Browse Source

Merge branch 'tg' of github.com:jaw-sh/Fulpstation

master
Joshua Moon 2 months ago
parent
commit
dad41cd5f6
33 changed files with 229 additions and 83 deletions
  1. +3
    -0
      code/__DEFINES/traits.dm
  2. +1
    -1
      code/_onclick/cyborg.dm
  3. +5
    -7
      code/datums/diseases/advance/symptoms/heal.dm
  4. +12
    -2
      code/datums/status_effects/debuffs.dm
  5. +3
    -0
      code/game/objects/items/storage/boxes.dm
  6. +0
    -1
      code/modules/antagonists/changeling/powers/fakedeath.dm
  7. +1
    -1
      code/modules/clothing/head/misc_special.dm
  8. +10
    -0
      code/modules/holiday/holidays.dm
  9. +1
    -0
      code/modules/mob/living/carbon/alien/larva/larva.dm
  10. +4
    -7
      code/modules/mob/living/carbon/alien/larva/life.dm
  11. +19
    -10
      code/modules/mob/living/carbon/carbon.dm
  12. +22
    -0
      code/modules/mob/living/carbon/carbon_defense.dm
  13. +0
    -2
      code/modules/mob/living/carbon/monkey/combat.dm
  14. +1
    -1
      code/modules/mob/living/carbon/monkey/monkey_defense.dm
  15. +7
    -5
      code/modules/mob/living/damage_procs.dm
  16. +28
    -0
      code/modules/mob/living/init_signals.dm
  17. +25
    -9
      code/modules/mob/living/living.dm
  18. +2
    -0
      code/modules/mob/living/living_defines.dm
  19. +1
    -1
      code/modules/mob/living/silicon/ai/life.dm
  20. +1
    -1
      code/modules/mob/living/silicon/pai/pai.dm
  21. +6
    -12
      code/modules/mob/living/silicon/robot/robot.dm
  22. +22
    -0
      code/modules/mob/living/silicon/robot/robot_defense.dm
  23. +1
    -4
      code/modules/mob/living/simple_animal/simple_animal.dm
  24. +2
    -2
      code/modules/mob/living/status_procs.dm
  25. +1
    -3
      code/modules/research/nanites/nanite_programs/protocols.dm
  26. +32
    -0
      code/modules/research/xenobiology/xenobiology.dm
  27. +11
    -0
      html/changelog.html
  28. +7
    -0
      html/changelogs/.all_changelog.yml
  29. +0
    -5
      html/changelogs/AutoChangeLog-pr-51378.yml
  30. +0
    -4
      html/changelogs/AutoChangeLog-pr-51383.yml
  31. +0
    -5
      html/changelogs/AutoChangeLog-pr-51391.yml
  32. BIN
      icons/obj/chemical.dmi
  33. +1
    -0
      tgstation.dme

+ 3
- 0
code/__DEFINES/traits.dm View File

@@ -76,6 +76,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
*/

//mob traits
#define TRAIT_KNOCKEDOUT "knockedout" //Forces the user to stay unconscious.
#define TRAIT_INCAPACITATED "incapacitated"
#define TRAIT_BLIND "blind"
#define TRAIT_MUTE "mute"
@@ -257,6 +258,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define GLASSES_TRAIT "glasses"
#define VEHICLE_TRAIT "vehicle" // inherited from riding vehicles
#define INNATE_TRAIT "innate"
#define CRIT_HEALTH_TRAIT "crit_health"
#define OXYLOSS_TRAIT "oxyloss"

// unique trait sources, still defines
#define CLONING_POD_TRAIT "cloning-pod"


+ 1
- 1
code/_onclick/cyborg.dm View File

@@ -14,7 +14,7 @@
if(check_click_intercept(params,A))
return
if(stat || lockcharge || IsParalyzed() || IsStun() || IsUnconscious())
if(stat || lockcharge || IsParalyzed() || IsStun())
return
var/list/modifiers = params2list(params)


+ 5
- 7
code/datums/diseases/advance/symptoms/heal.dm View File

