From 5ccda49a29180717d4abdc7a8ddec8a7df1f0961 Mon Sep 17 00:00:00 2001 From: oranges Date: Mon, 16 Sep 2019 16:44:42 +1200 Subject: [PATCH] Document the world (#46495) --- code/controllers/master.dm | 1 + code/game/world.dm | 20 +++++++++++++++++--- code/world.dm | 9 +++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/code/controllers/master.dm b/code/controllers/master.dm index 5beab69ad4..c4c9b07520 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -8,6 +8,7 @@ **/ //This is the ABSOLUTE ONLY THING that should init globally like this +//2019 update: the failsafe,config and Global controllers also do it GLOBAL_REAL(Master, /datum/controller/master) = new //THIS IS THE INIT ORDER diff --git a/code/game/world.dm b/code/game/world.dm index 05ee9f5d86..bd6d64e1eb 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -2,8 +2,22 @@ GLOBAL_VAR(restart_counter) -//This happens after the Master subsystem new(s) (it's a global datum) -//So subsystems globals exist, but are not initialised +/** + * World creation + * + * Here is where a round itself is actually begun and setup, lots of important config changes happen here + * * db connection setup + * * config loaded from files + * * loads admins + * * Sets up the dynamic menu system + * * and most importantly, calls initialize on the master subsystem, starting the game loop that causes the rest of the game to begin processing and setting up + * + * Note this happens after the Master subsystem is created (as that is a global datum), this means all the subsystems exist, + * but they have not been Initialized at this point, only their New proc has run + * + * Nothing happens until something moves. ~Albert Einstein + * + */ /world/New() log_world("World loaded at [time_stamp()]!") @@ -329,4 +343,4 @@ GLOBAL_VAR(restart_counter) /world/proc/on_tickrate_change() - SStimer?.reset_buckets() \ No newline at end of file + SStimer?.reset_buckets() diff --git a/code/world.dm b/code/world.dm index 65d1e87680..691a9263bf 100644 --- a/code/world.dm +++ b/code/world.dm @@ -1,6 +1,15 @@ //This file is just for the necessary /world definition //Try looking in game/world.dm +/** + * # 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 + * + * The world /New() is the root of where a round itself begins + */ /world mob = /mob/dead/new_player turf = /turf/open/space/basic