Sundry Runtime Fixes - March (#5047)

* Fixes Runtime in tools.dm,239: undefined variable /mob/living/simple_animal/retaliate/solargrub/var/handcuffed

* Add logging to help identify the cause of runtime in examining zshadow mobs.

* Fix Runtime in buckling.dm,165: Cannot execute null.forceMove().

* Fixes  Runtime in robot_items.dm,31: Cannot read null.origin_tech

* Fixes Runtime in paper_bundle.dm,183: Cannot read null.loc
This commit is contained in:
Leshana
2018-03-13 00:13:19 -05:00
committed by Anewbe
parent cc80fddfe1
commit 57ed0f6e9e
6 changed files with 13 additions and 7 deletions
+2
View File
@@ -20,6 +20,8 @@
/mob/living/Destroy()
dsoverlay.loc = null //I'll take my coat with me
dsoverlay = null
if(buckled)
buckled.unbuckle_mob(src, TRUE)
return ..()
//mob verbs are faster than object verbs. See mob/verb/examine.
@@ -24,7 +24,7 @@
if(response == "Analyze")
if(loaded_item)
var/confirm = alert(user, "This will destroy the item inside forever. Are you sure?","Confirm Analyze","Yes","No")
if(confirm == "Yes") //This is pretty copypasta-y
if(confirm == "Yes" && !QDELETED(loaded_item)) //This is pretty copypasta-y
user << "You activate the analyzer's microlaser, analyzing \the [loaded_item] and breaking it down."
flick("portable_analyzer_scan", src)
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
+4
View File
@@ -33,6 +33,10 @@
. = ..()
/mob/zshadow/examine(mob/user, distance, infix, suffix)
if(!owner)
// The only time we should have a null owner is if we are in nullspace. Help figure out why we were examined.
crash_with("[src] ([type]) @ [log_info_line()] was examined by [user] @ [global.log_info_line(user)]")
return
return owner.examine(user, distance, infix, suffix)
// Relay some stuff they hear
+4 -4
View File
@@ -164,7 +164,7 @@
usr.put_in_hands(W)
pages.Remove(pages[page])
usr << "<span class='notice'>You remove the [W.name] from the bundle.</span>"
to_chat(usr, "<span class='notice'>You remove the [W.name] from the bundle.</span>")
if(pages.len <= 1)
var/obj/item/weapon/paper/P = src[1]
@@ -178,11 +178,11 @@
page = pages.len
update_icon()
else
usr << "<span class='notice'>You need to hold it in hands!</span>"
if (src.loc && istype(src.loc, /mob) ||istype(src.loc.loc, /mob))
src.attack_self(usr)
updateUsrDialog()
else
to_chat(usr, "<span class='notice'>You need to hold it in hands!</span>")
/obj/item/weapon/paper_bundle/verb/rename()
set name = "Rename bundle"