Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ship/Shuttle Terminal Access Checks #20227

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion code/modules/overmap/ships/computers/ship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
/obj/machinery/computer/ship/attack_hand(mob/user)
if(use_check_and_message(user))
return

if(!allowed(user))
to_chat(user, SPAN_WARNING("Access denied."))
return FALSE
user.set_machine(src)
ui_interact(user)

Expand All @@ -28,6 +30,16 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
src.add_hiddenprint(user)
ui_interact(user)

/obj/machinery/computer/ship/emag_act(var/remaining_charges, var/mob/user)
if(emagged)
to_chat(user, SPAN_WARNING("The [src] has already been subverted."))
return FALSE
req_access = list()
req_one_access = list()
emagged = TRUE
to_chat(user, "You short out the console's ID checking system. It's now available to everyone!")
return TRUE

/obj/machinery/computer/ship/Topic(href, href_list)
if(..())
return TOPIC_HANDLED
Expand Down
20 changes: 13 additions & 7 deletions code/modules/shuttles/shuttle_console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
icon_keyboard_emis = "cyan_key_mask"
light_color = LIGHT_COLOR_CYAN

var/shuttle_tag // Used to coordinate data in shuttle controller.
var/hacked = FALSE // Has been emagged, no access restrictions.
/// Used to coordinate data in shuttle controller.
var/shuttle_tag

var/ui_template = "ShuttleControlConsole"
var/list/linked_helmets = list()
Expand Down Expand Up @@ -44,6 +44,9 @@
return ..()

/obj/machinery/computer/shuttle_control/attack_hand(mob/user)
if(!allowed(user))
to_chat(user, SPAN_WARNING("Access denied."))
return FALSE
ui_interact(user)

/obj/machinery/computer/shuttle_control/attack_ai(mob/user)
Expand Down Expand Up @@ -160,11 +163,14 @@
PH.set_hud_maptext("Shuttle Status: [shuttle_status]")

/obj/machinery/computer/shuttle_control/emag_act(var/remaining_charges, var/mob/user)
if(!hacked)
req_access = list()
hacked = TRUE
to_chat(user, "You short out the console's ID checking system. It's now available to everyone!")
return TRUE
if(emagged)
to_chat(user, SPAN_WARNING("The [src] has already been subverted."))
return FALSE
req_access = list()
req_one_access = list()
emagged = TRUE
to_chat(user, "You short out the console's ID checking system. It's now available to everyone!")
return TRUE

/obj/machinery/computer/shuttle_control/ex_act()
return
Expand Down
61 changes: 61 additions & 0 deletions html/changelogs/Ben10083 - Ship Access.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
################################
# 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
# - (fixes bugs)
# wip
# - (work in progress)
# qol
# - (quality of life)
# soundadd
# - (adds a sound)
# sounddel
# - (removes a sound)
# rscadd
# - (adds a feature)
# rscdel
# - (removes a feature)
# imageadd
# - (adds an image or sprite)
# imagedel
# - (removes an image or sprite)
# spellcheck
# - (fixes spelling or grammar)
# experiment
# - (experimental change)
# balance
# - (balance changes)
# code_imp
# - (misc internal code change)
# refactor
# - (refactors code)
# config
# - (makes a change to the config files)
# admin
# - (makes changes to administrator tools)
# server
# - (miscellaneous changes to server)
#################################

# Your name.
author: Ben10083

