Skip to content

Commit

Permalink
Adds cached larva queue message to observer status panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Sep 25, 2023
1 parent 933efa9 commit 945d18b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,11 @@
var/mob/dead/observer/cur_obs = candidates[i]

// Generate the messages
var/cached_message = SPAN_XENONOTICE("You are currently [i-dequeued]\th in the larva queue.")
var/cached_message = "You are currently [i-dequeued]\th in the larva queue."
cur_obs.larva_queue_cached_message = cached_message
if(!cache_only)
var/chat_message = dequeued ? replacetext(cached_message, "currently", "now") : cached_message
to_chat(candidates[i], chat_message)
to_chat(candidates[i], SPAN_XENONOTICE(chat_message))

/proc/convert_k2c(temp)
return ((temp - T0C))
Expand Down
10 changes: 5 additions & 5 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ Additional game mode variables.
var/mob/dead/observer/candidate_observer = xeno_candidate
if(istype(candidate_observer))
if(candidate_observer.larva_queue_cached_message)
to_chat(xeno_candidate, candidate_observer.larva_queue_cached_message)
to_chat(xeno_candidate, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
return FALSE

// No cache, lets check now then
Expand All @@ -389,14 +389,14 @@ Additional game mode variables.
cur_hive = GLOB.hive_datum[hive_num]
for(var/mob_name in cur_hive.banished_ckeys)
if(cur_hive.banished_ckeys[mob_name] == xeno_candidate.ckey)
candidate_observer.larva_queue_cached_message += "\n" + SPAN_WARNING("NOTE: You are banished from the [cur_hive] and you may not rejoin unless the Queen re-admits you or dies. Your queue number won't update until there is a hive you aren't banished from.")
candidate_observer.larva_queue_cached_message += "\nNOTE: You are banished from the [cur_hive] and you may not rejoin unless the Queen re-admits you or dies. Your queue number won't update until there is a hive you aren't banished from."
break
to_chat(xeno_candidate, candidate_observer.larva_queue_cached_message)
to_chat(xeno_candidate, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
return FALSE

// We aren't in queue yet, lets teach them about the queue then
candidate_observer.larva_queue_cached_message = SPAN_XENONOTICE("You are currently awaiting assignment in the larva queue. The ordering is based on your time of death or the time you joined. When you have been dead long enough and are not inactive, you will periodically receive messages where you are in the queue relative to other currently valid xeno candidates. Your current position will shift as others change their preferences or go inactive, but your relative position compared to all observers is the same. Note: Playing as a facehugger or in the thunderdome will not alter your time of death. This means you won't lose your relative place in queue if you step away, disconnect, play as a facehugger, or play in the thunderdome.")
to_chat(xeno_candidate, candidate_observer.larva_queue_cached_message)
candidate_observer.larva_queue_cached_message = "You are currently awaiting assignment in the larva queue. The ordering is based on your time of death or the time you joined. When you have been dead long enough and are not inactive, you will periodically receive messages where you are in the queue relative to other currently valid xeno candidates. Your current position will shift as others change their preferences or go inactive, but your relative position compared to all observers is the same. Note: Playing as a facehugger or in the thunderdome will not alter your time of death. This means you won't lose your relative place in queue if you step away, disconnect, play as a facehugger, or play in the thunderdome."
to_chat(xeno_candidate, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
return FALSE

var/mob/living/carbon/xenomorph/new_xeno
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(eta_status)
. += "Evacuation: [eta_status]"

if(client.prefs?.be_special & BE_ALIEN_AFTER_DEATH)
if(larva_queue_cached_message)
. += larva_queue_cached_message


/proc/message_ghosts(message)
for(var/mob/dead/observer/O as anything in GLOB.observer_list)
Expand Down

0 comments on commit 945d18b

Please sign in to comment.