/tg/ Station 13 - Modules - TypesProc Details

world

Runs the game in "map test mode" Map test mode prevents common annoyances, such as rats from spawning and random light fixture breakage, so mappers can test important facets of their map (working powernet, atmos, good light coverage) without these interfering.

World

Two possibilities exist: either we are alone in the Universe or we are not. Both are equally terrifying. ~ Arthur C. Clarke

The byond world object stores some basic byond level config, and has a few hub specific procs for managing hub visiblity

Procs

ConfigLoadedRuns after config is loaded but before Master is initialized
GenesisWORLD INITIALIZATION THIS IS THE INIT ORDER:
InitTgsInitializes TGS and loads the returned revising info into GLOB.revdata
NewWorld creation
RunUnattendedFunctionsRuns after the call to Master.Initialize, but before the delay kicks in. Used to turn the world execution into some single function then exit
_THE GENESIS CALL
get_world_state_for_loggingReturns a list of data about the world state, don't clutter
increase_max_xHandles incresing the world's maxx var and intializing the new turfs and assigning them to the global area. If map_load_z_cutoff is passed in, it will only load turfs up to that z level, inclusive. This is because maploading will handle the turfs it loads itself.
jatum_deserializeAttempt to create a value from a JATUM JSON.
jatum_serializeAttempt to serialize a given value to the JATUM format.
push_usrMakes a call in the context of a different usr. Use sparingly
send_cross_commsSends a message to a given cross comms server by name (by name for security).
shelleoXXX AOO XXX AXX

Proc Details

ConfigLoaded

Runs after config is loaded but before Master is initialized

Genesis

WORLD INITIALIZATION THIS IS THE INIT ORDER:

BYOND =>

Now listen up because I want to make something clear: If something is not in this list it should almost definitely be handled by a subsystem Initialize()ing If whatever it is that needs doing doesn't fit in a subsystem you probably aren't trying hard enough tbhfam

GOT IT MEMORIZED?

Where to put init shit quick guide: If you need it to happen before the mc is created: world/Genesis. If you need it to happen last: world/New(), Otherwise, in a subsystem preinit or init. Subsystems can set an init priority.

THIS !!!SINGLE!!! PROC IS WHERE ANY FORM OF INIITIALIZATION THAT CAN'T BE PERFORMED IN SUBSYSTEMS OR WORLD/NEW IS DONE NOWHERE THE FUCK ELSE I DON'T CARE HOW MANY LAYERS OF DEBUG/PROFILE/TRACE WE HAVE, YOU JUST HAVE TO DEAL WITH THIS PROC EXISTING I'M NOT EVEN GOING TO TELL YOU WHERE IT'S CALLED FROM BECAUSE I'M DECLARING THAT FORBIDDEN KNOWLEDGE SO HELP ME GOD IF I FIND ABSTRACTION LAYERS OVER THIS!

InitTgs

Initializes TGS and loads the returned revising info into GLOB.revdata

New

World creation

Here is where a round itself is actually begun and setup.

Nothing happens until something moves. ~Albert Einstein

For clarity, this proc gets triggered later in the initialization pipeline, it is not the first thing to happen, as it might seem.

Initialization Pipeline: Global vars are new()'ed, (including config, glob, and the master controller will also new and preinit all subsystems when it gets new()ed) Compiled in maps are loaded (mainly centcom). all areas/turfs/objs/mobs(ATOMs) in these maps will be new()ed world/New() (You are here) Once world/New() returns, client's can connect. 1 second sleep Master Controller initialization. Subsystem initialization. Non-compiled-in maps are maploaded, all atoms are new()ed All atoms in both compiled and uncompiled maps are initialized()

RunUnattendedFunctions

Runs after the call to Master.Initialize, but before the delay kicks in. Used to turn the world execution into some single function then exit

_

THE GENESIS CALL

THE VERY FIRST LINE OF DM CODE TO EXECUTE Ong this must be done after !!!EVERYTHING!!! else NO IFS ANDS OR BUTS it's a hack, not an example of any sort, and DEFINITELY should NOT be emulated IT JUST HAS TO BE LAST!!!!!! If you want to do something in the initialization pipeline FIRST RTFM IN /code/game/world.dm AND THEN NEVER RETURN TO THIS PLACE

If you're still here, here's an explanation: BYOND loves to tell you about its loving spouse /global But it's actually having a sexy an affair with /static Specifically statics in procs Priority is given to these lines of code in REVERSE order of declaration in the .dme Which is why this file has a funky name So this is what we use to call world.Genesis() It's a nameless, no-op function, because it does absolutely nothing It exists to hold a static var which is initialized to null It's on /world to hide it from reflection Painful right? Good, now you share my suffering Please lock the door on your way out

get_world_state_for_logging

Returns a list of data about the world state, don't clutter

increase_max_x

Handles incresing the world's maxx var and intializing the new turfs and assigning them to the global area. If map_load_z_cutoff is passed in, it will only load turfs up to that z level, inclusive. This is because maploading will handle the turfs it loads itself.

jatum_deserialize

Attempt to create a value from a JATUM JSON.

jatum_serialize

Attempt to serialize a given value to the JATUM format.

push_usr

Makes a call in the context of a different usr. Use sparingly

send_cross_comms

Sends a message to a given cross comms server by name (by name for security).

shelleo

XXX AOO XXX AXX