# 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, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- code_imp: "Adds ID check functionality to ship/shuttle consoles."
- rscadd: "ID Checks added to SCCV Horizon ship/shuttle consoles. Bridge Crew given access to all shuttles."
- balance: "Emagging a ship console will allow it to be usable by anyone."
- rscadd: "Many offships and their shuttles given access checks."
15 changes: 10 additions & 5 deletions maps/away/away_site/tajara/peoples_station/peoples_station.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,8 @@
/area/peoples_station/hangar)
"dG" = (
/obj/machinery/computer/ship/helm/terminal{
dir = 1
dir = 1;
req_access = list(209)
},
/turf/simulated/floor/plating{
temperature = 278.15
Expand Down Expand Up @@ -4375,7 +4376,8 @@
dir = 10
},
/obj/machinery/computer/ship/targeting/terminal{
dir = 1
dir = 1;
req_access = list(209)
},
/turf/simulated/floor/tiled/dark{
temperature = 278.15
Expand Down Expand Up @@ -7428,7 +7430,8 @@
/area/peoples_station)
"BN" = (
/obj/machinery/computer/shuttle_control/explore/terminal/peoples_station_fang{
dir = 8
dir = 8;
req_access = list(209)
},
/obj/machinery/light/small{
dir = 4
Expand Down Expand Up @@ -8665,7 +8668,8 @@
/area/peoples_station/hangar)
"Go" = (
/obj/machinery/computer/ship/helm/terminal{
dir = 1
dir = 1;
req_access = list(209)
},
/turf/simulated/floor/carpet/rubber,
/area/shuttle/peoples_station_transport)
Expand Down Expand Up @@ -12915,7 +12919,8 @@
/area/peoples_station/fang)
"Xy" = (
/obj/machinery/computer/ship/targeting/terminal{
dir = 4
dir = 4;
req_access = list(209)
},
/obj/machinery/light/small{
dir = 8
Expand Down
11 changes: 8 additions & 3 deletions maps/away/away_site/uueoaesa/reclamation/ihss_reclamation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,9 @@
dir = 4;
color = "#941307"
},
/obj/machinery/computer/shuttle_control/explore/ihss_reclamation,
/obj/machinery/computer/shuttle_control/explore/ihss_reclamation{
req_one_access = list(113)
},
/turf/simulated/floor/tiled/dark,
/area/shuttle/ihss_reclamation)
"iW" = (
Expand Down Expand Up @@ -4632,7 +4634,9 @@
/turf/simulated/floor/plating,
/area/ihss_reclamation/dock)
"wx" = (
/obj/machinery/computer/ship/helm,
/obj/machinery/computer/ship/helm{
req_one_access = list(113)
},
/obj/effect/floor_decal/corner/red/diagonal{
dir = 4;
color = "#941307"
Expand Down Expand Up @@ -8750,7 +8754,8 @@
color = "#941307"
},
/obj/machinery/computer/ship/targeting{
dir = 4
dir = 4;
req_one_access = list(113)
},
/turf/simulated/floor/tiled/dark,
/area/shuttle/ihss_reclamation)
Expand Down
23 changes: 16 additions & 7 deletions maps/away/ships/biesel/tcaf_corvette/tcaf_corvette.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,9 @@
},
/obj/machinery/atmospherics/pipe/simple/hidden/black,
/obj/effect/floor_decal/industrial/outline/yellow,
/obj/machinery/computer/ship/engines/terminal,
/obj/machinery/computer/ship/engines/terminal{
req_access = list(204)
},
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 8
},
Expand Down Expand Up @@ -3628,7 +3630,8 @@
dir = 10
},
/obj/machinery/computer/ship/targeting/terminal{
dir = 1
dir = 1;
req_access = list(204)
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/tiled/dark,
Expand Down Expand Up @@ -7221,7 +7224,8 @@
/area/tcaf_corvette/engine)
"BW" = (
/obj/machinery/computer/ship/helm/terminal{
dir = 1
dir = 1;
req_access = list(204)
},
/obj/effect/floor_decal/industrial/outline/security,
/turf/simulated/floor/carpet/rubber,
Expand Down Expand Up @@ -7851,7 +7855,9 @@
/obj/structure/platform_deco{
dir = 4
},
/obj/machinery/computer/ship/helm/terminal,
/obj/machinery/computer/ship/helm/terminal{
req_access = list(204)
},
/obj/effect/floor_decal/industrial/outline/security,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/tiled/gunmetal,
Expand Down Expand Up @@ -8494,7 +8500,8 @@
/area/tcaf_corvette/captain)
"HA" = (
/obj/machinery/computer/ship/targeting/terminal{
dir = 4
dir = 4;
req_access = list(204)
},
/obj/effect/floor_decal/industrial/outline/security,
/turf/simulated/floor/carpet/rubber,
Expand Down Expand Up @@ -10941,7 +10948,8 @@
/area/tcaf_corvette/messhall)
"Rt" = (
/obj/machinery/computer/ship/targeting/terminal{
dir = 1
dir = 1;
req_access = list(204)
},
/obj/effect/floor_decal/industrial/outline/security,
/obj/effect/decal/cleanable/dirt,
Expand Down Expand Up @@ -11238,7 +11246,8 @@
dir = 10
},
/obj/machinery/computer/ship/targeting/terminal{
dir = 1
dir = 1;
req_access = list(204)
},
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/tiled/dark,
Expand Down
20 changes: 14 additions & 6 deletions maps/away/ships/coc/coc_ranger/coc_ship.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@
},
/obj/structure/railing/mapped,
/obj/machinery/computer/ship/helm{
dir = 1
dir = 1;
req_one_access = list(221,222)
},
/turf/simulated/floor/tiled/dark/full,
/area/ship/ranger_corvette/bridge)
Expand Down Expand Up @@ -2815,7 +2816,9 @@
/turf/simulated/floor/tiled/dark/full,
/area/ship/ranger_corvette/bridge)
"lvN" = (
/obj/machinery/computer/shuttle_control/explore/ranger_shuttle,
/obj/machinery/computer/shuttle_control/explore/ranger_shuttle{
req_one_access = list(221,222)
},
/turf/simulated/floor/tiled/full,
/area/shuttle/ranger_shuttle)
"lxT" = (
Expand Down Expand Up @@ -2923,7 +2926,8 @@
dir = 4
},
/obj/machinery/computer/ship/helm{
dir = 4
dir = 4;
req_access = list(221,222)
},
/obj/effect/floor_decal/corner_wide/blue/diagonal,
/turf/simulated/floor/tiled/dark,
Expand Down Expand Up @@ -4064,7 +4068,8 @@
/area/ship/ranger_corvette/bridge)
"qhi" = (
/obj/machinery/computer/ship/targeting{
dir = 8
dir = 8;
req_access = list(221,222)
},
/obj/effect/floor_decal/corner_wide/blue/diagonal,
/turf/simulated/floor/tiled/dark,
Expand Down Expand Up @@ -5151,7 +5156,9 @@
/turf/simulated/floor/tiled/dark,
/area/ship/ranger_corvette/crew)
"twl" = (
/obj/machinery/computer/ship/helm,
/obj/machinery/computer/ship/helm{
req_one_access = list(221,222)
},
/turf/simulated/floor/tiled/full,
/area/shuttle/ranger_shuttle)
"tAd" = (
Expand Down Expand Up @@ -6058,7 +6065,8 @@
"wmN" = (
/obj/structure/lattice/catwalk/indoor/grate/dark,
/obj/machinery/computer/ship/targeting{
dir = 1
dir = 1;
req_one_access = list(221,222)
},
/turf/simulated/floor/tiled/dark/full,
/area/ship/ranger_corvette/bridge)
Expand Down
Loading
Loading