Skip to content

Commit

Permalink
Revert "emissive blockers are now just an overlay (with kickass fucki…
Browse files Browse the repository at this point in the history
…ng graphs). FUCK YOU MAPTICK (tgstation#57934)"

This reverts commit 0992c09.
  • Loading branch information
ArcaneDefence committed Mar 29, 2021
1 parent 6fef023 commit 2892ac9
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,11 @@
. = ..()
switch(blocks_emissive)
if(EMISSIVE_BLOCK_GENERIC)
var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, EMISSIVE_BLOCKER_LAYER, EMISSIVE_BLOCKER_PLANE)
gen_emissive_blocker.dir = dir
gen_emissive_blocker.alpha = alpha
gen_emissive_blocker.appearance_flags |= appearance_flags
add_overlay(list(gen_emissive_blocker))
update_emissive_block()
if(EMISSIVE_BLOCK_UNIQUE)
render_target = ref(src)
em_block = new(src, render_target)
add_overlay(list(em_block))
vis_contents += em_block
if(opacity)
AddElement(/datum/element/light_blocking)
switch(light_system)
Expand Down Expand Up @@ -135,24 +131,17 @@

vis_contents.Cut()


/atom/movable/proc/update_emissive_block()
if(!blocks_emissive)
if(blocks_emissive != EMISSIVE_BLOCK_GENERIC)
return
else if (blocks_emissive == EMISSIVE_BLOCK_GENERIC)
var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, EMISSIVE_BLOCKER_LAYER, EMISSIVE_BLOCKER_PLANE)
gen_emissive_blocker.dir = dir
gen_emissive_blocker.alpha = alpha
gen_emissive_blocker.appearance_flags |= appearance_flags
return gen_emissive_blocker
else if(blocks_emissive == EMISSIVE_BLOCK_UNIQUE)
if(!em_block)
render_target = ref(src)
em_block = new(src, render_target)
return em_block

/atom/movable/update_overlays()
. = ..()
. += update_emissive_block()
if(length(managed_vis_overlays))
for(var/a in managed_vis_overlays)
var/obj/effect/overlay/vis/vs
if(vs.plane == EMISSIVE_BLOCKER_PLANE)
SSvis_overlays.remove_vis_overlay(src, list(vs))
break
SSvis_overlays.add_vis_overlay(src, icon, icon_state, EMISSIVE_BLOCKER_LAYER, EMISSIVE_BLOCKER_PLANE, dir)

/atom/movable/proc/can_zFall(turf/source, levels = 1, turf/target, direction)
if(!direction)
Expand Down

0 comments on commit 2892ac9

Please sign in to comment.