Structures now take damage properly from projectile clouds

This commit is contained in:
mwerezak
2015-08-15 19:08:45 -04:00
parent a773715ff9
commit 77ddae4e26
25 changed files with 57 additions and 57 deletions
@@ -195,11 +195,12 @@
qdel(src)
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
var/proj_damage = Proj.get_structure_damage()
if(!proj_damage)
return
..()
damage(Proj.damage)
damage(proj_damage)
return
@@ -86,7 +86,7 @@
shatter(M)
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
health -= Proj.get_structure_damage()
check_health()
return
+1 -1
View File
@@ -29,7 +29,7 @@
/obj/structure/displaycase/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
health -= Proj.get_structure_damage()
..()
src.healthcheck()
return
+2 -3
View File
@@ -27,11 +27,10 @@
if(Proj.original != src && !prob(cover))
return PROJECTILE_CONTINUE //pass through
//Tasers and the like should not damage girders.
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
var/damage = Proj.get_structure_damage()
if(!damage)
return
var/damage = Proj.damage
if(!istype(Proj, /obj/item/projectile/beam))
damage *= 0.4 //non beams do reduced damage
+3 -5
View File
@@ -64,13 +64,11 @@
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return
//Tasers and the like should not damage grilles.
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
var/damage = Proj.damage
var/damage = Proj.get_structure_damage()
var/passthrough = 0
if(!damage) return
//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.
+3 -3
View File
@@ -38,10 +38,10 @@
return 0
/obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj)
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
var/proj_damage = Proj.get_structure_damage()
if(!proj_damage) return
health -= Proj.damage
health -= proj_damage
..()
if(health <= 0)
deflate(1)
+2 -4
View File
@@ -30,10 +30,8 @@
/obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj)
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
if(prob(Proj.damage * 2))
if(prob(Proj.get_structure_damage() * 2))
if(!shattered)
shatter()
else
+3 -4
View File
@@ -99,12 +99,11 @@
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
//Tasers and the like should not damage windows.
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
var/proj_damage = Proj.get_structure_damage()
if(!proj_damage) return
..()
take_damage(Proj.damage)
take_damage(proj_damage)
return