Merge remote-tracking branch 'origin/upsteam-12-15-25-revert-unique-reskins'

# Conflicts:
#	_maps/bubber/automapper/templates/centcom/interlink_adminoffice.dmm
#	_maps/map_files/BoxStation/BoxStation.dmm
#	_maps/map_files/generic/CentCom_skyrat_z2.dmm
#	_maps/map_files/moonstation/moonstation.dmm
#	code/modules/holiday/holidays.dm
This commit is contained in:
nevimer
2026-01-12 22:09:10 -05:00
1118 changed files with 119008 additions and 36907 deletions
@@ -378,8 +378,8 @@
sexy_chad.hair_color = hair_color
sexy_chad.facial_hairstyle = facial_hairstyle
sexy_chad.facial_hair_color = facial_hair_color
sexy_chad.grad_style = gradient_styles.Copy()
sexy_chad.grad_color = gradient_colors.Copy()
sexy_chad.grad_style = LAZYCOPY(gradient_styles)
sexy_chad.grad_color = LAZYCOPY(gradient_colors)
sexy_chad.lip_style = lip_style
sexy_chad.lip_color = lip_color
@@ -17,6 +17,7 @@
disabling_threshold_percentage = 1
bodypart_flags = BODYPART_UNHUSKABLE
biological_state = (BIO_WOOD|BIO_JOINTED)
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2)
/obj/item/bodypart/arm/left/ghetto/Initialize(mapload, ...)
. = ..()
@@ -41,6 +42,7 @@
disabling_threshold_percentage = 1
bodypart_flags = BODYPART_UNHUSKABLE
biological_state = (BIO_WOOD|BIO_JOINTED)
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2)
/obj/item/bodypart/arm/right/ghetto/Initialize(mapload, ...)
. = ..()
@@ -63,6 +65,7 @@
disabling_threshold_percentage = 1
bodypart_flags = BODYPART_UNHUSKABLE
biological_state = (BIO_WOOD|BIO_JOINTED)
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2)
/obj/item/bodypart/leg/left/ghetto/Initialize(mapload, ...)
. = ..()
@@ -85,6 +88,7 @@
disabling_threshold_percentage = 1
bodypart_flags = BODYPART_UNHUSKABLE
biological_state = (BIO_WOOD|BIO_JOINTED)
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2)
/obj/item/bodypart/leg/right/ghetto/Initialize(mapload, ...)
. = ..()
+5 -11
View File
@@ -57,15 +57,9 @@
var/facial_hair_hidden = FALSE
/// Gradient styles, if any
var/list/gradient_styles = list(
"None", //Hair gradient style
"None", //Facial hair gradient style
)
var/list/gradient_styles
/// Gradient colors, if any
var/list/gradient_colors = list(
COLOR_BLACK, //Hair gradient color
COLOR_BLACK, //Facial hair gradient color
)
var/list/gradient_colors
/// An override color that can be cleared later, affects both hair and facial hair
var/override_hair_color = null
@@ -182,7 +176,7 @@
if(!eyes)
if (!(head_flags & HEAD_EYEHOLES))
return
var/image/no_eyes = image('icons/mob/human/human_face.dmi', "eyes_missing", -EYES_LAYER, SOUTH)
var/image/no_eyes = image('icons/mob/human/human_eyes.dmi', "eyes_missing", -EYES_LAYER, SOUTH)
worn_face_offset?.apply_offset(no_eyes)
. += no_eyes
return
@@ -191,8 +185,8 @@
return
// This is a bit of copy/paste code from eyes.dm:generate_body_overlay
var/image/eye_left = image('icons/mob/human/human_face.dmi', "[eyes.eye_icon_state]_l", -EYES_LAYER, SOUTH)
var/image/eye_right = image('icons/mob/human/human_face.dmi', "[eyes.eye_icon_state]_r", -EYES_LAYER, SOUTH)
var/image/eye_left = image(eyes.eye_icon, "[eyes.eye_icon_state]_l", -EYES_LAYER, SOUTH)
var/image/eye_right = image(eyes.eye_icon, "[eyes.eye_icon_state]_r", -EYES_LAYER, SOUTH)
if(head_flags & HEAD_EYECOLOR)
if(eyes.eye_color_left)
eye_left.color = eyes.eye_color_left
@@ -56,8 +56,8 @@
facial_hair_alpha = target_species.facial_hair_alpha
facial_hair_color = target.facial_hair_color
fixed_hair_color = target_species.get_fixed_hair_color(target) //Can be null
gradient_styles = target.grad_style.Copy()
gradient_colors = target.grad_color.Copy()
gradient_styles = LAZYCOPY(target.grad_style)
gradient_colors = LAZYCOPY(target.grad_color)
var/obj/item/organ/eyes/peepers = locate() in src
if(peepers)
if(overwrite_eyes || isnull(initial(peepers.eye_color_left)))
@@ -114,9 +114,9 @@
worn_face_offset?.apply_offset(facial_hair_overlay)
. += facial_hair_overlay
//Gradients
var/facial_hair_gradient_style = gradient_styles[GRADIENT_FACIAL_HAIR_KEY]
var/facial_hair_gradient_style = get_hair_gradient_style(GRADIENT_FACIAL_HAIR_KEY)
if(facial_hair_gradient_style != "None")
var/facial_hair_gradient_color = gradient_colors[GRADIENT_FACIAL_HAIR_KEY]
var/facial_hair_gradient_color = get_hair_gradient_color(GRADIENT_FACIAL_HAIR_KEY)
var/image/facial_hair_gradient_overlay = get_gradient_overlay(icon(sprite_accessory.icon, sprite_accessory.icon_state), -HAIR_LAYER, SSaccessories.facial_hair_gradients_list[facial_hair_gradient_style], facial_hair_gradient_color, dropped)
. += facial_hair_gradient_overlay
@@ -155,9 +155,9 @@
worn_face_offset?.apply_offset(hair_overlay)
. += hair_overlay
//Gradients
var/hair_gradient_style = gradient_styles[GRADIENT_HAIR_KEY]
var/hair_gradient_style = get_hair_gradient_style(GRADIENT_HAIR_KEY)
if(hair_gradient_style != "None")
var/hair_gradient_color = gradient_colors[GRADIENT_HAIR_KEY]
var/hair_gradient_color = get_hair_gradient_color(GRADIENT_HAIR_KEY)
var/image/hair_gradient_overlay = get_gradient_overlay(base_icon, hair_overlay.layer, SSaccessories.hair_gradients_list[hair_gradient_style], hair_gradient_color, dropped)
hair_gradient_overlay.pixel_z = hair_sprite_accessory.y_offset
// SKYRAT EDIT ADDITION - Species hair offset
@@ -216,7 +216,7 @@
/// Returns an appropriate missing eyes overlay
/obj/item/bodypart/head/proc/get_eyeless_overlay(dropped)
RETURN_TYPE(/image)
var/eyeless_icon = 'icons/mob/human/human_face.dmi'
var/eyeless_icon = 'icons/mob/human/human_eyes.dmi'
var/eyeless_icon_state = "eyes_missing"
var/image/eyeless_overlay = mutable_appearance(eyeless_icon, eyeless_icon_state, -HAIR_LAYER)
@@ -312,6 +312,39 @@
if(update)
update_body_parts()
/**
* Get the hair gradient style of a human.
* Defaults to "None".
* arguments:
* * key (optional) - corresponds to hair or facial hair index. If no key is provided returns whole list.
**/
/mob/living/proc/get_hair_gradient_style(key)
return
/mob/living/carbon/human/get_hair_gradient_style(key)
if(key)
return LAZYACCESS(grad_style, key) || "None"
return grad_style || list(
"None", //Hair Gradient Style
"None", //Facial Hair Gradient Style
)
/**
* Get the hair gradient style of a head.
* Defaults to "None".
* arguments:
* * key (optional) - corresponds to hair or facial hair index. If no key is provided returns whole list.
**/
/obj/item/bodypart/head/proc/get_hair_gradient_style(key)
if(key)
return LAZYACCESS(gradient_styles, key) || "None"
return gradient_styles || list(
"None", //Hair Gradient Style
"None", //Facial Hair Gradient Style
)
/**
* Set the hair gradient style of a human.
* Update calls update_body_parts().
@@ -320,17 +353,52 @@
return
/mob/living/carbon/human/set_hair_gradient_style(new_style, update = TRUE)
if(grad_style[GRADIENT_HAIR_KEY] == new_style)
if(LAZYACCESS(grad_style, GRADIENT_HAIR_KEY) == new_style)
return
var/obj/item/bodypart/head/my_head = get_bodypart(BODY_ZONE_HEAD)
grad_style[GRADIENT_HAIR_KEY] = new_style
LAZYSET(grad_style, GRADIENT_HAIR_KEY, new_style)
if(my_head)
my_head.gradient_styles[GRADIENT_HAIR_KEY] = new_style
LAZYSET(my_head.gradient_styles, GRADIENT_HAIR_KEY, new_style)
if(update)
update_body_parts()
/**
* Get the hair gradient color of a human.
* Defaults to black.
*
* arguments:
* * key (optional) - corresponds to hair or facial hair index. If no key is provided returns whole list.
**/
/mob/living/proc/get_hair_gradient_color(key)
return
/mob/living/carbon/human/get_hair_gradient_color(key)
if(key)
return LAZYACCESS(grad_color, key) || COLOR_BLACK
return grad_color || list(
COLOR_BLACK, //Hair Gradient Color
COLOR_BLACK, //Facial Hair Gradient Color
)
/**
* Get the hair gradient color of a head.
* Defaults to black.
*
* arguments:
* * key (optional) - corresponds to hair or facial hair index. If no key is provided returns whole list.
**/
/obj/item/bodypart/head/proc/get_hair_gradient_color(key)
if(key)
return LAZYACCESS(gradient_colors, key) || COLOR_BLACK
return gradient_colors || list(
COLOR_BLACK, //Hair Gradient Color
COLOR_BLACK, //Facial Hair Gradient Color
)
/**
* Set the hair gradient color of a human.
* Update calls update_body_parts().
@@ -339,13 +407,13 @@
return
/mob/living/carbon/human/set_hair_gradient_color(new_color, update = TRUE)
if(grad_color[GRADIENT_HAIR_KEY] == new_color)
if(LAZYACCESS(grad_color, GRADIENT_HAIR_KEY) == new_color)
return
var/obj/item/bodypart/head/my_head = get_bodypart(BODY_ZONE_HEAD)
grad_color[GRADIENT_HAIR_KEY] = new_color
LAZYSET(grad_color, GRADIENT_HAIR_KEY, new_color)
if(my_head)
my_head.gradient_colors[GRADIENT_HAIR_KEY] = new_color
LAZYSET(my_head.gradient_colors, GRADIENT_HAIR_KEY, new_color)
if(update)
update_body_parts()
@@ -395,13 +463,13 @@
return
/mob/living/carbon/human/set_facial_hair_gradient_style(new_style, update = TRUE)
if(grad_style[GRADIENT_FACIAL_HAIR_KEY] == new_style)
if(LAZYACCESS(grad_style, GRADIENT_FACIAL_HAIR_KEY) == new_style)
return
var/obj/item/bodypart/head/my_head = get_bodypart(BODY_ZONE_HEAD)
grad_style[GRADIENT_FACIAL_HAIR_KEY] = new_style
LAZYSET(grad_style, GRADIENT_FACIAL_HAIR_KEY, new_style)
if(my_head)
my_head.gradient_styles[GRADIENT_FACIAL_HAIR_KEY] = new_style
LAZYSET(my_head.gradient_styles, GRADIENT_FACIAL_HAIR_KEY, new_style)
if(update)
update_body_parts()
@@ -414,13 +482,13 @@
return
/mob/living/carbon/human/set_facial_hair_gradient_color(new_color, update = TRUE)
if(grad_color[GRADIENT_FACIAL_HAIR_KEY] == new_color)
if(LAZYACCESS(grad_color, GRADIENT_FACIAL_HAIR_KEY) == new_color)
return
var/obj/item/bodypart/head/my_head = get_bodypart(BODY_ZONE_HEAD)
grad_color[GRADIENT_FACIAL_HAIR_KEY] = new_color
LAZYSET(grad_color, GRADIENT_FACIAL_HAIR_KEY, new_color)
if(my_head)
my_head.gradient_colors[GRADIENT_FACIAL_HAIR_KEY] = new_color
LAZYSET(my_head.gradient_colors, GRADIENT_FACIAL_HAIR_KEY, new_color)
if(update)
update_body_parts()
@@ -287,7 +287,7 @@
/obj/item/taperecorder,
/obj/item/lighter,
/obj/item/laser_pointer,
/obj/item/stamp,
/obj/item/stamp/granted,
/obj/item/stamp/denied,
)
@@ -37,6 +37,9 @@
var/eye_color_left = null // set to a hex code to override a mob's left eye color
var/eye_color_right = null // set to a hex code to override a mob's right eye color
/// The icon file of that eyes as its applied to the mob
var/eye_icon = 'icons/mob/human/human_eyes.dmi'
/// The icon state of that eyes as its applied to the mob
var/eye_icon_state = "eyes"
/// Do these eyes have blinking animations
var/blink_animation = TRUE
@@ -127,11 +130,6 @@
if(CONFIG_GET(flag/native_fov) && native_fov)
affected_human.add_fov_trait(type, native_fov)
// SKYRAT EDIT ADDITION - EMISSIVES
if (affected_human.emissive_eyes)
is_emissive = TRUE
// SKYRAT EDIT END
if(call_update)
affected_human.update_body()
@@ -166,7 +164,6 @@
organ_owner.update_tint()
organ_owner.update_sight()
is_emissive = FALSE // SKYRAT EDIT ADDITION
UnregisterSignal(organ_owner, list(
COMSIG_ATOM_BULLET_ACT,
COMSIG_COMPONENT_CLEAN_FACE_ACT,
@@ -293,28 +290,11 @@
if(!istype(parent) || parent.get_organ_by_type(/obj/item/organ/eyes) != src)
CRASH("Generating a body overlay for [src] targeting an invalid parent '[parent]'.")
if(isnull(eye_icon_state) || eye_icon_state == "None") // SKYRAT EDIT - Synths, adds eye_icon_state == "None"
if(isnull(eye_icon_state))
return list()
var/eye_icon = parent.dna?.species.eyes_icon || 'icons/mob/human/human_face.dmi' // SKYRAT EDIT ADDITION
var/mutable_appearance/eye_left = mutable_appearance(eye_icon, "[eye_icon_state]_l", -eyes_layer, parent) // SKYRAT EDIT CHANGE - Customization - ORIGINAL: var/mutable_appearance/eye_left = mutable_appearance('icons/mob/human/human_face.dmi', "[eye_icon_state]_l", -EYES_LAYER, parent)
var/mutable_appearance/eye_right = mutable_appearance(eye_icon, "[eye_icon_state]_r", -eyes_layer, parent) // SKYRAT EDIT CHANGE - Customization - ORIGINAL: var/mutable_appearance/eye_right = mutable_appearance('icons/mob/human/human_face.dmi', "[eye_icon_state]_r", -EYES_LAYER, parent)
// BEGIN BUBBER ADDITION:
if(HAS_TRAIT(owner, TRAIT_QUAD_EYES)) // (*) (*) v (*) (*)
var/mutable_appearance/eye_left_2 = new /mutable_appearance(eye_left)
eye_left_2.pixel_x -= 1
eye_left_2.pixel_y += parent.quad_eyes_offset
var/mutable_appearance/eye_right_2 = new /mutable_appearance(eye_right)
eye_right_2.pixel_x += 1
eye_right_2.pixel_y += parent.quad_eyes_offset
eye_left.underlays.Add(eye_left_2)
eye_right.underlays.Add(eye_right_2)
// END BUBBER ADDITION
var/mutable_appearance/eye_left = mutable_appearance(eye_icon, "[eye_icon_state]_l", -EYES_LAYER, parent)
var/mutable_appearance/eye_right = mutable_appearance(eye_icon, "[eye_icon_state]_r", -EYES_LAYER, parent)
var/list/overlays = list(eye_left, eye_right)
if(!(parent.obscured_slots & HIDEEYES))
@@ -333,24 +313,15 @@
overlays += eyelids
if (scarring & RIGHT_EYE_SCAR)
var/mutable_appearance/right_scar = mutable_appearance('icons/mob/human/human_face.dmi', "eye_scar_right", -EYES_LAYER, parent)
var/mutable_appearance/right_scar = mutable_appearance('icons/mob/human/human_eyes.dmi', "eye_scar_right", -EYES_LAYER, parent)
right_scar.color = my_head.draw_color
overlays += right_scar
if (scarring & LEFT_EYE_SCAR)
var/mutable_appearance/left_scar = mutable_appearance('icons/mob/human/human_face.dmi', "eye_scar_left", -EYES_LAYER, parent)
var/mutable_appearance/left_scar = mutable_appearance('icons/mob/human/human_eyes.dmi', "eye_scar_left", -EYES_LAYER, parent)
left_scar.color = my_head.draw_color
overlays += left_scar
// SKYRAT EDIT START - Customization Emissives
if(is_emissive)
var/mutable_appearance/emissive_left = emissive_appearance_copy(eye_left, owner)
var/mutable_appearance/emissive_right = emissive_appearance_copy(eye_right, owner)
overlays += emissive_left
overlays += emissive_right
// SKYRAT EDIT END - Customization Emissives
if(my_head.worn_face_offset)
for (var/mutable_appearance/overlay as anything in overlays)
my_head.worn_face_offset.apply_offset(overlay)
@@ -561,9 +532,7 @@
addtimer(CALLBACK(src, PROC_REF(animate_eyelids), owner), blink_delay + duration)
/obj/item/organ/eyes/proc/animate_eyelids(mob/living/carbon/human/parent)
if(CONFIG_GET(flag/disable_blinking)) return // BUBBER EDIT - CONFIG BLINKING
var/sync_blinking = TRUE // synchronized_blinking && (parent.get_organ_loss(ORGAN_SLOT_BRAIN) < ASYNC_BLINKING_BRAIN_DAMAGE) // BUBBER EDIT - REMOVE ASYNC BLINKING UNTIL https://github.com/tgstation/tgstation/issues/90269 is fixed
var/sync_blinking = synchronized_blinking && (parent.get_organ_loss(ORGAN_SLOT_BRAIN) < BRAIN_DAMAGE_ASYNC_BLINKING)
// Randomize order for unsynched animations
if (sync_blinking || prob(50))
var/list/anim_times = animate_eyelid(eyelid_left, parent, sync_blinking)
@@ -574,7 +543,7 @@
/obj/effect/abstract/eyelid_effect
name = "eyelid"
icon = 'icons/mob/human/human_face.dmi'
icon = 'icons/mob/human/human_eyes.dmi'
layer = -EYES_LAYER
vis_flags = VIS_INHERIT_DIR | VIS_INHERIT_PLANE | VIS_INHERIT_ID
@@ -597,6 +566,7 @@
#define NIGHTVISION_LIGHT_HIG 3
/obj/item/organ/eyes/night_vision
abstract_type = /obj/item/organ/eyes/night_vision
actions_types = list(/datum/action/item_action/organ_action/use)
// These lists are used as the color cutoff for the eye
@@ -763,6 +733,7 @@
iris_overlay = null
flash_protect = FLASH_PROTECTION_WELDER
tint = INFINITY
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 2.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.9)
var/obj/item/flashlight/eyelight/eye
light_reactive = FALSE
pupils_name = "flashlights"
@@ -850,20 +821,8 @@
/// Set the initial color of the eyes on insert to be the mob's previous eye color.
/obj/item/organ/eyes/robotic/glow/on_mob_insert(mob/living/carbon/eye_recipient, special = FALSE, movement_flags)
. = ..()
//BUBBER EDIT CHANGE BEGIN
//left_eye_color_string = eye_color_left
//right_eye_color_string = eye_color_right
if (ishuman(eye_recipient))
var/mob/living/carbon/human/H = eye_recipient
left_eye_color_string = H.eye_color_left
right_eye_color_string = H.eye_color_right
light_color_string = H.eye_color_left
else
left_eye_color_string = eye_color_left
right_eye_color_string = eye_color_right
light_color_string = eye_color_left
eye.set_light_color(light_color_string)
//BUBBER EDIT CHANGE END
left_eye_color_string = eye_color_left
right_eye_color_string = eye_color_right
update_mob_eye_color(eye_recipient)
deactivate(close_ui = TRUE)
eye.forceMove(eye_recipient)
@@ -919,13 +878,12 @@
set_beam_range(new_range)
return TRUE
if("pick_color")
// BUBBERSTATION EDIT START: TGUI COLOR PICKER
var/new_color = tgui_color_picker(
var/new_color = input(
usr,
"Choose eye color color:",
"High Luminosity Eyes Menu",
light_color_string
) // BUBBERSTATION EDIT END: TGUI COLOR PICKER
) as color|null
if(new_color)
var/to_update = params["to_update"]
set_beam_color(new_color, to_update)
@@ -1198,7 +1156,7 @@
name = "reptile eyes"
desc = "A pair of reptile eyes with thin vertical slits for pupils."
icon_state = "lizard_eyes"
// synchronized_blinking = FALSE // BUBBER EDIT - REMOVE ASYNC BLINKING UNTIL https://github.com/tgstation/tgstation/issues/90269 is fixed
synchronized_blinking = FALSE
pupils_name = "slit pupils"
penlight_message = "have vertically slit pupils and tinted whites"
@@ -1236,9 +1194,9 @@
name = "pod eyes"
desc = "Strangest salad you've ever seen."
icon_state = "eyes_pod"
// eye_color_left = "#375846" BUBBER EDIT - ALLOWS EYE COLOR TO BE CHANGED AGAIN
// eye_color_right = "#375846" BUBBER EDIT - ALLOWS EYE COLOR TO BE CHANGED AGAIN
// iris_overlay = null BUBBER EDIT - ALLOWS EYE COLOR TO BE CHANGED AGAIN
eye_color_left = "#375846"
eye_color_right = "#375846"
iris_overlay = null
foodtype_flags = PODPERSON_ORGAN_FOODTYPES
penlight_message = "are green and plant-like"
@@ -256,14 +256,7 @@
if(toxification_probability && prob(toxification_probability))
wounded_owner.adjust_tox_loss(1 * seconds_per_tick, updating_health = FALSE)
var/datum/wound/bloodiest_wound
for(var/datum/wound/iter_wound as anything in wounded_owner.all_wounds)
if(iter_wound.blood_flow && iter_wound.blood_flow > bloodiest_wound?.blood_flow)
bloodiest_wound = iter_wound
if(bloodiest_wound)
bloodiest_wound.adjust_blood_flow(-1 * seconds_per_tick)
wounded_owner.coagulant_effect(1 * seconds_per_tick)
/obj/item/organ/heart/cybernetic/proc/stabilize_heart()
ADD_TRAIT(owner, TRAIT_NOSOFTCRIT, ORGAN_TRAIT)
@@ -33,6 +33,10 @@
QDEL_NULL(core)
return ..()
/obj/item/organ/heart/cybernetic/anomalock/examine(mob/user)
. = ..()
. += span_info("The voltaic boost will avoid healing toxin damage at all in slime-based humanoids, to prevent harmful side effects.")
/obj/item/organ/heart/cybernetic/anomalock/on_mob_insert(mob/living/carbon/organ_owner, special, movement_flags)
. = ..()
if(!core)
@@ -182,14 +186,19 @@
duration = 30 SECONDS
alert_type = /atom/movable/screen/alert/status_effect/anomalock_active
show_duration = TRUE
processing_speed = STATUS_EFFECT_PRIORITY
/datum/status_effect/voltaic_overdrive/tick(seconds_between_ticks)
. = ..()
if(owner.health <= owner.crit_threshold)
owner.heal_overall_damage(5, 5)
owner.adjust_oxy_loss(-5)
owner.adjust_tox_loss(-5)
if(owner.health > owner.crit_threshold)
return
var/needs_update = FALSE
needs_update += owner.heal_overall_damage(brute = 5, burn = 5, updating_health = FALSE)
needs_update += owner.adjust_oxy_loss(-5, updating_health = FALSE)
if(!HAS_TRAIT(owner, TRAIT_TOXINLOVER))
needs_update += owner.adjust_tox_loss(-5, updating_health = FALSE)
if(needs_update)
owner.updatehealth()
/datum/status_effect/voltaic_overdrive/on_apply()
. = ..()
@@ -1131,7 +1131,7 @@
icon_state = "lungs-evolved"
safe_plasma_max = 8
safe_co2_max = 8
safe_co2_max = 20
maxHealth = 1.2 * STANDARD_ORGAN_THRESHOLD
safe_oxygen_min = 8
@@ -39,7 +39,7 @@
/// Whether the stomach's been repaired with surgery and can be fixed again or not
var/operated = FALSE
/// List of all atoms within the stomach
var/list/atom/movable/stomach_contents = list()
var/list/atom/movable/stomach_contents
/// Have we been cut open with a scalpel? If so, how much damage from it we still have from it and can be recovered with a cauterizing tool.
/// All healing goes towards recovering this.
var/cut_open_damage = 0
@@ -53,7 +53,7 @@
reagents.flags |= REAGENT_HOLDER_ALIVE
/obj/item/organ/stomach/Destroy()
QDEL_LIST(stomach_contents)
QDEL_LAZYLIST(stomach_contents)
return ..()
/obj/item/organ/stomach/on_life(seconds_per_tick, times_fired)
@@ -216,19 +216,19 @@
/obj/item/organ/stomach/proc/consume_thing(atom/movable/thing)
RegisterSignal(thing, COMSIG_MOVABLE_MOVED, PROC_REF(content_moved))
RegisterSignal(thing, COMSIG_QDELETING, PROC_REF(content_deleted))
stomach_contents += thing
LAZYADD(stomach_contents, thing)
thing.forceMove(owner || src) // We assert that if we have no owner, we will not be nullspaced
return TRUE
/obj/item/organ/stomach/proc/content_deleted(atom/movable/source)
SIGNAL_HANDLER
stomach_contents -= source
LAZYREMOVE(stomach_contents, source)
/obj/item/organ/stomach/proc/content_moved(atom/movable/source)
SIGNAL_HANDLER
if(source.loc == src || source.loc == owner) // not in us? out da list then
return
stomach_contents -= source
LAZYREMOVE(stomach_contents, source)
UnregisterSignal(source, list(COMSIG_MOVABLE_MOVED, COMSIG_QDELETING))
/obj/item/organ/stomach/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change)
@@ -249,7 +249,7 @@
var/total_chance = chance
// If min_amount is set, make sure that we vomit at least some of our contents
if (min_amount)
total_chance += 100 / (length(stomach_contents) + 1 - min_amount)
total_chance += 100 / (LAZYLEN(stomach_contents) + 1 - min_amount)
if (!prob(total_chance))
continue
nugget.forceMove(drop_loc)
@@ -272,7 +272,7 @@
if (!owner || SSmobs.times_fired % 3 != 0)
return
if (!length(stomach_contents))
if (!LAZYLEN(stomach_contents))
return
var/obj/item/bodypart/chest/chest = owner.get_bodypart(zone)
@@ -306,7 +306,7 @@
if (chest && !chest.cavity_item && as_item.w_class <= WEIGHT_CLASS_NORMAL)
// Oopsie!
chest.cavity_item = as_item
stomach_contents -= as_item
LAZYREMOVE(stomach_contents, as_item)
continue
owner.apply_damage(as_item.w_class * (as_item.sharpness ? 2 : 1), BRUTE, BODY_ZONE_CHEST, wound_bonus = CANT_WOUND,
@@ -413,7 +413,7 @@
/// If damage is high enough, we may end up vomiting out whatever we had stored
/obj/item/organ/stomach/proc/on_punched(datum/source, mob/living/carbon/human/attacker, damage, attack_type, obj/item/bodypart/affecting, final_armor_block, kicking, limb_sharpness)
SIGNAL_HANDLER
if (!length(stomach_contents) || damage < 9 || final_armor_block || kicking)
if (!LAZYLEN(stomach_contents) || damage < 9 || final_armor_block || kicking)
return
if (owner.vomit(MOB_VOMIT_MESSAGE | MOB_VOMIT_FORCE))
// Since we vomited with a force flag, we should've vomited out at least one item