Level temperature
Allow setting a per-level "temperature": hot, cold, or temperate via special level flags. Currently it only affects some messages in Gehennom, but it could be expanded to ice melting, water freezing, or monster generation, for example. Invalidates saves and bones.
This commit is contained in:
@@ -3694,6 +3694,12 @@ lspo_level_flags(lua_State *L)
|
||||
gc.coder->allow_flips &= ~1;
|
||||
else if (!strcmpi(s, "noflip"))
|
||||
gc.coder->allow_flips = 0;
|
||||
else if (!strcmpi(s, "temperate"))
|
||||
gl.level.flags.temperature = 0;
|
||||
else if (!strcmpi(s, "hot"))
|
||||
gl.level.flags.temperature = 1;
|
||||
else if (!strcmpi(s, "cold"))
|
||||
gl.level.flags.temperature = -1;
|
||||
else {
|
||||
char buf[BUFSZ];
|
||||
Sprintf(buf, "Unknown level flag %s", s);
|
||||
@@ -6798,6 +6804,7 @@ sp_level_coder_init(void)
|
||||
(void) memset((genericptr_t) SpLev_Map, 0, sizeof SpLev_Map);
|
||||
|
||||
gl.level.flags.is_maze_lev = 0;
|
||||
gl.level.flags.temperature = In_hell(&u.uz) ? 1 : 0;
|
||||
|
||||
reset_xystart_size();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user