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
+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)