Skip to content

Commit

Permalink
Show facehugger limit when examining eggs/morphers (#6386)
Browse files Browse the repository at this point in the history
# About the pull request

When you examine a hive core, it tells you the lesser drone limit, and
the current amount of lesser drones. This adds a similar behavior for
eggs and morphers with regards to playable facehuggers.

# Explain why it's good for the game

Helpful for ghosts to decide whether to play hugger, drone, neither, or
just for information.


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog

:cl:
qol: examining eggs/morphers tells you current number of huggers and the
limit
/:cl:

---------

Co-authored-by: harryob <[email protected]>
Co-authored-by: Drathek <[email protected]>
  • Loading branch information
3 people committed Jun 19, 2024
1 parent fbfdddb commit 6864722
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/modules/cm_aliens/structures/egg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
. = ..()
if(isxeno(user) && status == EGG_GROWN)
. += "Ctrl + Click egg to retrieve child into your empty hand if you can carry it."
if(isobserver(user) && status == EGG_GROWN)
var/datum/hive_status/hive = GLOB.hive_datum[hivenumber]
var/current_hugger_count = hive.get_current_playable_facehugger_count();
. += "There are currently [SPAN_NOTICE("[current_hugger_count]")] facehuggers in the hive. The hive can support [SPAN_NOTICE("[hive.playable_hugger_limit]")] facehuggers."

/obj/effect/alien/egg/attack_alien(mob/living/carbon/xenomorph/M)
if(status == EGG_BURST || status == EGG_DESTROYED)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/cm_aliens/structures/special/egg_morpher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
. = ..()
if(isxeno(user) || isobserver(user))
. += "It has [stored_huggers] facehuggers within, with [huggers_to_grow] more to grow (reserved: [huggers_reserved])."
if(isobserver(user))
var/current_hugger_count = linked_hive.get_current_playable_facehugger_count();
. += "There are currently [SPAN_NOTICE("[current_hugger_count]")] facehuggers in the hive. The hive can support [SPAN_NOTICE("[linked_hive.playable_hugger_limit]")] facehuggers."

/obj/effect/alien/resin/special/eggmorph/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/grab))
Expand Down
7 changes: 7 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/hive_status.dm
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,13 @@

return TRUE

/datum/hive_status/proc/get_current_playable_facehugger_count()
var/count = 0
for(var/mob/mob as anything in totalXenos)
if(isfacehugger(mob))
count++
return count

/datum/hive_status/proc/spawn_as_hugger(mob/dead/observer/user, atom/A)
var/mob/living/carbon/xenomorph/facehugger/hugger = new /mob/living/carbon/xenomorph/facehugger(A.loc, null, hivenumber)
user.mind.transfer_to(hugger, TRUE)
Expand Down

0 comments on commit 6864722

Please sign in to comment.