mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 04:17:33 +01:00
Ports the radiation subsystem and cleans up damage flags. (#15715)
This commit is contained in:
@@ -136,7 +136,7 @@
|
||||
playsound(src, barricade_hitsound, 50, 1)
|
||||
if(is_wired)
|
||||
visible_message(SPAN_DANGER("\The [src]'s barbed wire slices into [L]!"))
|
||||
L.apply_damage(rand(5, 10), BRUTE, pick(BP_R_HAND, BP_L_HAND), "barbed wire", DAM_SHARP|DAM_EDGE, 25)
|
||||
L.apply_damage(rand(5, 10), DAMAGE_BRUTE, pick(BP_R_HAND, BP_L_HAND), "barbed wire", DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE, 25)
|
||||
L.do_attack_animation(src)
|
||||
take_damage(damage)
|
||||
|
||||
|
||||
@@ -203,6 +203,7 @@
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/glasses/safety/goggles(src)
|
||||
new /obj/item/device/geiger(src)
|
||||
for(var/i = 1 to 2)
|
||||
new /obj/item/reagent_containers/hypospray/autoinjector/hyronalin(src)
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.do_attack_animation(src, W)
|
||||
var/force_damage = W.force
|
||||
if(W.damtype == BURN)
|
||||
if(W.damtype == DAMAGE_BURN)
|
||||
force_damage *= 1.25
|
||||
health -= force_damage
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 80, TRUE)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.do_attack_animation(src, W)
|
||||
var/force_damage = W.force
|
||||
if(W.damtype == BURN)
|
||||
if(W.damtype == DAMAGE_BURN)
|
||||
force_damage *= 1.25
|
||||
health -= force_damage
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 80, TRUE)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
|
||||
//If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used.
|
||||
switch(Proj.damage_type)
|
||||
if(BRUTE)
|
||||
if(DAMAGE_BRUTE)
|
||||
//bullets
|
||||
if(Proj.original == src || prob(20))
|
||||
Proj.damage *= between(0, Proj.damage/60, 0.5)
|
||||
@@ -83,7 +83,7 @@
|
||||
else
|
||||
Proj.damage *= between(0, Proj.damage/60, 1)
|
||||
passthrough = 1
|
||||
if(BURN)
|
||||
if(DAMAGE_BURN)
|
||||
//beams and other projectiles are either blocked completely by grilles or stop half the damage.
|
||||
if(!(Proj.original == src || prob(20)))
|
||||
Proj.damage *= 0.5
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
if(passthrough)
|
||||
. = PROJECTILE_CONTINUE
|
||||
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
|
||||
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == DAMAGE_BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
|
||||
|
||||
src.health -= damage*0.2
|
||||
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
if(W.can_puncture())
|
||||
user.visible_message(SPAN_DANGER("[user] pierces \the [src] with \the [W]!"), SPAN_WARNING("You pierce \the [src] with \the [W]!"))
|
||||
deflate(TRUE)
|
||||
else if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
else if(W.damtype == DAMAGE_BRUTE || W.damtype == DAMAGE_BURN)
|
||||
hit(W.force)
|
||||
..()
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
if(!material || !material.radioactivity)
|
||||
return
|
||||
for(var/mob/living/L in range(1,src))
|
||||
L.apply_damage(round(material.radioactivity / 20), IRRADIATE)
|
||||
L.apply_damage(round(material.radioactivity / 20), DAMAGE_RADIATION)
|
||||
|
||||
/obj/structure/railing/Initialize()
|
||||
. = ..()
|
||||
@@ -213,7 +213,7 @@
|
||||
playsound(get_turf(src), 'sound/effects/grillehit.ogg', 50, TRUE)
|
||||
if(prob(30))
|
||||
G.affecting.Weaken(5)
|
||||
G.affecting.apply_damage(15, BRUTE, BP_HEAD)
|
||||
G.affecting.apply_damage(15, DAMAGE_BRUTE, BP_HEAD)
|
||||
else
|
||||
G.affecting.forceMove(get_step(src, get_dir(user, src)))
|
||||
G.affecting.Weaken(5)
|
||||
@@ -273,7 +273,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(W.force && (W.damtype == BURN || W.damtype == BRUTE))
|
||||
if(W.force && (W.damtype == DAMAGE_BURN || W.damtype == DAMAGE_BRUTE))
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
visible_message(SPAN_WARNING("\The [src] has been [LAZYLEN(W.attack_verb) ? pick(W.attack_verb) : "attacked"] with \the [W] by \the [user]!"))
|
||||
take_damage(W.force)
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
else if(istype(W,/obj/item))
|
||||
var/obj/item/I = W
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
||||
if(I.damtype == DAMAGE_BRUTE || I.damtype == DAMAGE_BURN)
|
||||
if(I.force < 10)
|
||||
user.visible_message("<span class='danger'>\The [user] hits \the [src] with \the [I] with no visible effect.</span>")
|
||||
else
|
||||
@@ -211,7 +211,7 @@
|
||||
if(!material.radioactivity)
|
||||
return
|
||||
for(var/mob/living/L in range(1,src))
|
||||
L.apply_damage(round(material.radioactivity/3),IRRADIATE, damage_flags = DAM_DISPERSED)
|
||||
L.apply_damage(round(material.radioactivity/3),DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||
|
||||
/obj/structure/simple_door/iron/New(var/newloc,var/material_name, var/complexity)
|
||||
..(newloc, MATERIAL_IRON, complexity)
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
occupant.apply_effect(6, STUN)
|
||||
occupant.apply_effect(6, WEAKEN)
|
||||
occupant.apply_effect(6, STUTTER)
|
||||
occupant.apply_damage(10, BRUTE, def_zone)
|
||||
occupant.apply_damage(10, DAMAGE_BRUTE, def_zone)
|
||||
playsound(src.loc, "punch", 50, 1, -1)
|
||||
if(isliving(A))
|
||||
var/mob/living/victim = A
|
||||
@@ -300,7 +300,7 @@
|
||||
victim.apply_effect(6, STUN)
|
||||
victim.apply_effect(6, WEAKEN)
|
||||
victim.apply_effect(6, STUTTER)
|
||||
victim.apply_damage(10, BRUTE, def_zone)
|
||||
victim.apply_damage(10, DAMAGE_BRUTE, def_zone)
|
||||
|
||||
if(pulling)
|
||||
occupant.visible_message(SPAN_DANGER("[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!"))
|
||||
|
||||
@@ -207,9 +207,9 @@
|
||||
|
||||
/obj/item/material/stool/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||
if(prob(300 / force)) // Weaker materials are more likely to shatter on people randomly.
|
||||
var/blocked = target.get_blocked_ratio(hit_zone, BRUTE)
|
||||
var/blocked = target.get_blocked_ratio(hit_zone, DAMAGE_BRUTE)
|
||||
target.Weaken(force * BLOCKED_MULT(blocked))
|
||||
target.apply_damage(force * 2, BRUTE, hit_zone, blocked, src)
|
||||
target.apply_damage(force * 2, DAMAGE_BRUTE, hit_zone, blocked, src)
|
||||
user.visible_message(SPAN_DANGER("[user] [material.destruction_desc] \the [src] to pieces against \the [target]'s [hit_zone]!"), SPAN_DANGER("\The [src] [material.destruction_desc] to pieces against \the [target]'s [hit_zone]!"))
|
||||
use_material_shatter = FALSE
|
||||
shatter()
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
hider = user
|
||||
if(ishuman(user) && prob(5))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.take_overall_damage(5, 0, DAM_SHARP, src)
|
||||
H.take_overall_damage(5, 0, DAMAGE_FLAG_SHARP, src)
|
||||
to_chat(user, SPAN_WARNING("You cut yourself while climbing into \the [src]!"))
|
||||
|
||||
/obj/structure/trash_pile/relaymove(mob/user)
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
if(istype(W, /obj/item/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/grab/G = W
|
||||
if(istype(G.affecting,/mob/living))
|
||||
grab_smash_attack(G, BRUTE)
|
||||
grab_smash_attack(G, DAMAGE_BRUTE)
|
||||
return
|
||||
|
||||
if(W.flags & NOBLUDGEON)
|
||||
@@ -284,7 +284,7 @@
|
||||
dismantle_window()
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
if(W.damtype == DAMAGE_BRUTE || W.damtype == DAMAGE_BURN)
|
||||
if(reinf)
|
||||
user.do_attack_animation(src)
|
||||
if(W.force >= REINFORCED_WINDOW_DAMAGE_FORCE)
|
||||
@@ -305,7 +305,7 @@
|
||||
playsound(src, hitsound, 10, 1)
|
||||
return
|
||||
|
||||
/obj/structure/window/proc/grab_smash_attack(obj/item/grab/G, var/damtype = BRUTE)
|
||||
/obj/structure/window/proc/grab_smash_attack(obj/item/grab/G, var/damtype = DAMAGE_BRUTE)
|
||||
var/mob/living/M = G.affecting
|
||||
var/mob/living/user = G.assailant
|
||||
|
||||
@@ -673,7 +673,7 @@
|
||||
if(istype(W, /obj/item/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/grab/G = W
|
||||
if(istype(G.affecting,/mob/living))
|
||||
grab_smash_attack(G, BRUTE)
|
||||
grab_smash_attack(G, DAMAGE_BRUTE)
|
||||
return
|
||||
|
||||
if(W.flags & NOBLUDGEON)
|
||||
@@ -709,7 +709,7 @@
|
||||
dismantle_window()
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
if(W.damtype == DAMAGE_BRUTE || W.damtype == DAMAGE_BURN)
|
||||
if(reinf)
|
||||
user.do_attack_animation(src)
|
||||
if(W.force >= FULL_REINFORCED_WINDOW_DAMAGE_FORCE)
|
||||
|
||||
Reference in New Issue
Block a user