Config shit for cards (#1310)

This commit is contained in:
LetterJay
2017-06-02 23:56:08 -05:00
committed by kevinz000
parent 2dc13e6242
commit 976c1244dd
4 changed files with 19 additions and 3 deletions

View File

@@ -208,6 +208,8 @@
var/generate_minimaps = 0
var/grey_assistants = 0
var/id_console_jobslot_delay = 30
var/lavaland_budget = 60
var/space_budget = 16
@@ -409,6 +411,8 @@
usewhitelist = TRUE
if("allow_metadata")
allow_Metadata = 1
if("id_console_jobslot_delay")
id_console_jobslot_delay = text2num(value)
if("inactivity_period")
inactivity_period = text2num(value) * 10 //documented as seconds in config.txt
if("afk_period")

View File

@@ -24,7 +24,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
//Cooldown for closing positions in seconds
//if set to -1: No cooldown... probably a bad idea
//if set to 0: Not able to close "original" positions. You can only close positions that you have opened before
var/change_position_cooldown = 60
var/change_position_cooldown = 30
//Jobs you cannot open new positions for
var/list/blacklisted = list(
"AI",
@@ -46,6 +46,11 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/card/Initialize()
. = ..()
change_position_cooldown = config.id_console_jobslot_delay
/obj/machinery/computer/card/attackby(obj/O, mob/user, params)//TODO:SANITY
if(istype(O, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = O
@@ -532,7 +537,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
else
SSjob.prioritized_jobs += j
prioritycount++
to_chat(usr, "<span class='notice'>[j.title] has been successfully [priority ? "prioritized" : "unprioritized"]. Potential employees will notice your request.</span>")
to_chat(usr, "<span class='notice'>[j.title] has been successfully [priority ? "prioritized" : "unprioritized"]. Potential employees will notice your request.</span>")
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
if ("print")

View File

@@ -19,7 +19,7 @@
var/list/region_access = null
var/list/head_subordinates = null
var/target_dept = 0 //Which department this computer has access to. 0=all departments
var/change_position_cooldown = 60
var/change_position_cooldown = 30
//Jobs you cannot open new positions for
var/list/blacklisted = list(
"AI",
@@ -39,6 +39,10 @@
//Assoc array: "JobName" = (int)<Opened Positions>
var/list/opened_positions = list();
/datum/computer_file/program/card_mod/New()
..()
change_position_cooldown = config.id_console_jobslot_delay
/datum/computer_file/program/card_mod/event_idremoved(background, slot)
if(!slot || slot == 2)// slot being false means both are removed

View File

@@ -99,6 +99,9 @@ LOG_LAW
## Comment this out to stop admins being able to choose their personal ooccolor
ALLOW_ADMIN_OOCCOLOR
## Job slot open/close by identification consoles delay in seconds
ID_CONSOLE_JOBSLOT_DELAY 30
## If metadata is supported
ALLOW_METADATA