Add support for Bay-style terminals (which lack holographic features) (#17522)

CL

Co-authored-by: Cody Brittain <cbrittain10@live.com>
This commit is contained in:
Cody Brittain
2023-10-08 17:32:53 -04:00
committed by GitHub
parent 139624aa25
commit a10007eb0a
9 changed files with 174 additions and 36 deletions
+11
View File
@@ -14,6 +14,17 @@
var/list/bodyscans = list()
var/selected = 0
/obj/machinery/computer/operating/terminal
name = "patient monitoring terminal"
icon = 'icons/obj/machinery/modular_terminal.dmi'
icon_screen = "med_comp"
icon_keyboard = "med_key"
is_connected = TRUE
has_off_keyboards = TRUE
can_pass_under = FALSE
light_power_on = 1
/obj/machinery/computer/operating/New()
..()
for(var/obj/machinery/optable/T in orange(1,src))
+33 -4
View File
@@ -19,6 +19,9 @@
var/overlay_layer
var/is_holographic = TRUE
var/icon_broken = "broken"
var/is_connected = FALSE
var/has_off_keyboards = FALSE
var/can_pass_under = TRUE
/obj/machinery/computer/Initialize()
. = ..()
@@ -80,8 +83,23 @@
icon_state = initial(icon_state)
//Connecting multiple computers in a row
if(is_connected)
var/append_string = ""
var/left = turn(dir, 90)
var/right = turn(dir, -90)
var/turf/L = get_step(src, left)
var/turf/R = get_step(src, right)
var/obj/machinery/computer/LC = locate() in L
var/obj/machinery/computer/RC = locate() in R
if(LC && LC.dir == dir && initial(LC.icon_state) == "computer")
append_string += "_L"
if(RC && RC.dir == dir && initial(RC.icon_state) == "computer")
append_string += "_R"
icon_state = "computer[append_string]"
if(stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"
icon_state = "[icon_state]-broken"
if (overlay_layer != layer)
add_overlay(image(icon, icon_broken, overlay_layer))
else
@@ -92,7 +110,10 @@
if (icon_scanline)
add_overlay(icon_scanline)
if (icon_keyboard)
add_overlay(icon_keyboard)
if((stat & NOPOWER) && has_off_keyboards)
add_overlay("[icon_keyboard]_off")
else
add_overlay(icon_keyboard)
else if (overlay_layer != layer)
add_overlay(image(icon, icon_screen, overlay_layer))
else
@@ -150,14 +171,14 @@
/obj/machinery/computer/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (!mover)
return 1
if(istype(mover,/obj/item/projectile) && density)
if(istype(mover,/obj/item/projectile) && density && is_holographic)
if (prob(80))
//Holoscreens are non solid, and the frames of the computers are thin. So projectiles will usually
//pass through
return 1
else
return 0
else if(mover.checkpass(PASSTABLE))
else if(mover.checkpass(PASSTABLE) && can_pass_under)
//Animals can run under them, lots of empty space
return 1
return ..()
@@ -166,3 +187,11 @@
/obj/machinery/computer/can_attach_sticker(var/mob/user, var/obj/item/sticker/S)
to_chat(user, SPAN_WARNING("\The [src]'s non-stick surface prevents you from attaching a sticker to it!"))
return FALSE
/obj/machinery/computer/terminal
name = "terminal"
icon = 'icons/obj/machinery/modular_terminal.dmi'
is_connected = TRUE
has_off_keyboards = TRUE
can_pass_under = FALSE
light_power_on = 1
@@ -12,6 +12,18 @@
var/list/names_to_guns = list()
var/list/names_to_entries = list()
/obj/machinery/computer/ship/targeting/terminal
name = "targeting systems terminal"
desc = "A targeting systems terminal using Zavodskoi software."
icon = 'icons/obj/machinery/modular_terminal.dmi'
icon_screen = "hostile"
icon_keyboard = "red_key"
is_connected = TRUE
has_off_keyboards = TRUE
can_pass_under = FALSE
light_power_on = 1
/obj/machinery/computer/ship/targeting/Initialize()
..()
return INITIALIZE_HINT_LATELOAD
@@ -16,6 +16,16 @@
icon_keyboard = null
circuit = null
/obj/machinery/computer/ship/engines/terminal
name = "engine control terminal"
icon = 'icons/obj/machinery/modular_terminal.dmi'
icon_screen = "engines"
icon_keyboard = "tech_key"
is_connected = TRUE
has_off_keyboards = TRUE
can_pass_under = FALSE
light_power_on = 1
/obj/machinery/computer/ship/engines/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!connected)
display_reconnect_dialog(user, "ship control systems")
@@ -24,6 +24,16 @@
icon_keyboard = null
circuit = null
/obj/machinery/computer/ship/helm/terminal
name = "helm control terminal"
icon = 'icons/obj/machinery/modular_terminal.dmi'
icon_screen = "helm"
icon_keyboard = "security_key"
is_connected = TRUE
has_off_keyboards = TRUE
can_pass_under = FALSE
light_power_on = 1
/obj/machinery/computer/ship/helm/Initialize()
. = ..()
get_known_sectors()
@@ -311,6 +321,16 @@
icon_keyboard = null
circuit = null
/obj/machinery/computer/ship/navigation/terminal
name = "navigation terminal"
icon = 'icons/obj/machinery/modular_terminal.dmi'
icon_screen = "nav"
icon_keyboard = "generic_key"
is_connected = TRUE
has_off_keyboards = TRUE
can_pass_under = FALSE
light_power_on = 1
/obj/machinery/computer/ship/navigation/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!connected)
display_reconnect_dialog(user, "Navigation")
@@ -27,6 +27,17 @@
icon_keyboard = null
circuit = null
/obj/machinery/computer/ship/sensors/terminal
name = "sensors terminal"
icon = 'icons/obj/machinery/modular_terminal.dmi'
icon_screen = "teleport"
icon_keyboard = "teleport_key"
is_connected = TRUE
has_off_keyboards = TRUE
can_pass_under = FALSE
light_power_on = 1
/obj/machinery/computer/ship/sensors/Destroy()
QDEL_NULL(sound_token)
sensors = null
@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: GeneralCamo
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Added older-style terminals, ported from Bay, as a drop-in replacement for holographic consoles."
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

