Skip to content

Commit

Permalink
Merge pull request lizardqueenlexi#205 from LemonInTheDark/door-world
Browse files Browse the repository at this point in the history
Lets you stand between doors (Also finally implements shutters, longside some other small stuff
  • Loading branch information
LemonInTheDark authored Dec 19, 2023
2 parents 89d95fb + 00c0ccd commit 4f4268f
Show file tree
Hide file tree
Showing 32 changed files with 326 additions and 74 deletions.
4 changes: 3 additions & 1 deletion code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
#define EMISSIVE_FLOOR_LAYER 2
#define EMISSIVE_SPACE_LAYER 3
#define EMISSIVE_WALL_LAYER 4
#define EMISSIVE_FRILL_LAYER 5
#define EMISSIVE_PLANE_LAYER 5
#define EMISSIVE_FRILL_LAYER 6
#define EMISSIVE_FRILL_PLANE_LAYER 7

#define RENDER_PLANE_LIGHTING 15

Expand Down
23 changes: 22 additions & 1 deletion code/_onclick/hud/rendering/plane_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,30 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master)
plane = EMISSIVE_PLANE
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_relay_planes = list(EMISSIVE_RENDER_PLATE)
render_relay_planes = list()
critical = PLANE_CRITICAL_DISPLAY

/atom/movable/screen/plane_master/emissive/Initialize(mapload, datum/hud/hud_owner, datum/plane_master_group/home, offset)
. = ..()
add_relay_to(GET_NEW_PLANE(EMISSIVE_RENDER_PLATE, offset), relay_layer = EMISSIVE_PLANE_LAYER)

/**
* Handles emissive overlays that want to sit above frills
*/
#warn currently unused, added under the assumption it will be useful. if it's still unused on merge remove it and its emissive layer
/atom/movable/screen/plane_master/emissive_frills
name = "Emissive Frills"
documentation = "Holds HIGH that will be used to mask the lighting plane later on. Behaves the exact same as the emissive plane, but it renders ABOVE the frills blocker."
plane = EMISSIVE_FRILL_PLANE_LAYER
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_relay_planes = list()
critical = PLANE_CRITICAL_DISPLAY

/atom/movable/screen/plane_master/emissive/Initialize(mapload, datum/hud/hud_owner, datum/plane_master_group/home, offset)
. = ..()
add_relay_to(GET_NEW_PLANE(EMISSIVE_RENDER_PLATE, offset), relay_layer = EMISSIVE_PLANE_LAYER)

