Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acid Runner Respawn #4037

Merged
merged 4 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
18 changes: 18 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,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))
ghostsheet marked this conversation as resolved.
Show resolved Hide resolved
qdel(new_xeno)
return FALSE

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)]")
ghostsheet marked this conversation as resolved.
Show resolved Hide resolved
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)
Expand Down