Skip to content

Commit

Permalink
Also disable ghost notification on hijack surge if theres a queue (th…
Browse files Browse the repository at this point in the history
…ey couldn't actually join, but no point notifying the disappointment)
  • Loading branch information
Drulikar committed Sep 25, 2023
1 parent 84d4dc1 commit 1dc175c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions code/modules/cm_aliens/structures/special/pylon_core.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,25 +263,26 @@
linked_hive.hive_ui.update_burrowed_larva()
qdel(worm)

var/count_spawned = 0
var/spawning_larva = can_spawn_larva() && (last_larva_time + spawn_cooldown) < world.time
if(spawning_larva)
last_larva_time = world.time
if(spawning_larva || (last_larva_queue_time + spawn_cooldown * 4) < world.time)
last_larva_queue_time = world.time
var/list/players_with_xeno_pref = get_alien_candidates(linked_hive)
if(players_with_xeno_pref && players_with_xeno_pref.len)
if(length(players_with_xeno_pref))
if(spawning_larva && spawn_burrowed_larva(players_with_xeno_pref[1]))
// We were in spawning_larva mode and successfully spawned someone
message_alien_candidates(players_with_xeno_pref, dequeued = 1)
else
// Just time to update everyone their queue status (or the spawn failed)
message_alien_candidates(players_with_xeno_pref, dequeued = 0)
count_spawned = 1
// Update everyone's queue status
message_alien_candidates(players_with_xeno_pref, dequeued = count_spawned)

if(linked_hive.hijack_burrowed_surge && (last_surge_time + surge_cooldown) < world.time)
last_surge_time = world.time
linked_hive.stored_larva++
linked_hive.hijack_burrowed_left--
notify_ghosts(header = "Claim Xeno", message = "The Hive has gained another burrowed larva! Click to take it.", source = src, action = NOTIFY_JOIN_XENO, enter_link = "join_xeno")
if(GLOB.xeno_queue_candidate_count < 1 + count_spawned)
notify_ghosts(header = "Claim Xeno", message = "The Hive has gained another burrowed larva! Click to take it.", source = src, action = NOTIFY_JOIN_XENO, enter_link = "join_xeno")
if(surge_cooldown > 30 SECONDS) //mostly for sanity purposes
surge_cooldown = surge_cooldown - surge_incremental_reduction //ramps up over time
if(linked_hive.hijack_burrowed_left < 1)
Expand Down

0 comments on commit 1dc175c

Please sign in to comment.