diff --git a/code/_onclick/hud/screen_objects/menu_text_objects.dm b/code/_onclick/hud/screen_objects/menu_text_objects.dm index f73bdc8a3c5..59ad66e0ee6 100644 --- a/code/_onclick/hud/screen_objects/menu_text_objects.dm +++ b/code/_onclick/hud/screen_objects/menu_text_objects.dm @@ -88,11 +88,11 @@ update_text() /atom/movable/screen/text/lobby/clickable/join_game/update_text() - var/mob/new_player/player = hud.mymob if(SSticker?.current_state > GAME_STATE_PREGAME) maptext = "ПРИСОЕДИНИТЬСЯ" icon_state = "join" return + var/mob/new_player/player = hud.mymob maptext = "ВЫ: [player.ready ? "" : "НЕ "]ГОТОВЫ" icon_state = player.ready ? "ready" : "unready" diff --git a/code/modules/mob/living/carbon/xenomorph/evolution.dm b/code/modules/mob/living/carbon/xenomorph/evolution.dm index a3928a480b9..6cb2d88c467 100644 --- a/code/modules/mob/living/carbon/xenomorph/evolution.dm +++ b/code/modules/mob/living/carbon/xenomorph/evolution.dm @@ -133,7 +133,7 @@ ///Actually changes the xenomorph to another caste /mob/living/carbon/xenomorph/proc/finish_evolve(new_mob_type) - var/mob/living/carbon/xenomorph/new_xeno = new new_mob_type(get_turf(src)) + var/mob/living/carbon/xenomorph/new_xeno = new new_mob_type(get_turf(src), TRUE) if(!istype(new_xeno)) //Something went horribly wrong! @@ -148,7 +148,6 @@ return SEND_SIGNAL(src, COMSIG_XENOMORPH_EVOLVED, new_xeno) - for(var/obj/item/W in contents) //Drop stuff dropItemToGround(W) @@ -168,6 +167,8 @@ qdel(new_xeno.hunter_data) new_xeno.hunter_data = hunter_data hunter_data = null + new_xeno.generate_name() // This is specifically for numbered xenos who want to keep their previous number instead of a random new one. + new_xeno.hive?.update_ruler() // Since ruler wasn't set during initialization, update ruler now. transfer_observers_to(new_xeno) if(new_xeno.health - getBruteLoss(src) - getFireLoss(src) > 0) //Cmon, don't kill the new one! Shouldnt be possible though @@ -221,7 +222,6 @@ selector?.set_selected_zone(zone_selected, new_xeno) qdel(src) INVOKE_ASYNC(new_xeno, TYPE_PROC_REF(/atom, do_jitter_animation), 1000) - new_xeno.overlay_fullscreen_timer(2 SECONDS, 20, "roundstart2", /atom/movable/screen/fullscreen/spawning_in) ///Check if the xeno is currently able to evolve /mob/living/carbon/xenomorph/proc/generic_evolution_checks() diff --git a/code/modules/mob/living/carbon/xenomorph/hive_datum.dm b/code/modules/mob/living/carbon/xenomorph/hive_datum.dm index 602f7759cbe..5f9d1931129 100644 --- a/code/modules/mob/living/carbon/xenomorph/hive_datum.dm +++ b/code/modules/mob/living/carbon/xenomorph/hive_datum.dm @@ -403,6 +403,9 @@ // *********** Adding xenos // *************************************** /datum/hive_status/proc/add_xeno(mob/living/carbon/xenomorph/X) // should only be called by add_to_hive below + if(isnull(X)) // don't add nulls please + return FALSE + if(X.stat == DEAD) dead_xenos += X else @@ -429,7 +432,7 @@ return TRUE -/mob/living/carbon/xenomorph/proc/add_to_hive(datum/hive_status/HS, force=FALSE) +/mob/living/carbon/xenomorph/proc/add_to_hive(datum/hive_status/HS, force=FALSE, prevent_ruler=FALSE) if(!force && hivenumber != XENO_HIVE_NONE) CRASH("trying to do a dirty add_to_hive") @@ -446,24 +449,30 @@ SSdirection.start_tracking(HS.hivenumber, src) hive.update_tier_limits() //Update our tier limits. -/mob/living/carbon/xenomorph/queen/add_to_hive(datum/hive_status/HS, force=FALSE) // override to ensure proper queen/hive behaviour +/mob/living/carbon/xenomorph/queen/add_to_hive(datum/hive_status/HS, force=FALSE, prevent_ruler=FALSE) // override to ensure proper queen/hive behaviour . = ..() if(HS.living_xeno_queen) // theres already a queen return HS.living_xeno_queen = src + if(prevent_ruler) + return + HS.update_ruler() -/mob/living/carbon/xenomorph/shrike/add_to_hive(datum/hive_status/HS, force = FALSE) // override to ensure proper queen/hive behaviour +/mob/living/carbon/xenomorph/shrike/add_to_hive(datum/hive_status/HS, force = FALSE, prevent_ruler=FALSE) // override to ensure proper queen/hive behaviour . = ..() if(HS.living_xeno_ruler) return + if(prevent_ruler) + return + HS.update_ruler() -/mob/living/carbon/xenomorph/hivemind/add_to_hive(datum/hive_status/HS, force = FALSE) +/mob/living/carbon/xenomorph/hivemind/add_to_hive(datum/hive_status/HS, force = FALSE, prevent_ruler=FALSE) . = ..() if(!GLOB.xeno_structures_by_hive[HS.hivenumber]) GLOB.xeno_structures_by_hive[HS.hivenumber] = list() @@ -484,23 +493,26 @@ hive_core.name = "[HS.hivenumber == XENO_HIVE_NORMAL ? "" : "[HS.name] "]hivemind core" hive_core.color = HS.color -/mob/living/carbon/xenomorph/king/add_to_hive(datum/hive_status/HS, force = FALSE) +/mob/living/carbon/xenomorph/king/add_to_hive(datum/hive_status/HS, force = FALSE, prevent_ruler=FALSE) . = ..() if(HS.living_xeno_ruler) return + if(prevent_ruler) + return + HS.update_ruler() -/mob/living/carbon/xenomorph/proc/add_to_hive_by_hivenumber(hivenumber, force=FALSE) // helper function to add by given hivenumber +/mob/living/carbon/xenomorph/proc/add_to_hive_by_hivenumber(hivenumber, force=FALSE, prevent_ruler=FALSE) // helper function to add by given hivenumber if(!GLOB.hive_datums[hivenumber]) CRASH("add_to_hive_by_hivenumber called with invalid hivenumber") var/datum/hive_status/HS = GLOB.hive_datums[hivenumber] - add_to_hive(HS, force) + add_to_hive(HS, force, prevent_ruler) hive.update_tier_limits() //Update our tier limits. // This is a special proc called only when a xeno is first created to set their hive and name properly -/mob/living/carbon/xenomorph/proc/set_initial_hivenumber() - add_to_hive_by_hivenumber(hivenumber, force=TRUE) +/mob/living/carbon/xenomorph/proc/set_initial_hivenumber(prevent_ruler=FALSE) + add_to_hive_by_hivenumber(hivenumber, force=TRUE, prevent_ruler=prevent_ruler) // *************************************** // *********** Removing xenos @@ -1016,7 +1028,7 @@ to_chat will check for valid clients itself already so no need to double check f /datum/hive_status/proc/set_all_xeno_trackers(atom/target) for(var/mob/living/carbon/xenomorph/X AS in get_all_xenos()) X.set_tracked(target) - to_chat(X, span_notice(" Now tracking [target.name]")) + to_chat(X, span_notice("Now tracking [target.name]")) // *************************************** // *********** Normal Xenos diff --git a/code/modules/mob/living/carbon/xenomorph/xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/xenomorph.dm index 67c6a446a59..c238d64a628 100644 --- a/code/modules/mob/living/carbon/xenomorph/xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/xenomorph.dm @@ -4,7 +4,7 @@ //Just about ALL the procs are tied to the parent, not to the children //This is so they can be easily transferred between them without copypasta -/mob/living/carbon/xenomorph/Initialize(mapload) +/mob/living/carbon/xenomorph/Initialize(mapload, do_not_set_as_ruler) if(mob_size == MOB_SIZE_BIG) move_resist = MOVE_FORCE_EXTREMELY_STRONG move_force = MOVE_FORCE_EXTREMELY_STRONG @@ -28,7 +28,7 @@ if(is_centcom_level(z) && hivenumber == XENO_HIVE_NORMAL) hivenumber = XENO_HIVE_ADMEME //so admins can safely spawn xenos in Thunderdome for tests. - set_initial_hivenumber() + set_initial_hivenumber(prevent_ruler=do_not_set_as_ruler) switch(stat) if(CONSCIOUS) diff --git a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm index 075d4614579..73ea93cfb49 100644 --- a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm +++ b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm @@ -441,9 +441,7 @@ if(locate(/turf/closed/wall/resin) in loc) to_chat(src, span_warning("We decide not to drop [F] after all.")) return - - . = ..() - + return ..() //When the Queen's pheromones are updated, or we add/remove a leader, update leader pheromones /mob/living/carbon/xenomorph/proc/handle_xeno_leader_pheromones(mob/living/carbon/xenomorph/queen/Q)