From 18a0ff541e2393896fa9feb0edd93239d869b213 Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Wed, 30 May 2018 21:55:26 -0400 Subject: [PATCH] Better solution Repathed the point decal to the temp_visual effects path. This path has built-in singularity resistance, and allows me to remove a spawn in favor of a built-in QDEL_IN call Also changed points from using the magic number 16 to POINT_LAYER for their layer definition. This does technically drop the point by 4 layers (POINT_LAYER is 12), placing them now below the light layer (shouldn't affect anything) instead of just above it. --- code/game/objects/effects/decals/misc.dm | 12 ------------ .../effects/temporary_visuals/miscellaneous.dm | 9 +++++++++ code/modules/mob/mob.dm | 12 ++++-------- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/code/game/objects/effects/decals/misc.dm b/code/game/objects/effects/decals/misc.dm index e45388c9e7e..301fd71a98d 100644 --- a/code/game/objects/effects/decals/misc.dm +++ b/code/game/objects/effects/decals/misc.dm @@ -1,15 +1,3 @@ -/obj/effect/decal/point - name = "arrow" - desc = "It's an arrow hanging in mid-air. There may be a wizard about." - icon = 'icons/mob/screen_gen.dmi' - icon_state = "arrow" - layer = 16.0 - anchored = 1 - mouse_opacity = 0 - -/obj/effect/decal/point/singularity_act() - return - // Used for spray that you spray at walls, tables, hydrovats etc /obj/effect/decal/spraystill density = 0 diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index 001c482a922..03e8ea8fcd9 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -1,3 +1,12 @@ +/obj/effect/temp_visual/point + name = "arrow" + desc = "It's an arrow hanging in mid-air. There may be a wizard about." + icon = 'icons/mob/screen_gen.dmi' + icon_state = "arrow" + layer = POINT_LAYER + duration = 20 + randomdir = FALSE + /obj/effect/temp_visual/dir_setting/bloodsplatter icon = 'icons/effects/blood.dmi' duration = 5 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index bbe6caed8a3..beba84eaa3f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -543,11 +543,11 @@ var/list/slot_equipment_priority = list( \ client.screen = list() hud_used.show_hud(hud_used.hud_version) -/mob/setDir(new_dir) +/mob/setDir(new_dir) if(forced_look) if(isnum(forced_look)) dir = forced_look - else + else var/atom/A = locateUID(forced_look) if(istype(A)) dir = get_cardinal_dir(src, A) @@ -592,7 +592,7 @@ var/list/slot_equipment_priority = list( \ return if(!src || !isturf(src.loc)) return 0 - if(istype(A, /obj/effect/decal/point)) + if(istype(A, /obj/effect/temp_visual/point)) return 0 var/tile = get_turf(A) @@ -600,12 +600,8 @@ var/list/slot_equipment_priority = list( \ return 0 changeNext_move(CLICK_CD_POINT) - var/obj/P = new /obj/effect/decal/point(tile) + var/obj/P = new /obj/effect/temp_visual/point(tile) P.invisibility = invisibility - spawn (20) - if(P) - qdel(P) - return 1 /mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag)