mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Disallow effects from being scanned by the chameleon projector (#38017)
* henk * iseffect
This commit is contained in:
committed by
letterjay
parent
cc088d9113
commit
1d1dc1aca8
@@ -181,6 +181,8 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
|
|||||||
|
|
||||||
#define is_glass_sheet(O) (is_type_in_typecache(O, GLOB.glass_sheet_types))
|
#define is_glass_sheet(O) (is_type_in_typecache(O, GLOB.glass_sheet_types))
|
||||||
|
|
||||||
|
#define iseffect(O) (is_type_in_typecache(O, GLOB.typecache_effect))
|
||||||
|
|
||||||
#define isblobmonster(O) (istype(O, /mob/living/simple_animal/hostile/blob))
|
#define isblobmonster(O) (istype(O, /mob/living/simple_animal/hostile/blob))
|
||||||
|
|
||||||
#define isshuttleturf(T) (length(T.baseturfs) && (/turf/baseturf_skipover/shuttle in T.baseturfs))
|
#define isshuttleturf(T) (length(T.baseturfs) && (/turf/baseturf_skipover/shuttle in T.baseturfs))
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ GLOBAL_LIST_INIT(typecache_machine_or_structure, typecacheof(list(/obj/machinery
|
|||||||
GLOBAL_LIST_INIT(typecache_shuttle_area, typecacheof(/area/shuttle))
|
GLOBAL_LIST_INIT(typecache_shuttle_area, typecacheof(/area/shuttle))
|
||||||
|
|
||||||
GLOBAL_LIST_INIT(typecache_clothing, typecacheof(/obj/item/clothing))
|
GLOBAL_LIST_INIT(typecache_clothing, typecacheof(/obj/item/clothing))
|
||||||
|
|
||||||
|
GLOBAL_LIST_INIT(typecache_effect, typecacheof(/obj/effect))
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
//must succeed in most cases
|
//must succeed in most cases
|
||||||
/datum/teleport/proc/setTeleatom(atom/movable/ateleatom)
|
/datum/teleport/proc/setTeleatom(atom/movable/ateleatom)
|
||||||
if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
|
if(iseffect(ateleatom) && !istype(ateleatom, /obj/effect/dummy/chameleon))
|
||||||
qdel(ateleatom)
|
qdel(ateleatom)
|
||||||
return 0
|
return 0
|
||||||
if(istype(ateleatom))
|
if(istype(ateleatom))
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/effect/portal/proc/teleport(atom/movable/M, force = FALSE)
|
/obj/effect/portal/proc/teleport(atom/movable/M, force = FALSE)
|
||||||
if(!force && (!istype(M) || istype(M, /obj/effect) || (ismecha(M) && !mech_sized) || (!isobj(M) && !ismob(M)))) //Things that shouldn't teleport.
|
if(!force && (!istype(M) || iseffect(M) || (ismecha(M) && !mech_sized) || (!isobj(M) && !ismob(M)))) //Things that shouldn't teleport.
|
||||||
return
|
return
|
||||||
var/turf/real_target = get_link_target_turf()
|
var/turf/real_target = get_link_target_turf()
|
||||||
if(!istype(real_target))
|
if(!istype(real_target))
|
||||||
@@ -175,4 +175,3 @@
|
|||||||
else
|
else
|
||||||
real_target = get_turf(linked)
|
real_target = get_turf(linked)
|
||||||
return real_target
|
return real_target
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
if(!check_sprite(target))
|
if(!check_sprite(target))
|
||||||
return
|
return
|
||||||
if(!active_dummy)
|
if(!active_dummy)
|
||||||
if(!(isturf(target) || istype(target, /obj/structure/falsewall) || ismob(target))) //NOT any of these
|
if(!(isturf(target) || ismob(target) || istype(target, /obj/structure/falsewall) || istype(target, /obj/effect))) //NOT any of these
|
||||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6)
|
playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6)
|
||||||
to_chat(user, "<span class='notice'>Scanned [target].</span>")
|
to_chat(user, "<span class='notice'>Scanned [target].</span>")
|
||||||
var/obj/temp = new/obj()
|
var/obj/temp = new/obj()
|
||||||
|
|||||||
@@ -283,7 +283,7 @@
|
|||||||
for(var/turf/closed/wall/W in RANGE_TURFS(2, src))
|
for(var/turf/closed/wall/W in RANGE_TURFS(2, src))
|
||||||
W.dismantle_wall()
|
W.dismantle_wall()
|
||||||
for(var/obj/O in orange(1, src))
|
for(var/obj/O in orange(1, src))
|
||||||
if(!O.pulledby && !istype(O, /obj/effect) && O.density)
|
if(!O.pulledby && !iseffect(O) && O.density)
|
||||||
if(!step_away(O, src, 2) || get_dist(O, src) < 2)
|
if(!step_away(O, src, 2) || get_dist(O, src) < 2)
|
||||||
O.take_damage(50, BURN, "bomb")
|
O.take_damage(50, BURN, "bomb")
|
||||||
O.update_icon()
|
O.update_icon()
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
mech_sized = TRUE
|
mech_sized = TRUE
|
||||||
|
|
||||||
/obj/effect/portal/wormhole/teleport(atom/movable/M)
|
/obj/effect/portal/wormhole/teleport(atom/movable/M)
|
||||||
if(istype(M, /obj/effect)) //sparks don't teleport
|
if(iseffect(M)) //sparks don't teleport
|
||||||
return
|
return
|
||||||
if(M.anchored)
|
if(M.anchored)
|
||||||
if(!(ismecha(M) && mech_sized))
|
if(!(ismecha(M) && mech_sized))
|
||||||
|
|||||||
@@ -598,7 +598,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
|||||||
AM.visible_message("<span class='danger'>\The [AM] slams into \the [src] inducing a resonance... [AM.p_their()] body starts to glow and catch flame before flashing into ash.</span>",\
|
AM.visible_message("<span class='danger'>\The [AM] slams into \the [src] inducing a resonance... [AM.p_their()] body starts to glow and catch flame before flashing into ash.</span>",\
|
||||||
"<span class='userdanger'>You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"</span>",\
|
"<span class='userdanger'>You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"</span>",\
|
||||||
"<span class='italics'>You hear an unearthly noise as a wave of heat washes over you.</span>")
|
"<span class='italics'>You hear an unearthly noise as a wave of heat washes over you.</span>")
|
||||||
else if(isobj(AM) && !istype(AM, /obj/effect))
|
else if(isobj(AM) && !iseffect(AM))
|
||||||
AM.visible_message("<span class='danger'>\The [AM] smacks into \the [src] and rapidly flashes to ash.</span>", null,\
|
AM.visible_message("<span class='danger'>\The [AM] smacks into \the [src] and rapidly flashes to ash.</span>", null,\
|
||||||
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
|
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
|
||||||
else
|
else
|
||||||
@@ -620,10 +620,10 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
|||||||
else if(istype(AM, /obj/singularity))
|
else if(istype(AM, /obj/singularity))
|
||||||
return
|
return
|
||||||
else if(isobj(AM))
|
else if(isobj(AM))
|
||||||
if(!istype(AM, /obj/effect))
|
if(!iseffect(AM))
|
||||||
investigate_log("has consumed [AM].", INVESTIGATE_SUPERMATTER)
|
investigate_log("has consumed [AM].", INVESTIGATE_SUPERMATTER)
|
||||||
qdel(AM)
|
qdel(AM)
|
||||||
if(!istype(AM, /obj/effect))
|
if(!iseffect(AM))
|
||||||
matter_power += 200
|
matter_power += 200
|
||||||
|
|
||||||
//Some poor sod got eaten, go ahead and irradiate people nearby.
|
//Some poor sod got eaten, go ahead and irradiate people nearby.
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
/datum/chemical_reaction/proc/goonchem_vortex(turf/T, setting_type, range)
|
/datum/chemical_reaction/proc/goonchem_vortex(turf/T, setting_type, range)
|
||||||
for(var/atom/movable/X in orange(range, T))
|
for(var/atom/movable/X in orange(range, T))
|
||||||
if(istype(X, /obj/effect))
|
if(iseffect(X))
|
||||||
continue
|
continue
|
||||||
if(!X.anchored)
|
if(!X.anchored)
|
||||||
var/distance = get_dist(X, T)
|
var/distance = get_dist(X, T)
|
||||||
|
|||||||
Reference in New Issue
Block a user