diff --git a/code/modules/jobs/job_exp.dm b/code/modules/jobs/job_exp.dm index 4b7b1752409..f99bf650715 100644 --- a/code/modules/jobs/job_exp.dm +++ b/code/modules/jobs/job_exp.dm @@ -8,6 +8,8 @@ GLOBAL_PROTECT(exp_to_update) return 0 if(!CONFIG_GET(flag/use_exp_tracking)) return 0 + if(!SSdbcore.Connect()) + return 0 if(!exp_requirements || !exp_type) return 0 if(!job_is_xp_locked(src.title)) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 87373bacb0d..16f8148dd5f 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -139,8 +139,8 @@ return 0 if(!CONFIG_GET(flag/use_age_restriction_for_jobs)) return 0 - if(!isnum(C.player_age)) - return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced + if(!SSdbcore.Connect()) + return 0 //Without a database connection we can't get a player's age so we'll assume they're old enough for all jobs if(!isnum(minimal_player_age)) return 0