[MIRROR] Linter Introduction + Cleanup

This commit is contained in:
Chompstation Bot
2021-05-27 16:31:50 +00:00
parent bbafe17f3b
commit 20e3b0a2d3
244 changed files with 4808 additions and 1461 deletions

View File

@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(chat)
priority = FIRE_PRIORITY_CHAT
init_order = INIT_ORDER_CHAT
var/list/msg_queue = list()
var/list/list/msg_queue = list() //List of lists
/datum/controller/subsystem/chat/Initialize(timeofday)
init_vchat()

View File

@@ -38,7 +38,7 @@ SUBSYSTEM_DEF(events)
return
for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
var/list/datum/event_container/EC = event_containers[i]
var/datum/event_container/EC = event_containers[i]
EC.process()
/datum/controller/subsystem/events/stat_entry()

View File

@@ -32,6 +32,10 @@ SUBSYSTEM_DEF(persistence)
if(!A || (A.flags & AREA_FLAG_IS_NOT_PERSISTENT))
return
// if((!T.z in GLOB.using_map.station_levels) || !initialized)
if(!(T.z in using_map.station_levels))
return
if(!(T.z in using_map.persist_levels))
return
@@ -57,4 +61,4 @@ SUBSYSTEM_DEF(persistence)
dat += "</table>"
var/datum/browser/popup = new(user, "admin_persistence", "Persistence Data")
popup.set_content(jointext(dat, null))
popup.open()
popup.open()

View File

@@ -33,7 +33,7 @@ SUBSYSTEM_DEF(planets)
z_to_planet[Z] = NP
// DO NOT CALL THIS DIRECTLY UNLESS IT'S IN INITIALIZE,
// USE turf/simulated/proc/make_indoors() and\
// USE turf/simulated/proc/make_indoors() and
// tyrf/simulated/proc/make_outdoors()
/datum/controller/subsystem/planets/proc/addTurf(var/turf/T)
if(z_to_planet.len >= T.z && z_to_planet[T.z])

View File

@@ -314,7 +314,7 @@ var/global/datum/controller/subsystem/ticker/ticker
switch(M.z)
if(0) //inside a crate or something
var/turf/T = get_turf(M)
if(T && T.z in using_map.station_levels) //we don't use M.death(0) because it calls a for(/mob) loop and
if(T && (T.z in using_map.station_levels)) //we don't use M.death(0) because it calls a for(/mob) loop and
M.health = 0
M.set_stat(DEAD)
if(1) //on a z-level 1 turf.

View File

@@ -159,8 +159,7 @@ SUBSYSTEM_DEF(timer)
if (timer.timeToRun < head_offset)
bucket_resolution = null //force bucket recreation
CRASH("[i] Invalid timer state: Timer in long run queue with a time to run less then head_offset. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
crash_with("[i] Invalid timer state: Timer in long run queue with a time to run less then head_offset. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
if (timer.callBack && !timer.spent)
timer.callBack.InvokeAsync()
spent += timer
@@ -171,7 +170,7 @@ SUBSYSTEM_DEF(timer)
if (timer.timeToRun < head_offset + TICKS2DS(practical_offset-1))
bucket_resolution = null //force bucket recreation
CRASH("[i] Invalid timer state: Timer in long run queue that would require a backtrack to transfer to short run queue. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
crash_with("[i] Invalid timer state: Timer in long run queue that would require a backtrack to transfer to short run queue. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
if (timer.callBack && !timer.spent)
timer.callBack.InvokeAsync()
spent += timer

View File

@@ -22,10 +22,10 @@ SUBSYSTEM_DEF(transcore)
var/cost_backups = 0
var/cost_implants = 0
var/datum/transhuman/mind_record/list/backed_up = list() // All known mind records, indexed by MR.mindname/mind.name
var/datum/transhuman/mind_record/list/has_left = list() // Why do we even have this?
var/datum/transhuman/body_record/list/body_scans = list() // All known body records, indexed by BR.mydna.name
var/obj/item/weapon/implant/backup/list/implants = list() // All OPERATING implants that are being ticked
var/list/datum/transhuman/mind_record/backed_up = list() // All known mind records, indexed by MR.mindname/mind.name
var/list/datum/transhuman/mind_record/has_left = list() // Why do we even have this?
var/list/datum/transhuman/body_record/body_scans = list() // All known body records, indexed by BR.mydna.name
var/list/obj/item/weapon/implant/backup/implants = list() // All OPERATING implants that are being ticked
var/list/current_run = list()
@@ -115,14 +115,14 @@ SUBSYSTEM_DEF(transcore)
/datum/controller/subsystem/transcore/Recover()
if (istype(SStranscore.body_scans))
for(var/N in SStranscore.body_scans[N])
if(N) body_scans[N] = SStranscore.body_scans[N]
for(var/N in SStranscore.body_scans)
if(N && SStranscore.body_scans[N]) body_scans[N] = SStranscore.body_scans[N]
if(SStranscore.core_dumped)
core_dumped = TRUE
can_fire = FALSE
else if (istype(SStranscore.backed_up))
for(var/N in SStranscore.backed_up[N])
if(N) backed_up[N] = SStranscore.backed_up[N]
for(var/N in SStranscore.backed_up)
if(N && SStranscore.backed_up[N]) backed_up[N] = SStranscore.backed_up[N]
/datum/controller/subsystem/transcore/proc/m_backup(var/datum/mind/mind, var/obj/item/device/nif/nif, var/one_time = FALSE)
ASSERT(mind)

View File

@@ -31,7 +31,7 @@ SUBSYSTEM_DEF(xenoarch)
/datum/controller/subsystem/xenoarch/proc/SetupXenoarch()
for(var/turf/simulated/mineral/M in world)
if(!M.density || M.z in using_map.xenoarch_exempt_levels)
if(!M.density || (M.z in using_map.xenoarch_exempt_levels))
continue
if(isnull(M.geologic_data))