Skip to content

Commit

Permalink
BUFFS
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Aug 2, 2023
1 parent 5d8a9ed commit 48336c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
2 changes: 2 additions & 0 deletions code/game/machinery/telecomms/presets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,15 @@ GLOBAL_LIST_EMPTY(all_static_telecomms_towers)

new_pylon.comms_relay_connection()

/// Handles removing corruption effects from the comms relay
/obj/structure/machinery/telecomms/relay/preset/tower/mapcomms/proc/uncorrupt(datum/deleting_datum)
SIGNAL_HANDLER

corrupted = FALSE

overlays -= corruption_image

/// Handles moving the overlay from growing to idle
/obj/structure/machinery/telecomms/relay/preset/tower/mapcomms/proc/switch_to_idle_corruption()
if(!corrupted)
return
Expand Down
27 changes: 11 additions & 16 deletions code/modules/cm_aliens/structures/special/pylon_core.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,46 +97,41 @@

/obj/effect/alien/resin/special/pylon/endgame/Destroy()
if(activated)
if(XENO_STRUCTURE_PYLON in linked_hive.hive_structures)
for(var/obj/effect/alien/resin/special/pylon/endgame/pylon as anything in linked_hive.hive_structures[XENO_STRUCTURE_PYLON])
pylon.activated = FALSE
activated = FALSE

marine_announcement("ALERT.\n\nEnergy build up around communication relay at [get_area(src)] halted.", "[MAIN_AI_SYSTEM] Biological Scanner") // Ask lore team for a better AI system name, honestly a second look for these announcements may be good - Morrow

marine_announcement("ALERT.\n\nEnergy build up around communication relays halted.", "[MAIN_AI_SYSTEM] Biological Scanner") // Ask lore team for a better AI system name, honestly a second look for these announcements may be good - Morrow
for(var/hivenumber in GLOB.hive_datum)
var/datum/hive_status/checked_hive = GLOB.hive_datum[hivenumber]
if(!length(checked_hive.totalXenos))
continue

if(checked_hive == linked_hive)
xeno_announcement(SPAN_XENOANNOUNCE("We have lost our control of the tall's communication relays."), hivenumber, XENO_GENERAL_ANNOUNCE)
xeno_announcement(SPAN_XENOANNOUNCE("We have lost our control of the tall's communication relay at [get_area(src)]."), hivenumber, XENO_GENERAL_ANNOUNCE)
else
xeno_announcement(SPAN_XENOANNOUNCE("Another hive has lost control of the tall's communication relays."), hivenumber, XENO_GENERAL_ANNOUNCE)
xeno_announcement(SPAN_XENOANNOUNCE("Another hive has lost control of the tall's communication relay at [get_area(src)]."), hivenumber, XENO_GENERAL_ANNOUNCE)

. = ..()

/// Checks if all comms towers are connected and then starts end game content on all pylons if they are
/obj/effect/alien/resin/special/pylon/endgame/proc/comms_relay_connection()
for(var/obj/structure/machinery/telecomms/relay/preset/tower/mapcomms/checked_comms_relay in GLOB.all_static_telecomms_towers)
if(!checked_comms_relay.corrupted)
return
marine_announcement("ALERT.\n\nIrregular build up of energy around communication relays at [get_area(src)].", "[MAIN_AI_SYSTEM] Biological Scanner") // Ask lore team for a better AI system name, honestly a second look for these announcements may be good - Morrow

marine_announcement("ALERT.\n\nIrregular build up of energy around communication relays.", "[MAIN_AI_SYSTEM] Biological Scanner") // Ask lore team for a better AI system name, honestly a second look for these announcements may be good - Morrow
for(var/hivenumber in GLOB.hive_datum)
var/datum/hive_status/checked_hive = GLOB.hive_datum[hivenumber]
if(!length(checked_hive.totalXenos))
continue

if(checked_hive == linked_hive)
xeno_announcement(SPAN_XENOANNOUNCE("We have harnessed the tall's communication relays. Hold them!"), hivenumber, XENO_GENERAL_ANNOUNCE)
xeno_announcement(SPAN_XENOANNOUNCE("We have harnessed the tall's communication relay at [get_area(src)]. Hold it!"), hivenumber, XENO_GENERAL_ANNOUNCE)
else
xeno_announcement(SPAN_XENOANNOUNCE("Another hive has harnessed the tall's communication relays.[linked_hive.faction_is_ally(checked_hive.name) ? "" : " Stop them!"]"), hivenumber, XENO_GENERAL_ANNOUNCE)
xeno_announcement(SPAN_XENOANNOUNCE("Another hive has harnessed the tall's communication relay at [get_area(src)].[linked_hive.faction_is_ally(checked_hive.name) ? "" : " Stop them!"]"), hivenumber, XENO_GENERAL_ANNOUNCE)

for(var/obj/effect/alien/resin/special/pylon/endgame/structure in linked_hive.hive_structures[XENO_STRUCTURE_PYLON])
structure.activated = TRUE
addtimer(CALLBACK(structure, PROC_REF(give_larva)), XENO_PYLON_ACTIVATION_COOLDOWN, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_LOOP|TIMER_DELETE_ME)
activated = TRUE
addtimer(CALLBACK(src, PROC_REF(give_larva)), XENO_PYLON_ACTIVATION_COOLDOWN, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_LOOP|TIMER_DELETE_ME)

#define ENDGAME_LARVA_CAP_MULTIPLIER 0.4
#define LARVA_ADDITION_MULTIPLIER 0.05
#define LARVA_ADDITION_MULTIPLIER 0.10

/// Looped proc via timer to give larva after time
/obj/effect/alien/resin/special/pylon/endgame/proc/give_larva()
Expand Down

0 comments on commit 48336c4

Please sign in to comment.