Runtime Fixes (#1456)

Fixes a variety of simple runtime errors
This commit is contained in:
NanakoAC
2017-01-08 21:16:38 +00:00
committed by skull132
parent f0878244b9
commit b96f954762
6 changed files with 15 additions and 7 deletions
+1 -1
View File
@@ -270,7 +270,7 @@
tankcheck = list (H.s_store, C.back, H.belt, C.r_hand, C.l_hand, H.l_store, H.r_store)
if(H.species.has_organ["phoron reserve tank"])
var/obj/item/organ/vaurca/preserve/preserve = H.internal_organs_by_name["phoron reserve tank"]
if(preserve.air_contents)
if(preserve && preserve.air_contents)
from = "in"
nicename |= "sternum"
tankcheck |= preserve
+1 -1
View File
@@ -569,7 +569,7 @@ About the new airlock wires panel:
else if (health < maxhealth * 3/4 && !(stat & NOPOWER))
overlays += image(icon, "sparks_damaged")
if (hashatch)
if (hatch_image)
if (hatchstate)
hatch_image.icon_state = "[hatchstyle]_open"
else
@@ -316,7 +316,8 @@
var/atom/movable/I = new gift_type(M)
M.remove_from_mob(src)
M.put_in_hands(I)
if (!M.put_in_hands(I))
M.forceMove(get_turf(src))
M << "<span class='notice'>You open the gift, revealing your new [I.name]! Just what you always wanted!</span>"
qdel(src)
return
+6 -3
View File
@@ -156,9 +156,12 @@
/datum/event/New(var/datum/event_meta/EM = null, var/is_dummy = 0)
dummy = is_dummy
event_meta = EM
severity = event_meta.severity
if(severity < EVENT_LEVEL_MUNDANE) severity = EVENT_LEVEL_MUNDANE
if(severity > EVENT_LEVEL_MAJOR) severity = EVENT_LEVEL_MAJOR
if (event_meta)
severity = event_meta.severity
if(severity < EVENT_LEVEL_MUNDANE) severity = EVENT_LEVEL_MUNDANE
if(severity > EVENT_LEVEL_MAJOR) severity = EVENT_LEVEL_MAJOR
else
severity = EVENT_LEVEL_MODERATE//Fixes runtime errors with admin triggered events
if (dummy)
return
+2 -1
View File
@@ -131,8 +131,9 @@ var/list/slot_equipment_priority = list( \
//If both fail it drops it on the floor and returns 0.
//This is probably the main one you need to know :)
/mob/proc/put_in_hands(var/obj/item/W)
if(!W)
if(!W || !istype(W))
return 0
W.forceMove(get_turf(src))
W.layer = initial(W.layer)
W.dropped()
+3
View File
@@ -290,6 +290,9 @@ var/list/organ_cache = list()
loc = get_turf(owner)
processing_objects |= src
rejecting = null
if (!reagents)
create_reagents(5)
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
if(!organ_blood || !organ_blood.data["blood_DNA"])
owner.vessel.trans_to(src, 5, 1, 1)