From 0ebcca246e5770ce9aaf8ad248ceedff9aef1ee0 Mon Sep 17 00:00:00 2001 From: Atermonera Date: Thu, 20 Aug 2020 22:24:03 -0700 Subject: [PATCH] Merge pull request #7518 from Meghan-Rossi/borgcookfix Fix cyborgs not being able to cook --- code/game/objects/items.dm | 7 ++++++- code/modules/food/kitchen/cooking_machines/_appliance.dm | 2 +- code/modules/mob/inventory.dm | 2 +- html/changelogs/meghan rossi - borg cooking fix.yml | 5 +++++ 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 html/changelogs/meghan rossi - borg cooking fix.yml diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 1df31e3814..13d9f0ab8f 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -430,11 +430,16 @@ var/list/global/slot_flags_enumeration = list( return 1 /obj/item/proc/mob_can_unequip(mob/M, slot, disable_warning = 0) - if(!slot) return 0 if(!M) return 0 if(!canremove) 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)) return 0 return 1 diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm index d8c4e761ca..297dc688f4 100644 --- a/code/modules/food/kitchen/cooking_machines/_appliance.dm +++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm @@ -182,7 +182,7 @@ //Handles all validity checking and error messages for inserting things /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 else if (istype(I.loc, /obj/item/rig_module)) return 0 diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index c778470b19..e6a618272e 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -178,7 +178,7 @@ var/list/slot_equipment_priority = list( \ if(!I) //If there's nothing to drop, the drop is automatically successful. return 1 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) var/slot = 0 diff --git a/html/changelogs/meghan rossi - borg cooking fix.yml b/html/changelogs/meghan rossi - borg cooking fix.yml new file mode 100644 index 0000000000..4fa38aef12 --- /dev/null +++ b/html/changelogs/meghan rossi - borg cooking fix.yml @@ -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"