mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 21:57:53 +01:00
Ticket Printer!
This commit is contained in:
@@ -25,6 +25,8 @@ GLOBAL_VAR_INIT(prey_eaten_roundstat, 0) //VOREStation Edit - Obviously
|
||||
GLOBAL_VAR_INIT(prey_absorbed_roundstat, 0) //VOREStation Edit - Obviously
|
||||
GLOBAL_VAR_INIT(prey_digested_roundstat, 0) //VOREStation Edit - Obviously
|
||||
GLOBAL_VAR_INIT(items_digested_roundstat, 0) //VOREStation Edit - Obviously
|
||||
var/global/list/security_printer_tickets = list() //VOREStation Edit
|
||||
|
||||
|
||||
/hook/roundend/proc/RoundTrivia()//bazinga
|
||||
var/list/valid_stats_list = list() //This is to be populated with the good shit
|
||||
@@ -54,6 +56,22 @@ GLOBAL_VAR_INIT(items_digested_roundstat, 0) //VOREStation Edit - Obviously
|
||||
else if(GLOB.disposals_flush_shift_roundstat > 40)
|
||||
valid_stats_list.Add("The disposal system flushed a whole [GLOB.disposals_flush_shift_roundstat] times for this shift. We should really invest in waste treatement.")
|
||||
|
||||
//VOREStation add Start - Ticket time!
|
||||
if(security_printer_tickets.len)
|
||||
valid_stats_list.Add("<span class = 'danger'>[security_printer_tickets.len] unique security tickets were issued today!</span><br>Examples include:")
|
||||
var/good_num = 5
|
||||
var/ourticket
|
||||
while(good_num > 0)
|
||||
ourticket = null
|
||||
if(security_printer_tickets.len)
|
||||
ourticket = pick(security_printer_tickets)
|
||||
security_printer_tickets -= ourticket
|
||||
if(ourticket)
|
||||
valid_stats_list.Add("<b>-</b>\"[ourticket]\"")
|
||||
good_num--
|
||||
else
|
||||
good_num = 0
|
||||
|
||||
//VOREStation Add Start - Vore stats lets gooooo
|
||||
if(GLOB.prey_eaten_roundstat > 0)
|
||||
valid_stats_list.Add("A total of [GLOB.prey_eaten_roundstat] individuals were eaten today!")
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/obj/item/device/ticket_printer
|
||||
name = "ticket printer"
|
||||
desc = "It prints security citations!"
|
||||
icon = 'icons/obj/device_vr.dmi'
|
||||
icon_state = "sec_ticket_printer"
|
||||
var/print_cooldown = 1 MINUTE
|
||||
var/last_print
|
||||
|
||||
/obj/item/device/ticket_printer/attack_self(mob/user)
|
||||
. = ..()
|
||||
if(last_print + print_cooldown <= world.time)
|
||||
print_a_ticket(user)
|
||||
else
|
||||
to_chat(user, "<span class = 'warning'>\The [src] is not ready to print another ticket yet.</span>")
|
||||
|
||||
/obj/item/device/ticket_printer/proc/print_a_ticket(mob/user)
|
||||
|
||||
var/ticket_name = sanitize(tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100))
|
||||
if(length(ticket_name) > 100)
|
||||
tgui_alert_async(usr, "Entered name too long. 100 character limit.","Error")
|
||||
return
|
||||
if(!ticket_name)
|
||||
return
|
||||
var/details = sanitize(tgui_input_text(user, "What is the ticket for? Avoid entering personally identifiable information in this section. This information should not be used to harrass or otherwise make the person feel uncomfortable. (Max length: 200)", "Ticket Details", max_length = 200))
|
||||
if(length(details) > 200)
|
||||
tgui_alert_async(usr, "Entered details too long. 200 character limit.","Error")
|
||||
return
|
||||
if(!details)
|
||||
return
|
||||
|
||||
var/turf/our_turf = get_turf(user)
|
||||
|
||||
var/final = "<head><style>body {font-family: Verdana; background-color: #C1BDA3;}</style></head><center><h3>Nanotrasen Security Citation</h3><hr>This security citation has been issued to <br><big>[capitalize(ticket_name)]</big></center><b>Reason</b>:<br><i>[details]</i><hr><center><small>See your local representative at Central Command after the shift is over to resolve this issue.</small><br><img src = ntlogo.png></center>"
|
||||
|
||||
var/obj/item/weapon/paper/sec_ticket/p = new /obj/item/weapon/paper/sec_ticket(our_turf)
|
||||
|
||||
p.info = final
|
||||
p.name = "Security Citation: [ticket_name]"
|
||||
playsound(user, 'sound/items/ticket_printer.ogg', 75, 1)
|
||||
|
||||
security_printer_tickets |= details
|
||||
log_and_message_admins("has issued '[ticket_name]' a security citation: \"[details]\"", user)
|
||||
last_print = world.time
|
||||
|
||||
/obj/item/weapon/paper/sec_ticket
|
||||
name = "Security Citation"
|
||||
desc = "A citation issued by security for some kind of infraction!"
|
||||
icon = 'icons/obj/bureaucracy_vr.dmi'
|
||||
icon_state = "sec_ticket"
|
||||
|
||||
/obj/item/weapon/paper/sec_ticket/Initialize(mapload, text, title)
|
||||
. = ..()
|
||||
icon = 'icons/obj/bureaucracy_vr.dmi'
|
||||
icon_state = "sec_ticket"
|
||||
|
||||
/obj/item/weapon/paper/sec_ticket/update_icon()
|
||||
icon = icon
|
||||
icon_state = icon_state
|
||||
@@ -128,7 +128,8 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/despawn_player,
|
||||
/datum/admins/proc/view_feedback,
|
||||
/client/proc/make_mentor,
|
||||
/client/proc/unmake_mentor
|
||||
/client/proc/unmake_mentor,
|
||||
/client/proc/removetickets
|
||||
)
|
||||
|
||||
var/list/admin_verbs_ban = list(
|
||||
|
||||
@@ -54,3 +54,20 @@
|
||||
segments = 36
|
||||
if(tgui_alert(usr, "\The [orbiter] will orbit around [center]. Is this okay?", "Confirm Orbit", list("Yes", "No")) == "Yes")
|
||||
orbiter.orbit(center, distance, clock, speed, segments)
|
||||
|
||||
/client/proc/removetickets()
|
||||
set name = "Security Tickets"
|
||||
set category = "Admin"
|
||||
set desc = "Allows one to remove tickets from the global list."
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(security_printer_tickets.len >= 1)
|
||||
var/input = tgui_input_list(usr, "Which message?", "Security Tickets", security_printer_tickets)
|
||||
|
||||
if(tgui_alert(usr, "Do you want to remove the following message from the global list? \"[input]\"", "Remove Ticket", list("Yes", "No")) == "Yes")
|
||||
security_printer_tickets -= input
|
||||
|
||||
else
|
||||
tgui_alert_async(usr, "The ticket list is empty.","Empty")
|
||||
|
||||
@@ -544,6 +544,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/taperoll/police(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
src.modules += new /obj/item/weapon/gripper/security(src)
|
||||
src.modules += new /obj/item/device/ticket_printer(src) //VOREStation Add
|
||||
src.emag = new /obj/item/weapon/gun/energy/laser/mounted(src)
|
||||
|
||||
/obj/item/weapon/robot_module/robot/security/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
|
||||
@@ -862,6 +863,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/weapon/pickaxe/plasmacutter/borg(src)
|
||||
src.modules += new /obj/item/borg/combat/shield(src)
|
||||
src.modules += new /obj/item/borg/combat/mobility(src)
|
||||
src.modules += new /obj/item/device/ticket_printer(src) //VOREStation Add
|
||||
src.emag = new /obj/item/weapon/gun/energy/lasercannon/mounted(src)
|
||||
|
||||
|
||||
|
||||
@@ -237,6 +237,7 @@
|
||||
src.modules += new /obj/item/taperoll/police(src) //Block out crime scenes.
|
||||
src.modules += new /obj/item/weapon/gun/energy/taser/mounted/cyborg(src) //They /are/ a security borg, after all.
|
||||
src.modules += new /obj/item/weapon/dogborg/pounce(src) //Pounce
|
||||
src.modules += new /obj/item/device/ticket_printer(src)
|
||||
src.emag = new /obj/item/weapon/gun/energy/laser/mounted(src) //Emag. Not a big problem.
|
||||
|
||||
var/datum/matter_synth/water = new /datum/matter_synth(500) //Starts full and has a max of 500
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 664 B |
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -118,6 +118,7 @@ lel
|
||||
dir = 8;
|
||||
pixel_x = 30
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/groundbase/security/equipment)
|
||||
"aq" = (
|
||||
@@ -1343,6 +1344,8 @@ lel
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
|
||||
dir = 1
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/groundbase/security/briefing)
|
||||
"dp" = (
|
||||
@@ -4006,6 +4009,7 @@ lel
|
||||
/obj/machinery/light{
|
||||
dir = 8
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/groundbase/security/equipment)
|
||||
"jZ" = (
|
||||
@@ -6881,6 +6885,7 @@ lel
|
||||
/obj/machinery/camera/network/security{
|
||||
dir = 4
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/groundbase/security/equipment)
|
||||
"qR" = (
|
||||
@@ -8042,6 +8047,7 @@ lel
|
||||
/obj/item/weapon/book/manual/security_space_law,
|
||||
/obj/item/gunbox/warden,
|
||||
/obj/structure/closet/secure_closet/warden,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/groundbase/security/warden)
|
||||
"tx" = (
|
||||
@@ -11091,6 +11097,7 @@ lel
|
||||
/obj/machinery/light{
|
||||
dir = 4
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/groundbase/security/equipment)
|
||||
"Au" = (
|
||||
@@ -11849,6 +11856,7 @@ lel
|
||||
/obj/machinery/firealarm{
|
||||
dir = 4
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/groundbase/security/equipment)
|
||||
"Co" = (
|
||||
@@ -13938,6 +13946,11 @@ lel
|
||||
/obj/structure/cable/yellow{
|
||||
icon_state = "0-4"
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
/obj/random/paicard,
|
||||
/obj/item/device/ticket_printer,
|
||||
>>>>>>> 58c370688b... Merge pull request #14119 from Very-Soft/ticket_printer
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/groundbase/security/hos)
|
||||
"Hw" = (
|
||||
@@ -16256,6 +16269,7 @@ lel
|
||||
/obj/structure/cable/yellow{
|
||||
icon_state = "0-4"
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/groundbase/security/equipment)
|
||||
"MS" = (
|
||||
@@ -20986,6 +21000,7 @@ lel
|
||||
pixel_x = 2;
|
||||
pixel_y = 3
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/groundbase/security/detective)
|
||||
"YO" = (
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/floor_decal/milspec/color/red,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/security/security_lockerroom)
|
||||
"ag" = (
|
||||
@@ -8820,6 +8821,7 @@
|
||||
},
|
||||
/obj/item/weapon/gun/energy/sizegun,
|
||||
/obj/item/weapon/storage/box/donut,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/security/warden)
|
||||
"ss" = (
|
||||
@@ -9023,6 +9025,7 @@
|
||||
dir = 8
|
||||
},
|
||||
/obj/effect/floor_decal/milspec/color/red,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/security/security_lockerroom)
|
||||
"sM" = (
|
||||
@@ -13211,6 +13214,7 @@
|
||||
"BM" = (
|
||||
/obj/structure/table/steel_reinforced,
|
||||
/obj/machinery/recharger,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/security/security_equiptment_storage)
|
||||
"BN" = (
|
||||
@@ -13709,6 +13713,7 @@
|
||||
pixel_y = 7
|
||||
},
|
||||
/obj/item/weapon/pen,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/security/lobby)
|
||||
"CR" = (
|
||||
@@ -16283,6 +16288,7 @@
|
||||
dir = 8
|
||||
},
|
||||
/obj/effect/floor_decal/milspec/color/red,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/security/security_lockerroom)
|
||||
"Iu" = (
|
||||
@@ -22561,6 +22567,7 @@
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/floor_decal/milspec/color/red,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/security/security_lockerroom)
|
||||
"VG" = (
|
||||
@@ -24167,6 +24174,7 @@
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/floor_decal/milspec/color/red,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/security/security_lockerroom)
|
||||
"YY" = (
|
||||
@@ -24214,6 +24222,7 @@
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/floor_decal/milspec/color/red,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/security/security_lockerroom)
|
||||
"Zc" = (
|
||||
|
||||
@@ -10713,6 +10713,7 @@
|
||||
dir = 1
|
||||
},
|
||||
/obj/item/device/retail_scanner/security,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/crew_quarters/heads/hos)
|
||||
"MO" = (
|
||||
|
||||
@@ -4747,6 +4747,7 @@
|
||||
dir = 8
|
||||
},
|
||||
/obj/item/device/holowarrant,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/tether/surfacebase/security/outfitting)
|
||||
"ahp" = (
|
||||
@@ -4814,6 +4815,7 @@
|
||||
/obj/effect/floor_decal/corner/red/bordercorner2{
|
||||
dir = 6
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/tether/surfacebase/security/outfitting)
|
||||
"ahu" = (
|
||||
@@ -5122,6 +5124,7 @@
|
||||
pixel_x = 2;
|
||||
pixel_y = 3
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/carpet,
|
||||
/area/tether/surfacebase/security/detective/officea)
|
||||
"ahU" = (
|
||||
@@ -5135,6 +5138,7 @@
|
||||
pixel_x = 2;
|
||||
pixel_y = 3
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/carpet,
|
||||
/area/tether/surfacebase/security/detective/officeb)
|
||||
"ahV" = (
|
||||
@@ -5209,6 +5213,7 @@
|
||||
pixel_x = -24
|
||||
},
|
||||
/obj/item/device/holowarrant,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/tether/surfacebase/security/outfitting)
|
||||
"aid" = (
|
||||
@@ -5274,6 +5279,7 @@
|
||||
},
|
||||
/obj/structure/closet/secure_closet/security,
|
||||
/obj/item/device/holowarrant,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/tether/surfacebase/security/outfitting)
|
||||
"aii" = (
|
||||
@@ -6001,6 +6007,7 @@
|
||||
},
|
||||
/obj/structure/closet/secure_closet/security,
|
||||
/obj/item/device/holowarrant,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/tether/surfacebase/security/outfitting)
|
||||
"ajk" = (
|
||||
@@ -6090,6 +6097,7 @@
|
||||
/obj/effect/floor_decal/corner/red/bordercorner2,
|
||||
/obj/structure/closet/secure_closet/security,
|
||||
/obj/item/device/holowarrant,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/tether/surfacebase/security/outfitting)
|
||||
"ajp" = (
|
||||
@@ -11719,6 +11727,7 @@
|
||||
/obj/structure/cable/green{
|
||||
icon_state = "4-8"
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/tether/surfacebase/security/warden)
|
||||
"asF" = (
|
||||
|
||||
@@ -1778,6 +1778,7 @@
|
||||
},
|
||||
/obj/effect/floor_decal/borderfloor,
|
||||
/obj/effect/floor_decal/corner/red/border,
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/tether/surfacebase/security/upperhall)
|
||||
"acE" = (
|
||||
@@ -1796,6 +1797,7 @@
|
||||
/obj/machinery/light{
|
||||
dir = 8
|
||||
},
|
||||
/obj/item/device/ticket_printer,
|
||||
/turf/simulated/floor/wood,
|
||||
/area/tether/surfacebase/security/hos)
|
||||
"acG" = (
|
||||
@@ -4795,6 +4797,12 @@
|
||||
/obj/effect/floor_decal/corner/red/border{
|
||||
dir = 1
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
/obj/machinery/recharger,
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
|
||||
/obj/item/device/ticket_printer,
|
||||
>>>>>>> 58c370688b... Merge pull request #14119 from Very-Soft/ticket_printer
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/tether/surfacebase/security/lobby)
|
||||
"agQ" = (
|
||||
|
||||
Binary file not shown.
@@ -1275,6 +1275,7 @@
|
||||
#include "code\game\objects\items\devices\t_scanner.dm"
|
||||
#include "code\game\objects\items\devices\taperecorder.dm"
|
||||
#include "code\game\objects\items\devices\text_to_speech.dm"
|
||||
#include "code\game\objects\items\devices\ticket_printer.dm"
|
||||
#include "code\game\objects\items\devices\traitordevices.dm"
|
||||
#include "code\game\objects\items\devices\transfer_valve.dm"
|
||||
#include "code\game\objects\items\devices\translator.dm"
|
||||
|
||||
Reference in New Issue
Block a user