Merge pull request #7518 from Meghan-Rossi/borgcookfix

Fix cyborgs not being able to cook
This commit is contained in:
Atermonera
2020-08-20 22:24:03 -07:00
committed by VirgoBot
parent d63f0b2c3e
commit 0ebcca246e
4 changed files with 13 additions and 3 deletions

View File

@@ -430,11 +430,16 @@ var/list/global/slot_flags_enumeration = list(
return 1 return 1
/obj/item/proc/mob_can_unequip(mob/M, slot, disable_warning = 0) /obj/item/proc/mob_can_unequip(mob/M, slot, disable_warning = 0)
if(!slot) return 0
if(!M) return 0 if(!M) return 0
if(!canremove) if(!canremove)
return 0 return 0
if(!slot)
if(issilicon(M))
return 1 // for stuff in grippers
return 0
if(!M.slot_is_accessible(slot, src, disable_warning? null : M)) if(!M.slot_is_accessible(slot, src, disable_warning? null : M))
return 0 return 0
return 1 return 1

View File

@@ -182,7 +182,7 @@
//Handles all validity checking and error messages for inserting things //Handles all validity checking and error messages for inserting things
/obj/machinery/appliance/proc/can_insert(var/obj/item/I, var/mob/user) /obj/machinery/appliance/proc/can_insert(var/obj/item/I, var/mob/user)
if (istype(I.loc, /mob/living/silicon)) if (istype(I, /obj/item/weapon/gripper))
return 0 return 0
else if (istype(I.loc, /obj/item/rig_module)) else if (istype(I.loc, /obj/item/rig_module))
return 0 return 0

View File

@@ -178,7 +178,7 @@ var/list/slot_equipment_priority = list( \
if(!I) //If there's nothing to drop, the drop is automatically successful. if(!I) //If there's nothing to drop, the drop is automatically successful.
return 1 return 1
var/slot = get_inventory_slot(I) var/slot = get_inventory_slot(I)
return slot && I.mob_can_unequip(src, slot) return I.mob_can_unequip(src, slot)
/mob/proc/get_inventory_slot(obj/item/I) /mob/proc/get_inventory_slot(obj/item/I)
var/slot = 0 var/slot = 0

View File

@@ -0,0 +1,5 @@
author: Meghan Rossi
delete-after: True
changes:
- bugfix: "Cyborgs can now put things into oven dishes with their grippers"
- bugfix: "Cyborgs can now put oven dishes in the oven with their grippers"