mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
demos config (#50615)
* demos config * safety * functional * cut lists on init
This commit is contained in:
@@ -96,6 +96,9 @@
|
||||
|
||||
/datum/config_entry/flag/log_shuttle // log shuttle related actions, ie shuttle computers, shuttle manipulator, emergency console
|
||||
|
||||
/// Whether demos are written, if not set demo SS never initializes
|
||||
/datum/config_entry/flag/demos_enabled
|
||||
|
||||
/datum/config_entry/flag/allow_admin_ooccolor // Allows admins with relevant permissions to have their own ooc colour
|
||||
|
||||
/datum/config_entry/flag/allow_admin_asaycolor //Allows admins with relevant permissions to have a personalized asay color
|
||||
|
||||
@@ -61,6 +61,14 @@ SUBSYSTEM_DEF(demo)
|
||||
last_chat_message = text
|
||||
|
||||
/datum/controller/subsystem/demo/Initialize()
|
||||
if(!CONFIG_GET(flag/demos_enabled))
|
||||
flags |= SS_NO_FIRE
|
||||
can_fire = FALSE
|
||||
marked_dirty.Cut()
|
||||
marked_new.Cut()
|
||||
marked_turfs.Cut()
|
||||
return ..()
|
||||
|
||||
WRITE_LOG_NO_FORMAT(GLOB.demo_log, "demo version 1\n") // increment this if you change the format
|
||||
if(GLOB.revdata)
|
||||
WRITE_LOG_NO_FORMAT(GLOB.demo_log, "commit [GLOB.revdata.originmastercommit || GLOB.revdata.commit]\n")
|
||||
@@ -394,11 +402,15 @@ SUBSYSTEM_DEF(demo)
|
||||
..(msg)
|
||||
|
||||
/datum/controller/subsystem/demo/proc/mark_turf(turf/T)
|
||||
if(!can_fire)
|
||||
return
|
||||
if(!isturf(T))
|
||||
return
|
||||
marked_turfs[T] = TRUE
|
||||
|
||||
/datum/controller/subsystem/demo/proc/mark_new(atom/movable/M)
|
||||
if(!can_fire)
|
||||
return
|
||||
if(!isobj(M) && !ismob(M))
|
||||
return
|
||||
if(M.gc_destroyed)
|
||||
@@ -409,6 +421,8 @@ SUBSYSTEM_DEF(demo)
|
||||
|
||||
// I can't wait for when TG ports this and they make this a #define macro.
|
||||
/datum/controller/subsystem/demo/proc/mark_dirty(atom/movable/M)
|
||||
if(!can_fire)
|
||||
return
|
||||
if(!isobj(M) && !ismob(M))
|
||||
return
|
||||
if(M.gc_destroyed)
|
||||
@@ -417,6 +431,8 @@ SUBSYSTEM_DEF(demo)
|
||||
marked_dirty[M] = TRUE
|
||||
|
||||
/datum/controller/subsystem/demo/proc/mark_destroyed(atom/movable/M)
|
||||
if(!can_fire)
|
||||
return
|
||||
if(!isobj(M) && !ismob(M))
|
||||
return
|
||||
if(marked_new[M])
|
||||
|
||||
Reference in New Issue
Block a user