Fixes all bits of code that check if something is under a tile that weren't being done

This commit is contained in:
LemonInTheDark
2020-07-10 22:14:37 -07:00
parent 0315a560df
commit fce4274752
8 changed files with 24 additions and 6 deletions
+1 -1
View File
@@ -167,7 +167,7 @@
if(!T)
return FALSE
for(var/atom/movable/AM in T)
if(AM.flags_1 & PREVENT_CLICK_UNDER_1 && AM.density && AM.layer > layer)
if(AM.flags_1 & PREVENT_CLICK_UNDER_1 && AM.density && (AM.layer > layer || (T.intact && HAS_TRAIT(AM, TRAIT_T_RAY_VISIBLE))))
return TRUE
return FALSE
+4
View File
@@ -102,6 +102,10 @@
step_towards(M,src)
for(var/obj/O in range(0,src))
if(!O.anchored)
if(isturf(O.loc))
var/turf/T = O.loc
if(T.intact && HAS_TRAIT(O, TRAIT_T_RAY_VISIBLE))
continue
var/mob/living/target = locate() in view(4,src)
if(target && !target.stat)
O.throw_at(target, 5, 10)
@@ -141,6 +141,10 @@
for(var/obj/O in range(0,src))
if(O.type == src.type)
continue
if(isturf(O.loc))
var/turf/T = O.loc
if(T.intact && HAS_TRAIT(O, TRAIT_T_RAY_VISIBLE))
continue
if(lifetime % reagent_divisor)
reagents.expose(O, VAPOR, fraction)
var/hit = 0
@@ -232,6 +232,8 @@
for(var/atom/movable/AM in T)
if(AM.type == src.type)
continue
if(T.intact && HAS_TRAIT(AM, TRAIT_T_RAY_VISIBLE))
continue
reagents.expose(AM, TOUCH, fraction)
reagents.expose(T, TOUCH, fraction)
+1 -2
View File
@@ -67,8 +67,7 @@ GENE SCANNER
return
var/list/t_ray_images = list()
for(var/obj/O in orange(distance, viewer) )
if(O.invisibility == INVISIBILITY_MAXIMUM || HAS_TRAIT(O, TRAIT_T_RAY_VISIBLE))
if(HAS_TRAIT(O, TRAIT_T_RAY_VISIBLE))
var/image/I = new(loc = get_turf(O))
var/mutable_appearance/MA = new(O)
MA.alpha = 128
+8
View File
@@ -91,6 +91,10 @@
return TRUE
/obj/blob_act(obj/structure/blob/B)
if(isturf(loc))
var/turf/T = loc
if(T.intact && HAS_TRAIT(src, TRAIT_T_RAY_VISIBLE))
return
take_damage(400, BRUTE, "melee", 0, get_dir(src, B))
/obj/proc/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, armor_penetration = 0) //used by attack_alien, attack_animal, and attack_slime
@@ -198,6 +202,10 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
///Called when the obj is exposed to fire.
/obj/fire_act(exposed_temperature, exposed_volume)
if(isturf(loc))
var/turf/T = loc
if(T.intact && HAS_TRAIT(src, TRAIT_T_RAY_VISIBLE))
return
if(exposed_temperature && !(resistance_flags & FIRE_PROOF))
take_damage(clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE) && !(resistance_flags & FIRE_PROOF))
+3 -1
View File
@@ -389,7 +389,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
/turf/singularity_act()
if(intact)
for(var/obj/O in contents) //this is for deleting things like wires contained in the turf
if(O.invisibility == INVISIBILITY_MAXIMUM)
if(HAS_TRAIT(O, TRAIT_T_RAY_VISIBLE))
O.singularity_act()
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
return(2)
@@ -473,6 +473,8 @@ GLOBAL_LIST_EMPTY(station_turfs)
acid_type = /obj/effect/acid/alien
var/has_acid_effect = FALSE
for(var/obj/O in src)
if(intact && HAS_TRAIT(O, TRAIT_T_RAY_VISIBLE))
return
if(istype(O, acid_type))
var/obj/effect/acid/A = O
A.acid_level = min(acid_volume * acidpwr, 12000)//capping acid level to limit power of the acid
+1 -2
View File
@@ -948,8 +948,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/list/t_ray_images = list()
var/static/list/stored_t_ray_images = list()
for(var/obj/O in orange(client.view, src) )
if(O.invisibility == INVISIBILITY_MAXIMUM)
if(HAS_TRAIT(O, TRAIT_T_RAY_VISIBLE))
var/image/I = new(loc = get_turf(O))
var/mutable_appearance/MA = new(O)
MA.alpha = 128