upstream-merge-27971
This commit is contained in:
@@ -430,6 +430,8 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define GIBTONITE_ACTIVE 1
|
||||
#define GIBTONITE_STABLE 2
|
||||
#define GIBTONITE_DETONATE 3
|
||||
//for obj explosion block calculation
|
||||
#define EXPLOSION_BLOCK_PROC -1
|
||||
//Gangster starting influences
|
||||
|
||||
#define GANGSTER_SOLDIER_STARTING_INFLUENCE 5
|
||||
|
||||
@@ -279,16 +279,9 @@ GLOBAL_LIST_EMPTY(explosions)
|
||||
var/turf/T = affected_turfs[I]
|
||||
var/current_exp_block = T.density ? T.explosion_block : 0
|
||||
|
||||
for(var/obj/machinery/door/D in T)
|
||||
if(D.density)
|
||||
current_exp_block += D.explosion_block
|
||||
|
||||
for(var/obj/structure/window/W in T)
|
||||
if(W.reinf && W.fulltile)
|
||||
current_exp_block += W.explosion_block
|
||||
|
||||
for(var/obj/structure/blob/B in T)
|
||||
current_exp_block += B.explosion_block
|
||||
for(var/obj/O in T)
|
||||
var/the_block = O.explosion_block
|
||||
current_exp_block += the_block == EXPLOSION_BLOCK_PROC ? O.GetExplosionBlock() : the_block
|
||||
|
||||
.[T] = current_exp_block
|
||||
|
||||
@@ -351,20 +344,12 @@ GLOBAL_LIST_EMPTY(explosions)
|
||||
var/turf/TT = T
|
||||
while(TT != epicenter)
|
||||
TT = get_step_towards(TT,epicenter)
|
||||
if(TT.density && TT.explosion_block)
|
||||
if(TT.density)
|
||||
dist += TT.explosion_block
|
||||
|
||||
for(var/obj/machinery/door/D in TT)
|
||||
if(D.density && D.explosion_block)
|
||||
dist += D.explosion_block
|
||||
|
||||
for(var/obj/structure/window/W in TT)
|
||||
if(W.explosion_block && W.fulltile)
|
||||
dist += W.explosion_block
|
||||
|
||||
for(var/obj/structure/blob/B in T)
|
||||
dist += B.explosion_block
|
||||
|
||||
for(var/obj/O in T)
|
||||
var/the_block = O.explosion_block
|
||||
dist += the_block == EXPLOSION_BLOCK_PROC ? O.GetExplosionBlock() : the_block
|
||||
if(dist < dev)
|
||||
T.color = "red"
|
||||
T.maptext = "Dev"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
max_integrity = 350
|
||||
armor = list(melee = 30, bullet = 30, laser = 20, energy = 20, bomb = 10, bio = 100, rad = 100, fire = 80, acid = 70)
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
flags = PREVENT_CLICK_UNDER
|
||||
flags = PREVENT_CLICK_UNDER
|
||||
|
||||
var/secondsElectrified = 0
|
||||
var/shockedby = list()
|
||||
@@ -32,6 +32,7 @@
|
||||
var/auto_close //TO BE REMOVED, no longer used, it's just preventing a runtime with a map var edit.
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/damage_deflection = 10
|
||||
var/real_explosion_block //ignore this, just use explosion_block
|
||||
|
||||
/obj/machinery/door/New()
|
||||
..()
|
||||
@@ -45,6 +46,10 @@
|
||||
spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(2, 1, src)
|
||||
|
||||
//doors only block while dense though so we have to use the proc
|
||||
real_explosion_block = explosion_block
|
||||
explosion_block = EXPLOSION_BLOCK_PROC
|
||||
|
||||
|
||||
|
||||
/obj/machinery/door/Destroy()
|
||||
@@ -284,7 +289,7 @@
|
||||
|
||||
/obj/machinery/door/proc/crush()
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
L.visible_message("<span class='warning'>[src] closes on [L], crushing them!</span>", "<span class='userdanger'>[src] closes on you and crushes you!</span>")
|
||||
L.visible_message("<span class='warning'>[src] closes on [L], crushing them!</span>", "<span class='userdanger'>[src] closes on you and crushes you!</span>")
|
||||
if(isalien(L)) //For xenos
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE * 1.5) //Xenos go into crit after aproximately the same amount of crushes as humans.
|
||||
L.emote("roar")
|
||||
@@ -346,3 +351,6 @@
|
||||
//if it blows up a wall it should blow up a door
|
||||
..(severity ? max(1, severity - 1) : 0, target)
|
||||
|
||||
/obj/machinery/door/GetExplosionBlock()
|
||||
return density ? real_explosion_block : 0
|
||||
|
||||
|
||||
@@ -259,3 +259,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
obj_break(damage_type)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//returns how much the object blocks an explosion
|
||||
/obj/proc/GetExplosionBlock()
|
||||
CRASH("Unimplemented GetExplosionBlock()")
|
||||
@@ -24,6 +24,7 @@
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 100)
|
||||
CanAtmosPass = ATMOS_PASS_PROC
|
||||
var/real_explosion_block //ignore this, just use explosion_block
|
||||
|
||||
/obj/structure/window/examine(mob/user)
|
||||
..()
|
||||
@@ -73,6 +74,10 @@
|
||||
if(rods)
|
||||
debris += new /obj/item/stack/rods(src, rods)
|
||||
|
||||
//windows only block while reinforced and fulltile, so we'll use the proc
|
||||
real_explosion_block = explosion_block
|
||||
explosion_block = EXPLOSION_BLOCK_PROC
|
||||
|
||||
/obj/structure/window/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||
switch(the_rcd.mode)
|
||||
if(RCD_DECONSTRUCT)
|
||||
@@ -400,6 +405,10 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/window/GetExplosionBlock()
|
||||
return reinf && fulltile ? real_explosion_block : 0
|
||||
|
||||
|
||||
/obj/structure/window/unanchored
|
||||
anchored = FALSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user