Also added cancellation buttons here and there.
Prevented an exploit, resulting in ability to issue same passes with different ID, even if it doesn't have those accesses.

Conflicts:
	code/WorkInProgress/Chinsky/guestpass.dm
	icons/obj/computer.dmi
This commit is contained in:
Chinsky
2014-06-30 16:11:42 +04:00
committed by ZomgPonies
parent 7e64846a95
commit 6ce2d8a0f8
2 changed files with 7 additions and 5 deletions

View File

@@ -49,7 +49,7 @@
var/list/accesses = list()
var/giv_name = "NOT SPECIFIED"
var/reason = "NOT SPECIFIED"
var/duration = 0
var/duration = 5
var/list/internal_log = list()
var/mode = 0 // 0 - making pass, 1 - viewing logs
@@ -113,12 +113,13 @@
if (href_list["choice"])
switch(href_list["choice"])
if ("giv_name")
var/nam = input("Person pass is issued to", "Name", name)
var/nam = strip_html_simple(input("Person pass is issued to", "Name", giv_name) as text|null)
if (nam)
giv_name = strip_html_simple(nam)
giv_name = nam
if ("reason")
var/reas = input("Reason why pass is issued", "Reason", reason)
reason = strip_html_simple(reas)
var/reas = strip_html_simple(input("Reason why pass is issued", "Reason", reason) as text|null)
if(reas)
reason = reas
if ("duration")
var/dur = input("Duration (in minutes) during which pass is valid (up to 30 minutes).", "Duration") as num|null
if (dur)
@@ -144,6 +145,7 @@
else
giver.loc = src.loc
giver = null
accesses.Cut()
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))