@@ -267,20 +267,19 @@
var/mob/living/M = A.affected_mob
if(HAS_TRAIT(M, TRAIT_DEATHCOMA))
return power
else if(M.IsUnconscious() || M.stat == UNCONSCIOUS)
if(M.IsSleeping())
return power * 0.25 //Voluntary unconsciousness yields lower healing.
if(M.stat == UNCONSCIOUS)
return power * 0.9
else if(M.stat == SOFT_CRIT)
if(M.stat == SOFT_CRIT)
return power * 0.5
else if(M.IsSleeping())
return power * 0.25
else if(M.getBruteLoss() + M.getFireLoss() >= 70 && !active_coma)
if(M.getBruteLoss() + M.getFireLoss() >= 70 && !active_coma)
to_chat(M, "<span class='warning'>You feel yourself slip into a regenerative coma...</span>")
active_coma = TRUE
addtimer(CALLBACK(src, .proc/coma, M), 60)
/datum/symptom/heal/coma/proc/coma(mob/living/M)
M.fakedeath("regenerative_coma", !deathgasp)
M.update_stat()
M.update_mobility()
addtimer(CALLBACK(src, .proc/uncoma, M), 300)
@@ -289,7 +288,6 @@
return
active_coma = FALSE
M.cure_fakedeath("regenerative_coma")
M.update_stat()
M.update_mobility()
/datum/symptom/heal/coma/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)


+ 12
- 2
code/datums/status_effects/debuffs.dm View File

@@ -68,10 +68,10 @@
. = ..()
if(!.)
return
ADD_TRAIT(owner, TRAIT_INCAPACITATED, TRAIT_STATUS_EFFECT(id))
ADD_TRAIT(owner, TRAIT_KNOCKEDOUT, TRAIT_STATUS_EFFECT(id))

/datum/status_effect/incapacitating/unconscious/on_remove()
REMOVE_TRAIT(owner, TRAIT_INCAPACITATED, TRAIT_STATUS_EFFECT(id))
REMOVE_TRAIT(owner, TRAIT_KNOCKEDOUT, TRAIT_STATUS_EFFECT(id))
return ..()

/datum/status_effect/incapacitating/unconscious/tick()
@@ -99,6 +99,16 @@
human_owner = null
return ..()

/datum/status_effect/incapacitating/sleeping/on_apply()
. = ..()
if(!.)
return
ADD_TRAIT(owner, TRAIT_KNOCKEDOUT, TRAIT_STATUS_EFFECT(id))

/datum/status_effect/incapacitating/sleeping/on_remove()
REMOVE_TRAIT(owner, TRAIT_KNOCKEDOUT, TRAIT_STATUS_EFFECT(id))
return ..()

/datum/status_effect/incapacitating/sleeping/tick()
if(owner.maxHealth)
var/health_ratio = owner.health / owner.maxHealth


+ 3
- 0
code/game/objects/items/storage/boxes.dm View File

@@ -129,6 +129,9 @@
else
new /obj/item/tank/internals/plasmaman/belt(src)
if(SSevents.holidays["Pride Month"])
new /obj/item/slimepotion/pride(src)
/obj/item/storage/box/survival/radio/PopulateContents()
..() // we want the survival stuff too.
new /obj/item/radio/off(src)


+ 0
- 1
code/modules/antagonists/changeling/powers/fakedeath.dm View File

@@ -24,7 +24,6 @@
else
to_chat(user, "<span class='notice'>We begin our stasis, preparing energy to arise once more.</span>")
user.fakedeath("changeling") //play dead
user.update_stat()
user.update_mobility()
addtimer(CALLBACK(src, .proc/ready_to_regenerate, user), LING_FAKEDEATH_TIME, TIMER_UNIQUE)
return TRUE


+ 1
- 1
code/modules/clothing/head/misc_special.dm View File

@@ -355,7 +355,7 @@
if(target.get_item_by_slot(ITEM_SLOT_HEAD) != src)
return
QDEL_NULL(paranoia)
if(!target.IsUnconscious())
if(target.stat < UNCONSCIOUS)
to_chat(target, "<span class='warning'>Your zealous conspirationism rapidly dissipates as the donned hat warps up into a ruined mess. All those theories starting to sound like nothing but a ridicolous fanfare.</span>")
/obj/item/clothing/head/foilhat/attack_hand(mob/user)


