Fixes two very common runtimes

Fixes some null.Topic() runtimes caused by AI hotkeys.
removeItem() now checks if the item actually exists before modifying variables.
This commit is contained in:
Neerti
2016-05-02 00:46:31 -04:00
parent 3baf91b46e
commit 3ea6635f6a
2 changed files with 13 additions and 11 deletions
+2
View File
@@ -166,6 +166,8 @@ var/list/slot_equipment_priority = list( \
return slot
/mob/proc/removeItem(var/obj/item/I, var/atom/T = loc, var/force = 0)
if(!I) // Nothing to remove, so we succeed.
return 1
if(!force && !src.canUnEquip(I))
return 0