Files
Bubberstation/code/__DEFINES/sight.dm
SkyratBot 1c76ea5334 [MIRROR] Changes our map_format to SIDE_MAP [MDB IGNORE] (#18070)
* Changes our map_format to SIDE_MAP (#70162)

## About The Pull Request

This does nothing currently, but will allow me to test for layering
issues on LIVE, rather then in just wallening.
Oh also I'm packaging in a fix to one of my macros that I wrote wrong,
as a joke

[removes SEE_BLACKNESS usage, because we actually cannot use it
effectively](c9a19dd7cc)

[c9a19dd](c9a19dd7cc)

Sidemap removes the ability to control it on a plane, so it basically
just means there's an uncontrollable black slate even if you have other
toggles set.

This just like, removes that, since it's silly

[fixes weird layering on solars and ai portraits. Pixel y was casuing
things to render below who
shouldn't](3885b9d9ed)

[3885b9d](3885b9d9ed)

[Fixes flicker
issues](2defc0ad20)

[2defc0a](2defc0ad20)

Offsetting the vis_contents'd objects down physically, and then up
visually resolves the confliciting that was going on between the text
and its display.

This resolves the existing reported flickering issues

[fixes plated food not appearing in
world](28a34c64f8)

[28a34c6](28a34c64f8)

pixel_y'd vis_contents strikes again. It's a tad hacky but we'll just
use pixel_z for this

[Adds wall and upper wall plane
masters](89fe2b4eb4)

[89fe2b4](89fe2b4eb4)

We use these + the floor and space planes to build a mask of all the
visible turfs.
Then we take that, stick it in a plane master, and mask the emissive
plane with it.

This solves the lighting fulldark screen object getting cut by emissives
Shifts some planes around to match this new layering. Also ensures we
only shift fullscreen objects if they don't object to it.

[compresses plane master
controllers](bd64cc196a)

[bd64cc1](bd64cc196a)

we don't use them for much rn, but we might in future so I'm keeping it
as a convienince thing

🆑
refactor: The logic of how we well, render things has changed. Make an
issue report if anything looks funky, particularly layers. PLEASE USE
YOUR EYES
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Changes our map_format to SIDE_MAP

* Modular!

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
2022-12-19 20:58:43 +13:00

61 lines
2.3 KiB
Plaintext

#define SEE_INVISIBLE_MINIMUM 5
#define INVISIBILITY_LIGHTING 20
#define SEE_INVISIBLE_LIVING 25
//#define SEE_INVISIBLE_LEVEL_ONE 35 //currently unused
//#define INVISIBILITY_LEVEL_ONE 35 //currently unused
//#define SEE_INVISIBLE_LEVEL_TWO 45 //currently unused
//#define INVISIBILITY_LEVEL_TWO 45 //currently unused
#define INVISIBILITY_REVENANT 50
#define INVISIBILITY_OBSERVER 60
#define SEE_INVISIBLE_OBSERVER 60
#define INVISIBILITY_MAXIMUM 100 //the maximum allowed for "real" objects
#define INVISIBILITY_ABSTRACT 101 //only used for abstract objects (e.g. spacevine_controller), things that are not really there.
#define BORGMESON (1<<0)
#define BORGTHERM (1<<1)
#define BORGXRAY (1<<2)
#define BORGMATERIAL (1<<3)
//for clothing visor toggles, these determine which vars to toggle
#define VISOR_FLASHPROTECT (1<<0)
#define VISOR_TINT (1<<1)
#define VISOR_VISIONFLAGS (1<<2) //all following flags only matter for glasses
#define VISOR_DARKNESSVIEW (1<<3)
#define VISOR_INVISVIEW (1<<4)
// BYOND internal values for the sight flags
// See [https://www.byond.com/docs/ref/#/mob/var/sight]
/// can't see anything
//#define BLIND (1<<0)
/// can see all mobs, no matter what
//#define SEE_MOBS (1<<2)
/// can see all objs, no matter what
//#define SEE_OBJS (1<<3)
// can see all turfs (and areas), no matter what
//#define SEE_TURFS (1<<4)
/// can see self, no matter what
//#define SEE_SELF (1<<5)
/// can see infra-red objects (different sort of luminosity, essentially a copy of it, one we do not use)
//#define SEE_INFRA (1<<6)
/// if an object is located on an unlit area, but some of its pixels are
/// in a lit area (via pixel_x,y or smooth movement), can see those pixels
//#define SEE_PIXELS (1<<8)
/// can see through opaque objects
//#define SEE_THRU (1<<9)
/// render dark tiles as blackness (Note, this basically means we draw dark tiles to plane 0)
/// we can then hijack that plane with a plane master, and start drawing it anywhere we want
/// NOTE: this does not function with the SIDE_MAP map format. So we can't. :(
//#define SEE_BLACKNESS (1<<10)
/// Bitfield of sight flags that show things "inside" the blackness plane
/// We've gotta alpha it down if we get this, cause otherwise the sight flag won't work
#define BLACKNESS_CUTTING (SEE_MOBS|SEE_OBJS|SEE_TURFS|SEE_TURFS|SEE_TURFS)