Skip to content

Commit

Permalink
Forsaken/Feral Xenos can use hive status. (#5693)
Browse files Browse the repository at this point in the history
# About the pull request
due to #5316, the hive status UI checks for a living queen, meaning that
hives without living queens (including those that specifically have
allow_no_queen_actions (forsaken xenos) were unable to use hive status.

while making this PR I noticed that there were two ways to get
hive_status and fixed it(and also carried over the we/you).

don't look at the branch name.
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
I like ~~buffing~~ fixing forsaken xenos. also being able to use hive
status is intended
# Testing Photographs and Procedure
<details>
<summary>Screenshots Are here! Click me!</summary>
forsaken:


![image](https://github.com/cmss13-devs/cmss13/assets/54422837/63d8053e-8e88-41fd-91a3-07382c3c9f64)

normal hive (I changed the we/you after this was made)


![image](https://github.com/cmss13-devs/cmss13/assets/54422837/178a7c33-dfea-4418-b341-75341fbacf29)


![image](https://github.com/cmss13-devs/cmss13/assets/54422837/54c64de5-0f73-4d80-988b-f0df8dc15b1b)

</details>


# Changelog
:cl:
fix: Forsaken and Feral xenos can now (correctly) use hive-status
spellcheck: fixed a case where we/our wouldn't be used when attempting
to access hive status with no queen
/:cl:
  • Loading branch information
private-tristan committed Feb 20, 2024
1 parent 7f9c6c5 commit b81570c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
18 changes: 3 additions & 15 deletions code/datums/keybinding/xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,21 +189,9 @@
. = ..()
if(.)
return

var/mob/living/carbon/xenomorph/current_xeno = user?.mob

if(!current_xeno?.hive)
return

if((!current_xeno.hive.living_xeno_queen || SSmapping.configs[GROUND_MAP].map_name == MAP_WHISKEY_OUTPOST) && !current_xeno.hive.allow_no_queen_actions) //No Hive status on WO
to_chat(current_xeno, SPAN_WARNING("There is no Queen. We are alone."))
return

if(current_xeno.interference)
to_chat(current_xeno, SPAN_WARNING("A headhunter temporarily cut off our psychic connection!"))
return

current_xeno.hive.hive_ui.open_hive_status(current_xeno)
var/mob/living/carbon/xenomorph/xeno = user.mob
xeno.hive_status()
return TRUE

/datum/keybinding/xenomorph/hide
hotkey_keys = list("Unbound")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/hive_status_ui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
return UI_INTERACTIVE

// If the Queen died or is otherwise missing.
if(!assoc_hive.living_xeno_queen)
if(!assoc_hive.living_xeno_queen && !assoc_hive.allow_no_queen_actions)
return UI_CLOSE

/datum/hive_status_ui/ui_data(mob/user)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/xenomorph/xeno_verbs.dm
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
//// Holds Xeno verbs that don't belong anywhere else.
/mob/living/carbon/xenomorph/verb/hive_status()
set name = "Hive Status"
set desc = "Check the status of your current hive."
set desc = "Check the status of our current hive."
set category = "Alien"

if(!hive)
return

if((!hive.living_xeno_queen || SSmapping.configs[GROUND_MAP].map_name == MAP_WHISKEY_OUTPOST) && !hive.allow_no_queen_actions) //No Hive status on WO
to_chat(src, SPAN_WARNING("There is no Queen. You are alone."))
to_chat(src, SPAN_WARNING("There is no Queen. We are alone."))
return

if(interference)
to_chat(src, SPAN_WARNING("A headhunter temporarily cut off your psychic connection!"))
to_chat(src, SPAN_WARNING("A headhunter temporarily cut off our psychic connection!"))
return

hive.hive_ui.open_hive_status(src)
Expand Down

0 comments on commit b81570c

Please sign in to comment.