+ 10
- 0
code/modules/holiday/holidays.dm View File

@@ -239,6 +239,16 @@
/datum/holiday/bee/getStationPrefix()
return pick("Bee","Honey","Hive","Africanized","Mead","Buzz")

/datum/holiday/pride_month
name = "Pride Month"
begin_day = 1
begin_month = JUNE
end_day = 30
end_month = JUNE

/datum/holiday/pride_month/getStationPrefix()
return pick("Pride","Love","Trans","LGBTQIAP","Gender","Identity","John Money","Hypnosis")

/datum/holiday/summersolstice
name = "Summer Solstice"
begin_day = 21


+ 1
- 0
code/modules/mob/living/carbon/alien/larva/larva.dm View File

@@ -9,6 +9,7 @@
maxHealth = 25
health = 25
hardcrit_threshold = HEALTH_THRESHOLD_CRIT
var/amount_grown = 0
var/max_grown = 100


+ 4
- 7
code/modules/mob/living/carbon/alien/larva/life.dm View File

@@ -18,15 +18,12 @@
if(health<= -maxHealth || !getorgan(/obj/item/organ/brain))
death()
return
if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || health <= crit_threshold)
if(stat == CONSCIOUS)
set_stat(UNCONSCIOUS)
become_blind(UNCONSCIOUS_BLIND)
update_mobility()
if((HAS_TRAIT(src, TRAIT_KNOCKEDOUT)))
set_stat(UNCONSCIOUS)
else
if(stat == UNCONSCIOUS)
set_stat(CONSCIOUS)
cure_blind(UNCONSCIOUS_BLIND)
set_resting(FALSE)
set_stat(CONSCIOUS)
update_mobility()
update_damage_hud()
update_health_hud()

+ 19
- 10
code/modules/mob/living/carbon/carbon.dm View File

@@ -514,7 +514,7 @@
total_brute += (BP.brute_dam * BP.body_damage_coeff)
total_burn += (BP.burn_dam * BP.body_damage_coeff)
total_stamina += (BP.stamina_dam * BP.stam_damage_coeff)
health = round(maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute, DAMAGE_PRECISION)
set_health(round(maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute, DAMAGE_PRECISION))
staminaloss = round(total_stamina, DAMAGE_PRECISION)
update_stat()
update_mobility()
@@ -756,28 +756,37 @@
if(hud_used && hud_used.spacesuit)
hud_used.spacesuit.icon_state = "spacesuit_[cell_state]"
/mob/living/carbon/set_health(new_value)
. = ..()
if(. > hardcrit_threshold)
if(health <= hardcrit_threshold && !HAS_TRAIT(src, TRAIT_NOHARDCRIT))
ADD_TRAIT(src, TRAIT_KNOCKEDOUT, CRIT_HEALTH_TRAIT)
else if(health > hardcrit_threshold)
REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, CRIT_HEALTH_TRAIT)
if(CONFIG_GET(flag/near_death_experience))
if(. > HEALTH_THRESHOLD_NEARDEATH)
if(health <= HEALTH_THRESHOLD_NEARDEATH && !HAS_TRAIT(src, TRAIT_NODEATH))
ADD_TRAIT(src, TRAIT_SIXTHSENSE, "near-death")
else if(health > HEALTH_THRESHOLD_NEARDEATH)
REMOVE_TRAIT(src, TRAIT_SIXTHSENSE, "near-death")
/mob/living/carbon/update_stat()
if(status_flags & GODMODE)
return
if(stat != DEAD)
if(health <= HEALTH_THRESHOLD_DEAD && !HAS_TRAIT(src, TRAIT_NODEATH))
death()
cure_blind(UNCONSCIOUS_BLIND)
return
if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT)))
if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT))
set_stat(UNCONSCIOUS)
become_blind(UNCONSCIOUS_BLIND)
if(CONFIG_GET(flag/near_death_experience) && health <= HEALTH_THRESHOLD_NEARDEATH && !HAS_TRAIT(src, TRAIT_NODEATH))
ADD_TRAIT(src, TRAIT_SIXTHSENSE, "near-death")
else
REMOVE_TRAIT(src, TRAIT_SIXTHSENSE, "near-death")
else
if(health <= crit_threshold && !HAS_TRAIT(src, TRAIT_NOSOFTCRIT))
set_stat(SOFT_CRIT)
else
set_stat(CONSCIOUS)
cure_blind(UNCONSCIOUS_BLIND)
REMOVE_TRAIT(src, TRAIT_SIXTHSENSE, "near-death")
update_mobility()
update_damage_hud()
update_health_hud()


