Skip to content

Commit

Permalink
[MIRROR] Shrunk arrow from pointing at things. Command roles unaffect…
Browse files Browse the repository at this point in the history
…ed thanks to id trims (also new skillchip). (Skyrat-SS13#29461)

Shrunk arrow from pointing at things. Command roles unaffected thanks to id trims (also new skillchip).

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
  • Loading branch information
SkyratBot and Ghommie committed Aug 21, 2024
1 parent d268ec8 commit e6e2af8
Show file tree
Hide file tree
Showing 23 changed files with 253 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
/// From base of area/Exited(): (area/left, direction)
#define COMSIG_MOVABLE_EXITED_AREA "movable_exited_area"

///from base of /atom/movable/point_at: (atom/A, obj/effect/temp_visual/point/point)
#define COMSIG_MOVABLE_POINTED "movable_pointed"

/// Sent to movables when they are being stolen by a spy: (mob/living/spy, datum/spy_bounty/bounty)
#define COMSIG_MOVABLE_SPY_STEALING "movable_spy_stealing"
/// Called when something is pushed by a living mob bumping it: (mob/living/pusher, push force)
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@
/// from base of mob/swap_hand(): ()
/// Performed after the hands are swapped.
#define COMSIG_MOB_SWAP_HANDS "mob_swap_hands"
///from base of /mob/verb/pointed: (atom/A)
#define COMSIG_MOB_POINTED "mob_pointed"
///Mob is trying to open the wires of a target [/atom], from /datum/wires/interactable(): (atom/target)
#define COMSIG_TRY_WIRES_INTERACT "try_wires_interact"
#define COMPONENT_CANT_INTERACT_WIRES (1<<0)
Expand Down
6 changes: 6 additions & 0 deletions code/controllers/subsystem/id_access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ SUBSYSTEM_DEF(id_access)

id_card.clear_access()
id_card.trim = trim
id_card.big_pointer = trim.big_pointer
id_card.pointer_color = trim.pointer_color

if(copy_access)
id_card.access = trim.access.Copy()
Expand Down Expand Up @@ -442,6 +444,8 @@ SUBSYSTEM_DEF(id_access)
id_card.department_color_override = trim.department_color
id_card.department_state_override = trim.department_state
id_card.subdepartment_color_override = trim.subdepartment_color
id_card.big_pointer = trim.big_pointer
id_card.pointer_color = trim.pointer_color

if(!check_forged || !id_card.forged)
id_card.assignment = trim.assignment
Expand All @@ -462,6 +466,8 @@ SUBSYSTEM_DEF(id_access)
id_card.department_color_override = null
id_card.department_state_override = null
id_card.subdepartment_color_override = null
id_card.big_pointer = id_card.trim.big_pointer
id_card.pointer_color = id_card.trim.pointer_color

/**
* Adds the accesses associated with a trim to an ID card.
Expand Down
6 changes: 3 additions & 3 deletions code/datums/ai/oldhostile/hostile_tameable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@
if(pawn.Adjacent(pawn, new_friend))
new_friend.visible_message("<b>[pawn]</b> looks at [new_friend] in a friendly manner!", span_notice("[pawn] looks at you in a friendly manner!"))
set_blackboard_key(BB_HOSTILE_FRIEND, new_friend)
RegisterSignal(new_friend, COMSIG_MOB_POINTED, PROC_REF(check_point))
RegisterSignal(new_friend, COMSIG_MOVABLE_POINTED, PROC_REF(check_point))
RegisterSignal(new_friend, COMSIG_MOB_SAY, PROC_REF(check_verbal_command))

/// Someone is being mean to us, take them off our friends (add actual enemies behavior later)
/datum/ai_controller/hostile_friend/proc/unfriend()
var/mob/living/old_friend = blackboard[BB_HOSTILE_FRIEND]
if(old_friend)
UnregisterSignal(old_friend, list(COMSIG_MOB_POINTED, COMSIG_MOB_SAY))
UnregisterSignal(old_friend, list(COMSIG_MOVABLE_POINTED, COMSIG_MOB_SAY))
clear_blackboard_key(BB_HOSTILE_FRIEND)

/// Someone is looking at us, if we're currently carrying something then show what it is, and include a message if they're our friend
Expand Down Expand Up @@ -190,7 +190,7 @@
set_blackboard_key(BB_HOSTILE_ORDER_MODE, HOSTILE_COMMAND_ATTACK)

/// Someone we like is pointing at something, see if it's something we might want to interact with (like if they might want us to fetch something for them)
/datum/ai_controller/hostile_friend/proc/check_point(mob/pointing_friend, atom/movable/pointed_movable)
/datum/ai_controller/hostile_friend/proc/check_point(mob/pointing_friend, atom/movable/pointed_movable, obj/effect/temp_visual/point/point)
SIGNAL_HANDLER

var/mob/living/simple_animal/hostile/living_pawn = pawn
Expand Down
6 changes: 3 additions & 3 deletions code/datums/components/pet_commands/pet_command.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@

/datum/pet_command/point_targeting/add_new_friend(mob/living/tamer)
. = ..()
RegisterSignal(tamer, COMSIG_MOB_POINTED, PROC_REF(on_point))
RegisterSignal(tamer, COMSIG_MOVABLE_POINTED, PROC_REF(on_point))

/datum/pet_command/point_targeting/remove_friend(mob/living/unfriended)
. = ..()
UnregisterSignal(unfriended, COMSIG_MOB_POINTED)
UnregisterSignal(unfriended, COMSIG_MOVABLE_POINTED)

/// Target the pointed atom for actions
/datum/pet_command/point_targeting/proc/on_point(mob/living/friend, atom/pointed_atom)
/datum/pet_command/point_targeting/proc/on_point(mob/living/friend, atom/pointed_atom, obj/effect/temp_visual/point/point)
SIGNAL_HANDLER

var/mob/living/parent = weak_parent.resolve()
Expand Down
6 changes: 3 additions & 3 deletions code/datums/components/riding/riding_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,9 @@

/datum/component/riding/creature/leaper/Initialize(mob/living/riding_mob, force = FALSE, ride_check_flags = NONE, potion_boost = FALSE)
. = ..()
RegisterSignal(riding_mob, COMSIG_MOB_POINTED, PROC_REF(attack_pointed))
RegisterSignal(riding_mob, COMSIG_MOVABLE_POINTED, PROC_REF(attack_pointed))

/datum/component/riding/creature/leaper/proc/attack_pointed(mob/living/rider, atom/pointed)
/datum/component/riding/creature/leaper/proc/attack_pointed(mob/living/rider, atom/pointed, obj/effect/temp_visual/point/point)
SIGNAL_HANDLER
if(!isclosedturf(pointed))
return
Expand All @@ -556,7 +556,7 @@

/datum/component/riding/leaper/handle_unbuckle(mob/living/rider)
. = ..()
UnregisterSignal(rider, COMSIG_MOB_POINTED)
UnregisterSignal(rider, COMSIG_MOVABLE_POINTED)

/datum/component/riding/creature/raptor
require_minigame = TRUE
Expand Down
5 changes: 5 additions & 0 deletions code/datums/id_trim/_id_trim.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
/// Accesses that this trim unlocks on a card that require wildcard slots to apply. If a card cannot accept all a trim's wildcard accesses, the card is incompatible with the trim.
var/list/wildcard_access = list()

///If true, IDs with this trim will grant wearers with bigger arrows when pointing
var/big_pointer = FALSE
///If set, IDs with this trim will give wearers arrows of different colors when pointing
var/pointer_color

/// Returns the SecHUD job icon state for whatever this object's ID card is, if it has one.
/obj/item/proc/get_sechud_job_icon_state()
var/obj/item/card/id/id_card = GetID()
Expand Down
2 changes: 2 additions & 0 deletions code/datums/id_trim/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
department_color = COLOR_CENTCOM_BLUE
subdepartment_color = COLOR_SERVICE_LIME
threat_modifier = -INFINITY
big_pointer = TRUE
pointer_color = COLOR_GREEN

/datum/id_trim/admin/New()
. = ..()
Expand Down
16 changes: 16 additions & 0 deletions code/datums/id_trim/centcom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
department_color = COLOR_CENTCOM_BLUE
subdepartment_color = COLOR_CENTCOM_BLUE
threat_modifier = -10 // Centcom are legally allowed to do whatever they want
big_pointer = TRUE
pointer_color = COLOR_CENTCOM_BLUE

/// Trim for Centcom VIPs
/datum/id_trim/centcom/vip
Expand All @@ -20,6 +22,7 @@
trim_state = "trim_janitor"
department_color = COLOR_CENTCOM_BLUE
subdepartment_color = COLOR_SERVICE_LIME
big_pointer = FALSE

/// Trim for Centcom Thunderdome Overseers.
/datum/id_trim/centcom/thunderdome_overseer
Expand All @@ -35,10 +38,12 @@
/datum/id_trim/centcom/intern
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_WEAPONS)
assignment = "CentCom Intern"
big_pointer = FALSE

/// Trim for Centcom Head Interns. Different assignment, common station access added on.
/datum/id_trim/centcom/intern/head
assignment = "CentCom Head Intern"
big_pointer = TRUE

/datum/id_trim/centcom/intern/head/New()
. = ..()
Expand All @@ -49,11 +54,13 @@
/datum/id_trim/centcom/bounty_hunter
access = list(ACCESS_CENT_GENERAL)
assignment = "Bounty Hunter"
big_pointer = FALSE

/// Trim for Centcom Bartenders.
/datum/id_trim/centcom/bartender
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_CENT_BAR)
assignment = JOB_CENTCOM_BARTENDER
big_pointer = FALSE

/// Trim for Centcom Medical Officers.
/datum/id_trim/centcom/medical_officer
Expand All @@ -68,6 +75,7 @@
/// Trim for Centcom Specops Officers. All Centcom and Station Access.
/datum/id_trim/centcom/specops_officer
assignment = JOB_CENTCOM_SPECIAL_OFFICER
big_pointer = FALSE

/datum/id_trim/centcom/specops_officer/New()
. = ..()
Expand Down Expand Up @@ -129,6 +137,7 @@
trim_state = "trim_securityofficer"
subdepartment_color = COLOR_SECURITY_RED
sechud_icon_state = SECHUD_SECURITY_RESPONSE_OFFICER
big_pointer = FALSE

/datum/id_trim/centcom/ert/security/New()
. = ..()
Expand All @@ -141,6 +150,7 @@
trim_state = "trim_stationengineer"
subdepartment_color = COLOR_ENGINEERING_ORANGE
sechud_icon_state = SECHUD_ENGINEERING_RESPONSE_OFFICER
big_pointer = FALSE

/datum/id_trim/centcom/ert/engineer/New()
. = ..()
Expand All @@ -153,6 +163,7 @@
trim_state = "trim_medicaldoctor"
subdepartment_color = COLOR_MEDICAL_BLUE
sechud_icon_state = SECHUD_MEDICAL_RESPONSE_OFFICER
big_pointer = FALSE

/datum/id_trim/centcom/ert/medical/New()
. = ..()
Expand All @@ -165,6 +176,7 @@
trim_state = "trim_chaplain"
subdepartment_color = COLOR_SERVICE_LIME
sechud_icon_state = SECHUD_RELIGIOUS_RESPONSE_OFFICER
big_pointer = FALSE

/datum/id_trim/centcom/ert/chaplain/New()
. = ..()
Expand All @@ -177,6 +189,7 @@
trim_state = "trim_ert_janitor"
subdepartment_color = COLOR_SERVICE_LIME
sechud_icon_state = SECHUD_JANITORIAL_RESPONSE_OFFICER
big_pointer = FALSE

/datum/id_trim/centcom/ert/janitor/New()
. = ..()
Expand All @@ -189,6 +202,7 @@
trim_state = "trim_clown"
subdepartment_color = COLOR_MAGENTA
sechud_icon_state = SECHUD_ENTERTAINMENT_RESPONSE_OFFICER
big_pointer = FALSE

/datum/id_trim/centcom/ert/clown/New()
. = ..()
Expand All @@ -197,6 +211,8 @@

/datum/id_trim/centcom/ert/militia
assignment = "Frontier Militia"
big_pointer = FALSE

/datum/id_trim/centcom/ert/militia/general
assignment = "Frontier Militia General"
big_pointer = TRUE
17 changes: 17 additions & 0 deletions code/datums/id_trim/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@
ACCESS_CHANGE_IDS,
)
job = /datum/job/captain
big_pointer = TRUE
pointer_color = COLOR_COMMAND_BLUE

/// Captain gets all station accesses hardcoded in because it's the Captain.
/datum/id_trim/job/captain/New()
Expand Down Expand Up @@ -360,6 +362,8 @@
ACCESS_CHANGE_IDS,
)
job = /datum/job/chief_engineer
big_pointer = TRUE
pointer_color = COLOR_ENGINEERING_ORANGE

/datum/id_trim/job/chief_medical_officer
assignment = JOB_CHIEF_MEDICAL_OFFICER
Expand Down Expand Up @@ -399,6 +403,8 @@
ACCESS_CHANGE_IDS,
)
job = /datum/job/chief_medical_officer
big_pointer = TRUE
pointer_color = COLOR_MEDICAL_BLUE

/datum/id_trim/job/clown
assignment = JOB_CLOWN
Expand Down Expand Up @@ -612,6 +618,8 @@
ACCESS_CHANGE_IDS,
)
job = /datum/job/head_of_personnel
big_pointer = TRUE
pointer_color = COLOR_SERVICE_LIME

/datum/id_trim/job/head_of_security
assignment = JOB_HEAD_OF_SECURITY
Expand Down Expand Up @@ -661,6 +669,8 @@
ACCESS_CHANGE_IDS,
)
job = /datum/job/head_of_security
big_pointer = TRUE
pointer_color = COLOR_SECURITY_RED

/datum/id_trim/job/head_of_security/refresh_trim_access()
. = ..()
Expand Down Expand Up @@ -893,6 +903,8 @@
ACCESS_CHANGE_IDS,
)
job = /datum/job/quartermaster
big_pointer = TRUE
pointer_color = COLOR_CARGO_BROWN

/datum/id_trim/job/research_director
assignment = JOB_RESEARCH_DIRECTOR
Expand Down Expand Up @@ -941,6 +953,8 @@
ACCESS_CHANGE_IDS,
)
job = /datum/job/research_director
big_pointer = TRUE
pointer_color = COLOR_SCIENCE_PINK

/datum/id_trim/job/roboticist
assignment = JOB_ROBOTICIST
Expand Down Expand Up @@ -1206,6 +1220,7 @@
extra_access = list()
template_access = list()
job = /datum/job/veteran_advisor
big_pointer = TRUE

/datum/id_trim/job/veteran_advisor/refresh_trim_access()
. = ..()
Expand Down Expand Up @@ -1275,3 +1290,5 @@
extra_access = list()
template_access = list()
job = /datum/job/human_ai
big_pointer = TRUE
pointer_color = COLOR_MODERATE_BLUE
10 changes: 8 additions & 2 deletions code/datums/id_trim/ruins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
/datum/id_trim/centcom/corpse/commander
assignment = "Commander"
access = list(ACCESS_CENT_CAPTAIN, ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_MEDICAL, ACCESS_CENT_STORAGE)
big_pointer = TRUE

/// Trim for various Centcom corpses.
/datum/id_trim/centcom/corpse/private_security
Expand Down Expand Up @@ -115,12 +116,14 @@
/datum/id_trim/pirate/captain
assignment = "Pirate Captain"
trim_state = "trim_captain"
big_pointer = TRUE

/datum/id_trim/pirate/silverscale
assignment = "Silver Scale Member"

/datum/id_trim/pirate/captain/silverscale
assignment = "Silver Scale VIP"
big_pointer = TRUE

//Trims for Dangerous Research, used in ``dangerous_research.dm``
/datum/id_trim/away/dangerous_research
Expand All @@ -130,6 +133,7 @@
/datum/id_trim/away/dangerous_research/head_occultist
assignment = "Head Occultist"
access = list(ACCESS_AWAY_SCIENCE, ACCESS_AWAY_COMMAND)
big_pointer = TRUE

//Trims for waystation.dmm space ruin
/datum/id_trim/away/waystation/cargo_technician
Expand All @@ -143,6 +147,7 @@
trim_state = "trim_quartermaster"
department_color = COLOR_CARGO_BROWN
access = list(ACCESS_AWAY_SUPPLY, ACCESS_AWAY_COMMAND)
big_pointer = TRUE

/datum/id_trim/away/waystation/security
assignment = "Waystation Security Officer"
Expand All @@ -162,8 +167,9 @@
/datum/id_trim/away/the_outlet/mad_manager
assignment = "The Mad Manager"
access = list(ACCESS_AWAY_GENERAL, ACCESS_AWAY_MEDICAL, ACCESS_AWAY_SEC)
big_pointer = TRUE

//Haunted Trading Post IDs //
//Haunted Trading Post IDs
/datum/id_trim/away/hauntedtradingpost
assignment = "Donk Co. Employee"
department_color = COLOR_ENGINEERING_ORANGE
Expand All @@ -174,4 +180,4 @@
/datum/id_trim/away/hauntedtradingpost/boss
assignment = "Donk Co. Executive"
access = list(ACCESS_SYNDICATE, ACCESS_AWAY_COMMAND)
// //
big_pointer = TRUE
Loading

0 comments on commit e6e2af8

Please sign in to comment.