diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 51f4f93f5d2..622976838bf 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -605,10 +605,10 @@ GLOBAL_LIST_EMPTY(PDAs) U << browse(null, "window=pda") return -/obj/item/pda/proc/remove_id() - if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) +/obj/item/pda/proc/remove_id(mob/user) + if(issilicon(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return - do_remove_id(usr) + do_remove_id(user) /obj/item/pda/proc/do_remove_id(mob/user) @@ -743,13 +743,13 @@ GLOBAL_LIST_EMPTY(PDAs) /obj/item/pda/proc/create_message(mob/living/U, obj/item/pda/P) send_message(U,list(P)) -/obj/item/pda/AltClick() +/obj/item/pda/AltClick(mob/user) ..() if(id) - remove_id() + remove_id(user) else - remove_pen() + remove_pen(user) /obj/item/pda/CtrlClick(mob/user) ..() @@ -776,7 +776,7 @@ GLOBAL_LIST_EMPTY(PDAs) set src in usr if(id) - remove_id() + remove_id(usr) else to_chat(usr, "This PDA does not have an ID in it!") @@ -837,7 +837,7 @@ GLOBAL_LIST_EMPTY(PDAs) /obj/item/pda/proc/id_check(mob/user, obj/item/card/id/I) if(!I) if(id && (src in user.contents)) - remove_id() + remove_id(user) return TRUE else var/obj/item/card/id/C = user.get_active_held_item() diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index e9d77ebd53f..4d445d083bf 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -82,7 +82,7 @@ . = ..() if(!.) return - if(!shock(user, 70)) + if(!shock(user, 70) && !QDELETED(src)) //Last hit still shocks but shouldn't deal damage to the grille take_damage(rand(5,10), BRUTE, "melee", 1) /obj/structure/grille/attack_paw(mob/user) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 09d652159b3..ad8a21c6985 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -157,7 +157,7 @@ /mob/living/simple_animal/bot/mulebot/bullet_act(obj/projectile/Proj) . = ..() - if(.) + if(. && !QDELETED(src)) //Got hit and not blown up yet. if(prob(50) && !isnull(load)) unload(0) if(prob(25)) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm index ebe25962cca..695639cc5ee 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm @@ -233,7 +233,8 @@ While using this makes the system rely on OnFire, it still gives options for tim INVOKE_ASYNC(src, .proc/fighters_check) //Checks to see if our fighters died. INVOKE_ASYNC(src, .proc/arena_trap) //Gets another arena trap queued up for when this one runs out. INVOKE_ASYNC(src, .proc/border_check) //Checks to see if our fighters got out of the arena somehow. - addtimer(CALLBACK(src, .proc/arena_checks), 50) + if(!QDELETED(src)) + addtimer(CALLBACK(src, .proc/arena_checks), 50) /obj/structure/elite_tumor/proc/fighters_check() if(activator != null && activator.stat == DEAD || activity == TUMOR_ACTIVE && QDELETED(activator)) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index 90957c91a64..1c8c29ccb6c 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -5,22 +5,24 @@ var/modifier = 0 /datum/chemical_reaction/reagent_explosion/on_reaction(datum/reagents/holder, created_volume) - var/turf/T = get_turf(holder.my_atom) - var/inside_msg - if(ismob(holder.my_atom)) - var/mob/M = holder.my_atom - inside_msg = " inside [ADMIN_LOOKUPFLW(M)]" - var/lastkey = holder.my_atom.fingerprintslast - var/touch_msg = "N/A" - if(lastkey) - var/mob/toucher = get_mob_by_key(lastkey) - touch_msg = "[ADMIN_LOOKUPFLW(toucher)]" - if(!istype(holder.my_atom, /obj/machinery/plumbing)) //excludes standard plumbing equipment from spamming admins with this shit - message_admins("Reagent explosion reaction occurred at [ADMIN_VERBOSEJMP(T)][inside_msg]. Last Fingerprint: [touch_msg].") - log_game("Reagent explosion reaction occurred at [AREACOORD(T)]. Last Fingerprint: [lastkey ? lastkey : "N/A"]." ) - var/datum/effect_system/reagents_explosion/e = new() - e.set_up(modifier + round(created_volume/strengthdiv, 1), T, 0, 0) - e.start() + var/power = modifier + round(created_volume/strengthdiv, 1) + if(power > 0) + var/turf/T = get_turf(holder.my_atom) + var/inside_msg + if(ismob(holder.my_atom)) + var/mob/M = holder.my_atom + inside_msg = " inside [ADMIN_LOOKUPFLW(M)]" + var/lastkey = holder.my_atom.fingerprintslast + var/touch_msg = "N/A" + if(lastkey) + var/mob/toucher = get_mob_by_key(lastkey) + touch_msg = "[ADMIN_LOOKUPFLW(toucher)]" + if(!istype(holder.my_atom, /obj/machinery/plumbing)) //excludes standard plumbing equipment from spamming admins with this shit + message_admins("Reagent explosion reaction occurred at [ADMIN_VERBOSEJMP(T)][inside_msg]. Last Fingerprint: [touch_msg].") + log_game("Reagent explosion reaction occurred at [AREACOORD(T)]. Last Fingerprint: [lastkey ? lastkey : "N/A"]." ) + var/datum/effect_system/reagents_explosion/e = new() + e.set_up(power , T, 0, 0) + e.start() holder.clear_reagents() diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 8efcbe80de9..65a42c592df 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -94,7 +94,7 @@ to_chat(user, "[src] is out of fuel!") return var/obj/item/weldingtool/W = I - if(!W.welding) + if(istype(W) && !W.welding) if(W.reagents.has_reagent(/datum/reagent/fuel, W.max_fuel)) to_chat(user, "Your [W.name] is already full!") return @@ -103,10 +103,8 @@ playsound(src, 'sound/effects/refill.ogg', 50, TRUE) W.update_icon() else - user.visible_message("[user] catastrophically fails at refilling [user.p_their()] [W.name]!", "That was stupid of you.") - + user.visible_message("[user] catastrophically fails at refilling [user.p_their()] [I.name]!", "That was stupid of you.") log_bomber(user, "detonated a", src, "via welding tool") - boom() return return ..() diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index 639d27cb0a0..199dfb58100 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -21,15 +21,18 @@ C.emote("scream") SEND_SIGNAL(C, COMSIG_ADD_MOOD_EVENT, "dismembered", /datum/mood_event/dismembered) drop_limb() + C.update_equipment_speed_mods() // Update in case speed affecting item unequipped by dismemberment - - if(dam_type == BURN) - burn() - return 1 - add_mob_blood(C) var/turf/location = C.loc if(istype(location)) C.add_splatter_floor(location) + + if(QDELETED(src)) //Could have dropped into lava/explosion/chasm/whatever + return TRUE + if(dam_type == BURN) + burn() + return TRUE + add_mob_blood(C) var/direction = pick(GLOB.cardinals) var/t_range = rand(2,max(throw_range/2, 2)) var/turf/target_turf = get_turf(src) @@ -41,7 +44,7 @@ if(new_turf.density) break throw_at(target_turf, throw_range, throw_speed) - return 1 + return TRUE /obj/item/bodypart/chest/dismember()