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

gives all xenos access to the (xeno) tacmap while the queen is on ovi #3690

Merged
merged 3 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@

// from /datum/emergency_call/proc/spawn_candidates()
#define COMSIG_ERT_SETUP "ert_setup"

// from /proc/update_living_queens() : /mob/living/carbon/xenomorph/queen
#define COMSIG_HIVE_NEW_QUEEN "hive_new_queen"
Original file line number Diff line number Diff line change
Expand Up @@ -479,3 +479,60 @@
// Perform check_state(TRUE) silently:
if(xeno && !xeno.is_mob_incapacitated() || !xeno.buckled || !xeno.evolving && xeno.plasma_stored >= plasma_cost)
return TRUE

/datum/action/xeno_action/onclick/tacmap
name = "View Tactical Map"
action_icon_state = "toggle_queen_zoom"
ability_name = "view tacmap"

var/mob/living/carbon/xenomorph/queen/tracked_queen
harryob marked this conversation as resolved.
Show resolved Hide resolved

/datum/action/xeno_action/onclick/tacmap/give_to(mob/living/carbon/xenomorph/xeno)
. = ..()

RegisterSignal(xeno.hive, COMSIG_HIVE_NEW_QUEEN, PROC_REF(handle_new_queen))
harryob marked this conversation as resolved.
Show resolved Hide resolved

if(!xeno.hive.living_xeno_queen)
hide_from(xeno)
return

if(!xeno.hive.living_xeno_queen.ovipositor)
hide_from(xeno)

handle_new_queen(new_queen = xeno.hive.living_xeno_queen)

/datum/action/xeno_action/onclick/tacmap/proc/handle_new_queen(datum/hive_status/hive, mob/living/carbon/xenomorph/queen/new_queen)
harryob marked this conversation as resolved.
Show resolved Hide resolved
SIGNAL_HANDLER

if(tracked_queen)
UnregisterSignal(tracked_queen, list(COMSIG_QUEEN_MOUNT_OVIPOSITOR, COMSIG_QUEEN_DISMOUNT_OVIPOSITOR, COMSIG_PARENT_QDELETING))

tracked_queen = new_queen

if(!tracked_queen.ovipositor)
hide_from(owner)

RegisterSignal(tracked_queen, COMSIG_QUEEN_MOUNT_OVIPOSITOR, PROC_REF(handle_mount_ovipositor))
RegisterSignal(tracked_queen, COMSIG_QUEEN_DISMOUNT_OVIPOSITOR, PROC_REF(handle_dismount_ovipositor))
RegisterSignal(tracked_queen, COMSIG_PARENT_QDELETING, PROC_REF(handle_queen_qdel))

/datum/action/xeno_action/onclick/tacmap/proc/handle_mount_ovipositor()
harryob marked this conversation as resolved.
Show resolved Hide resolved
SIGNAL_HANDLER

unhide_from(owner)

/datum/action/xeno_action/onclick/tacmap/proc/handle_dismount_ovipositor()
SIGNAL_HANDLER

hide_from(owner)

/datum/action/xeno_action/onclick/tacmap/proc/handle_queen_qdel()
SIGNAL_HANDLER

tracked_queen = null
hide_from(owner)

/datum/action/xeno_action/onclick/tacmap/use_ability(atom/target)
var/mob/living/carbon/xenomorph/xeno = owner
xeno.xeno_tacmap()
return ..()
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
/datum/action/xeno_action/activable/spray_acid/boiler, //3rd macro
/datum/action/xeno_action/onclick/toggle_long_range/boiler, //4rd macro
/datum/action/xeno_action/onclick/acid_shroud, //4th macro

/datum/action/xeno_action/onclick/tacmap,
)

/mob/living/carbon/xenomorph/boiler/Initialize(mapload, mob/living/carbon/xenomorph/oldxeno, h_number)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
/datum/action/xeno_action/onclick/place_trap, //second macro
/datum/action/xeno_action/activable/burrow, //third macro
/datum/action/xeno_action/onclick/tremor, //fourth macro
/datum/action/xeno_action/onclick/tacmap,
)

inherent_verbs = list(
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
/datum/action/xeno_action/activable/throw_hugger, //3rd macro
/datum/action/xeno_action/activable/retrieve_egg, //4th macro
/datum/action/xeno_action/onclick/set_hugger_reserve,
/datum/action/xeno_action/onclick/tacmap,
)

inherent_verbs = list(
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
/datum/action/xeno_action/activable/pounce/crusher_charge,
/datum/action/xeno_action/onclick/crusher_stomp,
/datum/action/xeno_action/onclick/crusher_shield,
/datum/action/xeno_action/onclick/tacmap,
)

