Skip to content

Commit

Permalink
Baylike Walls and Windows (#5547)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Largely a port of code from Daedalus Dock and icons from Bay/Nebula.
Lots of things need to be touched with this.

## Why It's Good For The Game

It just looks better, imho.

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

:cl:

/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: silicons <[email protected]>
Co-authored-by: silicons <[email protected]>
  • Loading branch information
3 people authored Jul 7, 2023
1 parent e698627 commit 8cc591c
Show file tree
Hide file tree
Showing 241 changed files with 22,386 additions and 20,831 deletions.
9 changes: 7 additions & 2 deletions citadel.dme
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "code\__DEFINES\appearance.dm"
#include "code\__DEFINES\automata.dm"
#include "code\__DEFINES\belly_modes_vr.dm"
#include "code\__DEFINES\bitflags.dm"
#include "code\__DEFINES\callbacks.dm"
#include "code\__DEFINES\chat.dm"
#include "code\__DEFINES\chemistry.dm"
Expand Down Expand Up @@ -205,6 +206,7 @@
#include "code\__DEFINES\languages\ids.dm"
#include "code\__DEFINES\languages\legacy.dm"
#include "code\__DEFINES\languages\translation.dm"
#include "code\__DEFINES\machines\door.dm"
#include "code\__DEFINES\mapping\levels.dm"
#include "code\__DEFINES\mapping\maploader.dm"
#include "code\__DEFINES\mapping\maps.dm"
Expand Down Expand Up @@ -1240,6 +1242,7 @@
#include "code\game\machinery\doors\airlock.dm"
#include "code\game\machinery\doors\airlock_control.dm"
#include "code\game\machinery\doors\airlock_electronics.dm"
#include "code\game\machinery\doors\airlock_subtypes.dm"
#include "code\game\machinery\doors\airlock_vr.dm"
#include "code\game\machinery\doors\alarmlock.dm"
#include "code\game\machinery\doors\blast_door.dm"
Expand Down Expand Up @@ -1534,7 +1537,6 @@
#include "code\game\objects\items\devices\holowarrant.dm"
#include "code\game\objects\items\devices\laserpointer.dm"
#include "code\game\objects\items\devices\lightreplacer.dm"
#include "code\game\objects\items\devices\locker_painter.dm"
#include "code\game\objects\items\devices\megaphone.dm"
#include "code\game\objects\items\devices\modkit.dm"
#include "code\game\objects\items\devices\multitool.dm"
Expand Down Expand Up @@ -1756,6 +1758,7 @@
#include "code\game\objects\structures\ledges.dm"
#include "code\game\objects\structures\lightpost.dm"
#include "code\game\objects\structures\loot_piles.dm"
#include "code\game\objects\structures\low_wall.dm"
#include "code\game\objects\structures\map_blocker.dm"
#include "code\game\objects\structures\medical_stand_vr.dm"
#include "code\game\objects\structures\mineral_bath.dm"
Expand All @@ -1782,7 +1785,8 @@
#include "code\game\objects\structures\windoor_assembly.dm"
#include "code\game\objects\structures\window.dm"
#include "code\game\objects\structures\window_spawner.dm"
#include "code\game\objects\structures\crates_lockers\closets.dm"
#include "code\game\objects\structures\crates_lockers\__closet.dm"
#include "code\game\objects\structures\crates_lockers\_closet_appearance_definitions.dm"
#include "code\game\objects\structures\crates_lockers\crates.dm"
#include "code\game\objects\structures\crates_lockers\largecrate.dm"
#include "code\game\objects\structures\crates_lockers\vehiclecage.dm"
Expand Down Expand Up @@ -2902,6 +2906,7 @@
#include "code\modules\mapping\map_template.dm"
#include "code\modules\mapping\minimaps.dm"
#include "code\modules\mapping\multiz_helpers.dm"
#include "code\modules\mapping\paint.dm"
#include "code\modules\mapping\shuttle.dm"
#include "code\modules\mapping\submap.dm"
#include "code\modules\mapping\submaps_legacy.dm"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/_planes+layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
#define OBJ_PLANE -35
#define OBJ_PLANE_RENDER_TARGET "OBJ_PLANE"

#define WALL_LAYER (TURF_LAYER+0.3) //! For walls.
#define DEBRIS_LAYER (TURF_LAYER+0.4) /// Cleanable debris.
#define STAIRS_LAYER (TURF_LAYER+0.5) /// Layer for stairs.
#define DOOR_OPEN_LAYER (TURF_LAYER+0.7) /// Under all objects if opened. 2.7 due to tables being at 2.6.
Expand All @@ -184,6 +185,8 @@

#define ABOVE_JUNK_LAYER (OBJ_LAYER+0.1) /// Things that want to be slightly above common objects.
#define DOOR_CLOSED_LAYER (OBJ_LAYER+0.1) /// Doors when closed.
#define LOW_WALL_LAYER (OBJ_LAYER+0.11)
#define GRILLE_LAYER (OBJ_LAYER+0.12)
#define WINDOW_LAYER (OBJ_LAYER+0.2) /// Windows.
#define ON_WINDOW_LAYER (OBJ_LAYER+0.3) /// Ontop of a window.
#define ABOVE_WINDOW_LAYER (OBJ_LAYER+0.4) /// Above full tile windows so wall items are clickable.
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/bitflags.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define BITSHIFT_LEFT(X, N) (X << (N))
#define BITSHIFT_RIGHT(X, N) (X >> (N))
#define BITFLAG(X) BITSHIFT_LEFT(1, X)
69 changes: 69 additions & 0 deletions code/__DEFINES/color/color.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,70 @@
#define COLOR_PALE_PURPLE_GRAY "#BDA2BA"
#define COLOR_PURPLE_GRAY "#A2819E"
#define COLOR_DEEP_SKY_BLUE "#00e1ff"
#define COLOR_NAVY_BLUE "#000080"
#define COLOR_DARK_GRAY "#404040"
#define COLOR_VIOLET "#9933ff"
#define COLOR_EXPLO_VIOLET "#410083"
#define COLOR_BROWN_ORANGE "#824b28"
#define COLOR_GRAY40 "#666666"
#define COLOR_GRAY20 "#333333"
#define COLOR_GRAY15 "#151515"
#define COLOR_SEDONA "#cc6600"
#define COLOR_DARK_RED "#aa0000"
#define COLOR_PALE_PINK "#bf89ba"
#define COLOR_YELLOW_GRAY "#c9a344"
#define COLOR_PALE_YELLOW "#c1bb7a"
#define COLOR_WARM_YELLOW "#b3863c"
#define COLOR_DARK_GREEN_GRAY "#54654c"
#define COLOR_DARK_BLUE_GRAY "#3e4855"
#define COLOR_SURGERY_BLUE "#e0f2f6"
#define COLOR_SUN "#ec8b2f"
#define COLOR_BLUE_LIGHT "#33ccff"
#define COLOR_BABY_BLUE "#89cff0"
#define COLOR_ACID_CYAN "#00ffc8"
#define COLOR_GRAY80 "#cccccc"
#define COLOR_OFF_WHITE "#eeeeee"
#define COLOR_EGGSHELL "#e4e0d2"
#define COLOR_CLOSET_GOLD "#6d6133"
#define COLOR_NT_RED "#9d2300"
#define COLOR_BOTTLE_GREEN "#1f6b4f"
#define COLOR_PALE_BTL_GREEN "#57967f"
#define COLOR_GUNMETAL "#545c68"
#define COLOR_WALL_GUNMETAL "#353a42"
#define COLOR_STEEL "#a8b0b2"
#define COLOR_MUZZLE_FLASH "#ffffb2"
#define COLOR_CHESTNUT "#996633"
#define COLOR_COPPER "#b87333"
#define COLOR_BEASTY_BROWN "#663300"
#define COLOR_WHEAT "#ffff99"
#define COLOR_CYAN_BLUE "#3366cc"
#define COLOR_CYAN_DARK "#006999"
#define COLOR_LIGHT_CYAN "#66ccff"
#define COLOR_PAKISTAN_GREEN "#006600"
#define COLOR_HULL "#436b8e"
#define COLOR_AMBER "#ffbf00"
#define COLOR_COMMAND_BLUE "#46698c"
#define COLOR_SKY_BLUE "#5ca1cc"
#define COLOR_PALE_ORANGE "#b88a3b"
#define COLOR_CIVIE_GREEN "#b7f27d"
#define COLOR_TITANIUM "#d1e6e3"
#define COLOR_DARK_GUNMETAL "#4c535b"
#define COLOR_BRONZE "#8c7853"
#define COLOR_TAN "#a39682"
#define COLOR_BRASS "#b99d71"
#define COLOR_POLISHED_BRASS "#fdef6e"
#define COLOR_INDIGO "#4b0082"
#define COLOR_ALUMINIUM "#bbbbbb"
#define COLOR_CRYSTAL "#00c8a5"
#define COLOR_DIAMOND "#d8d4ea"

#define WOOD_COLOR_GENERIC "#d5a66e"
#define WOOD_COLOR_RICH "#792f27"
#define WOOD_COLOR_PALE "#d2bc9d"
#define WOOD_COLOR_PALE2 "#e6d2ba"
#define WOOD_COLOR_BLACK "#332521"
#define WOOD_COLOR_CHOCOLATE "#543c30"
#define WOOD_COLOR_YELLOW "#e3994e"

// Color defines used by the assembly detailer.
#define COLOR_ASSEMBLY_BLACK "#545454"
Expand Down Expand Up @@ -63,3 +127,8 @@
#define COLOR_DARKMODE_BACKGROUND "#202020"
#define COLOR_DARKMODE_DARKBACKGROUND "#171717"
#define COLOR_DARKMODE_TEXT "#a4bad6"

#define GLASS_COLOR "#AACCFF"
#define GLASS_COLOR_SILICATE "#7C3A9A"
#define GLASS_COLOR_TINTED "#222222"
#define GLASS_COLOR_FROSTED "#EEEEEE"
15 changes: 15 additions & 0 deletions code/__DEFINES/machines/door.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// door do_animate animations
#define DOOR_ANIMATION_OPEN "open"
#define DOOR_ANIMATION_CLOSE "close"
#define DOOR_ANIMATION_EMAG "emag"
#define DOOR_ANIMATION_DENY "deny"
#define DOOR_ANIMATION_SPARK "spark"

// airlock var/state

#define AIRLOCK_CLOSED 1
#define AIRLOCK_CLOSING 2
#define AIRLOCK_OPEN 3
#define AIRLOCK_OPENING 4
#define AIRLOCK_DENY 5
#define AIRLOCK_EMAG 6
2 changes: 1 addition & 1 deletion code/datums/wires/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
if(WIRE_IDSCAN)
//Sending a pulse through flashes the red light on the door (if the door has power).
if(A.arePowerSystemsOn() && A.density)
A.do_animate("deny")
A.do_animate(DOOR_ANIMATION_DENY)

if(WIRE_MAIN_POWER1, WIRE_MAIN_POWER2)
//Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter).
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/changeling/powers/electric_lockpick.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
to_chat(user, "<span class='notice'>We send an electrical pulse up our finger, and into \the [target], attempting to open it.</span>")

if(door.density && door.operable())
door.do_animate("spark")
door.do_animate(DOOR_ANIMATION_SPARK)
sleep(6)
//More typechecks, because windoors can't be locked. Fun.
if(istype(target,/obj/machinery/door/airlock))
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ var/hadevent = 0
for (var/obj/machinery/door/airlock/security/temp_airlock in A)
spawn(0) temp_airlock.prison_open()

for (var/obj/machinery/door/airlock/glass_security/temp_glassairlock in A)
for (var/obj/machinery/door/airlock/glass/security/temp_glassairlock in A)
spawn(0) temp_glassairlock.prison_open()

for (var/obj/machinery/door_timer/temp_timer in A)
Expand Down
18 changes: 18 additions & 0 deletions code/game/machinery/air_alarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ GLOBAL_LIST_EMPTY(air_alarms)
TLV["other"] = list(-1.0, -1.0, 0.5, 1.0) // Partial pressure, kpa
TLV["pressure"] = list(ONE_ATMOSPHERE * 0.80, ONE_ATMOSPHERE * 0.90, ONE_ATMOSPHERE * 1.10, ONE_ATMOSPHERE * 1.20) /* kpa */
TLV["temperature"] = list(T0C - 26, T0C, T0C + 40, T0C + 66) // K
setDir(dir)

/obj/machinery/alarm/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -325,6 +326,23 @@ GLOBAL_LIST_EMPTY(air_alarms)
return TRUE
return FALSE

/obj/machinery/alarm/setDir(ndir)
. = ..()
base_pixel_x = 0
base_pixel_y = 0
var/turf/T = get_step(get_turf(src), turn(dir, 180))
if(istype(T) && T.density)
switch(dir)
if(NORTH)
base_pixel_y = -21
if(SOUTH)
base_pixel_y = 21
if(WEST)
base_pixel_x = 21
if(EAST)
base_pixel_x = -21
reset_pixel_offsets()

/obj/machinery/alarm/update_icon()
cut_overlays()

Expand Down
20 changes: 19 additions & 1 deletion code/game/machinery/camera/camera.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/obj/machinery/camera
name = "security camera"
desc = "It's used to monitor rooms."
icon = 'icons/obj/monitors_vr.dmi'
icon = 'icons/obj/monitors.dmi'
icon_state = "camera"
use_power = USE_POWER_ACTIVE
idle_power_usage = 5
Expand Down Expand Up @@ -65,6 +65,7 @@
if(!c_tag)
var/area/A = get_area(src)
c_tag = "[A ? A.name : "Unknown"] #[rand(111,999)]"
update_icon()
return ..()

/obj/machinery/camera/Destroy()
Expand Down Expand Up @@ -294,6 +295,23 @@
else
icon_state = initial(icon_state)

/obj/machinery/camera/setDir(ndir)
. = ..()
base_pixel_x = 0
base_pixel_y = 0
var/turf/T = get_step(get_turf(src), turn(src.dir, 180))
for(var/obj/O in T.contents)
if(O.density)
switch(dir)
if(SOUTH)
base_pixel_y = 21
if(WEST)
base_pixel_x = 10
if(EAST)
base_pixel_x = -10
break
reset_pixel_offsets()

/obj/machinery/camera/proc/triggerCameraAlarm(duration = 0)
alarm_on = 1
camera_alarm.triggerAlarm(loc, src, duration)
Expand Down
10 changes: 10 additions & 0 deletions code/game/machinery/computer/timeclock_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
makeOnDuty(params["switch-to-onduty-rank"], params["switch-to-onduty-assignment"])
usr.put_in_hands_or_drop(card)
card = null
flick(icon, "timeclock_approved")
else
flick(icon, "timeclock_denied")
update_icon()
return TRUE
if("switch-to-offduty")
Expand All @@ -142,6 +145,9 @@
makeOffDuty()
usr.put_in_hands_or_drop(card)
card = null
flick(icon, "timeclock_approved")
else
flick(icon, "timeclock_denied")
update_icon()
return TRUE

Expand Down Expand Up @@ -232,16 +238,20 @@
/obj/machinery/computer/timeclock/proc/checkFace()
if(!card)
to_chat(usr, "<span class='notice'>No ID is inserted.</span>")
flick(icon, "timeclock_denied")
return FALSE
var/mob/living/carbon/human/H = usr
if(!(istype(H)))
to_chat(usr, "<span class='warning'>Invalid user detected. Access denied.</span>")
flick(icon, "timeclock_denied")
return FALSE
else if((H.wear_mask && (H.wear_mask.inv_hide_flags & HIDEFACE)) || (H.head && (H.head.inv_hide_flags & HIDEFACE))) //Face hiding bad
to_chat(usr, "<span class='warning'>Facial recognition scan failed due to physical obstructions. Access denied.</span>")
flick(icon, "timeclock_denied")
return FALSE
else if(H.get_face_name() == "Unknown" || !(H.real_name == card.registered_name))
to_chat(usr, "<span class='warning'>Facial recognition scan failed. Access denied.</span>")
flick(icon, "timeclock_denied")
return FALSE
else
return TRUE
Expand Down
Loading

0 comments on commit 8cc591c

Please sign in to comment.