From aa723b5b12694ebb22ada592e4e22906a9a85dbe Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:14:34 +0300 Subject: [PATCH] 1 --- code/game/jobs/role_authority.dm | 4 ++-- .../extra_buttons/rename_platoon.dm | 17 ++++++++++------- code/modules/admin/verbs/select_equipment.dm | 6 +++--- code/modules/client/preferences.dm | 19 ++++++++++++++++++- code/modules/client/preferences_savefile.dm | 6 ++++++ .../modules/gear_presets/_select_equipment.dm | 7 ++++++- code/modules/gear_presets/uscm_ship.dm | 11 +++++------ 7 files changed, 50 insertions(+), 20 deletions(-) diff --git a/code/game/jobs/role_authority.dm b/code/game/jobs/role_authority.dm index 42ffc22570..af57c4323a 100644 --- a/code/game/jobs/role_authority.dm +++ b/code/game/jobs/role_authority.dm @@ -477,12 +477,12 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou new_human.job = new_job.title //TODO Why is this a mob variable at all? if(new_job.gear_preset_whitelist[job_whitelist]) - arm_equipment(new_human, new_job.gear_preset_whitelist[job_whitelist], FALSE, TRUE) + arm_equipment(new_human, new_job.gear_preset_whitelist[job_whitelist], FALSE, TRUE, late_join) var/generated_account = new_job.generate_money_account(new_human) new_job.announce_entry_message(new_human, generated_account, whitelist_status) //Tell them their spawn info. new_job.generate_entry_conditions(new_human, whitelist_status) //Do any other thing that relates to their spawn. else - arm_equipment(new_human, new_job.gear_preset, FALSE, TRUE) //After we move them, we want to equip anything else they should have. + arm_equipment(new_human, new_job.gear_preset, FALSE, TRUE, late_join) //After we move them, we want to equip anything else they should have. var/generated_account = new_job.generate_money_account(new_human) new_job.announce_entry_message(new_human, generated_account) //Tell them their spawn info. new_job.generate_entry_conditions(new_human) //Do any other thing that relates to their spawn. diff --git a/code/modules/admin/game_master/extra_buttons/rename_platoon.dm b/code/modules/admin/game_master/extra_buttons/rename_platoon.dm index 575319ad73..e596aee195 100644 --- a/code/modules/admin/game_master/extra_buttons/rename_platoon.dm +++ b/code/modules/admin/game_master/extra_buttons/rename_platoon.dm @@ -32,12 +32,15 @@ GLOBAL_VAR_INIT(main_platoon_initial_name, GLOB.main_platoon_name) to_chat(src, SPAN_NOTICE("The platoon name should be 16 characters or less.")) return + do_rename_platoon(new_name, mob) + +/proc/do_rename_platoon(name, mob/renamer) var/old_name = GLOB.main_platoon_name var/channel = radiochannels[old_name] radiochannels -= old_name - radiochannels[new_name] = channel + radiochannels[name] = channel var/list/keys_to_readd = list() @@ -47,17 +50,17 @@ GLOBAL_VAR_INIT(main_platoon_initial_name, GLOB.main_platoon_name) department_radio_keys -= key for(var/key in keys_to_readd) - department_radio_keys[key] = new_name + department_radio_keys[key] = name ROLES_SQUAD_ALL -= old_name - ROLES_SQUAD_ALL += new_name + ROLES_SQUAD_ALL += name var/list/copy_frozen_platoon_items = GLOB.frozen_items[old_name] GLOB.frozen_items -= old_name - GLOB.frozen_items[new_name] = copy_frozen_platoon_items + GLOB.frozen_items[name] = copy_frozen_platoon_items - SEND_GLOBAL_SIGNAL(COMSIG_GLOB_PLATOON_NAME_CHANGE, new_name, old_name) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_PLATOON_NAME_CHANGE, name, old_name) - log_admin("[key_name(src)] has renamed the platoon from [GLOB.main_platoon_name] to [new_name].") + log_admin("[key_name(renamer)] has renamed the platoon from [GLOB.main_platoon_name] to [name].") - GLOB.main_platoon_name = new_name + GLOB.main_platoon_name = name diff --git a/code/modules/admin/verbs/select_equipment.dm b/code/modules/admin/verbs/select_equipment.dm index 83a9cb1a06..560afc1a65 100644 --- a/code/modules/admin/verbs/select_equipment.dm +++ b/code/modules/admin/verbs/select_equipment.dm @@ -151,19 +151,19 @@ //note: when adding new dresscodes, on top of adding a proper skills_list, make sure the ID given has //a rank that matches a job title unless you want the human to bypass the skill system. -/proc/arm_equipment(mob/living/carbon/human/M, dresscode, randomise = FALSE, count_participant = FALSE, client/mob_client, show_job_gear = TRUE) +/proc/arm_equipment(mob/living/carbon/human/M, dresscode, randomise = FALSE, count_participant = FALSE, client/mob_client, show_job_gear = TRUE, late_join) if(ispath(dresscode)) if(!GLOB.gear_path_presets_list) CRASH("arm_equipment !gear_path_presets_list") if(!GLOB.gear_path_presets_list[dresscode]) CRASH("arm_equipment !gear_path_presets_list[dresscode]") - GLOB.gear_path_presets_list[dresscode].load_preset(M, randomise, count_participant, mob_client, show_job_gear) + GLOB.gear_path_presets_list[dresscode].load_preset(M, randomise, count_participant, mob_client, show_job_gear, late_join) else if(!GLOB.gear_name_presets_list) CRASH("arm_equipment !gear_path_presets_list") if(!GLOB.gear_name_presets_list[dresscode]) CRASH("arm_equipment !gear_path_presets_list[dresscode]") - GLOB.gear_name_presets_list[dresscode].load_preset(M, randomise, count_participant, mob_client, show_job_gear) + GLOB.gear_name_presets_list[dresscode].load_preset(M, randomise, count_participant, mob_client, show_job_gear, late_join) if(M.faction) M.check_event_info(M.faction) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index e54d86c7b7..710505eac7 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -6,6 +6,7 @@ #define MENU_MENTOR "mentor" #define MENU_SETTINGS "settings" #define MENU_SPECIAL "special" +#define MENU_PLTCO "pltco" var/list/preferences_datums = list() @@ -243,6 +244,8 @@ var/const/MAX_SAVE_SLOTS = 10 /// If this client has auto observe enabled, used by /datum/orbit_menu var/auto_observe = TRUE + /// Name for platoon used when spawning as LT + var/platoon_name = "Sun Riders" /datum/preferences/New(client/C) key_bindings = deep_copy_list(GLOB.hotkey_keybinding_list_by_key) // give them default keybinds and update their movement keys @@ -307,6 +310,7 @@ var/const/MAX_SAVE_SLOTS = 10 dat += "