mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Fix a few small runtimes (#49352)
Nothing special here, mostly sanity. Defib hud is awful, needs rewrite.
This commit is contained in:
@@ -128,7 +128,7 @@
|
||||
|
||||
/datum/quirk/phobia/post_add()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
H.gain_trauma(new /datum/brain_trauma/mild/phobia(H.client.prefs.phobia), TRAUMA_RESILIENCE_ABSOLUTE)
|
||||
H.gain_trauma(new /datum/brain_trauma/mild/phobia(H.client?.prefs.phobia), TRAUMA_RESILIENCE_ABSOLUTE)
|
||||
|
||||
/datum/quirk/phobia/remove()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
|
||||
@@ -39,9 +39,10 @@
|
||||
if(hotspot && istype(T) && T.air)
|
||||
qdel(hotspot)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
var/plas_amt = min(30,G.gases[/datum/gas/plasma][MOLES]) //Absorb some plasma
|
||||
G.gases[/datum/gas/plasma][MOLES] -= plas_amt
|
||||
absorbed_plasma += plas_amt
|
||||
if(G.gases[/datum/gas/plasma])
|
||||
var/plas_amt = min(30,G.gases[/datum/gas/plasma][MOLES]) //Absorb some plasma
|
||||
G.gases[/datum/gas/plasma][MOLES] -= plas_amt
|
||||
absorbed_plasma += plas_amt
|
||||
if(G.temperature > T20C)
|
||||
G.temperature = max(G.temperature/2,T20C)
|
||||
G.garbage_collect()
|
||||
|
||||
@@ -487,15 +487,17 @@
|
||||
name = "explosive lance"
|
||||
var/obj/item/grenade/explosive = null
|
||||
|
||||
/obj/item/twohanded/spear/explosive/Initialize(mapload, obj/item/grenade/G)
|
||||
/obj/item/twohanded/spear/explosive/Initialize(mapload)
|
||||
. = ..()
|
||||
if (!G)
|
||||
G = new /obj/item/grenade/iedcasing() //For admin-spawned explosive lances
|
||||
set_explosive(new /obj/item/grenade/iedcasing()) //For admin-spawned explosive lances
|
||||
|
||||
|
||||
/obj/item/twohanded/spear/explosive/proc/set_explosive(obj/item/grenade/G)
|
||||
if(explosive)
|
||||
QDEL_NULL(explosive)
|
||||
G.forceMove(src)
|
||||
explosive = G
|
||||
desc = "A makeshift spear with [G] attached to it"
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/twohanded/spear/explosive/CheckParts(list/parts_list)
|
||||
var/obj/item/grenade/G = locate() in parts_list
|
||||
@@ -507,7 +509,7 @@
|
||||
icon_prefix = lancePart.icon_prefix
|
||||
parts_list -= G
|
||||
parts_list -= lancePart
|
||||
Initialize(src.loc, G)
|
||||
set_explosive(G)
|
||||
qdel(lancePart)
|
||||
..()
|
||||
|
||||
|
||||
@@ -34,5 +34,5 @@
|
||||
/datum/reagent/blob/networked_fibers/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
M.apply_damage(0.6*reac_volume, BRUTE)
|
||||
if(M)
|
||||
if(!QDELETED(M))
|
||||
M.apply_damage(0.6*reac_volume, BURN)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
for(var/obj/item/I in world)
|
||||
CHECK_TICK
|
||||
|
||||
if(!(I.flags_1 & INITIALIZED_1))
|
||||
if(!(I.flags_1 & INITIALIZED_1) || QDELETED(I))
|
||||
continue
|
||||
|
||||
I.AddComponent(/datum/component/fantasy)
|
||||
|
||||
@@ -154,9 +154,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
|
||||
/mob/dead/observer/Destroy()
|
||||
// Update our old body's medhud since we're abandoning it
|
||||
if(mind)
|
||||
var/mob/living/carbon/current = mind.current
|
||||
current.med_hud_set_status()
|
||||
if(mind && mind.current)
|
||||
mind.current.med_hud_set_status()
|
||||
|
||||
GLOB.ghost_images_default -= ghostimage_default
|
||||
QDEL_NULL(ghostimage_default)
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
user.say(catchphrase, forced = "spell")
|
||||
if(catchphrase)
|
||||
user.say(catchphrase, forced = "spell")
|
||||
playsound(get_turf(user), on_use_sound,50,TRUE)
|
||||
charges--
|
||||
if(charges <= 0)
|
||||
|
||||
Reference in New Issue
Block a user