Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
5 changes: 2 additions & 3 deletions code/__DEFINES/atmospherics/atmos_mob_interaction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/// Amount of air to take a from a tile
#define BREATH_PERCENTAGE (BREATH_VOLUME/CELL_VOLUME)


#define QUANTIZE(variable) (round((variable), (MOLAR_ACCURACY)))

/// Return this from a while_present proc to call its on_loss version, if one exists
Expand Down Expand Up @@ -148,7 +149,7 @@
#define LOW_PRESSURE_DAMAGE 2

/// Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this
#define COLD_SLOWDOWN_FACTOR 20
#define COLD_SLOWDOWN_FACTOR 100


//CLOTHES
Expand Down Expand Up @@ -195,5 +196,3 @@

///Minimum temperature for items on fire
#define BURNING_ITEM_MINIMUM_TEMPERATURE (150+T0C)

#define SKIP_INTERNALS "skip_internals"
10 changes: 5 additions & 5 deletions code/__DEFINES/bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

/// The max damage a limb can take before it stops taking damage.
/// Used by the max_damage var.
#define LIMB_MAX_HP_DEFAULT 150 //
#define LIMB_MAX_HP_CORE 600 //
#define LIMB_MAX_HP_DEFAULT 75
#define LIMB_MAX_HP_CORE LIMB_MAX_HP_DEFAULT * 3

/// Xenomorph Limbs
#define LIMB_MAX_HP_ALIEN_LARVA 100 // 50 //Used by the weird larva chest and head. Did you know they have those?
#define LIMB_MAX_HP_ALIEN_LIMBS 300 // 100 //Used by xenomorph limbs.
#define LIMB_MAX_HP_ALIEN_CORE 1500 // 500 //Used by xenomorph chests and heads
#define LIMB_MAX_HP_ALIEN_LARVA 50 //Used by the weird larva chest and head. Did you know they have those?
#define LIMB_MAX_HP_ALIEN_LIMBS 100 //Used by xenomorph limbs.
#define LIMB_MAX_HP_ALIEN_CORE 500 //Used by xenomorph chests and heads

// EMP
// Note most of these values are doubled on heavy EMP
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define HANDLE_BLOOD_NO_EFFECTS (1<<2)

/// Various lists of body zones affected by pain.

#define BODY_ZONES_ALL list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
#define BODY_ZONES_MINUS_HEAD list(BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
#define BODY_ZONES_LIMBS list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
Expand Down Expand Up @@ -146,6 +147,11 @@
/// Updates associated self-huds on the mob
#define UPDATE_SELF (UPDATE_SELF_DAMAGE | UPDATE_SELF_HEALTH)

/// Threshold that heart beat becomes "slow"
#define SLOW_HEARTBEAT_THRESHOLD 6
/// Threshold that heart beat becomes "fast"
#define FAST_HEARTBEAT_THRESHOLD 11

// Used in living mob offset list for determining pixel offsets
#define PIXEL_W_OFFSET "w"
#define PIXEL_X_OFFSET "x"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,6 @@ GLOBAL_LIST_INIT(announcer_keys, list(
#define SFX_MALE_SIGH "male_sigh"
#define SFX_FEMALE_SIGH "female_sigh"
#define SFX_WRITING_PEN "writing_pen"
#define SFX_CLOTH_RIP "cloth_rip"
#define SFX_SEATBELT_BUCKLE "buckle"
#define SFX_SEATBELT_UNBUCKLE "unbuckle"
2 changes: 0 additions & 2 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#define STATUS_EFFECT_REPLACE 2
/// if it only allows one, and new instances just instead refresh the timer
#define STATUS_EFFECT_REFRESH 3
/// Like [STATUS_EFFECT_REPLACE] but only for differing types - Only replace if the new effect is of a different typepath
#define STATUS_EFFECT_LOOSE_REPLACE 4

///Processing flags - used to define the speed at which the status will work
///This is fast - 0.2s between ticks (I believe!)
Expand Down
4 changes: 0 additions & 4 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_MAINTENANCE_METABOLISM "maintenance_metabolism"
#define TRAIT_CORONER_METABOLISM "coroner_metabolism"

//LUNG TRAITS
/// Lungs always breathe normally when in vacuum/space.
#define TRAIT_SPACEBREATHING "spacebreathing"