claw_type = CLAW_TYPE_VERY_SHARP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
/datum/action/xeno_action/activable/headbutt,
/datum/action/xeno_action/onclick/tail_sweep,
/datum/action/xeno_action/activable/fortify,
/datum/action/xeno_action/onclick/tacmap,
)
mutation_icon_state = DEFENDER_NORMAL
mutation_type = DEFENDER_NORMAL
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
/datum/action/xeno_action/onclick/choose_resin, //second macro
/datum/action/xeno_action/activable/secrete_resin, //third macro
/datum/action/xeno_action/activable/transfer_plasma, //fourth macro
/datum/action/xeno_action/onclick/tacmap,
)
inherent_verbs = list(
/mob/living/carbon/xenomorph/proc/vent_crawl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
/datum/action/xeno_action/watch_xeno,
/datum/action/xeno_action/onclick/xenohide,
/datum/action/xeno_action/activable/pounce/facehugger,
/datum/action/xeno_action/onclick/tacmap,
)
inherent_verbs = list(
/mob/living/carbon/xenomorph/proc/vent_crawl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
/datum/action/xeno_action/onclick/xenohide,
/datum/action/xeno_action/activable/pounce/runner,
/datum/action/xeno_action/onclick/toggle_long_range/runner,
/datum/action/xeno_action/onclick/tacmap,
)
inherent_verbs = list(
/mob/living/carbon/xenomorph/proc/vent_crawl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
/datum/action/xeno_action/activable/secrete_resin/hivelord, //third macro
/datum/action/xeno_action/activable/transfer_plasma/hivelord, // to be consistent with drone placement
/datum/action/xeno_action/active_toggle/toggle_speed, //fourth macro
/datum/action/xeno_action/onclick/tacmap,
)

inherent_verbs = list(
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Larva.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
/datum/action/xeno_action/onclick/xeno_resting,
/datum/action/xeno_action/watch_xeno,
/datum/action/xeno_action/onclick/xenohide,
/datum/action/xeno_action/onclick/tacmap,
)
inherent_verbs = list(
/mob/living/carbon/xenomorph/proc/vent_crawl,
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
/datum/action/xeno_action/activable/pounce/lurker,
/datum/action/xeno_action/onclick/lurker_invisibility,
/datum/action/xeno_action/onclick/lurker_assassinate,
/datum/action/xeno_action/onclick/tacmap,
)
inherent_verbs = list(
/mob/living/carbon/xenomorph/proc/vent_crawl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
/datum/action/xeno_action/activable/pounce/base_prae_dash,
/datum/action/xeno_action/activable/prae_acid_ball,
/datum/action/xeno_action/activable/spray_acid/base_prae_spray_acid,
/datum/action/xeno_action/onclick/tacmap,
)

icon_xeno = 'icons/mob/xenos/praetorian.dmi'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
/datum/action/xeno_action/onclick/predalien_roar,
/datum/action/xeno_action/onclick/smash,
/datum/action/xeno_action/activable/devastate,
/datum/action/xeno_action/onclick/tacmap,
)
mutation_type = "Normal"

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Ravager.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
/datum/action/xeno_action/activable/pounce/charge,
/datum/action/xeno_action/onclick/empower,
/datum/action/xeno_action/activable/scissor_cut,
/datum/action/xeno_action/onclick/tacmap,
)

icon_xeno = 'icons/mob/xenos/ravager.dmi'
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Runner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
/datum/action/xeno_action/activable/pounce/runner,
/datum/action/xeno_action/activable/runner_skillshot,
/datum/action/xeno_action/onclick/toggle_long_range/runner,
/datum/action/xeno_action/onclick/tacmap,
)
inherent_verbs = list(
/mob/living/carbon/xenomorph/proc/vent_crawl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
/datum/action/xeno_action/activable/slowing_spit, //first macro
/datum/action/xeno_action/activable/scattered_spit, //second macro
/datum/action/xeno_action/onclick/paralyzing_slash, //third macro
/datum/action/xeno_action/onclick/tacmap,
)
inherent_verbs = list(
/mob/living/carbon/xenomorph/proc/vent_crawl,
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Spitter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
/datum/action/xeno_action/activable/xeno_spit,
/datum/action/xeno_action/onclick/charge_spit,
/datum/action/xeno_action/activable/spray_acid/spitter,
/datum/action/xeno_action/onclick/tacmap,
)
inherent_verbs = list(
/mob/living/carbon/xenomorph/proc/vent_crawl,
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Warrior.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
/datum/action/xeno_action/activable/warrior_punch,
/datum/action/xeno_action/activable/lunge,
/datum/action/xeno_action/activable/fling,
/datum/action/xeno_action/onclick/tacmap,
)

mutation_type = WARRIOR_NORMAL
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@
SStracking.set_leader("hive_[hivenumber]", queen)
SShive_status.wait = 2 SECONDS

SEND_SIGNAL(src, COMSIG_HIVE_NEW_QUEEN, queen)
living_xeno_queen = queen

recalculate_hive()
Expand Down