mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 11:07:46 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user