Whitespace cleanup part 3. (#19897)

* Whitespace cleanup part 3.

* clean up mecha a lot, other review fixes
This commit is contained in:
warriorstar-orion
2022-12-27 11:00:39 -05:00
committed by GitHub
parent f86374a504
commit 066bd06e8d
81 changed files with 1049 additions and 939 deletions
+5 -4
View File
@@ -283,10 +283,11 @@ SUBSYSTEM_DEF(air)
/datum/controller/subsystem/air/proc/add_to_active(turf/simulated/T, blockchanges = 1)
if(!initialized)
/* it makes no sense to "activate" turfs before setup_allturfs is
called, as setup_allturfs would simply cull the list incorrectly.
only /turf/simulated/Initialize_Atmos() is blessed enough to
activate turfs during this phase of initialization, as it happens
post-cull and inlines the logic (perhaps incorrectly) */
* called, as setup_allturfs would simply cull the list incorrectly.
* only /turf/simulated/Initialize_Atmos() is blessed enough to
* activate turfs during this phase of initialization, as it happens
* post-cull and inlines the logic (perhaps incorrectly)
**/
return
if(istype(T) && T.air)
+2 -2
View File
@@ -7,7 +7,7 @@ SUBSYSTEM_DEF(events)
// Report events at the end of the rouund
var/report_at_round_end = 0
// UI vars
// UI vars
var/window_x = 700
var/window_y = 600
var/table_options = " align='center'"
@@ -16,7 +16,7 @@ SUBSYSTEM_DEF(events)
var/row_options2 = " width='260px'"
var/row_options3 = " width='150px'"
// Event vars
// Event vars
var/datum/event_container/selected_event_container = null
var/list/active_events = list()
var/list/finished_events = list()
+27 -27
View File
@@ -1,37 +1,37 @@
SUBSYSTEM_DEF(npcpool)
name = "NPC Pool"
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
priority = FIRE_PRIORITY_NPC
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
offline_implications = "Simple animals will no longer process. Shuttle call recommended."
name = "NPC Pool"
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
priority = FIRE_PRIORITY_NPC
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
offline_implications = "Simple animals will no longer process. Shuttle call recommended."
var/list/currentrun = list()
var/list/currentrun = list()
/datum/controller/subsystem/npcpool/get_stat_details()
return "SimpleAnimals: [length(GLOB.simple_animals[AI_ON])]"
return "SimpleAnimals: [length(GLOB.simple_animals[AI_ON])]"
/datum/controller/subsystem/npcpool/fire(resumed = FALSE)
if(!resumed)
var/list/activelist = GLOB.simple_animals[AI_ON]
src.currentrun = activelist.Copy()
if(!resumed)
var/list/activelist = GLOB.simple_animals[AI_ON]
src.currentrun = activelist.Copy()
var/list/currentrun = src.currentrun
var/list/currentrun = src.currentrun
while(currentrun.len)
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
--currentrun.len
if(!SA)
log_debug("npcpool encountered an invalid entry, resumed: [resumed], SA [SA], type of SA [SA?.type], null [SA == null], qdelled [QDELETED(SA)], SA in AI_ON list: [SA in GLOB.simple_animals[AI_ON]]")
GLOB.simple_animals[AI_ON] -= SA
continue
while(currentrun.len)
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
--currentrun.len
if(!SA)
log_debug("npcpool encountered an invalid entry, resumed: [resumed], SA [SA], type of SA [SA?.type], null [SA == null], qdelled [QDELETED(SA)], SA in AI_ON list: [SA in GLOB.simple_animals[AI_ON]]")
GLOB.simple_animals[AI_ON] -= SA
continue
if(!SA.ckey && !SA.notransform)
if(SA.stat != DEAD)
SA.handle_automated_movement()
if(SA.stat != DEAD)
SA.handle_automated_action()
if(SA.stat != DEAD)
SA.handle_automated_speech()
if(MC_TICK_CHECK)
return
if(!SA.ckey && !SA.notransform)
if(SA.stat != DEAD)
SA.handle_automated_movement()
if(SA.stat != DEAD)
SA.handle_automated_action()
if(SA.stat != DEAD)
SA.handle_automated_speech()
if(MC_TICK_CHECK)
return
@@ -1,9 +1,9 @@
GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets)
/datum/controller/subsystem/tickets/mentor_tickets/New()
NEW_SS_GLOBAL(SSmentor_tickets)
PreInit()
ss_id = "mentor_tickets"
NEW_SS_GLOBAL(SSmentor_tickets)
PreInit()
ss_id = "mentor_tickets"
/datum/controller/subsystem/tickets/mentor_tickets
name = "Mentor Tickets"
@@ -566,7 +566,7 @@ UI STUFF
* msg - The message being send
* alt - If an alternative prefix should be used or not. Defaults to TICKET_STAFF_MESSAGE_PREFIX
* important - If the message is important. If TRUE it will ignore the CHAT_NO_TICKETLOGS preferences,
send a sound and flash the window. Defaults to FALSE
* send a sound and flash the window. Defaults to FALSE
*/
/datum/controller/subsystem/tickets/proc/message_staff(msg, prefix_type = TICKET_STAFF_MESSAGE_PREFIX, important = FALSE)
switch(prefix_type)
+7 -7
View File
@@ -79,10 +79,10 @@ SUBSYSTEM_DEF(weather)
next_hit_by_zlevel["[z]"] = null
/datum/controller/subsystem/weather/proc/get_weather(z, area/active_area)
var/datum/weather/A
for(var/V in processing)
var/datum/weather/W = V
if((z in W.impacted_z_levels) && W.area_type == active_area)
A = W
break
return A
var/datum/weather/A
for(var/V in processing)
var/datum/weather/W = V
if((z in W.impacted_z_levels) && W.area_type == active_area)
A = W
break
return A