+ 22
- 0
code/modules/mob/living/carbon/carbon_defense.dm View File

@@ -431,3 +431,25 @@
var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS)
if(istype(ears) && !ears.deaf)
. = TRUE
/mob/living/carbon/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
. = ..()
if(isnull(.))
return
if(. <= 50)
if(getOxyLoss() > 50)
ADD_TRAIT(src, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)
else if(getOxyLoss() <= 50)
REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)
/mob/living/carbon/setOxyLoss(amount, updating_health = TRUE, forced = FALSE)
. = ..()
if(isnull(.))
return
if(. <= 50)
if(getOxyLoss() > 50)
ADD_TRAIT(src, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)
else if(getOxyLoss() <= 50)
REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)

+ 0
- 2
code/modules/mob/living/carbon/monkey/combat.dm View File

@@ -54,8 +54,6 @@
return 1
if(health <= 0 && checkDead)
return 1
if(IsUnconscious())
return 1
if(IsStun() || IsParalyzed())
return 1
if(stat)


+ 1
- 1
code/modules/mob/living/carbon/monkey/monkey_defense.dm View File

@@ -64,7 +64,7 @@
"<span class='danger'>You avoid [M]'s punch!</span>", "<span class='hear'>You hear a swoosh!</span>", COMBAT_MESSAGE_RANGE, M)
to_chat(M, "<span class='warning'>Your punch misses [name]!</span>")
if("disarm")
if(!IsUnconscious())
if(stat < UNCONSCIOUS)
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
if (prob(25))
Paralyze(40)


+ 7
- 5
code/modules/mob/living/damage_procs.dm View File

@@ -167,19 +167,21 @@
/mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
if(!forced && (status_flags & GODMODE))
return FALSE
return
. = oxyloss
oxyloss = clamp((oxyloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
if(updating_health)
updatehealth()
return amount
/mob/living/proc/setOxyLoss(amount, updating_health = TRUE, forced = FALSE)
if(status_flags & GODMODE)
return 0
if(!forced && status_flags & GODMODE)
return
. = oxyloss
oxyloss = amount
if(updating_health)
updatehealth()
return amount
/mob/living/proc/getToxLoss()
return toxloss


+ 28
- 0
code/modules/mob/living/init_signals.dm View File

@@ -0,0 +1,28 @@
///Called on /mob/living/Initialize(), for the mob to register to relevant signals.
/mob/living/proc/register_init_signals()
RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_KNOCKEDOUT), .proc/on_knockedout_trait_gain)
RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_KNOCKEDOUT), .proc/on_knockedout_trait_loss)

RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_DEATHCOMA), .proc/on_deathcoma_trait_gain)
RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_DEATHCOMA), .proc/on_deathcoma_trait_loss)


///Called when TRAIT_KNOCKEDOUT is added to the mob.
/mob/living/proc/on_knockedout_trait_gain(datum/source)
if(stat < UNCONSCIOUS)
set_stat(UNCONSCIOUS)

///Called when TRAIT_KNOCKEDOUT is removed from the mob.
/mob/living/proc/on_knockedout_trait_loss(datum/source)
if(stat < DEAD)
update_stat()


///Called when TRAIT_DEATHCOMA is added to the mob.
/mob/living/proc/on_deathcoma_trait_gain(datum/source)
ADD_TRAIT(src, TRAIT_KNOCKEDOUT, TRAIT_DEATHCOMA)

