Rewrites Atmospherics

This commit is contained in:
Anewbe
2019-02-10 17:32:39 -06:00
committed by Novacat
parent 6d4ea26332
commit 8ed384b38c
49 changed files with 633 additions and 640 deletions

View File

@@ -53,10 +53,8 @@
projector = null
return ..()
/obj/effect/directional_shield/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0))
return TRUE
else if(istype(mover, /obj/item/projectile))
/obj/effect/directional_shield/CanPass(atom/movable/mover, turf/target)
if(istype(mover, /obj/item/projectile))
var/obj/item/projectile/P = mover
if(istype(P, /obj/item/projectile/test)) // Turrets need to try to kill the shield and so their test bullet needs to penetrate.
return TRUE
@@ -64,8 +62,6 @@
var/bad_arc = reverse_direction(dir) // Arc of directions from which we cannot block.
if(check_shield_arc(src, bad_arc, P)) // This is actually for mobs but it will work for our purposes as well.
return FALSE
else
return TRUE
return TRUE
/obj/effect/directional_shield/bullet_act(var/obj/item/projectile/P)

View File

@@ -7,6 +7,7 @@
opacity = 0
anchored = 1
unacidable = 1
can_atmos_pass = ATMOS_PASS_NO
var/const/max_health = 200
var/health = max_health //The shield can only take so much beating (prevents perma-prisons)
var/shield_generate_power = 7500 //how much power we use when regenerating
@@ -38,10 +39,6 @@
update_nearby_tiles()
..()
/obj/machinery/shield/CanPass(atom/movable/mover, turf/target, height, air_group)
if(!height || air_group) return 0
else return ..()
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!istype(W)) return

View File

@@ -18,6 +18,7 @@
plane = MOB_PLANE
layer = ABOVE_MOB_LAYER
density = 0
can_atmos_pass = ATMOS_PASS_DENSITY
var/obj/machinery/shield_gen/my_gen = null
var/strength = 0 // in Renwicks
var/ticks_recovering = 10
@@ -103,15 +104,6 @@
update_icon()
update_nearby_tiles()
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
//Purpose: Determines if the object (or airflow) can pass this atom.
//Called by: Movement, airflow.
//Inputs: The moving atom (optional), target turf, "height" and air group
//Outputs: Boolean if can pass.
//return (!density || !height || air_group)
return !density
/obj/effect/energy_field/update_icon(var/update_neightbors = 0)
overlays.Cut()
var/list/adjacent_shields_dir = list()

View File

@@ -317,13 +317,9 @@
return
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
return prob(20)
else
if (istype(mover, /obj/item/projectile))
return prob(10)
else
return !src.density
if(istype(mover, /obj/item/projectile))
return prob(10)
return !density