[MIRROR] Fixes runtimes (#11421)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-08-15 12:54:38 -07:00
committed by GitHub
parent 1394e54c33
commit ece6e8b28a
9 changed files with 42 additions and 42 deletions

View File

@@ -123,7 +123,8 @@
for(var/obj/effect/abstract/dark_maw/dm as anything in active_dark_maws) //if the component gets destroyed so does your precious maws
if(!QDELETED(dm))
qdel(dm)
owner.shadekin_display.invisibility = INVISIBILITY_ABSTRACT //hide it
if(owner.shadekin_display)
owner.shadekin_display.invisibility = INVISIBILITY_ABSTRACT //hide it
replace_shadekin_master()
active_dark_maws.Cut()
shadekin_abilities.Cut()

View File

@@ -292,8 +292,9 @@
if(H.should_have_organ(O_BRAIN))
if(!brain)
return "buzzes, \"Resuscitation failed - Patient lacks a brain. Further attempts futile without replacement.\""
if(brain.defib_timer <= 0)
return "buzzes, \"Resuscitation failed - Patient's brain has naturally degraded past a recoverable state. Further attempts futile.\""
else if(istype(brain, /obj/item/organ/internal/brain)) //Some species have weird 'brains' that aren't technically brains. Those don't have defib timers.
if(brain.defib_timer <= 0)
return "buzzes, \"Resuscitation failed - Patient's brain has naturally degraded past a recoverable state. Further attempts futile.\""
H.updatehealth()

View File

@@ -152,20 +152,20 @@
if(anchored && !reinf_material)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now disassembling the girder..."))
if(do_after(user,(35 + round(max_health/50)) * W.toolspeed))
if(do_after(user,(35 + round(max_health/50)) * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
if(!src) return
to_chat(user, span_notice("You dissasembled the girder!"))
dismantle()
else if(!anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now securing the girder..."))
if(do_after(user, 40 * W.toolspeed, src))
if(do_after(user, 40 * W.toolspeed, src, exclusive = TASK_USER_EXCLUSIVE))
to_chat(user, span_notice("You secured the girder!"))
reset_girder()
else if(istype(W, /obj/item/pickaxe/plasmacutter))
to_chat(user, span_notice("Now slicing apart the girder..."))
if(do_after(user,30 * W.toolspeed))
if(do_after(user,30 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
if(!src) return
to_chat(user, span_notice("You slice apart the girder!"))
dismantle()
@@ -178,7 +178,7 @@
if(state == 2)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now unsecuring support struts..."))
if(do_after(user,40 * W.toolspeed))
if(do_after(user,40 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
if(!src) return
to_chat(user, span_notice("You unsecured the support struts!"))
state = 1
@@ -190,7 +190,7 @@
else if(W.has_tool_quality(TOOL_WIRECUTTER) && state == 1)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now removing support struts..."))
if(do_after(user,40 * W.toolspeed))
if(do_after(user,40 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
if(!src) return
to_chat(user, span_notice("You removed the support struts!"))
reinf_material.place_dismantled_product(get_turf(src))
@@ -200,7 +200,7 @@
else if(W.has_tool_quality(TOOL_CROWBAR) && state == 0 && anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now dislodging the girder..."))
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
if(!src) return
to_chat(user, span_notice("You dislodged the girder!"))
displace()
@@ -251,7 +251,7 @@
to_chat(user, span_notice("You begin adding the plating..."))
if(!do_after(user,time_to_reinforce) || !S.use(amount_to_use))
if(!do_after(user,time_to_reinforce, exclusive = TASK_USER_EXCLUSIVE) || !S.use(amount_to_use))
return TRUE //once we've gotten this far don't call parent attackby()
if(anchored)
@@ -285,7 +285,7 @@
return 0
to_chat(user, span_notice("Now reinforcing..."))
if (!do_after(user,40) || !S.use(1))
if (!do_after(user,40, exclusive = TASK_USER_EXCLUSIVE) || !S.use(1))
return 1 //don't call parent attackby() past this point
to_chat(user, span_notice("You added reinforcement!"))
@@ -351,13 +351,13 @@
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now disassembling the girder..."))
if(do_after(user,40 * W.toolspeed))
if(do_after(user,40 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
to_chat(user, span_notice("You dissasembled the girder!"))
dismantle()
else if(istype(W, /obj/item/pickaxe/plasmacutter))
to_chat(user, span_notice("Now slicing apart the girder..."))
if(do_after(user,30 * W.toolspeed))
if(do_after(user,30 * W.toolspeed, exclusive = TASK_USER_EXCLUSIVE))
to_chat(user, span_notice("You slice apart the girder!"))
dismantle()

View File

@@ -120,7 +120,7 @@
if(is_antagish && antag_info_temp)
. += span_details("🏴‍☠️ | Antag Information", antag_info_temp)
var/list/interaction_info = A.get_description_interaction()
if(interaction_info.len > 0)
if(LAZYLEN(interaction_info))
var/temp = ""
for(var/a in interaction_info)
temp += a + "\n"

View File

@@ -47,10 +47,10 @@
if(seed.chems)
for(var/rid in seed.chems)
var/list/reagent_data = seed.chems[rid]
if(reagent_data && reagent_data.len)
if(reagent_data && LAZYLEN(reagent_data))
var/rtotal = reagent_data[1]
var/list/data = list()
if(reagent_data.len > 1 && potency > 0)
if(LAZYLEN(reagent_data) > 1 && potency > 0)
rtotal += round(potency/reagent_data[2])
if(rid == REAGENT_ID_NUTRIMENT)
data[seed.seed_name] = max(1,rtotal)

View File

@@ -44,7 +44,7 @@
seed_name = "plump helmet"
display_name = "plump helmet mushrooms"
mutants = list("walkingmushroom",PLANT_TOWERCAP)
chems = list(REAGENT_ID_NUTRIMENT = list(5,10), REAGENT_ID_FUNGI = 1)
chems = list(REAGENT_ID_NUTRIMENT = list(5,10), REAGENT_ID_FUNGI = list(1,5))
kitchen_tag = PLANT_PLUMPHELMET
/datum/seed/mushroom/plump/New()

View File

@@ -150,11 +150,11 @@
if(amount > 0)
for(var/datum/modifier/M in modifiers)
if(!isnull(M.incoming_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*amount)
amount *= M.incoming_damage_percent
if(!isnull(M.incoming_brute_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*amount)
amount *= M.incoming_brute_damage_percent
if(nif && nif.flag_check(NIF_C_BRUTEARMOR,NIF_FLAGS_COMBAT)){amount *= 0.7} //VOREStation Edit - NIF mod for damage resistance for this type of damage
@@ -172,11 +172,11 @@
if(amount > 0)
for(var/datum/modifier/M in modifiers)
if(!isnull(M.incoming_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*amount)
amount *= M.incoming_damage_percent
if(!isnull(M.incoming_fire_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*amount)
amount *= M.incoming_fire_damage_percent
if(nif && nif.flag_check(NIF_C_BURNARMOR,NIF_FLAGS_COMBAT)){amount *= 0.7} //VOREStation Edit - NIF mod for damage resistance for this type of damage
@@ -196,11 +196,11 @@
if(amount > 0)
for(var/datum/modifier/M in modifiers)
if(!isnull(M.incoming_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*amount)
amount *= M.incoming_damage_percent
if(!isnull(M.incoming_brute_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*amount)
amount *= M.incoming_brute_damage_percent
if(nif && nif.flag_check(NIF_C_BRUTEARMOR,NIF_FLAGS_COMBAT)){amount *= 0.7} //VOREStation Edit - NIF mod for damage resistance for this type of damage
@@ -222,11 +222,11 @@
if(amount > 0)
for(var/datum/modifier/M in modifiers)
if(!isnull(M.incoming_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*amount)
amount *= M.incoming_damage_percent
if(!isnull(M.incoming_fire_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*amount)
amount *= M.incoming_fire_damage_percent
if(nif && nif.flag_check(NIF_C_BURNARMOR,NIF_FLAGS_COMBAT)){amount *= 0.7} //VOREStation Edit - NIF mod for damage resistance for this type of damage
@@ -548,37 +548,37 @@ This function restores all organs.
for(var/datum/modifier/M in modifiers) //MODIFIER STUFF. It's best to do this RIGHT before armor is calculated, so it's done here! This is the 'forcefield' defence.
if(damagetype == BRUTE && (!isnull(M.effective_brute_resistance)))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost * damage)
damage = damage * M.effective_brute_resistance
continue
if((damagetype == BURN || damagetype == ELECTROCUTE) && (!isnull(M.effective_fire_resistance)))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost * damage)
damage = damage * M.effective_fire_resistance
continue
if(damagetype == TOX && (!isnull(M.effective_tox_resistance)))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost * damage)
damage = damage * M.effective_tox_resistance
continue
if(damagetype == OXY && (!isnull(M.effective_oxy_resistance)))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost * damage)
damage = damage * M.effective_oxy_resistance
continue
if(damagetype == CLONE && (!isnull(M.effective_clone_resistance)))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost * damage)
damage = damage * M.effective_clone_resistance
continue
if(damagetype == HALLOSS && (!isnull(M.effective_hal_resistance)))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost * damage)
damage = damage * M.effective_hal_resistance
continue
if(damagetype == SEARING && (!isnull(M.effective_fire_resistance) || !isnull(M.effective_brute_resistance)))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost * damage)
var/damage_mitigation = 0//Used for dual calculations.
if(!isnull(M.effective_fire_resistance))
@@ -631,11 +631,11 @@ This function restores all organs.
for(var/datum/modifier/M in modifiers)
if(!isnull(M.incoming_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*damage)
damage *= M.incoming_damage_percent
if(!isnull(M.incoming_brute_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*damage)
damage *= M.incoming_brute_damage_percent
@@ -648,11 +648,11 @@ This function restores all organs.
for(var/datum/modifier/M in modifiers)
if(!isnull(M.incoming_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*damage)
damage *= M.incoming_damage_percent
if(!isnull(M.incoming_brute_damage_percent))
if(M.energy_based)
if(M.energy_based && M.energy_source)
M.energy_source.use(M.damage_cost*damage)
damage *= M.incoming_fire_damage_percent

View File

@@ -491,8 +491,8 @@
..()
/obj/item/rig/protean/get_description_interaction()
var/list/results = list()
if(dead)
var/list/results = list()
switch(dead)
if(1)
results += "Use a screwdriver to start repairs."
@@ -502,7 +502,7 @@
results += "Use some Nanopaste."
if(4)
results += "Use either a defib or jumper cables to start the reboot sequence."
return results
return results
//Effectively a round about way of letting a Protean wear other rigs.
/obj/item/rig/protean/proc/AssimilateRig(mob/user, var/obj/item/rig/R)

View File

@@ -407,7 +407,7 @@
return
/obj/machinery/disposal/deliveryChute/Bumped(var/atom/movable/AM) //Go straight into the chute
if(istype(AM, /obj/item/projectile) || istype(AM, /obj/effect) || istype(AM, /obj/mecha)) return
if(QDELETED(AM) || istype(AM, /obj/item/projectile) || istype(AM, /obj/effect) || istype(AM, /obj/mecha)) return
switch(dir)
if(NORTH)
if(AM.loc.y != src.loc.y+1) return
@@ -426,9 +426,8 @@
M.loc = src
src.flush()
//Chompadd: Autocatch for stuff being thrown into disposal chutes..
/obj/machinery/disposal/deliveryChute/hitby(atom/movable/AM)
if((istype(AM, /obj/item) || istype(AM, /mob/living)) && !istype(AM, /obj/item/projectile))
if(!QDELETED(AM) || (istype(AM, /obj/item) || istype(AM, /mob/living)) && !istype(AM, /obj/item/projectile))
switch(dir)
if(NORTH)
if(AM.loc.y != src.loc.y+1) return ..()
@@ -440,7 +439,6 @@
if(AM.loc.x != src.loc.x-1) return ..()
AM.forceMove(src)
src.flush()
//Chompadd end
/obj/machinery/disposal/deliveryChute/flush()
flushing = 1