///Called when TRAIT_DEATHCOMA is removed from the mob.
/mob/living/proc/on_deathcoma_trait_loss(datum/source)
REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, TRAIT_DEATHCOMA)


+ 25
- 9
code/modules/mob/living/living.dm View File

@@ -1,5 +1,6 @@
/mob/living/Initialize()
. = ..()
register_init_signals()
if(unique_name)
set_name()
var/datum/atom_hud/data/human/medical/advanced/medhud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
@@ -375,8 +376,6 @@
/mob/living/pointed(atom/A as mob|obj|turf in view(client.view, src))
if(incapacitated())
return FALSE
if(HAS_TRAIT(src, TRAIT_DEATHCOMA))
return FALSE
if(!..())
return FALSE
visible_message("<span class='name'>[src]</span> points at [A].", "<span class='notice'>You point at [A].</span>")
@@ -480,10 +479,17 @@
/mob/living/is_drawable(mob/user, allowmobs = TRUE)
return (allowmobs && reagents && can_inject(user))


///Sets the current mob's health value. Do not call directly if you don't know what you are doing, use the damage procs, instead.
/mob/living/proc/set_health(new_value)
. = health
health = new_value


/mob/living/proc/updatehealth()
if(status_flags & GODMODE)
return
health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
set_health(maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss())
staminaloss = getStaminaLoss()
update_stat()
med_hud_set_health()
@@ -895,7 +901,7 @@
if(c.clothing_flags & DANGEROUS_OBJECT)
who.visible_message("<span class='danger'>[src] tries to put [what] on [who].</span>", \
"<span class='userdanger'>[src] tries to put [what] on you.</span>", null, null, src)
else
else
who.visible_message("<span class='notice'>[src] tries to put [what] on [who].</span>", \
"<span class='notice'>[src] tries to put [what] on you.</span>", null, null, src)
to_chat(src, "<span class='notice'>You try to put [what] on [who]...</span>")
@@ -1168,7 +1174,6 @@
/mob/living/proc/update_mobility()
var/stat_softcrit = stat == SOFT_CRIT
var/stat_conscious = (stat == CONSCIOUS) || stat_softcrit
var/conscious = !IsUnconscious() && stat_conscious && !HAS_TRAIT(src, TRAIT_DEATHCOMA)
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
var/restrained = restrained()
var/has_legs = get_num_legs()
@@ -1177,13 +1182,12 @@
var/stun = IsStun()
var/knockdown = IsKnockdown()
var/ignore_legs = get_leg_ignore()
var/canmove = !IsImmobilized() && !stun && conscious && !paralyzed && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && !IS_IN_STASIS(src) && (has_arms || ignore_legs || has_legs)
canmove = canmove && !IsFrenzied() // FULPSTATION: Bloodsuckers etc. cannot be controlled in Frenzy.
var/canmove = !IsImmobilized() && !stun && stat_conscious && !paralyzed && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && !IS_IN_STASIS(src) && (has_arms || ignore_legs || has_legs)
if(canmove)
mobility_flags |= MOBILITY_MOVE
else
mobility_flags &= ~MOBILITY_MOVE
var/canstand_involuntary = conscious && !stat_softcrit && !knockdown && !chokehold && !paralyzed && (ignore_legs || has_legs) && !(buckled && buckled.buckle_lying)
var/canstand_involuntary = stat_conscious && !stat_softcrit && !knockdown && !chokehold && !paralyzed && (ignore_legs || has_legs) && !(buckled && buckled.buckle_lying)
var/canstand = canstand_involuntary && !resting

if(buckled && buckled.buckle_lying != -1)
@@ -1209,7 +1213,7 @@



var/canitem = !paralyzed && !stun && conscious && !chokehold && !restrained && has_arms
var/canitem = !paralyzed && !stun && stat_conscious && !chokehold && !restrained && has_arms
if(canitem)
mobility_flags |= (MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_STORAGE)
else
@@ -1534,3 +1538,15 @@
/mob/living/proc/stop_look_up()
reset_perspective()
UnregisterSignal(src, COMSIG_MOVABLE_PRE_MOVE)


