From 3312efc6418b8540346f9ec8f32df1c9cde721a8 Mon Sep 17 00:00:00 2001 From: morrow <8919187+morrowwolf@users.noreply.github.com> Date: Sun, 17 Mar 2024 09:12:00 -0400 Subject: [PATCH] Initial --- code/game/jobs/job/command/cic/staffofficer.dm | 1 + code/game/jobs/job/job.dm | 3 +++ code/game/jobs/job/marine/squad/leader.dm | 1 + code/game/jobs/role_authority.dm | 11 ++++++++--- code/modules/client/preferences.dm | 16 +++++++++++++++- code/modules/client/preferences_savefile.dm | 8 ++++++-- code/modules/mob/new_player/preferences_setup.dm | 12 ++++++++---- 7 files changed, 42 insertions(+), 10 deletions(-) diff --git a/code/game/jobs/job/command/cic/staffofficer.dm b/code/game/jobs/job/command/cic/staffofficer.dm index 9f7d1d09bf..e561d9304f 100644 --- a/code/game/jobs/job/command/cic/staffofficer.dm +++ b/code/game/jobs/job/command/cic/staffofficer.dm @@ -52,6 +52,7 @@ AddTimelock(/datum/job/command/bridge, list( /datum/job/command/bridge/ai total_positions = 1 spawn_positions = 1 + prime_priorty = TRUE /datum/job/command/bridge/ai/set_spawn_positions(count) return spawn_positions diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 34671be60f..103c826ce5 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -41,6 +41,9 @@ /// If TRUE, this job will spawn w/ a cryo emergency kit during evac/red alert var/gets_emergency_kit = TRUE + /// Whether or not linking your discord account can let you get prime priority for this role + var/prime_priority = FALSE + /datum/job/New() . = ..() diff --git a/code/game/jobs/job/marine/squad/leader.dm b/code/game/jobs/job/marine/squad/leader.dm index 24233c95d5..45ebe3aa29 100644 --- a/code/game/jobs/job/marine/squad/leader.dm +++ b/code/game/jobs/job/marine/squad/leader.dm @@ -53,6 +53,7 @@ AddTimelock(/datum/job/marine/leader, list( /datum/job/marine/leader/ai total_positions = 1 spawn_positions = 1 + prime_priority = TRUE /datum/job/marine/leader/ai/upp title = JOB_SQUAD_LEADER_UPP diff --git a/code/game/jobs/role_authority.dm b/code/game/jobs/role_authority.dm index a50e25ae9e..b4be9385a0 100644 --- a/code/game/jobs/role_authority.dm +++ b/code/game/jobs/role_authority.dm @@ -18,9 +18,10 @@ var/global/datum/authority/branch/role/RoleAuthority #define RETURN_TO_LOBBY 2 #define NEVER_PRIORITY 0 -#define HIGH_PRIORITY 1 -#define MED_PRIORITY 2 -#define LOW_PRIORITY 3 +#define PRIME_PRIORITY 1 +#define HIGH_PRIORITY 2 +#define MED_PRIORITY 3 +#define LOW_PRIORITY 4 #define SHIPSIDE_ROLE_WEIGHT 0.25 @@ -245,6 +246,10 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou if(!length(roles_to_assign) || !length(unassigned_players)) return + //for(var/mob/new_player/cycled_unassigned in shuffle(unassigned_players)) + // var/wanted_jobs_by_name = shuffle(cycled_unassigned.client?.prefs?.get_jobs_by_priority(PRIME_PRIORITY)) + // Set up prime priority first rolls, probably put line 257 in a new function and then pass priority through manually - Morrow + for(var/mob/new_player/cycled_unassigned in shuffle(unassigned_players)) var/player_assigned_job = FALSE log_debug("ASSIGNMENT: We have started assigning for [cycled_unassigned].") diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 16b88e6293..30562af82b 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -652,6 +652,10 @@ var/const/MAX_SAVE_SLOTS = 10 if(!RoleAuthority) return + var/host_bypass = FALSE + if(user.client?.admin_holder?.check_for_rights(R_HOST)) + host_bypass = TRUE + var/HTML = "
" HTML += "