summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/cloud.h
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2011-11-02 12:37:38 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2011-11-02 12:42:33 +1000
commitad0ae35fa24fb02e0c9adc147b790b1b348414a7 (patch)
tree9d5410ced0438c640b67b5beca483de769e09d26 /crawl-ref/source/cloud.h
parent3f11d06fc561fc0b134012a40c3714710a910710 (diff)
downloadcrawl-ref-ad0ae35fa24fb02e0c9adc147b790b1b348414a7.tar.gz
crawl-ref-ad0ae35fa24fb02e0c9adc147b790b1b348414a7.zip
Allow specification of cloud exclusion radius, also via Lua; cloud traps.
All new clouds are created with an exclusion radius of -1, which means that they will not create an exclusion. That's the default, and is what is provided to all functions which create clouds. Specifying any non -1 value will result in the coud not being considered "temporary", and view.cc will create an exclusion for that cloud. By default, the excluson radius of damaging clouds created by vaults is 1 (set by lm_fog.lua). You can specify any radius that you'd like, and it'll use that. For steam clouds, it will change the radius to zero if the radius is at the default 1; otherwise, it will use whatever radius to have specified. This might have some unwanted effects: any clouds which are loaded from an old save file will all be considered temporary, so until they properly decay, they won't be considered for exclusion. This will be tempoary until the next wave of clouds is created. Finally, this fixes cloud traps: they'll no longer create exclusions. Hooray!
Diffstat (limited to 'crawl-ref/source/cloud.h')
-rw-r--r--crawl-ref/source/cloud.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/cloud.h b/crawl-ref/source/cloud.h
index 09fc1fbe44..841ef17533 100644
--- a/crawl-ref/source/cloud.h
+++ b/crawl-ref/source/cloud.h
@@ -22,11 +22,12 @@ void swap_clouds(coord_def p1, coord_def p2);
void check_place_cloud(cloud_type cl_type, const coord_def& p, int lifetime,
const actor *agent, int spread_rate = -1,
int colour = -1,
- std::string name = "", std::string tile = "");
+ std::string name = "", std::string tile = "",
+ int excl_rad = -1);
void place_cloud(cloud_type cl_type, const coord_def& ctarget,
int cl_range, const actor *agent,
int spread_rate = -1, int colour = -1, std::string name = "",
- std::string tile = "");
+ std::string tile = "", int excl_rad = -1);
void manage_clouds(void);