More docking codes features

- Adds docking codes to normal shuttles naoui.
- Adds docking codes sheet of paper.
This commit is contained in:
Aronai Sieyes
2020-03-10 22:20:36 -04:00
committed by Leshana
parent 9007a3aad9
commit b26f25eff4
2 changed files with 33 additions and 0 deletions

View File

@@ -142,3 +142,30 @@
/obj/machinery/computer/shuttle_control/emp_act()
return
GLOBAL_LIST_BOILERPLATE(papers_dockingcode, /obj/item/weapon/paper/dockingcodes)
/hook/roundstart/proc/populate_dockingcodes()
for(var/paper in global.papers_dockingcode)
var/obj/item/weapon/paper/dockingcodes/dcp = paper
dcp.populate_info()
return TRUE
/obj/item/weapon/paper/dockingcodes
name = "Docking Codes"
var/codes_from_z = null //So you can put codes from the station other places to give to antags or whatever
/obj/item/weapon/paper/dockingcodes/proc/populate_info()
var/dockingcodes = null
var/z_to_check = codes_from_z ? codes_from_z : z
if(using_map.use_overmap)
var/obj/effect/overmap/visitable/location = map_sectors["[z_to_check]"]
if(location && location.docking_codes)
dockingcodes = location.docking_codes
if(!dockingcodes)
info = "<center><h2>Daily Docking Codes</h2></center><br>The docking security system is down for maintenance. Please exercise caution when shuttles dock and depart."
else
info = "<center><h2>Daily Docking Codes</h2></center><br>The docking codes for this shift are '[dockingcodes]'.<br>These codes are secret, as they will allow hostile shuttles to dock with impunity if discovered.<br>"
info_links = info
icon_state = "paper_words"

View File

@@ -50,6 +50,12 @@
{{/if}}
</div>
<div class="itemLabel">
Docking Codes:
</div>
<div class="itemContent">
{{:helper.link(data.docking_codes ? data.docking_codes : 'Not set', null, {'set_codes' : '1'}, null , null)}}
</div>
</div>
</div>
{{/if}}