This commit is contained in:
izac112
2020-06-17 04:30:06 +02:00
116 changed files with 10186 additions and 4123 deletions
+7 -5
View File
@@ -360,14 +360,16 @@
log_admin("Couldn't perform IP check on [key] with [address]")
// VOREStation Edit Start - Department Hours
if(config.time_off)
var/DBQuery/query_hours = dbcon.NewQuery("SELECT department, hours, total_hours FROM vr_player_hours WHERE ckey = '[sql_ckey]'")
query_hours.Execute()
LAZYINITLIST(department_hours)
LAZYINITLIST(play_hours)
var/DBQuery/query_hours = dbcon.NewQuery("SELECT department, hours, total_hours FROM vr_player_hours WHERE ckey = '[sql_ckey]'")
if(query_hours.Execute())
while(query_hours.NextRow())
department_hours[query_hours.item[1]] = text2num(query_hours.item[2])
play_hours[query_hours.item[1]] = text2num(query_hours.item[3])
else
var/error_message = query_hours.ErrorMsg() // Need this out here since the spawn below will split the stack and who knows what'll happen by the time it runs
log_debug("Error loading play hours for [ckey]: [error_message]")
spawn(0)
alert(src, "The query to load your existing playtime failed. Screenshot this, give the screenshot to a developer, and reconnect, otherwise you may lose any recorded play hours (which may limit access to jobs). ERROR: [error_message]", "PROBLEMS!!")
// VOREStation Edit End - Department Hours
if(sql_id)