Adds in cell management console

This commit is contained in:
AffectedArc07
2019-02-23 21:10:35 +00:00
parent e36c6242fa
commit 8bef0cd2e2
10 changed files with 2521 additions and 2394 deletions
+5 -4
View File
@@ -2151,6 +2151,7 @@
},
/area/shuttle/syndicate_sit)
"aey" = (
/obj/machinery/computer/brigcells,
/turf/simulated/floor/plasteel{
dir = 9;
icon_state = "darkred"
@@ -6056,13 +6057,14 @@
/turf/simulated/floor/plasteel,
/area/security/permabrig)
"akN" = (
/obj/item/twohanded/required/kirbyplants,
/obj/machinery/newscaster{
pixel_y = 30
},
/obj/machinery/computer/security/telescreen/entertainment{
pixel_x = 32
},
/obj/structure/closet/secure_closet/hos,
/obj/item/reagent_containers/food/drinks/flask/barflask,
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
@@ -7070,8 +7072,6 @@
/turf/simulated/floor/plating,
/area/security/permabrig)
"amt" = (
/obj/structure/closet/secure_closet/hos,
/obj/item/reagent_containers/food/drinks/flask/barflask,
/obj/machinery/requests_console{
announcementConsole = 1;
department = "Head of Security's Desk";
@@ -7080,6 +7080,7 @@
pixel_x = 30;
pixel_y = 0
},
/obj/machinery/computer/brigcells,
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
@@ -8160,7 +8161,7 @@
},
/area/security/evidence)
"aom" = (
/obj/machinery/computer/station_alert/all,
/obj/machinery/computer/brigcells,
/turf/simulated/floor/plasteel{
dir = 9;
icon_state = "darkred"
+4
View File
@@ -102,6 +102,10 @@ proc/isDay(var/month, var/day)
var/numMinutes = (seconds - numSeconds) / 60
return "[numMinutes] [numMinutes > 1 ? "minutes" : "minute"] and [numSeconds] seconds."
//Take a value in seconds and makes it display like a clock
/proc/seconds_to_clock(var/seconds as num)
return "[add_zero(num2text((seconds / 60) % 60), 2)]:[add_zero(num2text(seconds % 60), 2)]"
//Takes a value of time in deciseconds.
//Returns a text value of that number in hours, minutes, or seconds.
/proc/DisplayTimeText(time_value)
+61
View File
@@ -0,0 +1,61 @@
/obj/machinery/computer/brigcells
name = "cell management computer"
desc = "Used to manage prison cells."
icon_keyboard = "security_key"
icon_screen = "cell_monitor"
use_power = IDLE_POWER_USE
idle_power_usage = 250
active_power_usage = 500
circuit = /obj/item/circuitboard/brigcells
light_color = LIGHT_COLOR_DARKRED
req_access = list(access_brig)
/obj/machinery/computer/brigcells/attack_ai(mob/user)
attack_hand(user)
ui_interact(user)
/obj/machinery/computer/brigcells/attack_hand(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
if(!allowed(user))
to_chat(user, "<span class='warning'>Access denied.</span>")
return
ui_interact(user)
/obj/machinery/computer/brigcells/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "brig_cells.tmpl", "Brig Cell Management", 1000, 400)
ui.open()
ui.set_auto_update(1)
/obj/machinery/computer/brigcells/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
var/data[0]
var/list/timers = list()
/*"Detainee [logname] has been incarcerated for [seconds_to_time(timetoset / 10)] for the charges of, '[logcharges]'. \
Arresting Officer: [usr.name].[R ? "" : " Detainee record not found, manual record update required."]"*/
for(var/obj/machinery/door_timer/T in world)
var/timer = list()
timer["cell_id"] = T.name
timer["occupant"] = T.occupant
timer["crimes"] = T.crimes
timer["brigged_by"] = T.officer
if(T.time == 0)
timer["background"] = "'background-color:#007f47'"
else
timer["background"] = "'background-color:#890E26'"
//timer["time_set"] = seconds_to_clock(T.timetoset)
timer["time_set"] = seconds_to_clock(T.time / 10)
timer["time_left"] = seconds_to_clock(T.timeleft())
timer["ref"] = "\ref[T]"
timers[++timers.len] += timer
timers = sortByKey(timers, "cell_id")
data["cells"] = timers
return data
/obj/machinery/computer/brigcells/Topic(href, href_list)
if(href_list["release"])
var/obj/machinery/door_timer/T = locate(href_list["release"])
T.timer_end()
T.Radio.autosay("Timer stopped manually from a cell management console.", T.name, "Security", list(z))
@@ -219,6 +219,9 @@
/obj/item/circuitboard/prisoner
name = "Circuit board (Prisoner Management)"
build_path = /obj/machinery/computer/prisoner
/obj/item/circuitboard/brigcells
name = "Circuit board (Brig Cell Control)"
build_path = /obj/machinery/computer/brigcells
// RD console circuits, so that {de,re}constructing one of the special consoles doesn't ruin everything forever
+1 -1
View File
@@ -1,5 +1,5 @@
/obj/machinery/computer/prisoner
name = "prisoner management console"
name = "implant management console"
icon = 'icons/obj/computer.dmi'
icon_keyboard = "security_key"
icon_screen = "explosive"
+14 -1
View File
@@ -31,6 +31,10 @@
maptext_height = 26
maptext_width = 32
maptext_y = -1
var/occupant = "None"
var/crimes = "None"
var/time = 0
var/officer = "None"
/obj/machinery/door_timer/proc/print_report()
var/logname = input(usr, "Name of the guilty?","[id] log name")
@@ -38,6 +42,10 @@
if(!logname || !logcharges)
return 0
occupant = logname
crimes = logcharges
time = timetoset
officer = usr.name
for(var/obj/machinery/computer/prisoner/C in GLOB.prisoncomputer_list)
var/obj/item/paper/P = new /obj/item/paper(C.loc)
@@ -121,6 +129,7 @@
if(timing)
if(timeleft() <= 0)
Radio.autosay("Timer has expired. Releasing prisoner.", name, "Security", list(z))
occupant = "None"
timer_end() // open doors, reset timer, clear status screen
timing = 0
. = PROCESS_KILL
@@ -181,7 +190,11 @@
if(stat & (NOPOWER|BROKEN))
return 0
// Reset releasetime
// Reset vars
occupant = "None"
crimes = "None"
time = 0
officer = "None"
releasetime = 0
printed = 0
if(prisoner)
@@ -209,6 +209,16 @@
req_tech = list("programming" = 2)
build_type = IMPRINTER
materials = list(MAT_GLASS = 1000)
build_path = /obj/item/circuitboard/brigcells
category = list("Computer Boards")
/datum/design/brigcells
name = "Console Board (Brig Cell Management Console)"
desc = "Allows for the construction of circuit boards used to build a brig cell management console."
id = "brigcells"
req_tech = list("programming" = 2)
build_type = IMPRINTER
materials = list(MAT_GLASS = 1000)
build_path = /obj/item/circuitboard/prisoner
category = list("Computer Boards")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

+34
View File
@@ -0,0 +1,34 @@
<!--
Title: Brig Cell Management
Used In File(s): \code\game\machinery\computer\brigcells.dm
-->
<div class="statusDisplay" style="overflow: auto;">
<span id='maintable_data_archive'>
<table style='width: 100%' id='maintable_data'>
<thead>
<tr>
<th>Cell</th>
<th>Occupant</th>
<th>Crimes</th>
<th>Brigged By</th>
<th>Time Brigged For</th>
<th>Time Left</th>
<th>Release</th>
</tr>
</thead>
<tbody>
{{for data.cells}}
<tr style={{:value.background}}>
<td>{{:value.cell_id}}</td>
<td>{{:value.occupant}}</td>
<td>{{:value.crimes}}</td>
<td>{{:value.brigged_by}}</td>
<td>{{:value.time_set}}</td>
<td>{{:value.time_left}}</td>
<td>{{:helper.link('Release', null, {'release' : value.ref}, null, 'infoButton')}}</td>
</tr>
{{/for}}
</tbody>
</table>
</span>
</div>
+2389 -2388
View File
File diff suppressed because it is too large Load Diff