Skip to content

Commit

Permalink
[READY] Multi-Z Openspace visual fixes. (tgstation#49323)
Browse files Browse the repository at this point in the history
* openspace fixes

* os over os fix

* 512 plugs

* up

* up up

* up up up

* drop 512

* drop 512 in obj

* drop 512 in turf

* drop 512 in mob p1

* drop 512 in mob p2

* drop 512 in openspace

* one backdrop to rule all
  • Loading branch information
Dennok authored Mar 1, 2020
1 parent 0e4249c commit fb85fc7
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 7 deletions.
9 changes: 6 additions & 3 deletions code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
#define PLANE_SPACE -95
#define PLANE_SPACE_PARALLAX -90


#define OPENSPACE_LAYER 17 //Openspace layer over all
#define OPENSPACE_PLANE -4 //Openspace plane below all turfs
#define OPENSPACE_BACKDROP_PLANE -3 //Black square just over openspace plane to guaranteed cover all in openspace turf


#define FLOOR_PLANE -2
#define GAME_PLANE -1
#define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals
Expand Down Expand Up @@ -84,9 +90,6 @@
#define ABOVE_LIGHTING_PLANE 16
#define ABOVE_LIGHTING_LAYER 16

#define FLOOR_OPENSPACE_PLANE 17
#define OPENSPACE_LAYER 17

#define BYOND_LIGHTING_PLANE 18
#define BYOND_LIGHTING_LAYER 18

Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/plane_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/obj/screen/plane_master/openspace
name = "open space plane master"
plane = FLOOR_OPENSPACE_PLANE
plane = OPENSPACE_BACKDROP_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_MULTIPLY
alpha = 255
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

var/drag_slowdown // Amont of multiplicative slowdown applied if pulled. >1 makes you slower, <1 makes you faster.

vis_flags = VIS_INHERIT_PLANE //when this be added to vis_contents of something it inherit something.plane, important for visualisation of obj in openspace.

/obj/vv_edit_var(vname, vval)
switch(vname)
if("anchored")
Expand Down Expand Up @@ -72,7 +74,6 @@
var/turf/T = loc
T.add_blueprints_preround(src)


/obj/Destroy(force=FALSE)
if(!ismachinery(src))
STOP_PROCESSING(SSobj, src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists
Expand Down
20 changes: 18 additions & 2 deletions code/game/turfs/open/openspace.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdrop, new)

/atom/movable/openspace_backdrop
name = "openspace_backdrop"

anchored = TRUE

icon = 'icons/turf/floors.dmi'
icon_state = "grey"
plane = OPENSPACE_BACKDROP_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
layer = SPLASHSCREEN_LAYER

/turf/open/openspace
name = "open space"
desc = "Watch your step!"
icon_state = "grey"
icon_state = "transparent"
baseturfs = /turf/open/openspace
CanAtmosPassVertical = ATMOS_PASS_YES
//mouse_opacity = MOUSE_OPACITY_TRANSPARENT
Expand All @@ -14,8 +27,11 @@

/turf/open/openspace/Initialize() // handle plane and layer here so that they don't cover other obs/turfs in Dream Maker
. = ..()
plane = FLOOR_OPENSPACE_PLANE
plane = OPENSPACE_PLANE
layer = OPENSPACE_LAYER

vis_contents += GLOB.openspace_backdrop_one_for_all //Special grey square for projecting backdrop darkness filter on it.

return INITIALIZE_HINT_LATELOAD

/turf/open/openspace/LateInitialize()
Expand Down
2 changes: 2 additions & 0 deletions code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

var/tiled_dirt = FALSE // use smooth tiled dirt decal

vis_flags = VIS_INHERIT_PLANE|VIS_INHERIT_ID //when this be added to vis_contents of something it inherit something.plane and be associatet with something on clicking, important for visualisation of turf in openspace and interraction with openspace that show you turf.

/turf/vv_edit_var(var_name, new_value)
var/static/list/banned_edits = list("x", "y", "z")
if(var_name in banned_edits)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/mob_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,5 @@

/// Used for tracking last uses of emotes for cooldown purposes
var/list/emotes_used

vis_flags = VIS_INHERIT_PLANE //when this be added to vis_contents of something it inherit something.plane, important for visualisation of mob in openspace.

0 comments on commit fb85fc7

Please sign in to comment.