mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
Merge pull request #4441 from Ikarrus/brigtimer_notice
Brig cells and Labor Shuttle will notify SecHUDs on release of a prisoner
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
/obj/machinery/mineral/labor_claim_console
|
||||
name = "point claim console"
|
||||
desc = "A stacking console with an electromagnetic writer, used to track ore mined by prisoners."
|
||||
name = "stacking machine console"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
density = 0
|
||||
@@ -34,18 +33,14 @@
|
||||
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/attack_hand(user as mob)
|
||||
name = "point claim console"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
desc = "A stacking console with an electromagnetic writer, used to track ore mined by prisoners."
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/dat
|
||||
dat += text("<b>Point Claim Console</b><br><br>")
|
||||
if(emagged) //Shit's broken
|
||||
dat += text("<b>QU&#t0A In%aL*D</b><br>")
|
||||
else if(istype(inserted_id)) //There's an ID in there.
|
||||
dat += text("[inserted_id.points] / [inserted_id.goal] collected. <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>")
|
||||
dat += text("ID: [inserted_id.registered_name] <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>")
|
||||
dat += text("Points Collected:[inserted_id.points]<br>")
|
||||
dat += text("Point Quota: [inserted_id.goal ? inserted_id.goal : "Unlimited"] - Reach your quota to earn your release<br>")
|
||||
dat += text("Unclaimed Collection Points: [machine.points]. <A href='?src=\ref[src];choice=claim'>Claim points.</A><br>")
|
||||
else //No ID in sight. Complain about it.
|
||||
dat += text("No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>")
|
||||
@@ -91,26 +86,31 @@
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
inserted_id = I
|
||||
else usr << "\red No valid ID."
|
||||
else usr << "<span class='warning'>Invalid ID.</span>"
|
||||
if(check_auth()) //Sanity check against hef spoofs
|
||||
if(href_list["choice"] == "station")
|
||||
var/datum/shuttle_manager/s = shuttles["laborcamp"]
|
||||
if(s.location == /area/shuttle/laborcamp/outpost)
|
||||
if(alone_in_area(get_area(loc), usr))
|
||||
if (s.move_shuttle(0)) // No delay, to stop people from getting on while it is departing.
|
||||
usr << "\blue Shuttle recieved message and will be sent shortly."
|
||||
broadcast_hud_message("<B>[inserted_id.registered_name]</B> has met their quota and has returned to the station. Minerals and Prisoner ID card ready for retrieval.", src)
|
||||
usr << "<span class='notice'>Shuttle recieved message and will be sent shortly.</span>"
|
||||
else
|
||||
usr << "\blue Shuttle is already moving."
|
||||
usr << "<span class='notice'>Shuttle is already moving.</span>"
|
||||
else
|
||||
usr << "\red Prisoners are only allowed to be released while alone."
|
||||
usr << "<span class='warning'>Prisoners are only allowed to be released while alone.</span>"
|
||||
else
|
||||
usr << "\blue Shuttle is already on-station."
|
||||
usr << "<span class='notice'>Shuttle is already on-station.</span>"
|
||||
if(href_list["choice"] == "release")
|
||||
var/datum/shuttle_manager/s = shuttles["laborcamp"]
|
||||
if(s.location == /area/shuttle/laborcamp/outpost)
|
||||
usr << "<span class='warning'>Prisoners can only be released while docked with the station.</span>"
|
||||
return
|
||||
if(alone_in_area(get_area(loc), usr))
|
||||
if(release_door.density)
|
||||
release_door.open()
|
||||
else
|
||||
usr << "\red Prisoners are only allowed to be released while alone."
|
||||
usr << "<span class='warning'>Prisoners are only allowed to be released while alone.</span>"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -136,4 +136,30 @@
|
||||
var/a = inp.amount
|
||||
if(n in ore_values)
|
||||
points += ore_values[n] * a
|
||||
..()
|
||||
|
||||
|
||||
/**********************Point Lookup Console**************************/
|
||||
/obj/machinery/mineral/labor_points_checker
|
||||
name = "points checking console"
|
||||
desc = "A console used by prisoners to check the progress on their quotas. Simply swipe a prisoner ID."
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
/obj/machinery/mineral/labor_points_checker/attack_hand(user as mob)
|
||||
examine(user)
|
||||
|
||||
/obj/machinery/mineral/labor_points_checker/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
if(istype(I, /obj/item/weapon/card/id/prisoner))
|
||||
var/obj/item/weapon/card/id/prisoner/prisoner_id = I
|
||||
user << "<span class='notice'><B>ID: [prisoner_id.registered_name]</B></span>"
|
||||
user << "<span class='notice'>Points Collected:[prisoner_id.points]</span>"
|
||||
user << "<span class='notice'>Point Quota: [prisoner_id.goal ? prisoner_id.goal : "Unlimited"]</span>"
|
||||
user << "<span class='notice'>Collect points by bringing smelted minerals to the Labor Shuttle stacking machine. Reach your quota to earn your release.</span>"
|
||||
else
|
||||
user << "<span class='warning'>Error: Invalid ID</span>"
|
||||
return
|
||||
..()
|
||||
Reference in New Issue
Block a user