Skip to content

Commit

Permalink
You can no longer put the cyborg gripper in a display case (#26848)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrer and [email protected] authored Sep 22, 2024
1 parent 80d2d78 commit 51c64ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion code/game/objects/items/robot/cyborg_gripper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
icon = 'icons/obj/device.dmi'
icon_state = "gripper"
actions_types = list(/datum/action/item_action/drop_gripped_item)
flags = ABSTRACT
/// Set to TRUE to removal of cells/lights from machine objects containing them.
var/engineering_machine_interaction = FALSE
/// Defines what items the gripper can carry.
Expand Down Expand Up @@ -50,11 +51,12 @@
/obj/item/gripper/proc/drop_gripped_item(mob/user, silent = FALSE)
if(!gripped_item)
to_chat(user, "<span class='warning'>[src] is empty.</span>")
return
return FALSE
if(!silent)
to_chat(user, "<span class='warning'>You drop [gripped_item].</span>")
gripped_item.forceMove(get_turf(src))
gripped_item = null
return TRUE

/obj/item/gripper/attack_self(mob/user)
if(!gripped_item)
Expand Down
5 changes: 2 additions & 3 deletions code/modules/mob/living/silicon/robot/robot_inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,8 @@

/mob/living/silicon/robot/drop_item()
var/obj/item/gripper/G = get_active_hand()
if(istype(G))
G.drop_gripped_item(silent = TRUE)
return TRUE // The gripper is special because it has a normal item inside that we can drop.
if(istype(G)) // The gripper is special because it has a normal item inside that we can drop.
return G.drop_gripped_item(silent = TRUE) // This only returns true if there's actually an item to drop so we don't drop the gripper accidentaly.
return FALSE // All robot inventory items have NODROP, so they should return FALSE.

//Helper procs for cyborg modules on the UI.
Expand Down

0 comments on commit 51c64ed

Please sign in to comment.