From aa1cf876d98ab41b1048f2aa398854c1a76c679a Mon Sep 17 00:00:00 2001 From: ghostsheet <43085828+ghostsheet@users.noreply.github.com> Date: Fri, 4 Aug 2023 15:20:04 +1000 Subject: [PATCH] Acid Runner Respawn (#4037) # About the pull request Acid Runner will now respawn on its turf when there's no hivecore to respawn at. instead of not spawning at all. # Explain why it's good for the game If acid runner exploded without a hivecore it wouldn't respawn at all. Now if it would respawn as a larva where it blew up, cool niche feature. # Testing Photographs and Procedure
Acid Runner Respawn https://github.com/cmss13-devs/cmss13/assets/43085828/97e3720d-3f6e-49f1-8258-a7e7c9c17837
# Changelog :cl: ghostsheet add: Acid Runners will now respawn where it blew up, if there is no hivecore to spawn at. /:cl: --------- Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- .../xenomorph/mutators/strains/runner/acid.dm | 7 ++++++- .../living/carbon/xenomorph/xeno_defines.dm | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) 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..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 @@ -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), 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 acc72586e647..cfca16f70a51 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -936,6 +936,24 @@ else hive_ui.update_burrowed_larva() +/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(xeno_client.mob, new_xeno)) + qdel(new_xeno) + return FALSE + + 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)] 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) + + hive_ui.update_burrowed_larva() + /datum/hive_status/proc/do_buried_larva_spawn(mob/xeno_candidate) var/spawning_area if(hive_location)