/mob/living/set_stat(new_stat)
. = ..()
if(isnull(.))
return
switch(.) //Previous stat.
if(UNCONSCIOUS)
cure_blind(UNCONSCIOUS_BLIND)
switch(stat) //Current stat.
if(UNCONSCIOUS)
become_blind(UNCONSCIOUS_BLIND)

+ 2
- 0
code/modules/mob/living/living_defines.dm View File

@@ -23,6 +23,8 @@
var/cloneloss = 0 ///Damage caused by being cloned or ejected from the cloner early. slimes also deal cloneloss damage to victims
var/staminaloss = 0 ///Stamina damage, or exhaustion. You recover it slowly naturally, and are knocked down if it gets too high. Holodeck and hallucinations deal this.
var/crit_threshold = HEALTH_THRESHOLD_CRIT /// when the mob goes from "normal" to crit
///When the mob enters hard critical state and is fully incapacitated.
var/hardcrit_threshold = HEALTH_THRESHOLD_FULLCRIT
var/mobility_flags = MOBILITY_FLAGS_DEFAULT


+ 1
- 1
code/modules/mob/living/silicon/ai/life.dm View File

@@ -62,7 +62,7 @@
/mob/living/silicon/ai/updatehealth()
if(status_flags & GODMODE)
return
health = maxHealth - getOxyLoss() - getToxLoss() - getBruteLoss() - getFireLoss()
set_health(maxHealth - getOxyLoss() - getToxLoss() - getBruteLoss() - getFireLoss())
update_stat()
diag_hud_set_health()
disconnect_shell()


+ 1
- 1
code/modules/mob/living/silicon/pai/pai.dm View File

@@ -281,7 +281,7 @@
/mob/living/silicon/pai/updatehealth()
if(status_flags & GODMODE)
return
health = maxHealth - getBruteLoss() - getFireLoss()
set_health(maxHealth - getBruteLoss() - getFireLoss())
update_stat()

/mob/living/silicon/pai/process()


+ 6
- 12
code/modules/mob/living/silicon/robot/robot.dm View File

@@ -421,7 +421,7 @@
/mob/living/silicon/robot/update_icons()
cut_overlays()
icon_state = module.cyborg_base_icon
if(stat != DEAD && !(IsUnconscious() || IsStun() || IsParalyzed() || low_power_mode)) //Not dead, not stunned.
if(stat != DEAD && !(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || IsStun() || IsParalyzed() || low_power_mode)) //Not dead, not stunned.
if(!eye_lights)
eye_lights = new()
if(lamp_intensity > 2)
@@ -771,18 +771,12 @@
if(health <= -maxHealth) //die only once
death()
return
if(IsUnconscious() || IsStun() || IsKnockdown() || IsParalyzed() || getOxyLoss() > maxHealth*0.5)
if(stat == CONSCIOUS)
set_stat(UNCONSCIOUS)
become_blind(UNCONSCIOUS_BLIND)
update_mobility()
update_headlamp()
if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || IsStun() || IsKnockdown() || IsParalyzed())
set_stat(UNCONSCIOUS)
else
if(stat == UNCONSCIOUS)
set_stat(CONSCIOUS)
cure_blind(UNCONSCIOUS_BLIND)
update_mobility()
update_headlamp()
set_stat(CONSCIOUS)
update_mobility()
update_headlamp()
diag_hud_set_status()
diag_hud_set_health()
diag_hud_set_aishell()


+ 22
- 0
code/modules/mob/living/silicon/robot/robot_defense.dm View File

@@ -399,3 +399,25 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
updatehealth()
if(prob(75) && Proj.damage > 0)
spark_system.start()


/mob/living/silicon/robot/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
. = ..()
if(isnull(.))
return
if(. <= (maxHealth * 0.5))
if(getOxyLoss() > (maxHealth * 0.5))
ADD_TRAIT(src, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)
else if(getOxyLoss() <= (maxHealth * 0.5))
REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)


/mob/living/silicon/robot/setOxyLoss(amount, updating_health = TRUE, forced = FALSE)
. = ..()
if(isnull(.))
return
if(. <= (maxHealth * 0.5))
if(getOxyLoss() > (maxHealth * 0.5))
ADD_TRAIT(src, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)
else if(getOxyLoss() <= (maxHealth * 0.5))
REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)

