Skip to content

Commit

Permalink
Random Processing Reviews: Part 1 (#2962)
Browse files Browse the repository at this point in the history
* /obj/Destroy

* Actually does the long overdue TODO
* SA

* 2020-11-10 commit #1

Case #1:
/obj/item/tk_grab
- Unproblematic, fastprocess → icon_update; Do we really need this tho?
- Focus = null for safety
Case #2:
/obj/screen/alert/bloodsense/process()
- (will be repathed to /atom/movable/screen)
- SSprocessing → long-ass process()
    → GUI stuff; do we really need animate()?
- left unchanged
Case #3:
/obj/screen/alert/clockwork/clocksense/process()
- SSprocessing → short-ish process() → Basic desc
- (creation and removal is sane)
- Wrap-up: /obj/screen/alert/Destroy()
  * Removed duplicated `master = null`
  * Proper return ..() position on
    * /obj/screen/alert/clockwork/clocksense/Destroy() &
    * /obj/screen/alert/Destroy()
Case #4:
/datum/proc/process()
- automatic killer for aimless START_PROCESS
- obviously left unchanged
Case #5:
/datum/action/proc/Process()
- A proc to be overriden? Why?
- Removed; we already have /datum/proc/process()
Case #6:
/datum/action/cooldown/process()
- return PROCESS_KILL
Case #7:
/datum/action/item_action/chameleon/change/process()
- return PROCESS_KILL
Case #8:
/datum/forced_movement
- Looks alright
Case #9:
/datum/point/vector/processed
- Is this shit even used???
- Left as is since it might be used in the future
(inb4 staying unused til 2025)

* 2020-11-12

Case 10:
/datum/radiation_wave/process()
- Literally the centerpiece of radiation
- Each process step progresses radiation wave by one tile
  * … and the place it used be is then filled by subsequent wave
- Kat requested fix of tgstation/tgstation#42572
  * I will start working on it soon(tm)
- The code seems fine otherwise

Case 11:
/obj/effect/hallucination/simple/securitron
- Responsible for making securitron hallucination lifelike
- Too simple to review, IMO
- victim = null for safety

Case 12:
/datum/component/chasm/process()
- Responsible for “dropping” things every now and then, very greedily
- I am not going to refactor this obviously
- START_PROCESSING actually has sanity check,
   no problem with double START_PROCESSING
- return PROCESS_KILL

Case 13:
/datum/component/lockon_aiming/process()
- Responsible for keeping locks sane
- Looks sane, left as is

Case 14:
/datum/component/manual_blinking/process()
- Adminbus shit for now
- Responsible for warnings and damage
- Looks sane, left as is
- *Even checks for life and eye-ness of parent*

Case 15:
/datum/component/manual_breathing/process()
- Mostly ditto

Case 16:
/datum/component/mood/process()
- Responsible for sanity, nutrition, and hygiene’s miasma production
- NO MORE INFINITE SANITY AHHHHH

* 2020-11-18 Commit 1

Case 17:
/datum/component/nanites/process()
- Responsible for nanites.
- Is its own family; the /datum/nanite_program/proc/on_process()
  * Handles so much but only one on_process()
  * Things are generally good except some fuzzy cases where
    * Host is ded
    * Host is invalid as hell
    * etc etc
  * But I don’t care; LGTM

Case 18:
/datum/component/radioactive/process()
- Responsible for making irradiating objects irradiate
- THE GODDAMN prob(50)
  * wontfix
- We don’t need return PROCESS_KILL here since it qdels anyway
  * … and Destroy() shouldn’t meaninglessly STOP_PROCESSING

Case 19:
/datum/component/rot/process()
- Responsible for miasma production for whatever that rots
- For the love of god, write actual real Destroy()

Case 20:
/datum/component/rot/corpse/process()
- Special handling for corpse rots
- Seems good

Case 21:
/datum/component/spawner/process()
- Spawns mobs, yay
- stop_spawning(force) is in lieu of Destroy, mostly
  * Are we sure that the spawner never dies otherwise? I don’t know.

Case 22:
/datum/component/wet_floor/process()
- time_left_list doesn’t look sane; will investigate further
  * Nah, everything works as intended
  * I am not sure if we need bitflag and assoc list tortures

Case 23:
/datum/component/plumbing/process()
- return PROCESS_KILL
  * IMO it shouldn’t be reachable in the first place
  * Hey does this work well with GC? (probably yes)
- STOP_PROCESSING in disable() is alright

* Update code/game/objects/objs.dm

For clarity...! Parenthesis FTW

Co-authored-by: ike709 <ike709@users.noreply.github.com>

* 2020-11-21 Commit 1

Case 24:
/datum/component/plumbing/acclimator/process()
- Makes acclimator do nothing when empyting
- LGTM

Case 25:
/obj/structure/alien/flesh/node/process()
- Hey, it is that weird pink skin stuff
- Controls flesh expansion through expand()
- LGTM

Case 26:
/datum/element/earhealing/process()
- Only used by earmuffs
- I think we have enough tickchecks
- I should stop before looking at every CHECK_TICK usage and
  * just walk away AHHHHHHHHHHHHHH

Case 27:
/datum/status_effect/process()
- Responsible for qdeling status effects as needed
- LGTM

Case 28:
/datum/quirk/process()
- It too is its own family: on_process()
- /datum/quirk/jolly/on_process()
  * Sends positive mood event really really rarely:
  * once per avg. 2000 seconds, yet the mood effect only lasts 2 minutes
  * Seems a bit too rare for me, but now isn’t a time for that
- /datum/quirk/spiritual/on_process()
  * Actually really loops through every *living thing* nearby
  * ‘Holy people’ here is chaplain, inquisitor ERT chaplain & commander
  * … and people who used syndicate bible on themselves
  * From now on only real human can appear holy to spiritual people
  * Like, don’t be comforted by holy monkeys or roaches or something
- /datum/quirk/neet/on_process()
  * Checks hygiene for NEET stuff
  * I think I should start considering hygiene signals
- /datum/quirk/badback/on_process()
  * I want to replace this with signal but quirks aren’t components
  * So it gets to live
- /datum/quirk/blooddeficiency/on_process()
  * Just removes blood from the holder, oof
  * LGTM
- /datum/quirk/brainproblems/on_process()
  * Just damages brain over time
  * LGTM
- /datum/quirk/family_heirloom/on_process()
  * Constantly checks whether the holder has the heirloom
  * LGTM
- /datum/quirk/nyctophobia/on_process()
  * Oh boy can’t we just change the type of the quirk_holder?
  * Handles nyctophobia mood and makes nyctophboes walk in the dark (?!)
  * LGTM
- /datum/quirk/insanity/on_process()
  * Makes holder go mad when they have no mindbreaker toxin
  * Feels like madness() call is unnecessary
- /datum/quirk/social_anxiety/on_process()
  * Ah yes, the *thing*
  * Code is a l r i g h t , t r u s t m e
- /datum/quirk/junkie/on_process()
  * Piggybacks on addiction mechanics
  * Mostly just keeps persistent addiction going
  * LGTM
- /datum/quirk/junkie/smoker/on_process()
  * Picky smokers...
  * LGTM
- /datum/quirk/neat/on_process()
  * NEET, but… much less asocial
  * LGTM

* 2020-11-22 Commit 1

Case 29:
/area/process()
- OwO wats dis, Cyberboss?
- tgstation/tgstation#23566
- Saner placement of START_PROCESSING and STOP_PROCESSING

Case 30:
/datum/game_mode/process()
- Base proc for game_mode process()s
- Not that necessary but I am leaving this for doc
  * I should consider giving game mode process()s a new name
- We shouldn’t return; return value isn’t even used lmao

Case 31:
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/process()
- Responsible recharging the combat bananium shoes
- I think I can refactor this away but I am too lazy
  * TODO
- Don’t forget the Destroy()

Case 32:
/datum/game_mode/dynamic/process()
- I am not touching this since
  * people are tinkering with dynamic gamemode
  * and I don't like dynamemes
- LGTM(?) anyway

Case 33:
/obj/machinery/dominator/process()
- WHY ..()
- Breaking kills process anyway
- return PROCESS_KILL is actually more important for machines

Case 34:
/datum/game_mode/meteor/process()
- I'll tell you about the cursed thing about compile time optimizations
  * (var * 10 * 10) is *slower* than (var * (10 * 10))
- I have no idea why it looks like this, but I am leaving this
  * for posterity? Idk

Case 35:
/datum/game_mode/revolution/process()
- Culls unnecessary returns; let’s not confuse coders
- Removes != 0
- return values are a batshit. I need to take care of this…
  * in another PR, probably, soon-ish

Case 36:
/datum/game_mode/revolution/speedy/process()
- We don’t return

Case 37:
/obj/machinery/process()
- Automatic killer a la /datum/process
- The truth is, we don’t need this
  * Postmortem: This code is a ridiculous heap of legacy
  * This automatic killer is actually older(8 y/o)
    * ...than the killer at datum(5 y/o)
  * This thing should’ve been phased out 5 years ago
- Proper STOP_PROCESSING
- Guess it would be good to unify normal processing and SSmachines more

Postscript: I will Signal-lize badback quirk next commit

* 2020-11-24 Commit 1

Important:
- Bad back on_process won’t be signalized away since
  * there aren’t appropriate signals
  * and I don’t want to write another signal (COMSIG_MOB_EQUIP?)
    * …unless I somehow find a few other probable use cases
- porting tgstation/tgstation#51392 should be a different PR
- game_mode process() should be left alone

Case 38:
/obj/machinery/airlock_sensor/process()
- responsible for constant input of air info… like a good sensor
- DOES THIS GET TURNED OFF IN THE FIRST PLACE
- update_icon() on demand

Case 39:
/obj/machinery/advanced_airlock_controller/process()
- ..() in process() IS NOT A GOOD IDEA MOST OF THE TIME
  * In this case it kills the process, rendering this process moot
- BeeStation/BeeStation-Hornet#2059 ← how did this happen to Bee
- yogstation13/Yogstation#7906 ← the culprit
- Oh god oh fuck I am in pain why are doing this to me monster860
- Every time I review through a handful of cases to prepare a commit
  * I am subjected to a constant pain
- Trilemma ensues:
  * Keep doing this really slowly
  * Stop this shit right now
  * Be masochist
- This fix is going to create a tiny(?) bit of lag

Case 40:
/obj/machinery/computer/bank_machine/process()
- /obj/machinery/computer/process() is a whole new kind of weird shit
  * It is to be used to check whether it should run process() or not but
  * This proc doesn’t follow that lmao
- More and more I investigate the machine code
  * more and more I lose hope in humanity
- This process is responsible for siphoning process
- Early return for having no power; who didn’t think of this?

Okay, let’s wrap up this batshit:
- Currently, BROKEN flag is misused
  * The checks are all over the place
  * BROKENness prevents interaction whilst it still eats energy
  * Probably other shits will be dug up once I take a serious look
- Power consumption depends on process()
  * I am not joking they really do
  * So idle machines still get process()ed
  * And power consumption isn’t very well controlled in general
- The technical debt here is damn too high just kill me
- So things won’t be fixed in this PR
  * This PR then will focus on mis-codings on machinery process()s
  * FOR THE LOVE OF GIT STOP CALLING ..() EVERYWHERE AHHHHH

* 2020-11-25 Commit 1

Case 41:
/obj/machinery/bluespace_beacon/process()
- Responsible for… beacon?
- Plz keep icon updates sane
- The only thing that changes invisibility is hide()
  * and hide() obviously is sane
  * yet it always calls it
  * faded version isn't vital in the first place so I am doing this
  * See /obj/machinery/navbeacon code for more doc

Case 42:
/obj/machinery/cell_charger/process()
- Responsible for actual charging
- Problems in power usage and BROKEN check are present but,
  * as I said, I am not touching that now
- LGTM otherwise; update_icon here is necessary

Case 43:
/obj/machinery/clonepod/process()
- Responsible for cloning; oh god oh fuck
- Surprisingly LGTM

Case 44:
/obj/machinery/cryopod/process()
- Responsible for freezing people away (read: qdel)
- Proper Destroy()
- Otherwise LGTM

Case 45:
/obj/machinery/jukebox/process()
- Responsible playing and stopping music as needed
- Order of addition and removal can be reversed
  * so I am going to reduce the amount of list iteration
- return PROCESS_KILL
- SSobj bad, use SSmachines

Case 46:
/obj/machinery/jukebox/disco/process()
- Does the same as above except it also bops a lot
- LGTM

Case 47:
/obj/machinery/defibrillator_mount/process()
- Cell charger is 100%
  * I am not touching the balance here
- update_icon is sane and needed

Case 48:
/obj/machinery/dish_drive/process()
- Responsible for constant suction and occasional beaming
- Suction code doesn’t check for other nearby drives but I don’t care
- LGTM

Case 49:
/obj/machinery/droneDispenser/process()
- power_change code is duplicated
- Responsible for drone production; cycles through three modes
- Except the useless parent call, the code LGTM

Case 50:
/obj/machinery/fat_sucker/process()
- Responsible fat sucking and random trivia
- Oh boy powered() situation is a bit deranged
  * /obj/machinery/proc/power_change() handles NOPOWER flag nicely
    * ... and powered() isn’t to be used everywhere
  * But so many machinery codes to
  * Arghhh I will deal with this in a different PR
  * For now it’ll only be dealt with on process()
  * So this powered() will be is_operational()

* Simplifies meteor gamemode number

* Replaced lagacy with a shiny new comment

Co-authored-by: ike709 <ike709@users.noreply.github.com>
  • Loading branch information
2 people authored and AustationBot committed Dec 5, 2020
1 parent ef40876 commit 057c9e2
Show file tree
Hide file tree
Showing 32 changed files with 75 additions and 85 deletions.
5 changes: 2 additions & 3 deletions code/_onclick/hud/alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
START_PROCESSING(SSprocessing, src)

/atom/movable/screen/alert/clockwork/clocksense/Destroy()
. = ..()
STOP_PROCESSING(SSprocessing, src)
return ..()

/atom/movable/screen/alert/clockwork/clocksense/process()
var/datum/antagonist/servant_of_ratvar/servant_antagonist = is_servant_of_ratvar(owner)
Expand Down Expand Up @@ -666,8 +666,7 @@ so as to remain in compliance with the most up-to-date laws."
return usr.client.Click(master, location, control, params)

/atom/movable/screen/alert/Destroy()
. = ..()
severity = 0
master = null
owner = null
screen_loc = ""
return ..()
1 change: 1 addition & 0 deletions code/_onclick/telekinesis.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
START_PROCESSING(SSfastprocess, src)

/obj/item/tk_grab/Destroy()
focus = null
STOP_PROCESSING(SSfastprocess, src)
return ..()

Expand Down
1 change: 1 addition & 0 deletions code/controllers/subsystem/processing/processing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ SUBSYSTEM_DEF(processing)
if (MC_TICK_CHECK)
return

// Every aimless process should reach *here* and die; better not write another instakiller like this
/datum/proc/process()
set waitfor = 0
return PROCESS_KILL
7 changes: 2 additions & 5 deletions code/datums/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@
return FALSE
return TRUE

/datum/action/proc/Process()
return

/datum/action/proc/IsAvailable()
if(!owner)
return FALSE
Expand Down Expand Up @@ -640,12 +637,12 @@
/datum/action/cooldown/process()
if(!owner)
button.maptext = ""
STOP_PROCESSING(SSfastprocess, src)
return PROCESS_KILL
var/timeleft = max(next_use_time - world.time, 0)
if(timeleft == 0)
button.maptext = ""
UpdateButtonIcon()
STOP_PROCESSING(SSfastprocess, src)
return PROCESS_KILL
else
button.maptext = "<b>[round(timeleft/10, 0.1)]</b>"

Expand Down
1 change: 1 addition & 0 deletions code/datums/brain_damage/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,6 @@
to_chat(victim, "<span class='name'>[name]</span> exclaims, \"<span class='robotic'>Level 10 infraction alert!\"</span>")

/obj/effect/hallucination/simple/securitron/Destroy()
victim = null
STOP_PROCESSING(SSfastprocess,src)
return ..()
2 changes: 1 addition & 1 deletion code/datums/components/chasm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

/datum/component/chasm/process()
if (!drop_stuff())
STOP_PROCESSING(SSobj, src)
return PROCESS_KILL

/datum/component/chasm/proc/is_safe()
//if anything matching this typecache is found in the chasm, we don't drop things
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/mood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
if(6)
setSanity(sanity+0.2, maximum=SANITY_GREAT)
if(7)
setSanity(sanity+0.3, maximum=INFINITY)
setSanity(sanity+0.3, maximum=SANITY_GREAT)
if(8)
setSanity(sanity+0.4, maximum=SANITY_MAXIMUM)
if(9)
Expand Down
5 changes: 2 additions & 3 deletions code/datums/components/plumbing/_plumbing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
create_overlays()

/datum/component/plumbing/process()
if(!demand_connects || !reagents)
STOP_PROCESSING(SSfluids, src)
return
if(!demand_connects || !reagents) // This actually shouldn't happen, but better safe than sorry
return PROCESS_KILL
if(reagents.total_volume < reagents.maximum_volume)
for(var/D in GLOB.cardinals)
if(D & demand_connects)
Expand Down
1 change: 0 additions & 1 deletion code/datums/components/radioactive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@

if(strength < RAD_WAVE_MINIMUM)
qdel(src)
return PROCESS_KILL

/datum/component/radioactive/proc/glow_loop(atom/movable/master)
var/filter = master.get_filter("rad_glow")
Expand Down
4 changes: 4 additions & 0 deletions code/datums/components/rot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

START_PROCESSING(SSprocessing, src)

/datum/component/rot/Destroy()
STOP_PROCESSING(SSprocessing, src)
return ..()

/datum/component/rot/process()
var/atom/A = parent

Expand Down
2 changes: 1 addition & 1 deletion code/datums/elements/earhealing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
continue
ears.deaf = max(ears.deaf - 0.25, (ears.damage < ears.maxHealth ? 0 : 1)) // Do not clear deafness if our ears are too damaged
ears.damage = max(ears.damage - 0.025, 0)
CHECK_TICK
CHECK_TICK // Reviewer: yes I really am afraid of 1000 clones with earmuffs
4 changes: 2 additions & 2 deletions code/datums/traits/good.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@

/datum/quirk/spiritual/on_process()
var/comforted = FALSE
for(var/mob/living/L in oview(5, quirk_holder))
if(L.mind?.isholy && L.stat == CONSCIOUS)
for(var/mob/living/carbon/human/H in oview(5, quirk_holder))
if(H.mind?.isholy && H.stat == CONSCIOUS)
comforted = TRUE
break
if(comforted)
Expand Down
8 changes: 2 additions & 6 deletions code/datums/traits/negative.dm
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,7 @@
if(H.dna.species.id in list("shadow", "nightmare"))
return //we're tied with the dark, so we don't get scared of it; don't cleanse outright to avoid cheese
var/turf/T = get_turf(quirk_holder)
var/lums = T.get_lumcount()
if(lums <= 0.2)
if(T.get_lumcount() <= 0.2)
if(quirk_holder.m_intent == MOVE_INTENT_RUN)
to_chat(quirk_holder, "<span class='warning'>Easy, easy, take it slow... you're in the dark...</span>")
quirk_holder.toggle_move_intent()
Expand Down Expand Up @@ -424,10 +423,7 @@
quirk_holder.hallucination = 0
return
if(prob(2)) //we'll all be mad soon enough
madness()

/datum/quirk/insanity/proc/madness()
quirk_holder.hallucination += rand(10, 25)
quirk_holder.hallucination += rand(10, 25)

/datum/quirk/insanity/post_add() //I don't /think/ we'll need this but for newbies who think "roleplay as insane" = "license to kill" it's probably a good thing to have
if(!quirk_holder.mind || quirk_holder.mind.special_role)
Expand Down
9 changes: 4 additions & 5 deletions code/game/area/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ GLOBAL_LIST_EMPTY(teleportlocs)
/area/Destroy()
if(GLOB.areas_by_type[type] == src)
GLOB.areas_by_type[type] = null
STOP_PROCESSING(SSobj, src)
if(fire)
STOP_PROCESSING(SSobj, src)
return ..()

/**
Expand Down Expand Up @@ -323,6 +324,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if (!fire)
set_fire_alarm_effect()
ModifyFiredoors(FALSE)
START_PROCESSING(SSobj, src)
for(var/item in firealarms)
var/obj/machinery/firealarm/F = item
F.update_icon()
Expand All @@ -340,8 +342,6 @@ GLOBAL_LIST_EMPTY(teleportlocs)
var/datum/computer_file/program/alarm_monitor/p = item
p.triggerAlarm("Fire", src, cameras, source)

START_PROCESSING(SSobj, src)

/**
* Reset the firealarm alert for this area
*
Expand All @@ -354,6 +354,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if (fire)
unset_fire_alarm_effects()
ModifyFiredoors(TRUE)
STOP_PROCESSING(SSobj, src)
for(var/item in firealarms)
var/obj/machinery/firealarm/F = item
F.update_icon()
Expand All @@ -371,8 +372,6 @@ GLOBAL_LIST_EMPTY(teleportlocs)
var/datum/computer_file/program/alarm_monitor/p = item
p.cancelAlarm("Fire", src, source)

STOP_PROCESSING(SSobj, src)

/**
* If 100 ticks has elapsed, toggle all the firedoors closed again
*/
Expand Down
4 changes: 4 additions & 0 deletions code/game/gamemodes/clown_ops/clown_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
bananium.insert_amount_mat(max_recharge, /datum/material/bananium)
START_PROCESSING(SSobj, src)

/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()

/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/process()
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
var/bananium_amount = bananium.get_material_amount(/datum/material/bananium)
Expand Down
14 changes: 8 additions & 6 deletions code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -266,25 +266,27 @@
. = 1

sleep(rand(600,1800))
//somewhere between 1 and 3 minutes from now
if(!SSticker.IsRoundInProgress())
message_admins("Roundtype conversion cancelled, the game appears to have finished!")
round_converted = 0
return
//somewhere between 1 and 3 minutes from now
if(!CONFIG_GET(keyed_list/midround_antag)[SSticker.mode.config_tag])
round_converted = 0
return 1
return
for(var/mob/living/carbon/human/H in antag_candidates)
if(H.client)
replacementmode.make_antag_chance(H)
replacementmode.gamemode_ready = TRUE //Awful but we're not doing standard setup here.
round_converted = 2
message_admins("-- IMPORTANT: The roundtype has been converted to [replacementmode.name], antagonists may have been created! --")


///Called by the gameSSticker
/datum/game_mode/process()
return 0
/**
* ATTENTION:
* If you make some special process() for your gamemode,
* it'll be called by the SSticker, which ignores your
* return value.
*/

//For things that do not die easily
/datum/game_mode/proc/are_special_antags_dead()
Expand Down
4 changes: 1 addition & 3 deletions code/game/gamemodes/gangs/dominator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
gang = null
QDEL_NULL(spark_system)
QDEL_NULL(countdown)
STOP_PROCESSING(SSmachines, src)
return ..()

/obj/machinery/dominator/emp_act(severity)
Expand Down Expand Up @@ -81,7 +80,6 @@
to_chat(user, "<span class='danger'>System Integrity: [round((obj_integrity/max_integrity)*100,1)]%</span>")

/obj/machinery/dominator/process()
..()
if(gang && gang.domination_time != NOT_DOMINATING)
var/time_remaining = gang.domination_time_remaining()
if(time_remaining > 0)
Expand Down Expand Up @@ -111,7 +109,7 @@
SSticker.force_ending = TRUE

if(!.)
STOP_PROCESSING(SSmachines, src)
return PROCESS_KILL

/obj/machinery/dominator/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/meteor/meteor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
return

var/list/wavetype = GLOB.meteors_normal
var/meteorminutes = (world.time - SSticker.round_start_time - meteordelay) / 10 / 60
var/meteorminutes = (world.time - SSticker.round_start_time - meteordelay) / 600


if (prob(meteorminutes))
Expand Down
6 changes: 2 additions & 4 deletions code/game/gamemodes/revolution/revolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
if(!finished)
SSticker.mode.check_win()
check_counter = 0
return FALSE

//////////////////////////////////////
//Checks if the revs have won or not//
Expand All @@ -129,7 +128,6 @@
finished = 1
else if(check_heads_victory())
finished = 2
return

///////////////////////////////
//Checks if the round is over//
Expand All @@ -139,7 +137,7 @@
if(finished)
SSshuttle.clearHostileEnvironment(src)
return ..()
if(finished != 0 && end_when_heads_dead)
if(finished && end_when_heads_dead)
return TRUE
else
return ..()
Expand Down Expand Up @@ -212,7 +210,7 @@
return ..()

/datum/game_mode/revolution/speedy/process()
. = ..()
..()
if(check_counter == 0)
if (world.time > endtime && !fuckingdone)
fuckingdone = TRUE
Expand Down
9 changes: 2 additions & 7 deletions code/game/machinery/Beacon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@

// update the icon_state
/obj/machinery/bluespace_beacon/proc/updateicon()
var/state="floor_beacon"

if(invisibility)
icon_state = "[state]f"

icon_state = "floor_beaconf"
else
icon_state = "[state]"
icon_state = "floor_beacon"

/obj/machinery/bluespace_beacon/process()
if(!Beacon)
Expand All @@ -44,5 +41,3 @@
Beacon.invisibility = INVISIBILITY_MAXIMUM
else if (Beacon.loc != loc)
Beacon.forceMove(loc)

updateicon()
13 changes: 6 additions & 7 deletions code/game/machinery/_machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Class Procs:
circuit = new circuit
circuit.apply_default_parts(src)

// Machines with no process() will stop being processed on /datum/proc/process
if(!speed_process)
START_PROCESSING(SSmachines, src)
else
Expand All @@ -148,10 +149,11 @@ Class Procs:

/obj/machinery/Destroy()
GLOB.machines.Remove(src)
if(!speed_process)
STOP_PROCESSING(SSmachines, src)
else
STOP_PROCESSING(SSfastprocess, src)
if(datum_flags & DF_ISPROCESSING) // A sizeable portion of machines stops processing before qdel
if(!speed_process)
STOP_PROCESSING(SSmachines, src)
else
STOP_PROCESSING(SSfastprocess, src)
dropContents()
if(length(component_parts))
for(var/atom/A in component_parts)
Expand All @@ -162,9 +164,6 @@ Class Procs:
/obj/machinery/proc/locate_machinery()
return

/obj/machinery/process()//If you dont use process or power why are you here
return PROCESS_KILL

/obj/machinery/proc/process_atmos()//If you dont use process why are you here
return PROCESS_KILL

Expand Down
8 changes: 4 additions & 4 deletions code/game/machinery/airlock_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

var/datum/radio_frequency/radio_connection

var/on = TRUE
var/on = TRUE // Reviewer: I can't find any way to turn this thing off but it stays
var/alert = FALSE

/obj/machinery/airlock_sensor/incinerator_toxmix
Expand Down Expand Up @@ -138,7 +138,9 @@
if(on)
var/datum/gas_mixture/air_sample = return_air()
var/pressure = round(air_sample.return_pressure(),0.1)
alert = (pressure < ONE_ATMOSPHERE*0.8)
if((pressure < ONE_ATMOSPHERE*0.8) != alert)
alert = !alert
update_icon()

var/datum/signal/signal = new(list(
"tag" = id_tag,
Expand All @@ -148,8 +150,6 @@

radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)

update_icon()

/obj/machinery/airlock_sensor/proc/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
Expand Down
Loading

0 comments on commit 057c9e2

Please sign in to comment.