mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Configuration option for time_off
This commit is contained in:
@@ -4,8 +4,7 @@
|
|||||||
|
|
||||||
/datum/configuration
|
/datum/configuration
|
||||||
var/list/engine_map // Comma separated list of engines to choose from. Blank means fully random.
|
var/list/engine_map // Comma separated list of engines to choose from. Blank means fully random.
|
||||||
var/assistants_ratio
|
var/time_off = FALSE
|
||||||
var/assistants_assured = 15 // Default 15, only used if the ratio is set though.
|
|
||||||
|
|
||||||
/hook/startup/proc/read_vs_config()
|
/hook/startup/proc/read_vs_config()
|
||||||
var/list/Lines = file2list("config/config.txt")
|
var/list/Lines = file2list("config/config.txt")
|
||||||
@@ -32,10 +31,6 @@
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
switch (name)
|
switch (name)
|
||||||
if ("assistants_ratio")
|
|
||||||
config.assistants_ratio = text2num(value)
|
|
||||||
if ("assistants_assured")
|
|
||||||
config.assistants_assured = text2num(value)
|
|
||||||
if ("chat_webhook_url")
|
if ("chat_webhook_url")
|
||||||
config.chat_webhook_url = value
|
config.chat_webhook_url = value
|
||||||
if ("chat_webhook_key")
|
if ("chat_webhook_key")
|
||||||
@@ -46,5 +41,7 @@
|
|||||||
config.fax_export_dir = value
|
config.fax_export_dir = value
|
||||||
if ("items_survive_digestion")
|
if ("items_survive_digestion")
|
||||||
config.items_survive_digestion = 1
|
config.items_survive_digestion = 1
|
||||||
|
if ("time_off")
|
||||||
|
config.time_off = TRUE
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ SUBSYSTEM_DEF(persist)
|
|||||||
|
|
||||||
// Do PTO Accruals
|
// Do PTO Accruals
|
||||||
/datum/controller/subsystem/persist/proc/update_department_hours(var/resumed = FALSE)
|
/datum/controller/subsystem/persist/proc/update_department_hours(var/resumed = FALSE)
|
||||||
|
if(!config.time_off)
|
||||||
|
return
|
||||||
|
|
||||||
establish_db_connection()
|
establish_db_connection()
|
||||||
if(!dbcon.IsConnected())
|
if(!dbcon.IsConnected())
|
||||||
src.currentrun.Cut()
|
src.currentrun.Cut()
|
||||||
|
|||||||
@@ -259,11 +259,12 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
// VOREStation Edit Start - Department Hours
|
// VOREStation Edit Start - Department Hours
|
||||||
var/DBQuery/query_hours = dbcon.NewQuery("SELECT department, hours FROM vr_player_hours WHERE ckey = '[sql_ckey]'")
|
if(config.time_off)
|
||||||
query_hours.Execute()
|
var/DBQuery/query_hours = dbcon.NewQuery("SELECT department, hours FROM vr_player_hours WHERE ckey = '[sql_ckey]'")
|
||||||
while(query_hours.NextRow())
|
query_hours.Execute()
|
||||||
LAZYINITLIST(department_hours)
|
while(query_hours.NextRow())
|
||||||
department_hours[query_hours.item[1]] = text2num(query_hours.item[2])
|
LAZYINITLIST(department_hours)
|
||||||
|
department_hours[query_hours.item[1]] = text2num(query_hours.item[2])
|
||||||
// VOREStation Edit End - Department Hours
|
// VOREStation Edit End - Department Hours
|
||||||
|
|
||||||
if(sql_id)
|
if(sql_id)
|
||||||
|
|||||||
@@ -399,3 +399,9 @@ STARLIGHT 0
|
|||||||
|
|
||||||
## Default language prefix keys, separated with spaces. Only single character keys are supported. If unset, defaults to , # and -
|
## Default language prefix keys, separated with spaces. Only single character keys are supported. If unset, defaults to , # and -
|
||||||
# DEFAULT_LANGUAGE_PREFIXES , # -
|
# DEFAULT_LANGUAGE_PREFIXES , # -
|
||||||
|
|
||||||
|
# Control which submaps are loaded for the Dynamic Engine system
|
||||||
|
ENGINE_MAP Supermatter Engine,Edison's Bane
|
||||||
|
|
||||||
|
# Controls if the 'time off' system is used for determining if players can play 'Off-Duty' jobs (requires SQL)
|
||||||
|
# time_off
|
||||||
Reference in New Issue
Block a user