diff --git a/code/modules/mob/living/carbon/xenomorph/Embryo.dm b/code/modules/mob/living/carbon/xenomorph/Embryo.dm index 29779480f143..d3c2b725d7ef 100644 --- a/code/modules/mob/living/carbon/xenomorph/Embryo.dm +++ b/code/modules/mob/living/carbon/xenomorph/Embryo.dm @@ -22,8 +22,8 @@ affected_mob.status_flags |= XENO_HOST START_PROCESSING(SSobj, src) if(iscarbon(affected_mob)) - var/mob/living/carbon/C = affected_mob - C.med_hud_set_status() + var/mob/living/carbon/affected_carbon = affected_mob + affected_carbon.med_hud_set_status() else return INITIALIZE_HINT_QDEL @@ -31,8 +31,8 @@ if(affected_mob) affected_mob.status_flags &= ~(XENO_HOST) if(iscarbon(affected_mob)) - var/mob/living/carbon/C = affected_mob - C.med_hud_set_status() + var/mob/living/carbon/affected_carbon = affected_mob + affected_carbon.med_hud_set_status() STOP_PROCESSING(SSobj, src) affected_mob = null GLOB.player_embryo_list -= src @@ -48,24 +48,24 @@ affected_mob.status_flags &= ~(XENO_HOST) STOP_PROCESSING(SSobj, src) if(iscarbon(affected_mob)) - var/mob/living/carbon/C = affected_mob - C.med_hud_set_status() + var/mob/living/carbon/affected_carbon = affected_mob + affected_carbon.med_hud_set_status() affected_mob = null return FALSE if(affected_mob.stat == DEAD) if(ishuman(affected_mob)) - var/mob/living/carbon/human/H = affected_mob - if(world.time > H.timeofdeath + H.revive_grace_period) //Can't be defibbed. - var/mob/living/carbon/xenomorph/larva/L = locate() in affected_mob - if(L) - L.chest_burst(affected_mob) + var/mob/living/carbon/human/affected_human = affected_mob + if(world.time > affected_human.timeofdeath + affected_human.revive_grace_period) //Can't be defibbed. + var/mob/living/carbon/xenomorph/larva/larva_embryo = locate() in affected_mob + if(larva_embryo) + larva_embryo.chest_burst(affected_mob) qdel(src) return FALSE else - var/mob/living/carbon/xenomorph/larva/L = locate() in affected_mob - if(L) - L.chest_burst(affected_mob) + var/mob/living/carbon/xenomorph/larva/larva_embryo = locate() in affected_mob + if(larva_embryo) + larva_embryo.chest_burst(affected_mob) STOP_PROCESSING(SSobj, src) return FALSE @@ -89,12 +89,12 @@ if(stage < 5) counter += 1 * hive.larva_gestation_multiplier - if(stage < 5 && counter >= 120) + if(stage < 5 && counter >= 90) counter = 0 stage++ if(iscarbon(affected_mob)) - var/mob/living/carbon/C = affected_mob - C.med_hud_set_status() + var/mob/living/carbon/affected_carbon = affected_mob + affected_carbon.med_hud_set_status() switch(stage) if(2) @@ -132,9 +132,9 @@ if(6) larva_autoburst_countdown-- if(!larva_autoburst_countdown) - var/mob/living/carbon/xenomorph/larva/L = locate() in affected_mob - if(L) - L.chest_burst(affected_mob) + var/mob/living/carbon/xenomorph/larva/larva_embryo = locate() in affected_mob + if(larva_embryo) + larva_embryo.chest_burst(affected_mob) //We look for a candidate. If found, we spawn the candidate as a larva //Order of priority is bursted individual (if xeno is enabled), then random candidate, and then it's up for grabs and spawns braindead @@ -256,36 +256,36 @@ victim.spawn_gibs() - for(var/mob/living/carbon/xenomorph/larva/L in victim) - var/datum/hive_status/hive = GLOB.hive_datum[L.hivenumber] - L.forceMove(get_turf(victim)) //moved to the turf directly so we don't get stuck inside a cryopod or another mob container. - playsound(L, pick('sound/voice/alien_chestburst.ogg','sound/voice/alien_chestburst2.ogg'), 25) + for(var/mob/living/carbon/xenomorph/larva/larva_embryo in victim) + var/datum/hive_status/hive = GLOB.hive_datum[larva_embryo.hivenumber] + larva_embryo.forceMove(get_turf(victim)) //moved to the turf directly so we don't get stuck inside a cryopod or another mob container. + playsound(larva_embryo, pick('sound/voice/alien_chestburst.ogg','sound/voice/alien_chestburst2.ogg'), 25) - if(L.client) - L.set_lighting_alpha_from_prefs(L.client) + if(larva_embryo.client) + larva_embryo.set_lighting_alpha_from_prefs(larva_embryo.client) - L.attack_log += "\[[time_stamp()]\] chestbursted from [key_name(victim)]" - victim.attack_log += "\[[time_stamp()]\] Was chestbursted, larva was [key_name(L)]" + larva_embryo.attack_log += "\[[time_stamp()]\] chestbursted from [key_name(victim)]" + victim.attack_log += "\[[time_stamp()]\] Was chestbursted, larva was [key_name(larva_embryo)]" if(burstcount) - step(L, pick(cardinal)) + step(larva_embryo, pick(cardinal)) if(round_statistics) round_statistics.total_larva_burst++ burstcount++ - if(!L.ckey && L.burrowable && loc && is_ground_level(loc.z) && (locate(/obj/structure/bed/nest) in loc) && hive.living_xeno_queen && hive.living_xeno_queen.z == loc.z) - L.visible_message(SPAN_XENODANGER("[L] quickly burrows into the ground.")) - if(round_statistics && !L.statistic_exempt) + if(!larva_embryo.ckey && larva_embryo.burrowable && loc && is_ground_level(loc.z) && (locate(/obj/structure/bed/nest) in loc) && hive.living_xeno_queen && hive.living_xeno_queen.z == loc.z) + larva_embryo.visible_message(SPAN_XENODANGER("[larva_embryo] quickly burrows into the ground.")) + if(round_statistics && !larva_embryo.statistic_exempt) round_statistics.track_new_participant(faction, -1) // keep stats sane hive.stored_larva++ hive.hive_ui.update_burrowed_larva() - qdel(L) + qdel(larva_embryo) if(!victim.first_xeno) - to_chat(L, SPAN_XENOHIGHDANGER("The Queen's will overwhelms your instincts...")) - to_chat(L, SPAN_XENOHIGHDANGER("\"[hive.hive_orders]\"")) - log_attack("[key_name(victim)] chestbursted, the larva was [key_name(L)].") //this is so that admins are not spammed with los logs + to_chat(larva_embryo, SPAN_XENOHIGHDANGER("The Queen's will overwhelms your instincts...")) + to_chat(larva_embryo, SPAN_XENOHIGHDANGER("\"[hive.hive_orders]\"")) + log_attack("[key_name(victim)] chestbursted, the larva was [key_name(larva_embryo)].") //this is so that admins are not spammed with los logs for(var/obj/item/alien_embryo/AE in victim) qdel(AE) @@ -295,31 +295,31 @@ victim.gib(cause) else if(ishuman(victim)) - var/mob/living/carbon/human/H = victim - H.last_damage_data = cause + var/mob/living/carbon/human/victim_human = victim + victim_human.last_damage_data = cause var/datum/internal_organ/O var/i for(i in list("heart","lungs")) //This removes (and later garbage collects) both organs. No heart means instant death. - O = H.internal_organs_by_name[i] - H.internal_organs_by_name -= i - H.internal_organs -= O + O = victim_human.internal_organs_by_name[i] + victim_human.internal_organs_by_name -= i + victim_human.internal_organs -= O victim.death(cause) // Certain species were still surviving bursting (predators), DEFINITELY kill them this time. victim.chestburst = 2 victim.update_burst() // Squeeze thru dense objects as a larva, as airlocks -/mob/living/carbon/xenomorph/larva/proc/scuttle(obj/structure/S) +/mob/living/carbon/xenomorph/larva/proc/scuttle(obj/structure/target) var/move_dir = get_dir(src, loc) - for(var/atom/movable/AM in get_turf(S)) - if(AM != S && AM.density && AM.BlockedPassDirs(src, move_dir)) - to_chat(src, SPAN_WARNING("\The [AM] prevents you from squeezing under \the [S]!")) + for(var/atom/movable/AM in get_turf(target)) + if(AM != target && AM.density && AM.BlockedPassDirs(src, move_dir)) + to_chat(src, SPAN_WARNING("\The [AM] prevents you from squeezing under \the [target]!")) return // Is it an airlock? - if(istype(S, /obj/structure/machinery/door/airlock)) - var/obj/structure/machinery/door/airlock/A = S - if(A.locked || A.welded) //Can't pass through airlocks that have been bolted down or welded - to_chat(src, SPAN_WARNING("\The [A] is locked down tight. You can't squeeze underneath!")) + if(istype(target, /obj/structure/machinery/door/airlock)) + var/obj/structure/machinery/door/airlock/selected_airlock = target + if(selected_airlock.locked || selected_airlock.welded) //Can't pass through airlocks that have been bolted down or welded + to_chat(src, SPAN_WARNING("\The [selected_airlock] is locked down tight. You can't squeeze underneath!")) return - visible_message(SPAN_WARNING("\The [src] scuttles underneath \the [S]!"), \ - SPAN_WARNING("You squeeze and scuttle underneath \the [S]."), null, 5) - forceMove(S.loc) + visible_message(SPAN_WARNING("\The [src] scuttles underneath \the [target]!"), \ + SPAN_WARNING("You squeeze and scuttle underneath \the [target]."), null, 5) + forceMove(target.loc)