ID:150603
 
Is there a way to expand an area at runtime? For instance, I might have an outside area that is effected by weather and daylight and an inside area that is not. If someone builds a house in the wilderness, the turfs within the house are now inside areas. I've been wondering over this all morning, but can't seem to think of a way to do it.
Is there a way to expand an area at runtime? For instance, I might have an outside area that is effected by weather and daylight and an inside area that is not. If someone builds a house in the wilderness, the turfs within the house are now inside areas. I've been wondering over this all morning, but can't seem to think of a way to do it.

I believe you could do this by setting turfs' loc vars to equal the area you want to expand, e.g.:

turf/proc/MakeEvil()
loc = locate(/area/evil)
In response to Gughunter
Gughunter wrote:
Is there a way to expand an area at runtime? For instance, I might have an outside area that is effected by weather and daylight and an inside area that is not. If someone builds a house in the wilderness, the turfs within the house are now inside areas. I've been wondering over this all morning, but can't seem to think of a way to do it.

I believe you could do this by setting turfs' loc vars to equal the area you want to expand, e.g.:

turf/proc/MakeEvil()
loc = locate(/area/evil)

Turf loc values are constant. :(
In response to Shadowdarke
Shadowdarke wrote:
Gughunter wrote:
Is there a way to expand an area at runtime? For instance, I might have an outside area that is effected by weather and daylight and an inside area that is not. If someone builds a house in the wilderness, the turfs within the house are now inside areas. I've been wondering over this all morning, but can't seem to think of a way to do it.

I believe you could do this by setting turfs' loc vars to equal the area you want to expand, e.g.:

turf/proc/MakeEvil()
loc = locate(/area/evil)

Turf loc values are constant. :(

You inspired me Guy :)

Even though I couldn't alter the turf loc variables, I can alter the contents list for both of the areas. It works perfectly now.

Thanks :)
In response to Shadowdarke
Even though I couldn't alter the turf loc variables, I can alter the contents list for both of the areas. It works perfectly now.

Ah! Good work. I'll have to remember that one!