+ 1
- 4
code/modules/mob/living/simple_animal/simple_animal.dm View File

@@ -197,9 +197,6 @@
if(stat == DEAD)
. += "<span class='deadsay'>Upon closer examination, [p_they()] appear[p_s()] to be dead.</span>"

/mob/living/simple_animal/updatehealth()
..()
health = clamp(health, 0, maxHealth)

/mob/living/simple_animal/update_stat()
if(status_flags & GODMODE)
@@ -515,7 +512,7 @@
..()

/mob/living/simple_animal/update_mobility(value_otherwise = TRUE)
if(IsUnconscious() || IsParalyzed() || IsStun() || IsKnockdown() || IsParalyzed() || stat || resting)
if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || IsParalyzed() || IsStun() || IsKnockdown() || IsParalyzed() || stat || resting)
drop_all_held_items()
mobility_flags = NONE
else if(buckled)


+ 2
- 2
code/modules/mob/living/status_procs.dm View File

@@ -445,7 +445,7 @@
REMOVE_TRAIT(src, TRAIT_DEATHCOMA, source)
if(stat != DEAD)
tod = null
update_stat()

/mob/living/proc/fakedeath(source, silent = FALSE)
if(stat == DEAD)
@@ -455,7 +455,7 @@
ADD_TRAIT(src, TRAIT_FAKEDEATH, source)
ADD_TRAIT(src, TRAIT_DEATHCOMA, source)
tod = station_time_timestamp()
update_stat()

///Unignores all slowdowns that lack the IGNORE_NOSLOW flag.
/mob/living/proc/unignore_slowdown(source)


+ 1
- 3
code/modules/research/nanites/nanite_programs/protocols.dm View File

@@ -91,9 +91,7 @@

/datum/nanite_program/protocol/offline/check_conditions()
var/is_offline = FALSE
if(nanites.host_mob.IsSleeping() || nanites.host_mob.IsUnconscious())
is_offline = TRUE
if(nanites.host_mob.stat == DEAD || HAS_TRAIT(nanites.host_mob, TRAIT_DEATHCOMA))
if(nanites.host_mob.stat >= UNCONSCIOUS) //DEAD or UNCONSCIOUS
is_offline = TRUE
if(nanites.host_mob.InCritical() && !HAS_TRAIT(nanites.host_mob, TRAIT_NOSOFTCRIT))
is_offline = TRUE


+ 32
- 0
code/modules/research/xenobiology/xenobiology.dm View File

@@ -969,6 +969,38 @@
L.regenerate_icons()
qdel(src)

/obj/item/slimepotion/pride // Pride Month Transgender Potion
name = "transgender potion"
desc = "A potion full of pride."
icon = 'icons/obj/chemical.dmi'
icon_state = "pottrans"

/obj/item/slimepotion/pride/attack_self(mob/user)
var/mob/living/carbon/L = user
if(!L)
to_chat(user, "<span class='warning'>The potion can only be used by gendered things, but you are still valid!</span>")
return

// handle neuters and plurals
if(L.gender == FEMALE)
L.gender = MALE
L.visible_message("<span class='boldnotice'>[L] suddenly looks more masculine!</span>", "<span class='boldwarning'>You suddenly feel more masculine!</span>")
else
L.gender = FEMALE
L.visible_message("<span class='boldnotice'>[L] suddenly looks more feminine!</span>", "<span class='boldwarning'>You suddenly feel more feminine!</span>")

// spread awareness to a very serious issue
if(rand(0,100) <= 41)
addtimer(CALLBACK(L, /mob/living/carbon/proc/david_reimer, user), rand(60, 300))

L.regenerate_icons()
qdel(src)

/mob/living/carbon/proc/david_reimer(mob/user)
user.visible_message("<span class='suicide'>[user] is suddenly coming to terms with a life full of regret! It looks like [user.p_theyre()] trying to commit suicide!</span>")
ADD_TRAIT(src, TRAIT_DISFIGURED, TRAIT_GENERIC)
src.inflate_gib()