+36 -32
View File
@@ -207,16 +207,11 @@
/turf/template_noop,
/area/template_noop)
"aB" = (
/obj/structure/cable{
d1 = 4;
d2 = 8;
icon_state = "4-8"
/obj/machinery/computer/terminal{
dir = 8
},
/obj/machinery/door/airlock/external{
dir = 4
},
/turf/simulated/floor/plating,
/area/engineering)
/turf/simulated/floor/tiled,
/area/storage/primary)
"aC" = (
/obj/structure/cable{
d1 = 4;
@@ -1195,10 +1190,9 @@
/turf/simulated/wall/r_wall,
/area/storage/primary)
"cS" = (
/obj/machinery/door/airlock/glass{
/obj/machinery/computer/terminal{
dir = 1
},
/obj/machinery/door/firedoor,
/turf/simulated/floor/tiled,
/area/storage/primary)
"cT" = (
@@ -1343,11 +1337,9 @@
/turf/simulated/floor/tiled,
/area/storage/primary)
"do" = (
/obj/machinery/door/airlock/external{
dir = 4
},
/turf/simulated/floor/plating,
/area/hallway/secondary/entry)
/obj/machinery/computer/terminal,
/turf/simulated/floor/tiled,
/area/storage/primary)
"dp" = (
/obj/structure/window_frame/empty,
/turf/simulated/floor/tiled/full,
@@ -1445,6 +1437,10 @@
/obj/item/device/radio/intercom/south,
/turf/simulated/floor/tiled,
/area/hallway/primary/central_one)
"eY" = (
/obj/machinery/computer/ship/engines/terminal,
/turf/simulated/floor/tiled,
/area/storage/primary)
"fq" = (
/obj/machinery/computer/shuttle_control/explore/runtime,
/turf/simulated/floor/shuttle,
@@ -1572,6 +1568,10 @@
/obj/effect/landmark/entry_point/aft,
/turf/simulated/wall/r_wall,
/area/shuttle/runtime)
"sf" = (
/obj/machinery/computer/ship/sensors/terminal,
/turf/simulated/floor/tiled,
/area/storage/primary)
"tr" = (
/obj/machinery/alarm/south,
/turf/simulated/floor/tiled,
@@ -1778,6 +1778,10 @@
},
/turf/simulated/floor/tiled,
/area/hallway/primary/central_one)
"LF" = (
/obj/machinery/computer/ship/targeting/terminal,
/turf/simulated/floor/tiled,
/area/storage/primary)
"PS" = (
/obj/effect/landmark{
name = "Revenant"
@@ -8317,7 +8321,7 @@ ad
aa
aa
ah
aB
dl
ah
ZE
ab
@@ -9111,7 +9115,7 @@ da
tr
dm
Sz
da
cS
da
cP
ae
@@ -9364,11 +9368,11 @@ dc
cZ
da
cZ
da
sf
da
Fw
da
da
cS
da
cP
ae
@@ -9621,11 +9625,11 @@ dc
cZ
da
cZ
da
LF
da
BP
da
da
cS
da
cP
ae
@@ -9878,7 +9882,7 @@ cZ
dm
da
dm
da
eY
Lp
dm
eH
@@ -10128,7 +10132,7 @@ bB
cx
UW
bB
cS
dn
da
cZ
dc
@@ -10139,7 +10143,7 @@ da
da
kP
da
da
do
da
cP
ae
@@ -10396,7 +10400,7 @@ da
da
da
da
da
do
da
cP
ae
@@ -10642,7 +10646,7 @@ bB
Ly
bB
bB
cS
dn
da
da
cZ
@@ -10651,9 +10655,9 @@ da
cZ
da
da
dm
da
da
do
da
cP
ae
@@ -10906,9 +10910,9 @@ da
da
da
da
da
da
da
aB
aB
aB
da
da
da
@@ -12694,7 +12698,7 @@ ac
ac
ac
bv
do
cv
bv
ac
ac