Here is a usless example:
area
var
RandNum
proc
setup()
RandNum = rand(1,16)
New()
setup()
.=..()
Entered(var/atom/movable/M)
M << RandNum
This example works for areas created at runtime, but not for areas loaded from the .dmp file. My question, is how can I force my areas to call setup() as soon as they exist?
I would do something like this [see code below] but that always causes problems if you don't add a 'spawn(20).' Normally, this would be acceptable, but after 20 ticks a lot of mobs could already have been placed on the map without getting the RandNum displayed to them.
world
New()
..()
spawn(20)
for(var/area/A in contents)
A.setup()
So, is there a way to cause areas (or anything, for that matter) to execute a command as soon as they exist?