Ports the radiation subsystem and cleans up damage flags. (#15715)

This commit is contained in:
Matt Atlas
2023-02-07 13:22:47 +01:00
committed by GitHub
parent 5527fc0810
commit 31c73ead85
198 changed files with 981 additions and 649 deletions
+4 -4
View File
@@ -571,8 +571,8 @@
return
if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
user.visible_message("<span class='warning'>[user] feeds the [target]'s hair into the [src] and flicks it on!</span>", "<span class='warning'>You turn the [src] on!</span>")
target.apply_damage(30, BRUTE, BP_HEAD)
target.apply_damage(25, PAIN)
target.apply_damage(30, DAMAGE_BRUTE, BP_HEAD)
target.apply_damage(25, DAMAGE_PAIN)
target.say("*scream")
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Has fed [target.name]'s ([target.ckey]) hair into a [src].</span>")
@@ -586,8 +586,8 @@
return
if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
user.visible_message("<span class='warning'>[user] starts tugging on [target]'s head as the [src] keeps running!</span>", "<span class='warning'>You start tugging on [target]'s head!</span>")
target.apply_damage(25, BRUTE, BP_HEAD)
target.apply_damage(10, PAIN)
target.apply_damage(25, DAMAGE_BRUTE, BP_HEAD)
target.apply_damage(10, DAMAGE_PAIN)
target.say("*scream")
spawn(10)
user.visible_message("<span class='warning'>[user] stops the [src] and leaves [target] resting as they are.</span>", "<span class='warning'>You turn the [src] off and let go of [target].</span>")
@@ -392,7 +392,7 @@
var/message_shown = FALSE
/singleton/reagent/radium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder)
M.apply_effect(10 * removed, IRRADIATE, blocked = 0) // Radium may increase your chances to cure a disease
M.apply_effect(10 * removed, DAMAGE_RADIATION, blocked = 0) // Radium may increase your chances to cure a disease
/singleton/reagent/radium/touch_turf(var/turf/T, var/amount, var/datum/reagents/holder)
if(amount >= 3)
@@ -792,7 +792,7 @@
to_chat(M, discomfort_message)
M.visible_message("<b>[M]</b> [pick("dry heaves!", "coughs!", "splutters!")]")
M.apply_effect(agony_amount, PAIN, 0)
M.apply_effect(agony_amount, DAMAGE_PAIN, 0)
if(istype(M, /mob/living/carbon/slime))
M.bodytemperature += rand(0, 15) + slime_temp_adj
@@ -869,14 +869,14 @@
message = "<span class='danger'>Your face and throat burn!</span>"
if(prob(25))
M.visible_message("<b>[M]</b> [pick("coughs!","coughs hysterically!","splutters!")]")
M.apply_effect(30, PAIN)
M.apply_effect(30, DAMAGE_PAIN)
/singleton/reagent/capsaicin/condensed/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!H.can_feel_pain())
return
M.apply_effect(10, PAIN)
M.apply_effect(10, DAMAGE_PAIN)
if(prob(5))
M.visible_message("<span class='warning'>[M] [pick("dry heaves!","coughs!","splutters!")]</span>", "<span class='danger'>You feel like your insides are burning!</span>")
if(istype(M, /mob/living/carbon/slime))
@@ -2680,7 +2680,7 @@
/singleton/reagent/alcohol/vodka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder)
..()
M.apply_effect(max(M.total_radiation - 1 * removed, 0), IRRADIATE, blocked = 0)
M.apply_effect(max(M.total_radiation - 1 * removed, 0), DAMAGE_RADIATION, blocked = 0)
/singleton/reagent/alcohol/vodka/mushroom
name = "Mushroom Vodka"
@@ -4189,7 +4189,7 @@
if(prob(5))
to_chat(M, discomfort_message)
else
M.apply_effect(agony_amount, PAIN, 0)
M.apply_effect(agony_amount, DAMAGE_PAIN, 0)
if(prob(5))
M.visible_message("<b>[M]</b> [pick("dry heaves!","coughs!","splutters!")]")
to_chat(M, "<span class='danger'>You feel like your insides are burning!</span>")
@@ -156,7 +156,7 @@
affect_ingest(M, alien, removed, holder)
/singleton/reagent/uranium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder)
M.apply_effect(5 * removed, IRRADIATE, blocked = 0)
M.apply_damage(5 * removed, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
/singleton/reagent/uranium/touch_turf(var/turf/T, var/amount, var/datum/reagents/holder)
if(amount >= 3)
@@ -178,7 +178,7 @@
affect_ingest(M, alien, removed, holder)
/singleton/reagent/radioactive_waste/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder)
M.apply_effect(25 * removed, IRRADIATE, blocked = 0)
M.apply_effect(25 * removed, DAMAGE_RADIATION, blocked = 0)
/singleton/reagent/radioactive_waste/touch_turf(var/turf/T, var/amount, var/datum/reagents/holder)
if(amount >= 3)
@@ -482,7 +482,7 @@
randmutg(M)
domutcheck(M, null)
M.UpdateAppearance()
M.apply_effect(10 * removed, IRRADIATE, blocked = 0)
M.apply_damage(10 * removed, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
/singleton/reagent/slimejelly
name = "Slime Jelly"
@@ -151,7 +151,7 @@
else
var/obj/item/organ/external/affecting = attached.get_organ(pick(BP_R_ARM, BP_L_ARM))
attached.visible_message(SPAN_WARNING("The needle is ripped out of [attached]'s [affecting.limb_name == BP_R_ARM ? "right arm" : "left arm"]."), SPAN_DANGER("The needle <b>painfully</b> rips out of your [affecting.limb_name == BP_R_ARM ? "right arm" : "left arm"]."))
affecting.take_damage(brute = 5, damage_flags = DAM_SHARP)
affecting.take_damage(brute = 5, damage_flags = DAMAGE_FLAG_SHARP)
attached_mob = null
STOP_PROCESSING(SSprocessing, src)
@@ -29,7 +29,7 @@
user.visible_message(SPAN_WARNING("[user] crushes the can of [src.name] on [user.get_pronoun("his")] forehead!"), SPAN_NOTICE("You crush the can of [src.name] on your forehead."))
else
user.visible_message(SPAN_WARNING("[user] crushes the can of [src.name] on [M]'s forehead!"), SPAN_NOTICE("You crush the can of [src.name] on [M]'s forehead."))
M.apply_damage(2,BRUTE,BP_HEAD) // ouch.
M.apply_damage(2,DAMAGE_BRUTE,BP_HEAD) // ouch.
playsound(M,'sound/items/soda_crush.ogg', rand(10,50), TRUE)
var/obj/item/trash/can/crushed_can = new /obj/item/trash/can(M.loc)
crushed_can.icon_state = icon_state
@@ -148,7 +148,7 @@
// You are going to knock someone out for longer if they are not wearing a helmet.
var/weaken_duration = 0
if(blocked < 100)
weaken_duration = smash_duration + min(0, force - target.get_blocked_ratio(hit_zone, BRUTE) * 100 + 10)
weaken_duration = smash_duration + min(0, force - target.get_blocked_ratio(hit_zone, DAMAGE_BRUTE) * 100 + 10)
var/mob/living/carbon/human/H = target
if(istype(H) && H.headcheck(hit_zone))
@@ -146,12 +146,12 @@
last_jab = 0 //Resets to try again immediately
user.visible_message("<b>[user]</b> fumbles with \the [src]!", SPAN_NOTICE("You fumble with \the [src]!"))
return
var/blocked = H.get_blocked_ratio(BP_CHEST, BRUTE, DAM_SHARP, damage = 5)
var/blocked = H.get_blocked_ratio(BP_CHEST, DAMAGE_BRUTE, DAMAGE_FLAG_SHARP, damage = 5)
if(blocked > 20)
user.visible_message("<b>[user]</b> jabs \the [src] into [H], but their armor blocks it!", SPAN_WARNING("You jab \the [src] into [H], but their armor blocks it!"))
return
user.visible_message("<b>[user]</b> jabs \the [src] between [P] ribs!", SPAN_NOTICE("You jab \the [src] between [SM] ribs!"))
H.apply_damage(3, BRUTE, BP_CHEST)
H.apply_damage(3, DAMAGE_BRUTE, BP_CHEST)
H.custom_pain("The pain in your chest is living hell!", 50, affecting = H.organs_by_name[BP_CHEST])
L.oxygen_deprivation = 0
L.rescued = TRUE
@@ -320,7 +320,7 @@
if((user != target) && H.check_shields(7, src, user, "\the [src]"))
return
var/armor = H.get_blocked_ratio(target_zone, BRUTE, damage_flags = DAM_SHARP, damage = 5)*100
var/armor = H.get_blocked_ratio(target_zone, DAMAGE_BRUTE, damage_flags = DAMAGE_FLAG_SHARP, damage = 5)*100
if (target != user && armor > 50)
user.visible_message(SPAN_DANGER("[user] tries to stab \the [target] in the [hit_area] with \the [src], but the attack is deflected by [target.get_pronoun("his")] armor!"), SPAN_WARNING("You try to stab \the [target] in the [hit_area] with \the [src], but the attack is deflected by [target.get_pronoun("his")] armor!"))
user.remove_from_mob(src)
+1 -1
View File
@@ -387,7 +387,7 @@
/obj/structure/reagent_dispensers/coolanttank/bullet_act(var/obj/item/projectile/Proj)
if(Proj.get_structure_damage())
if (Proj.damage_type != PAIN)
if (Proj.damage_type != DAMAGE_PAIN)
explode()
/obj/structure/reagent_dispensers/coolanttank/ex_act(var/severity = 2.0)