Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d1250a1

Browse filesBrowse files
siliconsCyberboss
authored andcommitted
Bluespace Artillery now requires keycard authentication to unlock controls (#28592)
* kor * doot * Update bsa.ract * Update keycard_authentication.dm * recompiled
1 parent 1c8badd commit d1250a1
Copy full SHA for d1250a1

7 files changed

+37-16Lines changed: 37 additions & 16 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎code/_globalvars/misc.dm‎

Copy file name to clipboardExpand all lines: code/_globalvars/misc.dm
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
1313
GLOBAL_VAR_INIT(CELLRATE, 0.002) // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
1414
GLOBAL_VAR_INIT(CHARGELEVEL, 0.001) // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
1515

16-
GLOBAL_LIST_EMPTY(powernets)
16+
GLOBAL_LIST_EMPTY(powernets)
17+
18+
GLOBAL_VAR_INIT(bsa_unlock, FALSE) //BSA unlocked by head ID swipes
Collapse file

‎code/modules/security_levels/keycard_authentication.dm‎

Copy file name to clipboardExpand all lines: code/modules/security_levels/keycard_authentication.dm
+14-3Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ GLOBAL_DATUM_INIT(keycard_events, /datum/events, new)
4040
data["auth_required"] = event_source ? event_source.event : 0
4141
data["red_alert"] = (seclevel2num(get_security_level()) >= SEC_LEVEL_RED) ? 1 : 0
4242
data["emergency_maint"] = GLOB.emergency_access
43+
data["bsa_unlock"] = GLOB.bsa_unlock
4344
return data
4445

4546
/obj/machinery/keycard_auth/ui_status(mob/user)
@@ -67,6 +68,10 @@ GLOBAL_DATUM_INIT(keycard_events, /datum/events, new)
6768
event_source.trigger_event(usr)
6869
event_source = null
6970
. = TRUE
71+
if("bsa_unlock")
72+
if(!event_source)
73+
sendEvent("Bluespace Artillery Unlock")
74+
. = TRUE
7075

7176
/obj/machinery/keycard_auth/proc/sendEvent(event_type)
7277
triggerer = usr
@@ -95,11 +100,13 @@ GLOBAL_DATUM_INIT(keycard_events, /datum/events, new)
95100
switch(event)
96101
if("Red Alert")
97102
set_security_level(SEC_LEVEL_RED)
98-
SSblackbox.inc("alert_keycard_auth_red",1)
103+
SSblackbox.inc("alert_keycard_auth_red",)
99104
if("Emergency Maintenance Access")
100105
make_maint_all_access()
101-
SSblackbox.inc("alert_keycard_auth_maint",1)
102-
106+
SSblackbox.inc("alert_keycard_auth_maint")
107+
if("Bluespace Artillery Unlock")
108+
toggle_bluespace_artillery()
109+
SSblackbox.inc("alert_keycard_auth_bsa")
103110

104111
GLOBAL_VAR_INIT(emergency_access, FALSE)
105112
/proc/make_maint_all_access()
@@ -117,3 +124,7 @@ GLOBAL_VAR_INIT(emergency_access, FALSE)
117124
D.update_icon(0)
118125
minor_announce("Access restrictions in maintenance areas have been restored.", "Attention! Station-wide emergency rescinded:")
119126
GLOB.emergency_access = FALSE
127+
128+
/proc/toggle_bluespace_artillery()
129+
GLOB.bsa_unlock = !GLOB.bsa_unlock
130+
minor_announce("Bluespace Artillery firing protocols have been [GLOB.bsa_unlock? "unlocked" : "locked"]", "Weapons Systems Update:")
Collapse file

‎code/modules/station_goals/bsa.dm‎

Copy file name to clipboardExpand all lines: code/modules/station_goals/bsa.dm
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@
258258
data["ready"] = cannon ? cannon.ready : FALSE
259259
data["connected"] = cannon
260260
data["notice"] = notice
261+
data["unlocked"] = GLOB.bsa_unlock
261262
if(target)
262263
data["target"] = get_target_name()
263264
return data
Collapse file

‎tgui/assets/tgui.css‎

Copy file name to clipboardExpand all lines: tgui/assets/tgui.css
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎tgui/assets/tgui.js‎

Copy file name to clipboardExpand all lines: tgui/assets/tgui.js
+9-9Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎tgui/src/interfaces/bsa.ract‎

Copy file name to clipboardExpand all lines: tgui/src/interfaces/bsa.ract
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@
99
<ui-button icon='crosshairs' action='recalibrate'>{{data.target}}</ui-button>
1010
</ui-section>
1111
<ui-section label='Controls'>
12-
<ui-button icon='warning' state='{{data.ready ? null : "disabled"}}' action='fire'>FIRE!</ui-button>
12+
{{#if !data.unlocked}}
13+
<ui-notice>
14+
<span>Bluespace Artillery firing protocols must be globally unlocked from two keycard authentication devices first!</span>
15+
</ui-notice>
16+
{{else}}
17+
<ui-button icon='warning' state='{{data.ready ? null : "disabled"}}' action='fire'>FIRE!</ui-button>
18+
{{/if}}
1319
</ui-section>
1420
{{/if}}
1521
{{#if !data.connected}}
1622
<ui-section label='Maintenance'>
1723
<ui-button icon='wrench' action='build'>Complete Deployment.</ui-button>
1824
</ui-section>
1925
{{/if}}
20-
</ui-display>
26+
</ui-display>
Collapse file

‎tgui/src/interfaces/keycard_auth.ract‎

Copy file name to clipboardExpand all lines: tgui/src/interfaces/keycard_auth.ract
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
{{else}}
1111
<ui-button icon='warning' state='{{data.red_alert ? 'disabled' : null}}' action='red_alert'>Red Alert</ui-button>
1212
<ui-button icon='wrench' state='{{data.emergency_maint ? 'disabled' : null}}' action='emergency_maint'>Emergency Maintenance Access</ui-button>
13+
<ui-button icon='warning' state='null' action='bsa_unlock'>Bluespace Artillery Unlock</ui-button>
1314
{{/if}}
1415
</ui-section>
1516
</ui-display>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.