/// This mob can strip other mobs.
#define TRAIT_CAN_STRIP "can_strip"
/// Can use the nuclear device's UI, regardless of a lack of hands
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/vv.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
#define VV_HK_PURRBATION "purrbation"
#define VV_HK_APPLY_DNA_INFUSION "apply_dna_infusion"
#define VV_HK_TURN_INTO_MMI "turn_into_mmi"
#define VV_HK_MAKE_ME_TANKY "make_me_tanky"

// misc
#define VV_HK_SPACEVINE_PURGE "spacevine_purge"
Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/wounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ GLOBAL_LIST_INIT(biotypes_to_scar_file, list(
// ~random wound balance defines
/// how quickly sanitization removes infestation and decays per second
#define WOUND_BURN_SANITIZATION_RATE 0.075
/// how much blood you can lose per tick per slash max.
#define WOUND_SLASH_MAX_BLOODFLOW 4.5
/// how much blood you can lose per tick per wound max.
#define WOUND_MAX_BLOODFLOW 4.5
/// further slash attacks on a bodypart with a slash wound have their blood_flow further increased by damage * this (10 damage slash adds .25 flow)
#define WOUND_SLASH_DAMAGE_FLOW_COEFF 0.025
/// if we suffer a bone wound to the head that creates brain traumas, the timer for the trauma cycle is +/- by this percent (0-100)
Expand Down
5 changes: 5 additions & 0 deletions code/_compile_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@
#warn Compiling in MAP_TEST mode. Certain game mechanics will be disabled.
#endif

// For balancing health
// #define HEALTH_DEBUG
// For debugging pain
// #define PAIN_DEBUG

/// Uncomment to compile content related to the story or characters of Maplestation.
// #define MAPLESTATION_STORY_CONTENT

Expand Down
3 changes: 0 additions & 3 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,6 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_PRETENDER_ROYAL_METABOLISM" = TRAIT_PRETENDER_ROYAL_METABOLISM,
"TRAIT_ROYAL_METABOLISM" = TRAIT_ROYAL_METABOLISM,
),
/obj/item/organ/internal/lungs = list(
"TRAIT_SPACEBREATHING" = TRAIT_SPACEBREATHING,
),
/obj/item/reagent_containers = list(
"TRAIT_MAY_CONTAIN_BLENDED_DUST" = TRAIT_MAY_CONTAIN_BLENDED_DUST,
),
Expand Down
3 changes: 0 additions & 3 deletions code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,6 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_PRETENDER_ROYAL_METABOLISM" = TRAIT_PRETENDER_ROYAL_METABOLISM,
"TRAIT_ROYAL_METABOLISM" = TRAIT_ROYAL_METABOLISM,
),
/obj/item/organ/internal/lungs = list(
"TRAIT_SPACEBREATHING" = TRAIT_SPACEBREATHING,
),
))

/// value -> trait name, generated as needed for adminning.
Expand Down
4 changes: 2 additions & 2 deletions code/datums/brain_damage/mild.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
var/fall_chance = 1
if(owner.move_intent == MOVE_INTENT_RUN)
fall_chance += 2
if(SPT_PROB(0.5 * fall_chance, seconds_per_tick) && owner.body_position == STANDING_UP)
if(SPT_PROB(0.5 * fall_chance, seconds_per_tick) && owner.body_position == STANDING_UP && !owner.buckled)
to_chat(owner, span_warning("Your leg gives out!"))
owner.Paralyze(35)

Expand All @@ -147,7 +147,7 @@
if(SPT_PROB(0.5 * drop_chance, seconds_per_tick) && owner.dropItemToGround(I))
to_chat(owner, span_warning("You drop [I]!"))

else if(SPT_PROB(1.5, seconds_per_tick))
else if(SPT_PROB(1.5, seconds_per_tick) && owner.getStaminaLoss() < 100)
to_chat(owner, span_warning("You feel a sudden weakness in your muscles!"))
owner.apply_damage(25, STAMINA, BODY_ZONE_L_LEG)
owner.apply_damage(25, STAMINA, BODY_ZONE_R_LEG)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/elements/digitalcamo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
var/datum/atom_hud/S = GLOB.huds[AI.sec_hud]
S.unhide_single_atomhud_from(AI,target)

