Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Git-Nivrak committed Jun 2, 2024
1 parent 07508cd commit 9bd8e69
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

/// From /mob/living/carbon/xenomorph/proc/hivemind_talk(): (message)
#define COMSIG_XENO_TRY_HIVEMIND_TALK "xeno_try_hivemind_talk"
#define COMPONENT_OVERRIDE_HIVEMIND_TALK (1<<0)
#define COMPONENT_OVERRIDE_HIVEMIND_TALK (1<<0)

/// used in /datum/component/status_effect/cleanse()
#define COMSIG_XENO_DEBUFF_CLEANSE "xeno_debuff_cleanse"
Expand Down
1 change: 1 addition & 0 deletions code/datums/xeno_shields/shield_types/destroyer_shield.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Shield can be equal to a maximum of percent_maxhealth_damagecap of the receiver's max hp
/datum/xeno_shield/destroyer_shield
duration = 10 SECONDS
decay_amount_per_second = 100
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/temporary_visuals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/obj/effect/temp_visual/heavy_impact
icon = 'icons/effects/heavyimpact.dmi'
icon_state = "heavyimpact"
duration = 13
duration = 1.3 SECONDS

/obj/effect/temp_visual/heavyimpact/Initialize(mapload)
. = ..()
Expand Down
27 changes: 16 additions & 11 deletions code/modules/cm_aliens/XenoStructures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -851,26 +851,31 @@
icon = 'icons/obj/structures/alien/xenoDestroyerHatchery.dmi'
icon_state = "static"

var/timer
// The mob picked as a candidate to be the destroyer
var/mob/chosen_candidate

/obj/effect/alien/resin/destroyer_cocoon/Destroy()
chosen_candidate = null

. = ..()

/obj/effect/alien/resin/destroyer_cocoon/Initialize(mapload, pylon)
. = ..()
timer = addtimer(CALLBACK(src, PROC_REF(start_growing)), 10 SECONDS, TIMER_UNIQUE|TIMER_STOPPABLE|TIMER_DELETE_ME)
addtimer(CALLBACK(src, PROC_REF(start_growing)), 10 SECONDS, TIMER_UNIQUE|TIMER_STOPPABLE|TIMER_DELETE_ME)
addtimer(CALLBACK(src, PROC_REF(check_pylons)), 10 SECONDS, TIMER_UNIQUE)

/obj/effect/alien/resin/destroyer_cocoon/proc/check_pylons()
var/datum/hive_status/hive = GLOB.hive_datum[XENO_HIVE_NORMAL]

if(hive.active_endgame_pylons.len < 2)
if(length(hive.active_endgame_pylons) < 2)
qdel(src)

addtimer(CALLBACK(src, PROC_REF(check_pylons)), 10 SECONDS, TIMER_UNIQUE)


/obj/effect/alien/resin/destroyer_cocoon/proc/start_growing()
icon_state = "growing"
timer = addtimer(CALLBACK(src, PROC_REF(choose_candidate)), 9 MINUTES, TIMER_UNIQUE|TIMER_STOPPABLE|TIMER_DELETE_ME)
addtimer(CALLBACK(src, PROC_REF(choose_candidate)), 9 MINUTES, TIMER_UNIQUE|TIMER_STOPPABLE|TIMER_DELETE_ME)

/obj/effect/alien/resin/destroyer_cocoon/proc/roll_candidates()
// First, Let the Queen choose
Expand All @@ -887,7 +892,7 @@
if (get_job_playtime(candidate.client, JOB_XENO_ROLES) < 25 HOURS)
continue

var/pick = tgui_alert(candidate, "Would you like to become the destroyer?", list("Yes", "No"), 10)
var/pick = tgui_alert(candidate, "Would you like to become the destroyer?", list("Yes", "No"), 10 SECONDS)

if(pick == "Yes")
return candidate
Expand All @@ -897,20 +902,20 @@
if (get_job_playtime(candidate.client, JOB_XENO_ROLES) < 25 HOURS)
continue

var/pick = tgui_alert(candidate, "Would you like to become the destroyer?", list("Yes", "No"), 10)
var/pick = tgui_alert(candidate, "Would you like to become the destroyer?", list("Yes", "No"), 10 SECONDS)

if(pick == "Yes")
return candidate

// Lastly all of the above again, without playtime requirements
for(var/mob/living/carbon/xenomorph/candidate in total_xenos_copy)
var/pick = tgui_alert(candidate, "Would you like to become the destroyer?", list("Yes", "No"), 10)
var/pick = tgui_alert(candidate, "Would you like to become the destroyer?", list("Yes", "No"), 10 SECONDS)

if(pick == "Yes")
return candidate

for(var/mob/candidate in GLOB.observer_list)
var/pick = tgui_alert(candidate, "Would you like to become the destroyer?", list("Yes", "No"), 10)
var/pick = tgui_alert(candidate, "Would you like to become the destroyer?", list("Yes", "No"), 10 SECONDS)

if(pick == "Yes")
return candidate
Expand All @@ -920,17 +925,17 @@
/obj/effect/alien/resin/destroyer_cocoon/proc/choose_candidate()
chosen_candidate = roll_candidates()

timer = addtimer(CALLBACK(src, PROC_REF(animate_hatch_destroyer)), 1 MINUTES, TIMER_UNIQUE|TIMER_STOPPABLE|TIMER_DELETE_ME)
addtimer(CALLBACK(src, PROC_REF(animate_hatch_destroyer)), 1 MINUTES, TIMER_UNIQUE|TIMER_STOPPABLE|TIMER_DELETE_ME)

/obj/effect/alien/resin/destroyer_cocoon/proc/animate_hatch_destroyer()
flick("hatching", src)

addtimer(CALLBACK(src, PROC_REF(hatch_destroyer)), 2 SECONDS, TIMER_UNIQUE|TIMER_STOPPABLE)

/obj/effect/alien/resin/destroyer_cocoon/proc/hatch_destroyer()
var/mob/living/carbon/xenomorph/destroyer/destroyer = new(locate(src.x + 2, src.y + 2, src.z))
var/mob/living/carbon/xenomorph/destroyer/destroyer = new(locate(x + 2, y + 2, z))
chosen_candidate.mind.transfer_to(destroyer, TRUE)
playsound(src.loc, 'sound/voice/alien_queen_command.ogg', 75, 0)
playsound(src, 'sound/voice/alien_queen_command.ogg', 75, 0)

icon_state = "hatched"

Expand Down

0 comments on commit 9bd8e69

Please sign in to comment.