In 510.1345 I am trying to create a 'Fog of War' effect using /image datums attached to turfs. However, these images are only showing up in my view if I can normally see the turf, even though my mob has the SEE_TURFS flag set.
It turns out that if I set SEE_OBJS (without removing SEE_TURFS) on my mob, that I can see the turfs (as well as objects, which is slightly less desirable at this point) properly.
Here are the turf visibilities with SEE_TURFS:
Here are the turf visibilities with SEE_OBJS:
And here are the turf visibilities with SEE_TURFS | SEE_OBJS
Code Snippet (if applicable) to Reproduce Problem:
/turf
var
FogValue = FALSE
FogDone = FALSE
image/FoWImage = null
proc
PreviouslySeen(var/mob/Player)
// TODO replace this with party handling down the road
return FogValue
ShowTo(var/mob/Player)
Player << FoWImage
FogValue = TRUE // TODO change this
MakeFoWStandin()
var/obj/Runtime/TurfStandIn/TSI = new()
TSI.icon = icon
TSI.icon_state = icon_state
TSI.layer = layer
TSI.Move(src)
FogOfWar()
if (FogDone)
return
FogDone = TRUE
alpha = 0
//MakeFoWStandin() <-- Removed this for ease of identifying issue
FoWImage = image(icon, src, icon_state, layer)
FoWImage.color = rgb(128, 128, 128)
FoWImage.appearance_flags = RESET_ALPHA | RESET_COLOR
FoWImage.override = TRUE
/mob
Move()
. = ..()
if (.)
for(var/turf/T in view(src))
if (!T.PreviouslySeen(src))
T.ShowTo(src)
Expected Results:
Turfs and images attached to turfs are always visible when SEE_TURFS flag is set on client.mob.sight
Actual Results:
Turfs and images attached to turfs are only always visible when SEE_TURFS | SEE_OBJS flags are set on client.mob.sight
Does the problem occur:
Every time? Or how often? Every time
In other games? Not tested
In other user accounts? Not tested
On other computers? Not tested
When does the problem NOT occur?
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Workarounds:
None I know of