mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
[MIRROR] Fixes some potential sleeps as detected by SpacemanDMM improvements (#1216)
* Fix some potential sleeps as detected by SpacemanDMM improvements (#54230) overrides weren't detected by should not sleep, i think i've mostly fixed that with SpaceManiac/SpacemanDMM#214 Some of these are wacky but overall this pr is harmless signals shouldnt sleep even in weird 1 in a million situations or due to other people adding bad code overrides of changeling can_sting() use alert() and input() and that's just too fucked for me to fix in this pr * Fixes some potential sleeps as detected by SpacemanDMM improvements Co-authored-by: spookydonut <github@spooksoftware.com>
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
owner.vomit()
|
||||
fail = TRUE
|
||||
if(2)
|
||||
owner.emote("cough")
|
||||
INVOKE_ASYNC(owner, /mob.proc/emote, "cough")
|
||||
owner.dizziness += 10
|
||||
fail = TRUE
|
||||
if(3)
|
||||
|
||||
@@ -5,19 +5,23 @@
|
||||
var/list/obj/item/storage/backpack/holding/matching = typecache_filter_list(W.GetAllContents(), typecacheof(/obj/item/storage/backpack/holding))
|
||||
matching -= A
|
||||
if(istype(W, /obj/item/storage/backpack/holding) || matching.len)
|
||||
var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Proceed", "Abort")
|
||||
if(safety != "Proceed" || QDELETED(A) || QDELETED(W) || QDELETED(user) || !user.canUseTopic(A, BE_CLOSE, iscarbon(user)))
|
||||
return
|
||||
var/turf/loccheck = get_turf(A)
|
||||
to_chat(user, "<span class='danger'>The Bluespace interfaces of the two devices catastrophically malfunction!</span>")
|
||||
qdel(W)
|
||||
playsound(loccheck,'sound/effects/supermatter.ogg', 200, TRUE)
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] detonated a bag of holding at [ADMIN_VERBOSEJMP(loccheck)].")
|
||||
log_game("[key_name(user)] detonated a bag of holding at [loc_name(loccheck)].")
|
||||
|
||||
user.gib(TRUE, TRUE, TRUE)
|
||||
new/obj/singularity/boh_tear(loccheck)
|
||||
qdel(A)
|
||||
INVOKE_ASYNC(src, .proc/recursive_insertion, W, user)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/datum/component/storage/concrete/bluespace/bag_of_holding/proc/recursive_insertion(obj/item/W, mob/living/user)
|
||||
var/atom/A = parent
|
||||
var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Proceed", "Abort")
|
||||
if(safety != "Proceed" || QDELETED(A) || QDELETED(W) || QDELETED(user) || !user.canUseTopic(A, BE_CLOSE, iscarbon(user)))
|
||||
return
|
||||
var/turf/loccheck = get_turf(A)
|
||||
to_chat(user, "<span class='danger'>The Bluespace interfaces of the two devices catastrophically malfunction!</span>")
|
||||
qdel(W)
|
||||
playsound(loccheck,'sound/effects/supermatter.ogg', 200, TRUE)
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] detonated a bag of holding at [ADMIN_VERBOSEJMP(loccheck)].")
|
||||
log_game("[key_name(user)] detonated a bag of holding at [loc_name(loccheck)].")
|
||||
|
||||
user.gib(TRUE, TRUE, TRUE)
|
||||
new/obj/singularity/boh_tear(loccheck)
|
||||
qdel(A)
|
||||
|
||||
@@ -32,4 +32,4 @@
|
||||
/datum/mutation/human/telekinesis/proc/on_ranged_attack(datum/source, atom/target)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
target.attack_tk(owner)
|
||||
INVOKE_ASYNC(target, /atom.proc/attack_tk, owner)
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#define AI_WIRE_NORMAL 0
|
||||
#define AI_WIRE_DISABLED 1
|
||||
#define AI_WIRE_HACKED 2
|
||||
#define AI_WIRE_DISABLED_HACKED -1
|
||||
|
||||
/datum/wires/airlock
|
||||
holder_type = /obj/machinery/door/airlock
|
||||
proper_name = "Generic Airlock"
|
||||
@@ -108,16 +113,11 @@
|
||||
A.emergency = FALSE
|
||||
A.update_icon()
|
||||
if(WIRE_AI) // Pulse to disable WIRE_AI control for 10 ticks (follows same rules as cutting).
|
||||
if(A.aiControlDisabled == 0)
|
||||
A.aiControlDisabled = 1
|
||||
else if(A.aiControlDisabled == -1)
|
||||
A.aiControlDisabled = 2
|
||||
sleep(10)
|
||||
if(A)
|
||||
if(A.aiControlDisabled == 1)
|
||||
A.aiControlDisabled = 0
|
||||
else if(A.aiControlDisabled == 2)
|
||||
A.aiControlDisabled = -1
|
||||
if(A.aiControlDisabled == AI_WIRE_NORMAL)
|
||||
A.aiControlDisabled = AI_WIRE_DISABLED
|
||||
else if(A.aiControlDisabled == AI_WIRE_DISABLED_HACKED)
|
||||
A.aiControlDisabled = AI_WIRE_HACKED
|
||||
addtimer(CALLBACK(A, /obj/machinery/door/airlock.proc/reset_ai_wire), 1 SECONDS)
|
||||
if(WIRE_SHOCK) // Pulse to shock the door for 10 ticks.
|
||||
if(!A.secondsElectrified)
|
||||
A.set_electrified(MACHINE_DEFAULT_ELECTRIFY_TIME, usr)
|
||||
@@ -132,6 +132,12 @@
|
||||
A.lights = !A.lights
|
||||
A.update_icon()
|
||||
|
||||
/obj/machinery/door/airlock/proc/reset_ai_wire()
|
||||
if(aiControlDisabled == AI_WIRE_DISABLED)
|
||||
aiControlDisabled = AI_WIRE_NORMAL
|
||||
else if(aiControlDisabled == AI_WIRE_HACKED)
|
||||
aiControlDisabled = AI_WIRE_DISABLED_HACKED
|
||||
|
||||
/datum/wires/airlock/on_cut(wire, mend)
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
switch(wire)
|
||||
@@ -154,15 +160,15 @@
|
||||
A.bolt()
|
||||
if(WIRE_AI) // Cut to disable WIRE_AI control, mend to re-enable.
|
||||
if(mend)
|
||||
if(A.aiControlDisabled == 1) // 0 = normal, 1 = locked out, 2 = overridden by WIRE_AI, -1 = previously overridden by WIRE_AI
|
||||
A.aiControlDisabled = 0
|
||||
else if(A.aiControlDisabled == 2)
|
||||
A.aiControlDisabled = -1
|
||||
if(A.aiControlDisabled == AI_WIRE_DISABLED) // 0 = normal, 1 = locked out, 2 = overridden by WIRE_AI, -1 = previously overridden by WIRE_AI
|
||||
A.aiControlDisabled = AI_WIRE_NORMAL
|
||||
else if(A.aiControlDisabled == AI_WIRE_HACKED)
|
||||
A.aiControlDisabled = AI_WIRE_DISABLED_HACKED
|
||||
else
|
||||
if(A.aiControlDisabled == 0)
|
||||
A.aiControlDisabled = 1
|
||||
else if(A.aiControlDisabled == -1)
|
||||
A.aiControlDisabled = 2
|
||||
if(A.aiControlDisabled == AI_WIRE_NORMAL)
|
||||
A.aiControlDisabled = AI_WIRE_DISABLED
|
||||
else if(A.aiControlDisabled == AI_WIRE_DISABLED_HACKED)
|
||||
A.aiControlDisabled = AI_WIRE_HACKED
|
||||
if(WIRE_SHOCK) // Cut to shock the door, mend to unshock.
|
||||
if(mend)
|
||||
if(A.secondsElectrified)
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
else
|
||||
victim.visible_message("<span class='danger'>[victim] weakly strikes [target] with [victim.p_their()] broken [limb.name], recoiling from pain!</span>", \
|
||||
"<span class='userdanger'>You fail to strike [target] as the fracture in your [limb.name] lights up in unbearable pain!</span>", vision_distance=COMBAT_MESSAGE_RANGE)
|
||||
victim.emote("scream")
|
||||
INVOKE_ASYNC(victim, /mob.proc/emote, "scream")
|
||||
victim.Stun(0.5 SECONDS)
|
||||
limb.receive_damage(brute=rand(3,7))
|
||||
return COMPONENT_NO_ATTACK_HAND
|
||||
|
||||
@@ -157,8 +157,7 @@
|
||||
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
|
||||
slipper.Slip(src, hit_atom)
|
||||
if(thrownby && !caught)
|
||||
sleep(1)
|
||||
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
|
||||
addtimer(CALLBACK(src, /atom/movable.proc/throw_at, thrownby, throw_range+2, throw_speed, null, TRUE), 1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
/obj/machinery/computer/security/telescreen/entertainment/proc/BigClick()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
interact(usr)
|
||||
INVOKE_ASYNC(src, /atom.proc/interact, usr)
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment/proc/notify(on)
|
||||
if(on && icon_state == icon_state_off)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_REQUIRES_SILICON | INTERACT_MACHINE_OPEN
|
||||
|
||||
var/security_level = 0 //How much are wires secured
|
||||
var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
var/aiControlDisabled = AI_WIRE_NORMAL //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
var/hackProof = FALSE // if true, this door can't be hacked by the AI
|
||||
var/secondsMainPowerLost = 0 //The number of seconds until power is restored.
|
||||
var/secondsBackupPowerLost = 0 //The number of seconds until power is restored.
|
||||
@@ -332,10 +332,10 @@
|
||||
return (secondsElectrified != MACHINE_NOT_ELECTRIFIED)
|
||||
|
||||
/obj/machinery/door/airlock/proc/canAIControl(mob/user)
|
||||
return ((aiControlDisabled != 1) && !isAllPowerCut())
|
||||
return ((aiControlDisabled != AI_WIRE_DISABLED) && !isAllPowerCut())
|
||||
|
||||
/obj/machinery/door/airlock/proc/canAIHack()
|
||||
return ((aiControlDisabled==1) && (!hackProof) && (!isAllPowerCut()));
|
||||
return ((aiControlDisabled==AI_WIRE_DISABLED) && (!hackProof) && (!isAllPowerCut()));
|
||||
|
||||
/obj/machinery/door/airlock/hasPower()
|
||||
return ((!secondsMainPowerLost || !secondsBackupPowerLost) && !(machine_stat & NOPOWER))
|
||||
@@ -719,7 +719,7 @@
|
||||
to_chat(user, "<span class='notice'>Transfer complete. Forcing airlock to execute program.</span>")
|
||||
sleep(50)
|
||||
//disable blocked control
|
||||
aiControlDisabled = 2
|
||||
aiControlDisabled = AI_WIRE_HACKED
|
||||
to_chat(user, "<span class='notice'>Receiving control information from airlock.</span>")
|
||||
sleep(10)
|
||||
//bring up airlock dialog
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
damage_deflection = 30
|
||||
explosion_block = 3
|
||||
hackProof = TRUE
|
||||
aiControlDisabled = 1
|
||||
aiControlDisabled = AI_WIRE_DISABLED
|
||||
normal_integrity = 700
|
||||
security_level = 1
|
||||
|
||||
@@ -446,7 +446,7 @@
|
||||
overlays_file = 'icons/obj/doors/airlocks/cult/runed/overlays.dmi'
|
||||
assemblytype = /obj/structure/door_assembly/door_assembly_cult
|
||||
hackProof = TRUE
|
||||
aiControlDisabled = 1
|
||||
aiControlDisabled = AI_WIRE_DISABLED
|
||||
req_access = list(ACCESS_BLOODCULT)
|
||||
damage_deflection = 10
|
||||
var/openingoverlaytype = /obj/effect/temp_visual/cult/door
|
||||
|
||||
@@ -78,9 +78,11 @@
|
||||
controller.cycleClose(door)
|
||||
else
|
||||
controller.onlyClose(door)
|
||||
sleep(20)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, .proc/not_busy), 2 SECONDS)
|
||||
|
||||
/obj/machinery/door_buttons/access_button/proc/not_busy()
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door_buttons/access_button/update_icon_state()
|
||||
if(machine_stat & NOPOWER)
|
||||
|
||||
@@ -1026,7 +1026,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
S = null
|
||||
|
||||
if(get_sharpness() && force >= 5) //if we've got something sharp with a decent force (ie, not plastic)
|
||||
M.emote("scream")
|
||||
INVOKE_ASYNC(M, /mob.proc/emote, "scream")
|
||||
M.visible_message("<span class='warning'>[M] looks like [M.p_theyve()] just bit something they shouldn't have!</span>", \
|
||||
"<span class='boldwarning'>OH GOD! Was that a crunch? That didn't feel good at all!!</span>")
|
||||
|
||||
|
||||
@@ -143,5 +143,4 @@
|
||||
AM.set_anchored(TRUE)
|
||||
flick("laserbox_burn", AM)
|
||||
trigger()
|
||||
sleep(15)
|
||||
qdel(AM)
|
||||
QDEL_IN(AM, 15)
|
||||
|
||||
@@ -333,9 +333,7 @@
|
||||
if(ishuman(hit_atom) && !caught && prob(throw_stun_chance))//if they are a carbon and they didn't catch it
|
||||
baton_effect(hit_atom)
|
||||
if(thrownby && !caught)
|
||||
sleep(1)
|
||||
if(!QDELETED(src))
|
||||
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
|
||||
addtimer(CALLBACK(src, /atom/movable.proc/throw_at, thrownby, throw_range+2, throw_speed, null, TRUE), 1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -1082,8 +1082,9 @@
|
||||
playsound(src, 'sound/effects/explosionfar.ogg', 50, FALSE)
|
||||
for(var/mob/M in urange(10, src)) // Checks range
|
||||
if(!M.stat && !isAI(M)) // Checks to make sure whoever's getting shaken is alive/not the AI
|
||||
sleep(8) // Short delay to match up with the explosion sound
|
||||
shake_camera(M, 2, 1) // Shakes player camera 2 squares for 1 second.
|
||||
// Short delay to match up with the explosion sound
|
||||
// Shakes player camera 2 squares for 1 second.
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/shake_camera, M, 2, 1), 0.8 SECONDS)
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Nothing happens.</span>")
|
||||
@@ -1471,8 +1472,7 @@
|
||||
if(cooldown <= world.time)
|
||||
cooldown = (world.time + 300)
|
||||
user.visible_message("<span class='notice'>[user] adjusts the dial on [src].</span>")
|
||||
sleep(5)
|
||||
playsound(src, 'sound/items/radiostatic.ogg', 50, FALSE)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/items/radiostatic.ogg', 50, FALSE), 0.5 SECONDS)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The dial on [src] jams up</span>")
|
||||
return
|
||||
@@ -1487,5 +1487,4 @@
|
||||
/obj/item/toy/braintoy/attack_self(mob/user)
|
||||
if(cooldown <= world.time)
|
||||
cooldown = (world.time + 10)
|
||||
sleep(5)
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 50, FALSE)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/effects/blobattack.ogg', 50, FALSE), 0.5 SECONDS)
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
///Handles stinging without verbs.
|
||||
/datum/antagonist/changeling/proc/stingAtom(mob/living/carbon/ling, atom/A)
|
||||
SIGNAL_HANDLER
|
||||
SIGNAL_HANDLER_DOES_SLEEP
|
||||
|
||||
if(!chosen_sting || A == ling || !istype(ling) || ling.stat)
|
||||
return
|
||||
|
||||
@@ -422,7 +422,7 @@
|
||||
|
||||
switch(rand(1,100)+modifier) //91-100=Nothing special happens
|
||||
if(-INFINITY to 0) //attack yourself
|
||||
I.attack(src,src)
|
||||
INVOKE_ASYNC(I, /obj/item.proc/attack, src, src)
|
||||
if(1 to 30) //throw it at yourself
|
||||
I.throw_impact(src)
|
||||
if(31 to 60) //Throw object in facing direction
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
losebreath = 0
|
||||
|
||||
if(!gibbed)
|
||||
emote("deathgasp")
|
||||
INVOKE_ASYNC(src, .proc/emote, "deathgasp")
|
||||
end_metabolization()
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -622,7 +622,7 @@
|
||||
var/obj/effect/proc_holder/spell/spell = S
|
||||
spell.updateButtonIcon()
|
||||
if(excess_healing)
|
||||
emote("gasp")
|
||||
INVOKE_ASYNC(src, .proc/emote, "gasp")
|
||||
log_combat(src, src, "revived")
|
||||
|
||||
/mob/living/proc/remove_CC(should_update_mobility = TRUE)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/grievous/Initialize()
|
||||
. = ..()
|
||||
weapon.attack_self(src)
|
||||
INVOKE_ASYNC(weapon, /obj/item.proc/attack_self, src)
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/grievous/Destroy()
|
||||
QDEL_NULL(weapon)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
action.Remove(mob_linked)
|
||||
qdel(action)
|
||||
to_chat(mob_linked, "<span class='notice'>Your mind shatters as the [src]'s Mansus Link leaves your mind.</span>")
|
||||
mob_linked.emote("Scream")
|
||||
INVOKE_ASYNC(mob_linked, /mob.proc/emote, "scream")
|
||||
//micro stun
|
||||
mob_linked.AdjustParalyzed(0.5 SECONDS)
|
||||
linked_mobs -= mob_linked
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
/mob/living/simple_animal/pet/dog/corgi/proc/place_on_head(obj/item/item_to_add, mob/user)
|
||||
|
||||
if(istype(item_to_add, /obj/item/grenade/c4)) // last thing he ever wears, I guess
|
||||
item_to_add.afterattack(src,user,1)
|
||||
INVOKE_ASYNC(item_to_add, /obj/item.proc/afterattack, src, user, 1)
|
||||
return
|
||||
|
||||
if(inventory_head)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
if(spawn_mecha_type)
|
||||
var/obj/vehicle/sealed/mecha/M = new spawn_mecha_type (get_turf(src))
|
||||
if(istype(M))
|
||||
enter_mecha(M)
|
||||
INVOKE_ASYNC(src, .proc/enter_mecha, M)
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/enter_mecha(obj/vehicle/sealed/mecha/M)
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
var/modifier = 0
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/on_reaction(datum/reagents/holder, created_volume)
|
||||
explode(holder, created_volume)
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/proc/explode(datum/reagents/holder, created_volume)
|
||||
var/power = modifier + round(created_volume/strengthdiv, 1)
|
||||
if(power > 0)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
@@ -23,7 +26,6 @@
|
||||
e.start()
|
||||
holder.clear_reagents()
|
||||
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/nitroglycerin
|
||||
results = list(/datum/reagent/nitroglycerin = 2)
|
||||
required_reagents = list(/datum/reagent/glycerol = 1, /datum/reagent/toxin/acid/nitracid = 1, /datum/reagent/toxin/acid = 1)
|
||||
@@ -146,15 +148,16 @@
|
||||
R.stun(20)
|
||||
R.reveal(100)
|
||||
R.adjustHealth(50)
|
||||
sleep(20)
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(round(created_volume/48,1),get_turf(holder.my_atom)))
|
||||
if(iscultist(C))
|
||||
to_chat(C, "<span class='userdanger'>The divine explosion sears you!</span>")
|
||||
C.Paralyze(40)
|
||||
C.adjust_fire_stacks(5)
|
||||
C.IgniteMob()
|
||||
addtimer(CALLBACK(src, .proc/divine_explosion, round(created_volume/48,1),get_turf(holder.my_atom)), 2 SECONDS)
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/potassium_explosion/holyboom/proc/divine_explosion(size, turf/T)
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(size,T))
|
||||
if(iscultist(C))
|
||||
to_chat(C, "<span class='userdanger'>The divine explosion sears you!</span>")
|
||||
C.Paralyze(40)
|
||||
C.adjust_fire_stacks(5)
|
||||
C.IgniteMob()
|
||||
|
||||
/datum/chemical_reaction/gunpowder
|
||||
results = list(/datum/reagent/gunpowder = 3)
|
||||
@@ -168,8 +171,7 @@
|
||||
mix_message = "<span class='boldannounce'>Sparks start flying around the gunpowder!</span>"
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/gunpowder_explosion/on_reaction(datum/reagents/holder, created_volume)
|
||||
sleep(rand(50,100))
|
||||
..()
|
||||
addtimer(CALLBACK(src, .proc/explode, holder, created_volume), rand(5,10) SECONDS)
|
||||
|
||||
/datum/chemical_reaction/thermite
|
||||
results = list(/datum/reagent/thermite = 3)
|
||||
@@ -452,19 +454,22 @@
|
||||
var/T1 = created_volume * 20 //100 units : Zap 3 times, with powers 2000/5000/12000. Tesla revolvers have a power of 10000 for comparison.
|
||||
var/T2 = created_volume * 50
|
||||
var/T3 = created_volume * 120
|
||||
sleep(5)
|
||||
var/added_delay = 0.5 SECONDS
|
||||
if(created_volume >= 75)
|
||||
tesla_zap(holder.my_atom, 7, T1, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, TRUE)
|
||||
sleep(15)
|
||||
addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T1), added_delay)
|
||||
added_delay += 1.5 SECONDS
|
||||
if(created_volume >= 40)
|
||||
tesla_zap(holder.my_atom, 7, T2, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, TRUE)
|
||||
sleep(15)
|
||||
addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T2), added_delay)
|
||||
added_delay += 1.5 SECONDS
|
||||
if(created_volume >= 10) //10 units minimum for lightning, 40 units for secondary blast, 75 units for tertiary blast.
|
||||
tesla_zap(holder.my_atom, 7, T3, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, TRUE)
|
||||
..()
|
||||
addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T3), added_delay)
|
||||
addtimer(CALLBACK(src, .proc/explode, holder, created_volume), added_delay)
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/teslium_lightning/proc/zappy_zappy(datum/reagents/holder, power)
|
||||
if(QDELETED(holder.my_atom))
|
||||
return
|
||||
tesla_zap(holder.my_atom, 7, power, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, TRUE)
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/teslium_lightning/heat
|
||||
required_temp = 474
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
var/deletes_extract = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/on_reaction(datum/reagents/holder)
|
||||
use_slime_core(holder)
|
||||
|
||||
/datum/chemical_reaction/slime/proc/use_slime_core(datum/reagents/holder)
|
||||
SSblackbox.record_feedback("tally", "slime_cores_used", 1, "type")
|
||||
if(deletes_extract)
|
||||
delete_extract(holder)
|
||||
@@ -484,7 +487,9 @@
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimestop/on_reaction(datum/reagents/holder)
|
||||
sleep(50)
|
||||
addtimer(CALLBACK(src, .proc/slime_stop, holder), 5 SECONDS)
|
||||
|
||||
/datum/chemical_reaction/slime/slimestop/proc/slime_stop(datum/reagents/holder)
|
||||
var/obj/item/slime_extract/sepia/extract = holder.my_atom
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
new /obj/effect/timestop(T, null, null, null)
|
||||
@@ -493,8 +498,7 @@
|
||||
var/mob/lastheld = get_mob_by_key(holder.my_atom.fingerprintslast)
|
||||
if(lastheld && !lastheld.equip_to_slot_if_possible(extract, ITEM_SLOT_HANDS, disable_warning = TRUE))
|
||||
extract.forceMove(get_turf(lastheld))
|
||||
|
||||
..()
|
||||
use_slime_core(holder)
|
||||
|
||||
/datum/chemical_reaction/slime/slimecamera
|
||||
required_reagents = list(/datum/reagent/water = 1)
|
||||
|
||||
@@ -573,7 +573,7 @@
|
||||
if(total_damage >= max_damage * disable_threshold) //Easy limb disable disables the limb at 40% health instead of 0%
|
||||
if(!last_maxed)
|
||||
if(owner.stat < UNCONSCIOUS)
|
||||
owner.emote("scream")
|
||||
INVOKE_ASYNC(owner, /mob.proc/emote, "scream")
|
||||
last_maxed = TRUE
|
||||
set_disabled(TRUE)
|
||||
return
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
affecting.receive_damage(clamp(brute_dam/2 * affecting.body_damage_coeff, 15, 50), clamp(burn_dam/2 * affecting.body_damage_coeff, 0, 50), wound_bonus=CANT_WOUND) //Damage the chest based on limb's existing damage
|
||||
if(!silent)
|
||||
C.visible_message("<span class='danger'><B>[C]'s [name] is violently dismembered!</B></span>")
|
||||
C.emote("scream")
|
||||
INVOKE_ASYNC(C, /mob.proc/emote, "scream")
|
||||
playsound(get_turf(C), 'sound/effects/dismember.ogg', 80, TRUE)
|
||||
SEND_SIGNAL(C, COMSIG_ADD_MOOD_EVENT, "dismembered", /datum/mood_event/dismembered)
|
||||
drop_limb()
|
||||
|
||||
@@ -551,13 +551,13 @@
|
||||
if(HAS_TRAIT(L, TRAIT_PACIFISM) && selected.harmful)
|
||||
to_chat(L, "<span class='warning'>You don't want to harm other living beings!</span>")
|
||||
return
|
||||
selected.action(user, target, params)
|
||||
INVOKE_ASYNC(selected, /obj/item/mecha_parts/mecha_equipment.proc/action, user, target, params)
|
||||
return
|
||||
if((selected.range & MECHA_MELEE) && Adjacent(target))
|
||||
if(isliving(target) && selected.harmful && HAS_TRAIT(L, TRAIT_PACIFISM))
|
||||
to_chat(L, "<span class='warning'>You don't want to harm other living beings!</span>")
|
||||
return
|
||||
selected.action(user, target, params)
|
||||
INVOKE_ASYNC(selected, /obj/item/mecha_parts/mecha_equipment.proc/action, user, target, params)
|
||||
return
|
||||
if(TIMER_COOLDOWN_CHECK(src, COOLDOWN_MECHA_MELEE_ATTACK) || !istype(target, /atom) || !Adjacent(target))
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
if(defense_mode)
|
||||
var/datum/action/action = LAZYACCESSASSOC(occupant_actions, M, /datum/action/vehicle/sealed/mecha/mech_defense_mode)
|
||||
if(action)
|
||||
action.Trigger(FALSE)
|
||||
INVOKE_ASYNC(action, /datum/action.proc/Trigger, FALSE)
|
||||
return ..()
|
||||
|
||||
///Relays the signal from the action button to the shield, and creates a new shield if the old one is MIA.
|
||||
|
||||
Reference in New Issue
Block a user