dreamchecker (#8233)

Implements dreamchecker plus fixes all errors
This commit is contained in:
mikomyazaki
2020-02-16 20:42:32 +02:00
committed by GitHub
parent d08b2ab609
commit 6074224d00
122 changed files with 282 additions and 227 deletions
+1
View File
@@ -67,6 +67,7 @@
throw EXCEPTION("Subsystem [src]([type]) does not fire() but did not set the SS_NO_FIRE flag. Please add the SS_NO_FIRE flag to any subsystem that doesn't fire so it doesn't get added to the processing list and waste cpu.")
/datum/controller/subsystem/Destroy()
SHOULD_CALL_PARENT(FALSE)
dequeue()
can_fire = 0
flags |= SS_NO_FIRE
+1 -1
View File
@@ -8,7 +8,7 @@ var/datum/controller/subsystem/chemistry/SSchemistry
var/list/active_holders = list()
var/list/chemical_reactions
var/list/chemical_reactions_clean = list()
var/list/chemical_reagents
var/list/datum/reagent/chemical_reagents
var/tmp/list/processing_holders = list()
+14 -9
View File
@@ -41,9 +41,10 @@ var/datum/controller/subsystem/docs/SSdocs
/datum/controller/subsystem/docs/proc/pick_document()
var/subtotal = rand() * src.total_docs
for (var/doc in docs)
subtotal -= docs[doc].chance
var/datum/docs_document/dd = doc
subtotal -= dd.chance
if (subtotal <= 0)
return docs[doc]
return dd
return null
//Pick a document by one tag
@@ -52,9 +53,10 @@ var/datum/controller/subsystem/docs/SSdocs
return null
var/subtotal = rand() * src.total_by_tags[tag]
for (var/doc in docs_by_tags[tag])
subtotal -= docs_by_tags[tag][doc].chance
var/datum/docs_document/dd = doc
subtotal -= dd.chance
if (subtotal <= 0)
return docs_by_tags[tag][doc]
return dd
return null
//Pick a document by any tag from a list of tags. Weighted.
@@ -70,9 +72,10 @@ var/datum/controller/subsystem/docs/SSdocs
tag_sublist += docs_by_tags[t]
var/subtotal = total_chance * rand()
for(var/doc in tag_sublist)
subtotal -= tag_sublist[doc].chance
var/datum/docs_document/dd = doc
subtotal -= dd.chance
if(subtotal <= 0)
return tag_sublist[doc]
return dd
return null
//Pick a document by multiple tags that it must have.
@@ -86,13 +89,15 @@ var/datum/controller/subsystem/docs/SSdocs
tag_sublist &= docs_by_tags[t]
log_ss("docs", "Tag sublist has length [tag_sublist.len].")
var/subtotal = 0
for(var/datum/docs_document/dd in tag_sublist)
for(var/doc in tag_sublist)
var/datum/docs_document/dd = doc
subtotal += dd.chance
subtotal *= rand()
for (var/doc in tag_sublist)
subtotal -= tag_sublist[doc].chance
var/datum/docs_document/dd = doc
subtotal -= dd.chance
if (subtotal <= 0)
return tag_sublist[doc]
return tag_sublist[dd]
return null
/*
Loading Data
+1 -1
View File
@@ -244,9 +244,9 @@ var/datum/controller/subsystem/economy/SSeconomy
//gets a departmental account by name
/datum/controller/subsystem/economy/proc/get_department_account(var/department)
RETURN_TYPE(/datum/money_account)
if(department_accounts[department])
return department_accounts[department]
return
/**
* Logging functions
+2 -2
View File
@@ -62,7 +62,7 @@ var/datum/controller/subsystem/events/SSevents
return
while (pos <= EVENT_LEVEL_MAJOR)
var/list/datum/event_container/EC = event_containers[pos]
var/datum/event_container/EC = event_containers[pos]
EC.process()
pos++
@@ -88,7 +88,7 @@ var/datum/controller/subsystem/events/SSevents
log_debug("SSevents: Event '[EM.name]' has completed at [worldtime2text()].")
/datum/controller/subsystem/events/proc/delay_events(severity, delay)
var/list/datum/event_container/EC = event_containers[severity]
var/datum/event_container/EC = event_containers[severity]
EC.next_event_time += delay
/datum/controller/subsystem/events/proc/Interact(mob/living/user)
+1 -1
View File
@@ -4,7 +4,7 @@
name = "Ghost Roles"
flags = SS_NO_FIRE
var/list/spawnpoints = list() //List of the available spawnpoints by spawnpoint type
var/list/list/spawnpoints = list() //List of the available spawnpoints by spawnpoint type
// -> type 1 -> spawnpoint 1
// -> spawnpoint 2
@@ -17,7 +17,7 @@ var/datum/controller/subsystem/atlas/SSatlas
var/map_override // If set, SSatlas will forcibly load this map. If the map does not exist, mapload will fail and SSatlas will panic.
var/list/spawn_locations = list()
var/list/connected_z_cache = list()
var/list/list/connected_z_cache = list()
var/z_levels = 0 // Each bit represents a connection between adjacent levels. So the first bit means levels 1 and 2 are connected.
/datum/controller/subsystem/atlas/stat_entry()
+1 -1
View File
@@ -14,7 +14,7 @@
var/list/localized_fields
var/manifest_json
var/list/manifest
var/list/list/manifest
var/list/citizenships = list()
var/list/religions = list()
@@ -7,11 +7,11 @@
// MECHA
var/list/mechnetworks = list("remotemechs", "prisonmechs") // A list of all the networks a mech can possibly connect to
var/list/mechs = list() // A list of lists, containing the mechs and their networks
var/list/list/mechs = list() // A list of lists, containing the mechs and their networks
// IPC BODIES
var/list/robotnetworks = list("remoterobots", "bunkerrobots", "prisonrobots")
var/list/robots = list()
var/list/list/robots = list()
/datum/controller/subsystem/virtualreality/New()
NEW_SS_GLOBAL(SSvirtualreality)
@@ -100,11 +100,12 @@
continue
if(!R.pilots.len)
continue
if(R.pilots[1].client || R.pilots[1].ckey)
var/mob/living/mech_pilot = R.pilots[1]
if(mech_pilot.client || mech_pilot.ckey)
continue
if(R.pilots[1].stat == DEAD)
if(mech_pilot.stat == DEAD)
continue
mech[R.name] = R
mech[mech_pilot.name] = mech_pilot
if(mech.len == 1)
to_chat(user, span("warning", "No active remote mechs are available."))
+1 -1
View File
@@ -371,7 +371,7 @@ var/datum/controller/subsystem/vote/SSvote
if(!data)
. = list("choices" = list(), "mode" = 0, "voted" = 0)
data = . || data
if(choices.len != data["choices"].len)
if(choices.len != LAZYLEN(data["choices"]))
data["choices"] = list()
for(var/choice in choices)
VUEUI_SET_IFNOTSET(data["choices"][choice], deepCopyList(choices[choice]), ., data)
+11 -1
View File
@@ -268,7 +268,17 @@
sortTim(found_oo, /proc/cmp_planelayer)
for (var/thing in found_oo)
var/atom/A = thing
out += "<li>[A] ([A.type]) at plane [A.plane], layer [A.layer][istype(A, /atom/movable/openspace/overlay) ? ", Z-level [A:associated_atom.z]." : "."]</li>"
if (istype(A, /atom/movable/openspace/overlay))
var/atom/movable/openspace/overlay/OO = A
var/atom/movable/AA = OO.associated_atom
out += "<li>\icon[A] plane [A.plane], layer [A.layer], depth [OO.depth], associated Z-level [AA.z] - [OO.type] copying [AA] ([AA.type])</li>"
else if (isturf(A))
if (A == T)
out += "<li>\icon[A] plane [A.plane], layer [A.layer], Z-level [A.z] - [A] ([A.type]) - <font color='green'>SELF</font></li>"
else // foreign turfs - not visible here, but good for figuring out layering
out += "<li>\icon[A] plane [A.plane], layer [A.layer], Z-level [A.z] - [A] ([A.type]) - <font color='red'>FOREIGN</font></li>"
else
out += "<li>\icon[A] plane [A.plane], layer [A.layer], Z-level [A.z] - [A] ([A.type])</li>"
out += "</ul>"