Guest pass does not require to be processed anymore.

Also agent IDs cannot copy access off them now (I think it would make them too powerful)
This commit is contained in:
Chinsky
2013-12-22 07:53:17 +04:00
parent 5754ba204f
commit 68b51d3188

View File

@@ -1,23 +1,20 @@
/////////////////////////////////////////////
//Guest pass ////////////////////////////////
/////////////////////////////////////////////
/obj/item/weapon/card/id/guest /obj/item/weapon/card/id/guest
name = "guest pass" name = "guest pass"
desc = "Allows temporary access to station areas." desc = "Allows temporary access to station areas."
icon_state = "guest" icon_state = "guest"
var/temp_access = list() //to prevent agent cards stealing access as permanent
var/expiration_time = 0 var/expiration_time = 0
var/reason = "NOT SPECIFIED" var/reason = "NOT SPECIFIED"
/obj/item/weapon/card/id/guest/New() /obj/item/weapon/card/id/guest/GetAccess()
processing_objects.Add(src)
/obj/item/weapon/card/id/guest/Del()
processing_objects.Remove(src)
..()
/obj/item/weapon/card/id/guest/process()
if (world.time > expiration_time) if (world.time > expiration_time)
access = null return access
icon_state = "guest_invalid" else
processing_objects.Remove(src) return temp_access
/obj/item/weapon/card/id/guest/examine() /obj/item/weapon/card/id/guest/examine()
..() ..()
@@ -31,12 +28,16 @@
usr << "This pass expired at [worldtime2text(expiration_time)]." usr << "This pass expired at [worldtime2text(expiration_time)]."
else else
usr << "This pass expires at [worldtime2text(expiration_time)]." usr << "This pass expires at [worldtime2text(expiration_time)]."
usr << "It grants access to following areas:" usr << "It grants access to following areas:"
for (var/A in access) for (var/A in temp_access)
usr << "[get_access_desc(A)]." usr << "[get_access_desc(A)]."
usr << "Issuing reason: [reason]." usr << "Issuing reason: [reason]."
return return
/////////////////////////////////////////////
//Guest pass terminal////////////////////////
/////////////////////////////////////////////
/obj/machinery/computer/guestpass /obj/machinery/computer/guestpass
name = "guest pass terminal" name = "guest pass terminal"
@@ -170,7 +171,7 @@
internal_log.Add(entry) internal_log.Add(entry)
var/obj/item/weapon/card/id/guest/pass = new(src.loc) var/obj/item/weapon/card/id/guest/pass = new(src.loc)
pass.access = accesses.Copy() pass.temp_access = accesses.Copy()
pass.registered_name = giv_name pass.registered_name = giv_name
pass.expiration_time = world.time + duration*10*60 pass.expiration_time = world.time + duration*10*60
pass.reason = reason pass.reason = reason