ID:138477
 
How would I test for something to check if another thing is overlapping it? (i.e. a mob standing in lava, fire burning a tree) On another note, could you make it so Dream Seeker saves the icon mode you specify? Its annoying having to keep going to the large icon format, I like the big window stuff.
How would I test for something to check if another thing is overlapping it? (i.e. a mob standing in lava, fire burning a tree)

In the case of lava, if you define lava as a turf, you could just override turf.Enter() to affect mobs when they enter the turf, and spawn a proc to check the mob every second or so--if the mob's loc is still the turf, it takes more damage, or whatever. When the mob's loc is no longer the turf, the proc stops spawning itself.

In the case of fire, the fire will probably need a self-perpetuating spawning proc to check what's going on. Then you could just do "for(myVar in loc)" to get a list of everything in the same turf as the fire, and affect each one as appropriate.

Here's what a self-perpetuating spawning proc would look like:

proc
KeepItUp()
if(someCondition)
DoSomething()
spawn(someDelay) KeepItUp()

The proc will keep running every "someDelay" ticks until "someCondition" is no longer true.
In response to Guy T.
In the case of fire, the fire will probably need a self-perpetuating spawning proc to check what's going on. Then you could just do "for(myVar in loc)" to get a list of everything in the same turf as the fire, and affect each one as appropriate.

Also, for fire, you'd probably want to start its maintenance proc as soon as the fire is created. For example:

obj
fire
New()
. = ..()
CheckForBurning()

proc
CheckForBurning()
var/currentItem
for(currentItem in loc)
if(istype(currentItem, /mob/player))
Damage(currentItem, 5) //or whatever... Damage() is not a built-in proc, just an example

if(prob(7))
//seven percent chance the fire will burn out
del src

spawn(10) CheckForBurning()

Now the CheckForBurning() proc will run every 10 ticks (1 second) for the fire's whole lifespan. In this case, the value of "src" in CFB() is the fire itself, and the rule is that a spawned proc will stop when its src is deleted. So as soon as the fire burns out, the proc will stop too.