From eaef5f77df99b54cb138c486c3c40faf0622dd13 Mon Sep 17 00:00:00 2001 From: ghostsheet Date: Sat, 29 Jul 2023 18:11:51 +1000 Subject: [PATCH 1/4] Acid Runner Respawn --- .../xenomorph/mutators/strains/runner/acid.dm | 7 +++++- .../living/carbon/xenomorph/xeno_defines.dm | 23 ++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm index 7a2196a3c209..293e321d90df 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm @@ -159,7 +159,12 @@ new /obj/effect/particle_effect/smoke/acid_runner_harmless(T) playsound(bound_xeno, 'sound/effects/blobattack.ogg', 75) if(bound_xeno.client && bound_xeno.hive) - addtimer(CALLBACK(bound_xeno.hive, TYPE_PROC_REF(/datum/hive_status, free_respawn), bound_xeno.client), 5 SECONDS) + var/datum/hive_status/hive_status = bound_xeno.hive + var/turf/spawning_turf = get_turf(bound_xeno) + if(!hive_status.hive_location) + addtimer(CALLBACK(bound_xeno.hive, TYPE_PROC_REF(/datum/hive_status, respawn_on_turf), bound_xeno.client, spawning_turf), 0.5 SECONDS) + else + addtimer(CALLBACK(bound_xeno.hive, TYPE_PROC_REF(/datum/hive_status, free_respawn), bound_xeno.client, spawning_turf), 5 SECONDS) bound_xeno.gib() /mob/living/carbon/xenomorph/runner/ventcrawl_carry() diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index bb58d2cf2a03..86c13dd2f43a 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -927,13 +927,34 @@ hivecore_cooldown = FALSE xeno_message(SPAN_XENOBOLDNOTICE("The weeds have recovered! A new hive core can be built!"),3,hivenumber) -/datum/hive_status/proc/free_respawn(client/C) +/datum/hive_status/proc/free_respawn(client/C, turf/spawning_turf) stored_larva++ if(!hive_location || !hive_location.spawn_burrowed_larva(C.mob)) stored_larva-- + respawn_on_turf(C, spawning_turf) else hive_ui.update_burrowed_larva() +/datum/hive_status/proc/respawn_on_turf(client/C, turf/spawning_turf) + var/mob/living/carbon/xenomorph/larva/new_xeno = spawn_hivenumber_larva(spawning_turf, hivenumber) + if(isnull(new_xeno)) + return FALSE + + if(!SSticker.mode.transfer_xeno(C.mob, new_xeno)) + qdel(new_xeno) + return FALSE + + new_xeno.visible_message(SPAN_XENODANGER("A larva suddenly burrows out of \the [spawning_turf]!"), + SPAN_XENODANGER("You burrow out of \the [spawning_turf] and awaken from your slumber. For the Hive!")) + msg_admin_niche("[key_name(new_xeno)] burrowed out from \a [spawning_turf]. [ADMIN_JMP(spawning_turf)]") + playsound(new_xeno, 'sound/effects/xeno_newlarva.ogg', 50, 1) + to_chat(new_xeno, SPAN_XENOANNOUNCE("You are a xenomorph larva awakened from slumber!")) + if(new_xeno.client) + if(new_xeno.client?.prefs?.toggles_flashing & FLASH_POOLSPAWN) + window_flash(new_xeno.client) + + hive_ui.update_burrowed_larva() + /datum/hive_status/proc/do_buried_larva_spawn(mob/xeno_candidate) var/spawning_area if(hive_location) From 102f7565bc77512683eb33f303b34afc9835ce8c Mon Sep 17 00:00:00 2001 From: ghostsheet Date: Sat, 29 Jul 2023 20:11:18 +1000 Subject: [PATCH 2/4] Acid Runner respawn message --- .../carbon/xenomorph/mutators/strains/runner/acid.dm | 2 +- .../mob/living/carbon/xenomorph/xeno_defines.dm | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm index 293e321d90df..7b64ae9f69d7 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm @@ -164,7 +164,7 @@ if(!hive_status.hive_location) addtimer(CALLBACK(bound_xeno.hive, TYPE_PROC_REF(/datum/hive_status, respawn_on_turf), bound_xeno.client, spawning_turf), 0.5 SECONDS) else - addtimer(CALLBACK(bound_xeno.hive, TYPE_PROC_REF(/datum/hive_status, free_respawn), bound_xeno.client, spawning_turf), 5 SECONDS) + addtimer(CALLBACK(bound_xeno.hive, TYPE_PROC_REF(/datum/hive_status, free_respawn), bound_xeno.client), 5 SECONDS) bound_xeno.gib() /mob/living/carbon/xenomorph/runner/ventcrawl_carry() diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index 86c13dd2f43a..1d4de8d5e4a3 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -927,28 +927,26 @@ hivecore_cooldown = FALSE xeno_message(SPAN_XENOBOLDNOTICE("The weeds have recovered! A new hive core can be built!"),3,hivenumber) -/datum/hive_status/proc/free_respawn(client/C, turf/spawning_turf) +/datum/hive_status/proc/free_respawn(client/C) stored_larva++ if(!hive_location || !hive_location.spawn_burrowed_larva(C.mob)) stored_larva-- - respawn_on_turf(C, spawning_turf) else hive_ui.update_burrowed_larva() -/datum/hive_status/proc/respawn_on_turf(client/C, turf/spawning_turf) +/datum/hive_status/proc/respawn_on_turf(client/xeno_client, turf/spawning_turf) var/mob/living/carbon/xenomorph/larva/new_xeno = spawn_hivenumber_larva(spawning_turf, hivenumber) if(isnull(new_xeno)) return FALSE - if(!SSticker.mode.transfer_xeno(C.mob, new_xeno)) + if(!SSticker.mode.transfer_xeno(xeno_client,.mob, new_xeno)) qdel(new_xeno) return FALSE - new_xeno.visible_message(SPAN_XENODANGER("A larva suddenly burrows out of \the [spawning_turf]!"), - SPAN_XENODANGER("You burrow out of \the [spawning_turf] and awaken from your slumber. For the Hive!")) + new_xeno.visible_message(SPAN_XENODANGER("A larva suddenly emerge from a dead husk!"), + SPAN_XENOANNOUNCE("The hive has no core! You manage to emerge from your old husk as a larva!")) msg_admin_niche("[key_name(new_xeno)] burrowed out from \a [spawning_turf]. [ADMIN_JMP(spawning_turf)]") playsound(new_xeno, 'sound/effects/xeno_newlarva.ogg', 50, 1) - to_chat(new_xeno, SPAN_XENOANNOUNCE("You are a xenomorph larva awakened from slumber!")) if(new_xeno.client) if(new_xeno.client?.prefs?.toggles_flashing & FLASH_POOLSPAWN) window_flash(new_xeno.client) From b8da98b4fa4bde98e13545429be89837956ff263 Mon Sep 17 00:00:00 2001 From: ghostsheet <43085828+ghostsheet@users.noreply.github.com> Date: Sat, 29 Jul 2023 20:15:07 +1000 Subject: [PATCH 3/4] Clean up Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/mob/living/carbon/xenomorph/xeno_defines.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index 1d4de8d5e4a3..86e072544dc6 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -947,9 +947,8 @@ SPAN_XENOANNOUNCE("The hive has no core! You manage to emerge from your old husk as a larva!")) msg_admin_niche("[key_name(new_xeno)] burrowed out from \a [spawning_turf]. [ADMIN_JMP(spawning_turf)]") playsound(new_xeno, 'sound/effects/xeno_newlarva.ogg', 50, 1) - if(new_xeno.client) - if(new_xeno.client?.prefs?.toggles_flashing & FLASH_POOLSPAWN) - window_flash(new_xeno.client) + if(new_xeno.client?.prefs?.toggles_flashing & FLASH_POOLSPAWN) + window_flash(new_xeno.client) hive_ui.update_burrowed_larva() From b319b3fd7c8fc26c2e87eedca4b927b8e4a826f1 Mon Sep 17 00:00:00 2001 From: ghostsheet Date: Thu, 3 Aug 2023 17:23:57 +1000 Subject: [PATCH 4/4] further acid runner commit --- code/modules/mob/living/carbon/xenomorph/xeno_defines.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index 86e072544dc6..7d775626a1f3 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -939,13 +939,13 @@ if(isnull(new_xeno)) return FALSE - if(!SSticker.mode.transfer_xeno(xeno_client,.mob, new_xeno)) + if(!SSticker.mode.transfer_xeno(xeno_client.mob, new_xeno)) qdel(new_xeno) return FALSE - new_xeno.visible_message(SPAN_XENODANGER("A larva suddenly emerge from a dead husk!"), + new_xeno.visible_message(SPAN_XENODANGER("A larva suddenly emerges from a dead husk!"), SPAN_XENOANNOUNCE("The hive has no core! You manage to emerge from your old husk as a larva!")) - msg_admin_niche("[key_name(new_xeno)] burrowed out from \a [spawning_turf]. [ADMIN_JMP(spawning_turf)]") + msg_admin_niche("[key_name(new_xeno)] respawned at \a [spawning_turf]. [ADMIN_JMP(spawning_turf)]") playsound(new_xeno, 'sound/effects/xeno_newlarva.ogg', 50, 1) if(new_xeno.client?.prefs?.toggles_flashing & FLASH_POOLSPAWN) window_flash(new_xeno.client)