/obj/item/slimepotion/slime/renaming
name = "renaming potion"
desc = "A potion that allows a self-aware being to change what name it subconciously presents to the world."


+ 11
- 0
html/changelog.html View File

@@ -1951,6 +1951,11 @@
<li class="rscadd">Unignore allows you to unignore players who are offline</li>
<li class="admin">Ignore and Unignore should not interfere with Stealth Mode</li>
</ul>
<h3 class="author">SomeoneYouProbablyKnow updated:</h3>
<ul class="changes bgimages16">
<li class="tweak">Psychologists gets a new Hud icon that's not a P</li>
<li class="tweak">The "incarcerated" sec hud icon gets a new sprite that is not a P</li>
</ul>
<h3 class="author">TemporalOroboros updated:</h3>
<ul class="changes bgimages16">
<li class="tweak">Firesuits and radiation suits can now fit most internals tanks.</li>
@@ -1959,6 +1964,12 @@
<ul class="changes bgimages16">
<li class="tweak">Only the Descendents of Asclepius who have taken the Hippocratic Oath may perform the Healing Touch miracle and conduct multiple concurrent surgeries. Everyone else is limited to a single surgery step at a time.</li>
</ul>
<h3 class="author">nemvar updated:</h3>
<ul class="changes bgimages16">
<li class="tweak">Glow will now always be a random color.</li>
<li class="tweak">Antiglow will now absorb all light equally.</li>
<li class="rscadd">Improved waddling for big things.</li>
</ul>
<h2 class="date">31 May 2020</h2>
<h3 class="author">Fikou updated:</h3>


+ 7
- 0
html/changelogs/.all_changelog.yml View File

@@ -39670,9 +39670,16 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
- rscadd: Unignore allows you to view your ignore list
- rscadd: Unignore allows you to unignore players who are offline
- admin: Ignore and Unignore should not interfere with Stealth Mode
SomeoneYouProbablyKnow:
- tweak: Psychologists gets a new Hud icon that's not a P
- tweak: The "incarcerated" sec hud icon gets a new sprite that is not a P
TemporalOroboros:
- tweak: Firesuits and radiation suits can now fit most internals tanks.
Timberpoes:
- tweak: Only the Descendents of Asclepius who have taken the Hippocratic Oath may
perform the Healing Touch miracle and conduct multiple concurrent surgeries.
Everyone else is limited to a single surgery step at a time.
nemvar:
- tweak: Glow will now always be a random color.
- tweak: Antiglow will now absorb all light equally.
- rscadd: Improved waddling for big things.

+ 0
- 5
html/changelogs/AutoChangeLog-pr-51378.yml View File

@@ -1,5 +0,0 @@
author: "nemvar"
delete-after: True
changes:
- tweak: "Glow will now always be a random color."
- tweak: "Antiglow will now absorb all light equally."

+ 0
- 4
html/changelogs/AutoChangeLog-pr-51383.yml View File

@@ -1,4 +0,0 @@
author: "nemvar"
delete-after: True
changes:
- rscadd: "Improved waddling for big things."

+ 0
- 5
html/changelogs/AutoChangeLog-pr-51391.yml View File

@@ -1,5 +0,0 @@
author: "SomeoneYouProbablyKnow"
delete-after: True
changes:
- tweak: "Psychologists gets a new Hud icon that's not a P"
- tweak: "The \"incarcerated\" sec hud icon gets a new sprite that is not a P"

BIN
icons/obj/chemical.dmi View File

Before After
Width: 512  |  Height: 512  |  Size: 47 KiB Width: 512  |  Height: 512  |  Size: 48 KiB

+ 1
- 0
tgstation.dme View File

@@ -2428,6 +2428,7 @@
#include "code\modules\mob\living\death.dm"
#include "code\modules\mob\living\emote.dm"
#include "code\modules\mob\living\inhand_holder.dm"
#include "code\modules\mob\living\init_signals.dm"
#include "code\modules\mob\living\life.dm"
#include "code\modules\mob\living\living.dm"
#include "code\modules\mob\living\living_defense.dm"


Loading…
Cancel
Save