mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
[MIRROR] Holding a tactical item (cardboard cutout, plants) now gives TRAIT_UNKNOWN, replaces your name with the name of the tactical item (#29350)
* Holding a tactical item (cardboard cutout, plants) now gives TRAIT_UNKNOWN, replaces your name with the name of the tactical item (#85567) ## About The Pull Request I added TRAIT_UNKNOWN to the code for picking up and dropping potted plants. Picking them up will make you totally anonymous (and suspicious). This is the same thing that infiltrator suit and heretic shadow cloak does. I also added in some code that changes your displayed name to the name of the item, and then I had to jiggle ID code a bit so it wouldn't display your worn ID; it'll now display the forced name of the tactical object. ## Why It's Good For The Game Becoming an absolute master of disguise by hiding with a potted plant is hilarious. Causing people to become immensely paranoid of anyone holding a potted plant is very on-brand. Dropping the potted plant to reveal you're in full infiltrator gear or heretic aura is also a funny double bluff. The total anonymity afforded by this is balanced out by the fact that you have to use both hands to hold the plant so you can't defend yourself at all if you're making use of it. ## Changelog 🆑 Bisar add: The interns remembered to water the plants around the station; their foilage is so thick that it totally hides the identity of anyone holding them! /🆑 --------- Co-authored-by: Ubuntu <ubuntu@ ip-172-26-7-23.us-east-2.compute.internal> * Holding a tactical item (cardboard cutout, plants) now gives TRAIT_UNKNOWN, replaces your name with the name of the tactical item --------- Co-authored-by: Joshua Kidder <49173900+Metekillot@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@ ip-172-26-7-23.us-east-2.compute.internal>
This commit is contained in:
co-authored by
Ubuntu
Joshua Kidder
parent
d889bf2998
commit
b57d885abd
@@ -133,6 +133,10 @@
|
||||
#define VISIBLE_NAME_FACE 1
|
||||
//Index for the name of the id
|
||||
#define VISIBLE_NAME_ID 2
|
||||
//Index for whether their name is being overriden instead of obsfuscated
|
||||
#define VISIBLE_NAME_FORCED 3
|
||||
///from /mob/living/carbon/human/get_id_name; only returns if the mob has TRAIT_UNKNOWN and it's being overriden: (identity)
|
||||
#define COMSIG_HUMAN_GET_FORCED_NAME "human_get_forced_name"
|
||||
|
||||
// Mob transformation signals
|
||||
///Called when a human turns into a monkey, from /mob/living/carbon/proc/finish_monkeyize()
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(unmodify))
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATED_ICON, PROC_REF(on_icon_update))
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
|
||||
RegisterSignal(user, COMSIG_HUMAN_GET_VISIBLE_NAME, PROC_REF(on_name_inquiry))
|
||||
RegisterSignal(user, COMSIG_HUMAN_GET_FORCED_NAME, PROC_REF(on_name_inquiry))
|
||||
ADD_TRAIT(user, TRAIT_UNKNOWN, ref(src))
|
||||
|
||||
current_slot = slot
|
||||
|
||||
@@ -62,6 +65,24 @@
|
||||
image.plane = FLOAT_PLANE
|
||||
user.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/everyone, "sneaking_mission[REF(src)]", image)
|
||||
|
||||
|
||||
/datum/component/tactical/proc/on_name_inquiry(obj/item/source, list/identity)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/tactical_disguise_power = INFINITY // it's a flawless plan: they'll never look behind this unassuming potted plant
|
||||
if(identity[VISIBLE_NAME_FORCED])
|
||||
if(identity[VISIBLE_NAME_FORCED] >= tactical_disguise_power) // my disguise is too powerful for you, traveler! but seriously this is bad
|
||||
stack_trace("A name forcing signal ([identity[VISIBLE_NAME_FACE]]) has a priority collision with [src].")
|
||||
else
|
||||
identity[VISIBLE_NAME_FORCED] = tactical_disguise_power
|
||||
else
|
||||
identity[VISIBLE_NAME_FORCED] = tactical_disguise_power
|
||||
|
||||
var/obj/item/flawless_disguise = parent
|
||||
identity[VISIBLE_NAME_FACE] = flawless_disguise.name
|
||||
identity[VISIBLE_NAME_ID] = flawless_disguise.name // for Unknown (as 'potted plant') says
|
||||
|
||||
|
||||
/datum/component/tactical/proc/unmodify(obj/item/source, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
if(!source)
|
||||
@@ -76,9 +97,12 @@
|
||||
COMSIG_ITEM_DROPPED,
|
||||
COMSIG_MOVABLE_MOVED,
|
||||
COMSIG_ATOM_UPDATED_ICON,
|
||||
COMSIG_HUMAN_GET_VISIBLE_NAME,
|
||||
COMSIG_HUMAN_GET_FORCED_NAME,
|
||||
))
|
||||
current_slot = null
|
||||
user.remove_alt_appearance("sneaking_mission[REF(src)]")
|
||||
REMOVE_TRAIT(user, TRAIT_UNKNOWN, ref(src))
|
||||
|
||||
///Checks if a mob is holding us, and if so we will modify our appearance to properly match w/ the mob.
|
||||
/datum/component/tactical/proc/tactical_update(obj/item/source)
|
||||
|
||||
@@ -132,6 +132,15 @@
|
||||
/// Called when someone tries to figure out what our identity is, but they can't see it because of the newspaper
|
||||
/obj/item/newspaper/proc/holder_checked_name(mob/living/carbon/human/source, list/identity)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/newspaper_obscurity_priority = 100 // how powerful obscuring your appearance with a newspaper is
|
||||
if(identity[VISIBLE_NAME_FORCED])
|
||||
if(identity[VISIBLE_NAME_FORCED] > newspaper_obscurity_priority) // the other set forced name is forcier than breaking news
|
||||
return
|
||||
else if(identity[VISIBLE_NAME_FORCED] == newspaper_obscurity_priority)
|
||||
stack_trace("A name-setting signal operation ([identity[VISIBLE_NAME_FACE]]) has a priority collision with [src].")
|
||||
else
|
||||
identity[VISIBLE_NAME_FORCED] = newspaper_obscurity_priority
|
||||
identity[VISIBLE_NAME_FACE] = ""
|
||||
identity[VISIBLE_NAME_ID] = ""
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/obj/item/kirbyplants
|
||||
name = "potted plant"
|
||||
//icon = 'icons/obj/fluff/flora/plants.dmi' // ORIGINAL
|
||||
|
||||
@@ -103,6 +103,8 @@
|
||||
|
||||
/obj/item/clothing/suit/armor/abductor/vest/proc/return_disguise_name(mob/living/carbon/human/source, list/identity)
|
||||
SIGNAL_HANDLER
|
||||
if(identity[VISIBLE_NAME_FORCED]) // name-forcing overrides disguise
|
||||
return
|
||||
identity[VISIBLE_NAME_FACE] = disguise.name
|
||||
identity[VISIBLE_NAME_ID] = ""
|
||||
|
||||
|
||||
@@ -58,10 +58,13 @@
|
||||
|
||||
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a separate proc as it'll be useful elsewhere
|
||||
/mob/living/carbon/human/get_visible_name(add_id_name = TRUE, force_real_name = FALSE)
|
||||
var/list/identity = list(null, null)
|
||||
var/list/identity = list(null, null, null)
|
||||
SEND_SIGNAL(src, COMSIG_HUMAN_GET_VISIBLE_NAME, identity)
|
||||
var/signal_face = LAZYACCESS(identity, VISIBLE_NAME_FACE)
|
||||
var/signal_id = LAZYACCESS(identity, VISIBLE_NAME_ID)
|
||||
var/force_set = LAZYACCESS(identity, VISIBLE_NAME_FORCED)
|
||||
if(force_set) // our name is overriden by something
|
||||
return signal_face // no need to null-check, because force_set will always set a signal_face
|
||||
var/face_name = !isnull(signal_face) ? signal_face : get_face_name("")
|
||||
var/id_name = !isnull(signal_id) ? signal_id : get_id_name("")
|
||||
if (force_real_name)
|
||||
@@ -107,6 +110,11 @@
|
||||
var/obj/item/card/id/id = wear_id
|
||||
if(HAS_TRAIT(src, TRAIT_UNKNOWN))
|
||||
. = if_no_id //You get NOTHING, no id name, good day sir
|
||||
var/list/identity = list(null, null, null)
|
||||
SEND_SIGNAL(src, COMSIG_HUMAN_GET_FORCED_NAME, identity)
|
||||
if(identity[VISIBLE_NAME_FORCED])
|
||||
. = identity[VISIBLE_NAME_FACE] // to return forced names when unknown, instead of ID
|
||||
return
|
||||
if(istype(wallet))
|
||||
id = wallet.front_id
|
||||
if(istype(id))
|
||||
|
||||
Reference in New Issue
Block a user