/atom/movable/screen/plane_master/pipecrawl
name = "Pipecrawl"
documentation = "Holds pipecrawl images generated during well, pipecrawling.\
Expand Down
54 changes: 49 additions & 5 deletions code/datums/greyscale/json_configs/airlock_custom.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,28 +87,72 @@
"color_ids": [ 7 ]
}
],
"open": [
"open_top": [
{
"type": "icon_state",
"icon_state": "left_door_panel_open",
"icon_state": "left_door_panel_open_top",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "right_door_panel_open",
"icon_state": "right_door_panel_open_top",
"blend_mode": "overlay",
"color_ids": [ 2 ]
},
{
"type": "icon_state",
"icon_state": "top_right_rim_open",
"icon_state": "top_right_rim_open_top",
"blend_mode": "overlay",
"color_ids": [ 3 ]
},
{
"type": "icon_state",
"icon_state": "top_left_rim_open",
"icon_state": "top_left_rim_open_top",
"blend_mode": "overlay",
"color_ids": [ 4 ]
},
{
"type": "icon_state",
"icon_state": "left_band_open",
"blend_mode": "overlay",
"color_ids": [ 5 ]
},
{
"type": "icon_state",
"icon_state": "right_band_open",
"blend_mode": "overlay",
"color_ids": [ 6 ]
},
{
"type": "icon_state",
"icon_state": "fill_open",
"blend_mode": "overlay",
"color_ids": [ 7 ]
}
],
"open_bottom": [
{
"type": "icon_state",
"icon_state": "left_door_panel_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "right_door_panel_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 2 ]
},
{
"type": "icon_state",
"icon_state": "top_right_rim_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 3 ]
},
{
"type": "icon_state",
"icon_state": "top_left_rim_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 4 ]
},
Expand Down
42 changes: 37 additions & 5 deletions code/datums/greyscale/json_configs/airlock_plain.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,60 @@
"color_ids": [ 5 ]
}
],
"open": [
"open_bottom": [
{
"type": "icon_state",
"icon_state": "left_door_panel_open",
"icon_state": "left_door_panel_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "right_door_panel_open",
"icon_state": "right_door_panel_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 2 ]
},
{
"type": "icon_state",
"icon_state": "top_right_rim_open",
"icon_state": "top_right_rim_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 3 ]
},
{
"type": "icon_state",
"icon_state": "top_left_rim_open",
"icon_state": "top_left_rim_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 4 ]
},
{
"type": "icon_state",
"icon_state": "fill_open",
"blend_mode": "overlay",
"color_ids": [ 5 ]
}
],
"open_top": [
{
"type": "icon_state",
"icon_state": "left_door_panel_open_top",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "right_door_panel_open_top",
"blend_mode": "overlay",
"color_ids": [ 2 ]
},
{
"type": "icon_state",
"icon_state": "top_right_rim_open_top",
"blend_mode": "overlay",
"color_ids": [ 3 ]
},
{
"type": "icon_state",
"icon_state": "top_left_rim_open_top",
"blend_mode": "overlay",
"color_ids": [ 4 ]
},
Expand Down
48 changes: 43 additions & 5 deletions code/datums/greyscale/json_configs/airlock_window.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,66 @@
"color_ids": [ 6 ]
}
],
"open": [
"open_top": [
{
"type": "icon_state",
"icon_state": "left_door_panel_open",
"icon_state": "left_door_panel_open_top",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "right_door_panel_open",
"icon_state": "right_door_panel_open_top",
"blend_mode": "overlay",
"color_ids": [ 2 ]
},
{
"type": "icon_state",
"icon_state": "top_right_rim_open",
"icon_state": "top_right_rim_open_top",
"blend_mode": "overlay",
"color_ids": [ 3 ]
},
{
"type": "icon_state",
"icon_state": "top_left_rim_open",
"icon_state": "top_left_rim_open_top",
"blend_mode": "overlay",
"color_ids": [ 4 ]
},
{
"type": "icon_state",
"icon_state": "left_band_open",
"blend_mode": "overlay",
"color_ids": [ 5 ]
},
{
"type": "icon_state",
"icon_state": "right_band_open",
"blend_mode": "overlay",
"color_ids": [ 6 ]
}
],
"open_bottom": [
{
"type": "icon_state",
"icon_state": "left_door_panel_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "right_door_panel_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 2 ]
},
{
"type": "icon_state",
"icon_state": "top_right_rim_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 3 ]
},
{
"type": "icon_state",
"icon_state": "top_left_rim_open_bottom",
"blend_mode": "overlay",
"color_ids": [ 4 ]
},
Expand Down
2 changes: 1 addition & 1 deletion code/datums/wires/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
A.update_appearance()
if(WIRE_IDSCAN) // Pulse to disable emergency access and flash the red lights.
if(A.hasPower() && A.density)
A.do_animate("deny")
A.run_animation("deny")
if(A.emergency)
A.emergency = FALSE
A.update_appearance()
Expand Down
7 changes: 5 additions & 2 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
. = ..()
switch(airlock_state)
if(AIRLOCK_OPEN)
icon_state = "open"
icon_state = "open_top"
if(AIRLOCK_CLOSED, AIRLOCK_DENY, AIRLOCK_EMAG)
icon_state = "closed"
if(AIRLOCK_OPENING)
Expand Down Expand Up @@ -559,6 +559,8 @@
light_state = AIRLOCK_LIGHT_CLOSING
if(AIRLOCK_OPEN)
frame_state = AIRLOCK_FRAME_OPEN
// If we're open we layer the bit below us "above" any mobs so they can walk through
. += mutable_appearance(icon, "open_bottom", ABOVE_MOB_LAYER, appearance_flags = KEEP_APART)
if(AIRLOCK_OPENING)
frame_state = AIRLOCK_FRAME_OPENING
light_state = AIRLOCK_LIGHT_OPENING
Expand Down Expand Up @@ -611,7 +613,8 @@
. += floorlight
update_greyscale()

/obj/machinery/door/airlock/do_animate(animation)
// I HATE AIRLOCKS AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
/obj/machinery/door/airlock/run_animation(animation)
switch(animation)
if("opening")
update_icon(ALL, AIRLOCK_OPENING)
Expand Down
Loading

0 comments on commit 4f4268f

Please sign in to comment.