Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You can now hide chameleon gear by using a multitool (bounty) #1153

Merged
merged 6 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion code/game/objects/items/cards_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1349,10 +1349,30 @@
/// Weak ref to the ID card we're currently attempting to steal access from.
var/datum/weakref/theft_target

var/datum/action/item_action/chameleon/change/id/chameleon_card_action // MONKESTATION ADDITION -- DATUM MOVED FROM INITIALIZE()

// MONKESTATION ADDITION START
/obj/item/card/id/advanced/chameleon/attackby(obj/item/W, mob/user, params)
if(W.tool_behaviour != TOOL_MULTITOOL)
return ..()

if(chameleon_card_action.hidden)
chameleon_card_action.hidden = FALSE
actions += chameleon_card_action
chameleon_card_action.Grant(user)
log_game("[key_name(user)] has removed the disguise lock on the agent ID ([name]) with [W]")
else
chameleon_card_action.hidden = TRUE
actions -= chameleon_card_action
chameleon_card_action.Remove(user)
log_game("[key_name(user)] has locked the disguise of the agent ID ([name]) with [W]")
// MONKESTATION ADDITION END

/obj/item/card/id/advanced/chameleon/Initialize(mapload)
. = ..()

var/datum/action/item_action/chameleon/change/id/chameleon_card_action = new(src)
// var/datum/action/item_action/chameleon/change/id/chameleon_card_action = new(src) MONKESTATION EDIT CHANGE OLD
chameleon_card_action = new(src) // MONKESTATION EDIT CHANGE NEW -- MOVED THE DATUM TO THE ITEM ITSELF
chameleon_card_action.chameleon_type = /obj/item/card/id/advanced
chameleon_card_action.chameleon_name = "ID Card"
chameleon_card_action.initialize_disguises()
Expand Down Expand Up @@ -1535,6 +1555,10 @@
return TRUE

/obj/item/card/id/advanced/chameleon/attack_self(mob/user)
// MONKESTATION ADDITION START
if(chameleon_card_action.hidden)
return ..()
// MONKESTATION ADDITION END
if(isliving(user) && user.mind)
var/popup_input = tgui_input_list(user, "Choose Action", "Agent ID", list("Show", "Forge/Reset", "Change Account ID"))
if(user.incapacitated())
Expand Down
Loading
Loading