/datum/element/digitalcamo/proc/on_examine(datum/source, mob/M)
/datum/element/digitalcamo/proc/on_examine(datum/source, mob/M, list/examine_list)
SIGNAL_HANDLER

to_chat(M, span_warning("[source.p_their()] skin seems to be shifting like something is moving below it."))
examine_list += span_danger("[source.p_Their()] skin seems to be <i>shifting</i> like something is moving below it.")

/datum/element/digitalcamo/proc/can_track(datum/source, mob/user)
SIGNAL_HANDLER
Expand Down
4 changes: 2 additions & 2 deletions code/datums/mood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,11 @@
if(0 to NUTRITION_LEVEL_STARVING)
msg += span_boldwarning("I'm starving!\n")

var/drunkness = mob_parent.get_timed_status_effect_duration(/datum/status_effect/inebriated)
var/drunkness = mob_parent.get_drunk_amount()
if(drunkness >= 1)
msg += span_notice("My current drunkenness: ")
switch(drunkness)
if(1 to 10)
if(0 to 10)
msg += span_info("I'm feeling a little tipsy.\n")
if(11 to 21)
msg += span_info("I'm feeling a bit drunk.\n")
Expand Down
5 changes: 0 additions & 5 deletions code/datums/status_effects/_status_effect_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@
if(STATUS_EFFECT_REFRESH)
existing_effect.refresh(arglist(arguments))
return
// Replace but only if the type differs
if(STATUS_EFFECT_LOOSE_REPLACE)
if(existing_effect.type == new_effect)
return
existing_effect.be_replaced()

// Create the status effect with our mob + our arguments
var/datum/status_effect/new_instance = new new_effect(arguments)
Expand Down
24 changes: 24 additions & 0 deletions code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -601,3 +601,27 @@

/datum/status_effect/jump_jet/on_remove()
owner.RemoveElement(/datum/element/forced_gravity, 0)

/datum/status_effect/basic_health_regen
id = "basic_health_regen"
status_type = STATUS_EFFECT_MULTIPLE
tick_interval = 1 SECONDS
duration = INFINITY
alert_type = null
/// How much to heal per second
var/modifier = 1

/datum/status_effect/basic_health_regen/on_creation(mob/living/new_owner, modifier = 1)
src.modifier = modifier
return ..()

/datum/status_effect/basic_health_regen/tick(seconds_between_ticks)
if(owner.stat == DEAD)
return
owner.adjustBruteLoss(-1 * modifier * seconds_between_ticks)
owner.adjustFireLoss(-1 * modifier * seconds_between_ticks)
owner.adjustToxLoss(-1 * modifier * seconds_between_ticks)
owner.adjustOxyLoss(-1 * modifier * seconds_between_ticks)
if(owner.blood_volume < BLOOD_VOLUME_NORMAL)
owner.blood_volume += modifier * seconds_between_ticks
owner.cause_pain(BODY_ZONES_ALL, -0.5 * modifier * seconds_between_ticks)
4 changes: 2 additions & 2 deletions code/datums/status_effects/debuffs/cursed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
playsound(human_owner, SFX_SEAR, 50, TRUE)
var/obj/item/bodypart/affecting = human_owner.get_active_hand()
branded_hand = affecting
affecting.force_wound_upwards(/datum/wound/burn/flesh/severe/cursed_brand, wound_source = "curse of the slot machine")
affecting.force_wound_upwards(/datum/wound/flesh/burn/severe/cursed_brand, wound_source = "curse of the slot machine")

messages += span_boldwarning("Your hand burns, and you quickly let go of the lever! You feel a little sick as the nerves deaden in your hand...")
messages += span_boldwarning("Some smoke appears to be coming out of your hand now, but it's not too bad...")
Expand Down Expand Up @@ -116,7 +116,7 @@
SIGNAL_HANDLER

if(!isnull(branded_hand))
var/datum/wound/brand = branded_hand.get_wound_type(/datum/wound/burn/flesh/severe/cursed_brand)
var/datum/wound/brand = branded_hand.get_wound_type(/datum/wound/flesh/burn/severe/cursed_brand)
brand?.remove_wound()

owner.visible_message(
Expand Down
Loading