On 8/26/07, Matthew Cline <matt@...> wrote:
[set_terrain_changed() vs dungeon_terrain_changed()]
> I'm not quite sure when you'd want to use one function as opposed to the
> other. Could anyone enlighten me?
dungeon_terrain_changed is badly named, it should really be called
change_dungeon_terrain. You can use dungeon_terrain_changed() to
safely make changes to terrain after initial map generation.
set_terrain_changed sets an env.map flag saying that the feature on
that square (which is out of LOS of the player) has been changed. This
is used to mark areas dug out by boring beetles outside LOS, and
monsters opening secret doors out of LOS. Grep for is_terrain_changed
to see where this information is used.
dungeon_terrain_changed should really call set_terrain_changed when it
changes features, but I don't think it does at the moment.