summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_dgn.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/l_dgn.cc')
-rw-r--r--crawl-ref/source/l_dgn.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/crawl-ref/source/l_dgn.cc b/crawl-ref/source/l_dgn.cc
index 99035d37f0..dddb216da4 100644
--- a/crawl-ref/source/l_dgn.cc
+++ b/crawl-ref/source/l_dgn.cc
@@ -1173,14 +1173,16 @@ static int lua_cloud_pow_rolls;
static int make_a_lua_cloud(coord_def where, int garbage, int spread_rate,
cloud_type ctype, kill_category whose,
- killer_type killer)
+ killer_type killer, int colour, std::string name,
+ std::string tile)
{
UNUSED( garbage );
const int pow = random_range(lua_cloud_pow_min,
lua_cloud_pow_max,
lua_cloud_pow_rolls);
- place_cloud( ctype, where, pow, whose, killer, spread_rate );
+ place_cloud( ctype, where, pow, whose, killer, spread_rate, colour, name,
+ tile );
return 1;
}
@@ -1200,6 +1202,10 @@ static int dgn_apply_area_cloud(lua_State *ls)
const int spread_rate = lua_isnumber(ls, 9) ? luaL_checkint(ls, 9) : -1;
+ const int colour = lua_isstring(ls, 10) ? str_to_colour(luaL_checkstring(ls, 10)) : -1;
+ std::string name = lua_isstring(ls, 11) ? luaL_checkstring(ls, 11) : "";
+ std::string tile = lua_isstring(ls, 12) ? luaL_checkstring(ls, 12) : "";
+
if (!in_bounds(x, y))
{
char buf[80];
@@ -1265,7 +1271,7 @@ static int dgn_apply_area_cloud(lua_State *ls)
apply_area_cloud(make_a_lua_cloud, coord_def(x, y), 0, size,
ctype, kc, cloud_struct::whose_to_killer(kc),
- spread_rate);
+ spread_rate, colour, name, tile);
return (0);
}
@@ -1282,6 +1288,10 @@ static int dgn_place_cloud(lua_State *ls)
const int spread_rate = lua_isnumber(ls, 6) ? luaL_checkint(ls, 6) : -1;
+ const int colour = lua_isstring(ls, 7) ? str_to_colour(luaL_checkstring(ls, 7)) : -1;
+ std::string name = lua_isstring(ls, 8) ? luaL_checkstring(ls, 8) : "";
+ std::string tile = lua_isstring(ls, 9) ? luaL_checkstring(ls, 9) : "";
+
if (!in_bounds(x, y))
{
char buf[80];
@@ -1315,7 +1325,7 @@ static int dgn_place_cloud(lua_State *ls)
return (0);
}
- place_cloud(ctype, coord_def(x, y), cl_range, kc, spread_rate);
+ place_cloud(ctype, coord_def(x, y), cl_range, kc, spread_rate, colour, name, tile);
return (0);
}