mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 13:47:33 +01:00
POLARIS: Fix regular mobs seeing when ghosts point at things.
* Fixed it by adding a facility by which code can check if a mob can logically see things present on another plane.
This commit is contained in:
@@ -181,6 +181,9 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
ma_compiled.transform = M
|
||||
ma_compiled.layer = MOB_LAYER //VOREStation Edit. Unset laying layer. UNLEWD.
|
||||
|
||||
//4.5 Set layer to PLANE_WORLD to make sure its not magically FLOAT_PLANE due to byond madness
|
||||
ma_compiled.plane = PLANE_WORLD
|
||||
|
||||
//5: Set appearance once
|
||||
appearance = ma_compiled
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
var/mob/M = I
|
||||
if(self_message && M==src)
|
||||
M.show_message( self_message, 1, blind_message, 2)
|
||||
else if(M.see_invisible >= invisibility) // Cannot view the invisible
|
||||
else if(M.see_invisible >= invisibility && MOB_CAN_SEE_PLANE(M, plane)) // Cannot view the invisible
|
||||
M.show_message( message, 1, blind_message, 2)
|
||||
else if (blind_message)
|
||||
M.show_message(blind_message, 2)
|
||||
@@ -244,6 +244,7 @@
|
||||
|
||||
var/obj/P = new /obj/effect/decal/point(tile)
|
||||
P.invisibility = invisibility
|
||||
P.plane = plane
|
||||
spawn (20)
|
||||
if(P)
|
||||
qdel(P) // qdel
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
var/obj/screen/wizard/instability/wiz_instability_display = null
|
||||
|
||||
var/datum/plane_holder/plane_holder = null
|
||||
var/list/vis_enabled = null
|
||||
var/list/vis_enabled = null // List of vision planes that should be graphically visible (list of their VIS_ indexes).
|
||||
var/list/planes_visible = null // List of atom planes that are logically visible/interactable (list of actual plane numbers).
|
||||
|
||||
//spells hud icons - this interacts with add_spell and remove_spell
|
||||
var/list/obj/screen/movable/spell_master/spell_masters = null
|
||||
|
||||
@@ -51,6 +51,11 @@
|
||||
var/list/subplanes = PM.sub_planes
|
||||
for(var/SP in subplanes)
|
||||
set_vis(which = SP, state = state)
|
||||
var/plane = PM.plane
|
||||
if(state && !(plane in my_mob.planes_visible))
|
||||
LAZYADD(my_mob.planes_visible, plane)
|
||||
else if(!state && (plane in my_mob.planes_visible))
|
||||
LAZYREMOVE(my_mob.planes_visible, plane)
|
||||
|
||||
/datum/plane_holder/proc/set_desired_alpha(var/which = null, var/new_alpha)
|
||||
ASSERT(which)
|
||||
@@ -137,7 +142,6 @@
|
||||
plane = PLANE_GHOSTS
|
||||
desired_alpha = 127 //When enabled, they're like half-transparent
|
||||
|
||||
|
||||
//'Normal'ness v v v
|
||||
//Various types of colorblindness R2R R2G R2B G2R G2G G2B B2R B2G B2B
|
||||
#define MATRIX_Monochromia list(0.33, 0.33, 0.33, 0.59, 0.59, 0.59, 0.11, 0.11, 0.11)
|
||||
|
||||
Reference in New Issue
Block a user