Skip to content

Commit

Permalink
Merge branch 'staging-sierra' into virusology
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexanx authored Apr 12, 2024
2 parents d4ff916 + 238cbdc commit dd74966
Show file tree
Hide file tree
Showing 42 changed files with 712 additions and 195 deletions.
4 changes: 4 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
#include "code\__defines\zmimic.dm"
#include "code\__defines\dcs\flags.dm"
#include "code\__defines\dcs\helpers.dm"
#include "code\__defines\dcs\signals\signals_area.dm"
#include "code\__defines\dcs\signals\signals_atom.dm"
#include "code\__defines\dcs\signals\signals_atom_movable.dm"
#include "code\__defines\dcs\signals\signals_datum.dm"
Expand Down Expand Up @@ -3416,10 +3417,12 @@
#include "maps\sierra\loadout\loadout_documents.dm"
#include "mods\_modpack.dm"
#include "mods\global_modpacks.dm"
#include "mods\_master_files\code\_onclick\click.dm"
#include "mods\_master_files\code\game\world.dm"
#include "mods\_master_files\code\game\gamemodes\ert.dm"
#include "mods\_master_files\code\game\objects\effects\decals\contraband.dm"
#include "mods\_master_files\code\game\objects\structures\crates_lockers\closets\_closet_appearance_definitions.dm"
#include "mods\_master_files\code\modules\clothing\voidsuits.dm"
#include "mods\_master_files\code\modules\clothing\spacesuits\spacesuits.dm"
#include "mods\_master_files\code\modules\culture_descriptor\_culture.dm"
#include "mods\_master_files\code\modules\culture_descriptor\culture\cultures_adherent.dm"
Expand Down Expand Up @@ -3452,6 +3455,7 @@
#include "mods\_master_files\code\modules\mob\new_player\new_player.dm"
#include "mods\_master_files\code\modules\power\gravitygenerator.dm"
#include "mods\_master_files\code\modules\projectiles\projectile\bullets.dm"
#include "mods\_master_files\code\modules\species\station\adherent.dm"
#include "mods\_master_files\code\modules\sounds\connector.dm"
#include "mods\_master_files\code\modules\sounds\throw.dm"
#include "mods\_master_files\code\modules\species\station\machine.dm"
Expand Down
10 changes: 10 additions & 0 deletions code/__defines/dcs/signals/signals_area.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Main area signals. Format:
// When the signal is called: (signal arguments)
// All signals send the source datum of the signal as the first argument

///from base of /area/proc/power_change(): (area/apc_area)
#define COMSIG_AREA_POWER_CHANGE "area_apc_power_change"
///from base of /area/proc/set_apc(): (area/apc_area)
#define COMSIG_AREA_APC_ADDED "area_apc_added"
///from base of /area/proc/remove_apc(): (area/apc_area)
#define COMSIG_AREA_APC_REMOVED "area_apc_removed"
45 changes: 22 additions & 23 deletions code/controllers/subsystems/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,47 +44,46 @@ SUBSYSTEM_DEF(atoms)
return
atom_init_stage = INITIALIZATION_INNEW_MAPLOAD
var/list/mapload_arg = list(TRUE)
var/atom/atom
var/list/params
var/count = 0
var/time = Uptime()
if (!initialized)
for (atom in world)
if (!atom || atom.atom_flags & ATOM_FLAG_INITIALIZED)
continue
InitAtom(atom, mapload_arg)
if (++count % 1000)
if(!initialized)
for(var/atom/atom_to_initialize as anything in world)
if(!atom_to_initialize || atom_to_initialize.atom_flags & ATOM_FLAG_INITIALIZED)
continue
InitAtom(atom_to_initialize, mapload_arg)
count++
CHECK_TICK

var/init_queue_length = length(init_queue)
if (init_queue_length)
for (var/i = 1 to init_queue_length)
atom = init_queue[i]
if (!atom || atom.atom_flags & ATOM_FLAG_INITIALIZED)
if(init_queue_length)
for(var/i = 1 to init_queue_length)
var/atom/atom_to_initialize = init_queue[i]
if (!atom_to_initialize || atom_to_initialize.atom_flags & ATOM_FLAG_INITIALIZED)
continue
params = init_queue[atom]

var/list/params = init_queue[atom_to_initialize]
if (params)
InitAtom(atom, mapload_arg + params)
InitAtom(atom_to_initialize, mapload_arg + params)
else
InitAtom(atom, mapload_arg)
if (++count % 500)
continue
InitAtom(atom_to_initialize, mapload_arg)
count++
CHECK_TICK
init_queue.Cut(1, init_queue_length + 1)

time = max((Uptime() - time) * 0.1, 0.1)
report_progress("Initialized [count] atom\s in [time]s ([floor(count/time)]/s)")
atom_init_stage = INITIALIZATION_INNEW_REGULAR
var/late_queue_length = length(late_init_queue)
if (late_queue_length)
count = 0
time = Uptime()
for (var/i = 1 to late_queue_length)
atom = late_init_queue[i]
if (!atom)
continue
atom.LateInitialize(arglist(late_init_queue[atom]))
if (++count % 250)
for(var/i = 1 to late_queue_length)
var/atom/atom_to_late_init = late_init_queue[i]
if (!atom_to_late_init)
continue

atom_to_late_init.LateInitialize(arglist(late_init_queue[atom_to_late_init]))
count++
CHECK_TICK
late_init_queue.Cut(1, late_queue_length + 1)
time = max((Uptime() - time) * 0.1, 0.1)
Expand Down
4 changes: 4 additions & 0 deletions code/controllers/subsystems/garbage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,13 @@ SUBSYSTEM_DEF(garbage)
++details.qdels
switch (datum.gc_destroyed)
if (null)
if(SEND_SIGNAL(datum, COMSIG_PREQDELETED)) // Gives any signal listener a chance to prevent atom qdel
return

datum.gc_destroyed = GC_CURRENTLY_BEING_QDELETED
var/start_time = world.time
var/start_tick = world.tick_usage
SEND_SIGNAL(datum, COMSIG_QDELETING) // Leting signal listeners know, that datum is being qdeleted
var/hint = datum.Destroy()
if (world.time != start_time)
++details.slept_destroy
Expand Down
7 changes: 7 additions & 0 deletions code/controllers/subsystems/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ SUBSYSTEM_DEF(mapping)
var/list/away_sites_templates = list()
var/list/submaps = list()
var/list/submap_archetypes = list()
// [SIERRA-ADD]
var/list/patrol = list()
// [/SIERRA-ADD]


/datum/controller/subsystem/mapping/UpdateStat(time)
Expand Down Expand Up @@ -73,6 +76,10 @@ SUBSYSTEM_DEF(mapping)
space_ruins_templates[MT.name] = MT
else if(istype(MT, /datum/map_template/ruin/away_site))
away_sites_templates[MT.name] = MT
// [SIERRA-ADD]
if(MT.is_patrol == TRUE)
patrol[MT.name] = MT
// [/SIERRA-ADD]

/proc/generateMapList(filename)
RETURN_TYPE(/list)
Expand Down
Loading

0 comments on commit dd74966

Please sign in to comment.