Files
+37 21b4095dfd [MDB IGNORE] [IDB IGNORE] Upstream Sync - 04/17/2026 (#5453)
Upstream 04/17/2026

fixes https://github.com/Bubberstation/Bubberstation/issues/5549

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com>
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com>
Co-authored-by: loganuk <fakeemail123@aol.com>
Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com>
Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com>
Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com>
Co-authored-by: Lucy <lucy@absolucy.moe>
Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com>
Co-authored-by: Isratosh <Isratosh@hotmail.com>
Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com>
Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Co-authored-by: Alexander V. <volas@ya.ru>
Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com>
Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com>
Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com>
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com>
Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com>
Co-authored-by: Josh <josh.adam.powell@gmail.com>
Co-authored-by: Josh Powell <josh.powell@softwire.com>
Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com>
Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com>
Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com>
Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
2026-05-16 00:56:00 +02:00

213 lines
7.7 KiB
Plaintext

/mob/living/carbon/alien
abstract_type = /mob/living/carbon/alien
name = "alien"
icon = 'icons/mob/nonhuman-player/alien.dmi'
gender = FEMALE //All xenos are girls!!
dna = null
faction = list(ROLE_ALIEN)
sight = SEE_MOBS
verb_say = "hisses"
initial_language_holder = /datum/language_holder/alien
bubble_icon = "alien"
type_of_meat = /obj/item/food/meat/slab/xeno
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
status_flags = CANUNCONSCIOUS|CANPUSH
heat_protection = 0.5 // minor heat insulation
///Whether or not the alien is leaping. Only used by hunters.
var/leaping = FALSE
///The speed this alien should move at.
var/alien_speed = 0
unique_name = TRUE
var/static/regex/alien_name_regex = new("alien (larva|sentinel|drone|hunter|praetorian|princess|queen)( \\(\\d+\\))?")
var/static/list/xeno_allowed_items = typecacheof(list(
/obj/item/clothing/mask/facehugger,
/obj/item/toy/basketball, // playing ball against a xeno is rigged since they cannot be disarmed, their game is out of this world
/obj/item/toy/toy_xeno,
/obj/item/sticker, //funny ~Jimmyl
/obj/item/toy/plush/rouny,
/obj/item/hand_item,
/obj/item/queen_promotion,
))
var/list/default_organ_types_by_slot = list(
ORGAN_SLOT_BRAIN = /obj/item/organ/brain/alien,
ORGAN_SLOT_XENO_HIVENODE = /obj/item/organ/alien/hivenode,
ORGAN_SLOT_TONGUE = /obj/item/organ/tongue/alien,
ORGAN_SLOT_EYES = /obj/item/organ/eyes/alien,
ORGAN_SLOT_LIVER = /obj/item/organ/liver/alien,
ORGAN_SLOT_EARS = /obj/item/organ/ears,
)
/mob/living/carbon/alien/Initialize(mapload)
add_verb(src, /mob/living/proc/mob_sleep)
add_verb(src, /mob/living/proc/toggle_resting)
create_bodyparts() //initialize bodyparts
create_internal_organs()
add_traits(list(TRAIT_NEVER_WOUNDED, TRAIT_VENTCRAWLER_ALWAYS), INNATE_TRAIT)
. = ..()
if(alien_speed)
update_alien_speed()
LoadComponent( \
/datum/component/itempicky, \
xeno_allowed_items, \
span_alien("Your claws lack the dexterity to hold %TARGET."), \
CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(_has_trait), src, TRAIT_ADVANCEDTOOLUSER))
/mob/living/carbon/alien/proc/create_internal_organs()
for(var/slot in default_organ_types_by_slot)
var/organ_type = default_organ_types_by_slot[slot]
var/obj/item/organ/organ = new organ_type()
organ.Insert(src, special = TRUE)
/mob/living/carbon/alien/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) // beepsky won't hunt aliums
return -10
/mob/living/carbon/alien/handle_environment(datum/gas_mixture/environment, seconds_per_tick)
// Run base mob body temperature proc before taking damage
// this balances body temp to the environment and natural stabilization
. = ..()
if(bodytemperature <= BODYTEMP_HEAT_DAMAGE_LIMIT)
clear_alert(ALERT_XENO_FIRE)
return
//Body temperature is too hot.
throw_alert(ALERT_XENO_FIRE, /atom/movable/screen/alert/alien_fire)
switch(bodytemperature)
if(360 to 400)
apply_damage(HEAT_DAMAGE_LEVEL_1 * seconds_per_tick, BURN)
if(400 to 460)
apply_damage(HEAT_DAMAGE_LEVEL_2 * seconds_per_tick, BURN)
if(460 to INFINITY)
if(on_fire)
apply_damage(HEAT_DAMAGE_LEVEL_3 * seconds_per_tick, BURN)
else
apply_damage(HEAT_DAMAGE_LEVEL_2 * seconds_per_tick, BURN)
/mob/living/carbon/alien/get_bloodtype()
return get_blood_type(BLOOD_TYPE_XENO)
/*----------------------------------------
Proc: AddInfectionImages()
Des: Gives the client of the alien an image on each infected mob.
----------------------------------------*/
/mob/living/carbon/alien/proc/AddInfectionImages()
if (!client)
return
for (var/mob/living/target as anything in GLOB.mob_living_list)
if(HAS_TRAIT(target, TRAIT_XENO_HOST))
var/obj/item/organ/body_egg/alien_embryo/embryo = target.get_organ_by_type(/obj/item/organ/body_egg/alien_embryo)
if(embryo)
client.images += image('icons/mob/nonhuman-player/alien.dmi', loc = target, icon_state = "infected[embryo.stage]")
/*----------------------------------------
Proc: RemoveInfectionImages()
Des: Removes all infected images from the alien.
----------------------------------------*/
/mob/living/carbon/alien/proc/RemoveInfectionImages()
if(client)
var/list/image/to_remove
for(var/image/client_image as anything in client.images)
var/searchfor = "infected"
if(findtext(client_image.icon_state, searchfor, 1, length(searchfor) + 1))
to_remove += client_image
client.images -= to_remove
return
/mob/living/carbon/alien/canBeHandcuffed()
if(num_hands < 2)
return FALSE
return TRUE
/mob/living/carbon/alien/get_visible_suicide_message()
return "[src] is thrashing wildly! It looks like [p_theyre()] trying to commit suicide."
/mob/living/carbon/alien/get_blind_suicide_message()
return "You hear thrashing."
/mob/living/carbon/alien/proc/alien_evolve(mob/living/carbon/alien/new_xeno)
visible_message(
span_alertalien("[src] begins to twist and contort!"),
span_noticealien("You begin to evolve!"),
)
new_xeno.setDir(dir)
new_xeno.change_name(name, real_name, identifier)
if(mind)
mind.name = new_xeno.real_name
mind.transfer_to(new_xeno)
for(var/slot in (organs_slot | default_organ_types_by_slot))
var/obj/item/organ/old_organ = get_organ_slot(slot)
var/obj/item/organ/new_organ = new_xeno.get_organ_slot(slot)
if(old_organ)
// Transfer any organs that differ from their intended original type
// Also transfer brains regardless - if we somehow put skillchips or traumas into xeno brains, those should carry over
if(istype(old_organ, /obj/item/organ/brain) || (old_organ.type != default_organ_types_by_slot[slot]))
if(new_organ)
new_organ.Remove(new_xeno, special = TRUE, movement_flags = NO_ID_TRANSFER)
qdel(new_organ)
old_organ.Remove(src, special = TRUE, movement_flags = NO_ID_TRANSFER)
old_organ.Insert(new_xeno, special = TRUE, movement_flags = NO_ID_TRANSFER)
else
// If we don't have an organ in a slot that should have one in both the old and new xeno, remove the organ from that slot in the new xeno
if(default_organ_types_by_slot[slot] && new_xeno.default_organ_types_by_slot[slot] && new_organ)
new_organ.Remove(new_xeno, special = TRUE)
qdel(new_organ)
var/obj/item/organ/stomach/alien/melting_pot = get_organ_slot(ORGAN_SLOT_STOMACH)
var/obj/item/organ/stomach/alien/frying_pan = new_xeno.get_organ_slot(ORGAN_SLOT_STOMACH)
if(istype(melting_pot) && istype(frying_pan))
for (var/atom/movable/poor_sod as anything in melting_pot.stomach_contents)
frying_pan.consume_thing(poor_sod)
// BUBBER ADDITION START - NANITES
var/datum/component/nanites/nanites = GetComponent(/datum/component/nanites)
if(nanites)
new_xeno.AddComponent(/datum/component/nanites, nanites.nanite_volume)
SEND_SIGNAL(new_xeno, COMSIG_NANITE_SYNC, nanites)
// BUBBER ADDITION END - NANITES
qdel(src)
/// Changes the name of the xeno we are evolving into in order to keep the same numerical identifier the old xeno had.
/mob/living/carbon/alien/proc/change_name(old_name, old_real_name, old_identifier)
if(!alien_name_regex.Find(old_name)) // check to make sure there's no admins doing funny stuff with naming these aliens
name = old_name
real_name = old_real_name
return
if(!unique_name)
return
if(old_identifier != 0)
identifier = old_identifier
name = initial(name) // prevent chicanery like two different numerical identifiers tied to the same mob
set_name()
/mob/living/carbon/alien/on_lying_down(new_lying_angle)
. = ..()
update_icons()
/mob/living/carbon/alien/on_standing_up()
. = ..()
update_icons()
/mob/living/carbon/alien/proc/update_alien_speed()
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/alien_speed, multiplicative_slowdown = alien_speed)
/mob/living/carbon/alien/get_footprint_sprite()
return FOOTPRINT_SPRITE_CLAWS
/mob/living/carbon/alien/get_fire_overlay(stacks, on_fire)
return make_generic_fire_overlay()