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/8] 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 += "
" dat += "Human - " + dat += "Platoon Commander - " dat += "Xenomorph - " if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_COMMANDER) dat += "Commanding Officer - " @@ -434,6 +438,12 @@ var/const/MAX_SAVE_SLOTS = 10 dat += "Flavor Text: [TextPreview(flavor_texts["general"], 15)]
" dat += "" + if(MENU_PLTCO) + dat += "
" + dat += "

Platoon Settings:

" + dat += "Platoon Name: [platoon_name]
" + dat += "
" + if(MENU_XENOMORPH) dat += "
" dat += "

Xenomorph Information:

" @@ -1251,6 +1261,13 @@ var/const/MAX_SAVE_SLOTS = 10 return ghost_vision_pref = choice + if("plat_name") + var/raw_name = input(user, "Choose your Platoon's name:", "Character Preference") as text|null + if(length(raw_name) > 16 || !length(raw_name)) // Check to ensure that the user entered text (rather than cancel.) + to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") + else + platoon_name = raw_name + if("synth_name") var/raw_name = input(user, "Choose your Synthetic's name:", "Character Preference") as text|null if(raw_name) // Check to ensure that the user entered text (rather than cancel.) @@ -1994,7 +2011,6 @@ var/const/MAX_SAVE_SLOTS = 10 if("change_menu") current_menu = href_list["menu"] - ShowChoices(user) return 1 @@ -2333,3 +2349,4 @@ var/const/MAX_SAVE_SLOTS = 10 #undef MENU_MENTOR #undef MENU_SETTINGS #undef MENU_SPECIAL +#undef MENU_PLTCO diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 4e6e166b2b..f4941945cb 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -292,6 +292,8 @@ S["adaptive_zoom"] >> adaptive_zoom S["tooltips"] >> tooltips + S["plat_name"] >> platoon_name + //Sanitize ooccolor = sanitize_hexcolor(ooccolor, CONFIG_GET(string/ooc_color_normal)) lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog)) @@ -357,6 +359,7 @@ custom_cursors = sanitize_integer(custom_cursors, FALSE, TRUE, TRUE) pref_special_job_options = sanitize_islist(pref_special_job_options, list()) pref_job_slots = sanitize_islist(pref_job_slots, list()) + platoon_name = platoon_name ? sanitize_text(platoon_name, initial(platoon_name)) : initial(platoon_name) vars["fps"] = fps if(remembered_key_bindings) @@ -481,6 +484,7 @@ S["no_radials_preference"] << no_radials_preference S["no_radial_labels_preference"] << no_radial_labels_preference S["custom_cursors"] << custom_cursors + S["plat_name"] << platoon_name S.Unlock() @@ -583,6 +587,7 @@ S["uplinklocation"] >> uplinklocation S["exploit_record"] >> exploit_record + S["plat_name"] >> platoon_name S.Unlock() @@ -740,6 +745,7 @@ S["uplinklocation"] << uplinklocation S["exploit_record"] << exploit_record + S["plat_name"] << platoon_name S.Unlock() diff --git a/code/modules/gear_presets/_select_equipment.dm b/code/modules/gear_presets/_select_equipment.dm index 6aefa9a673..9e2f860228 100644 --- a/code/modules/gear_presets/_select_equipment.dm +++ b/code/modules/gear_presets/_select_equipment.dm @@ -137,7 +137,7 @@ /datum/equipment_preset/proc/load_languages(mob/living/carbon/human/new_human, client/mob_client) new_human.set_languages(languages) -/datum/equipment_preset/proc/load_preset(mob/living/carbon/human/new_human, randomise = FALSE, count_participant = FALSE, client/mob_client, show_job_gear = TRUE) +/datum/equipment_preset/proc/load_preset(mob/living/carbon/human/new_human, randomise = FALSE, count_participant = FALSE, client/mob_client, show_job_gear = TRUE, late_join) load_race(new_human, mob_client) if(randomise || uses_special_name) load_name(new_human, randomise, mob_client) @@ -163,6 +163,8 @@ new_human.regenerate_icons() + handle_late_join(new_human, late_join) + new_human.marine_points = MARINE_TOTAL_BUY_POINTS //resetting buy points new_human.marine_snowflake_points = MARINE_TOTAL_SNOWFLAKE_POINTS new_human.marine_buyable_categories = MARINE_CAN_BUY_ALL @@ -381,6 +383,9 @@ GLOBAL_LIST_EMPTY(personal_closets) return background +/datum/equipment_preset/proc/handle_late_join(mob/living/carbon/human/new_human, late_join) + return + /datum/equipment_preset/strip //For removing all equipment name = "*strip*" flags = EQUIPMENT_PRESET_EXTRA diff --git a/code/modules/gear_presets/uscm_ship.dm b/code/modules/gear_presets/uscm_ship.dm index 905fa8265b..00e1e5ddcf 100644 --- a/code/modules/gear_presets/uscm_ship.dm +++ b/code/modules/gear_presets/uscm_ship.dm @@ -594,13 +594,12 @@ new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/general/medium(new_human), WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/device/binoculars/range(new_human), WEAR_L_HAND) -/datum/equipment_preset/uscm_ship/so/load_status(mob/living/carbon/human/new_human, client/mob_client) - . = ..() - - if(!new_human.client) - return +/datum/equipment_preset/uscm_ship/so/handle_late_join(mob/living/carbon/human/new_human, late_join) + to_chat(world, "[new_human.name], [late_join ? "YES" : "NO"]") + if(!late_join) + add_verb(new_human.client, /client/proc/commander_rename_platoon) - add_verb(new_human.client, /client/proc/commander_rename_platoon) + do_rename_platoon(new_human.client.prefs.platoon_name) /datum/equipment_preset/uscm_ship/so/lesser_rank paygrade = "MO1" From aaee37607c800013c12512b3779e2158855f4dbf Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Mon, 19 Aug 2024 18:51:44 +0300 Subject: [PATCH 2/8] 1 --- code/__DEFINES/__game.dm | 5 +++++ code/_globalvars/global_lists.dm | 3 +++ .../extra_buttons/rename_platoon.dm | 21 +++++++++++++++++++ code/modules/client/preferences.dm | 10 +++++++++ code/modules/client/preferences_savefile.dm | 2 +- code/modules/gear_presets/uscm_ship.dm | 1 + 6 files changed, 41 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/__game.dm b/code/__DEFINES/__game.dm index 5dcc85921a..42052d4f27 100644 --- a/code/__DEFINES/__game.dm +++ b/code/__DEFINES/__game.dm @@ -552,3 +552,8 @@ #define PERF_TOGGLE_SHUTTLES (1<<3) /// Disables loading Techwebs and additional Z-Levels #define PERF_TOGGLE_TECHWEBS (1<<4) + +/// Dropship Camos +#define DROPSHIP_CAMO_TAN "Tan" +#define DROPSHIP_CAMO_NAVY "Navy" +#define DROPSHIP_CAMO_URBAN "Urban" \ No newline at end of file diff --git a/code/_globalvars/global_lists.dm b/code/_globalvars/global_lists.dm index ee444cf63f..83057b4ee6 100644 --- a/code/_globalvars/global_lists.dm +++ b/code/_globalvars/global_lists.dm @@ -211,6 +211,9 @@ GLOBAL_REFERENCE_LIST_INDEXED(hair_styles_list, /datum/sprite_accessory/hair, na GLOBAL_REFERENCE_LIST_INDEXED(facial_hair_styles_list, /datum/sprite_accessory/facial_hair, name) //stores /datum/sprite_accessory/facial_hair indexed by name GLOBAL_REFERENCE_LIST_INDEXED(hair_gradient_list, /datum/sprite_accessory/hair_gradient, name) GLOBAL_REFERENCE_LIST_INDEXED(yautja_hair_styles_list, /datum/sprite_accessory/yautja_hair, name) + //Dropship camos + +GLOBAL_LIST_INIT(dropship_camos, list(DROPSHIP_CAMO_TAN, DROPSHIP_CAMO_NAVY, DROPSHIP_CAMO_URBAN)) //Backpacks var/global/list/backbaglist = list("Backpack", "Satchel") 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 e596aee195..1702712370 100644 --- a/code/modules/admin/game_master/extra_buttons/rename_platoon.dm +++ b/code/modules/admin/game_master/extra_buttons/rename_platoon.dm @@ -64,3 +64,24 @@ GLOBAL_VAR_INIT(main_platoon_initial_name, GLOB.main_platoon_name) log_admin("[key_name(renamer)] has renamed the platoon from [GLOB.main_platoon_name] to [name].") GLOB.main_platoon_name = name + + +/proc/change_dropship_camo(camo, mob/renamer) + var/icon_to_change + + switch(camo) + if(DROPSHIP_CAMO_NAVY) + icon_to_change = 'icons/turf/dropship2.dmi' + if(DROPSHIP_CAMO_TAN) + icon_to_change = 'icons/turf/dropship.dmi' + if(DROPSHIP_CAMO_URBAN) + icon_to_change = 'icons/turf/dropship3.dmi' + + + for(var/turf/closed/shuttle/midway/midway_turfs in world) + if(istype(midway_turfs.loc, /area/shuttle/midway)) + midway_turfs.icon = icon_to_change + for(var/obj/structure/shuttle/part/dropship1/midway_parts in world) + var/turf/turf_to_check = get_turf(midway_parts) + if(istype(turf_to_check.loc, /area/shuttle/midway)) + midway_parts.icon = icon_to_change \ No newline at end of file diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index f006b37e82..19d8d6a3e8 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -244,8 +244,11 @@ 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" + /// Dropship camo used when spawning as LT + var/dropship_camo = DROPSHIP_CAMO_TAN /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 @@ -441,6 +444,7 @@ var/const/MAX_SAVE_SLOTS = 10 dat += "
" dat += "

Platoon Settings:

" dat += "Platoon Name: [platoon_name]
" + dat += "Dropship Camo: [dropship_camo]
" dat += "
" if(MENU_XENOMORPH) @@ -1264,6 +1268,12 @@ var/const/MAX_SAVE_SLOTS = 10 else platoon_name = raw_name + if ("dropship_camo") + var/new_camo = tgui_input_list(user, "Choose your platoon's dropship camo:", "Character Preferences", GLOB.dropship_camos) + + if (new_camo) + dropship_camo = new_camo + if("synth_name") var/raw_name = input(user, "Choose your Synthetic's name:", "Character Preference") as text|null if(raw_name) // Check to ensure that the user entered text (rather than cancel.) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index f4941945cb..b5cdd20e31 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -359,7 +359,7 @@ custom_cursors = sanitize_integer(custom_cursors, FALSE, TRUE, TRUE) pref_special_job_options = sanitize_islist(pref_special_job_options, list()) pref_job_slots = sanitize_islist(pref_job_slots, list()) - platoon_name = platoon_name ? sanitize_text(platoon_name, initial(platoon_name)) : initial(platoon_name) + platoon_name = platoon_name ? sanitize_text(platoon_name, initial(platoon_name)) : "Sun Riders" vars["fps"] = fps if(remembered_key_bindings) diff --git a/code/modules/gear_presets/uscm_ship.dm b/code/modules/gear_presets/uscm_ship.dm index 00e1e5ddcf..ad6b6495e0 100644 --- a/code/modules/gear_presets/uscm_ship.dm +++ b/code/modules/gear_presets/uscm_ship.dm @@ -600,6 +600,7 @@ add_verb(new_human.client, /client/proc/commander_rename_platoon) do_rename_platoon(new_human.client.prefs.platoon_name) + change_dropship_camo(new_human.client.prefs.dropship_camo) /datum/equipment_preset/uscm_ship/so/lesser_rank paygrade = "MO1" From 6ef88a84e1fced26077ed13600de020817cc87b5 Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Mon, 19 Aug 2024 20:25:33 +0300 Subject: [PATCH 3/8] 3 --- code/__DEFINES/__game.dm | 2 +- .../game_master/extra_buttons/rename_platoon.dm | 2 +- code/modules/client/preferences_savefile.dm | 12 ++++++++---- code/modules/gear_presets/uscm_ship.dm | 5 ++++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/code/__DEFINES/__game.dm b/code/__DEFINES/__game.dm index 42052d4f27..385f884bb6 100644 --- a/code/__DEFINES/__game.dm +++ b/code/__DEFINES/__game.dm @@ -556,4 +556,4 @@ /// Dropship Camos #define DROPSHIP_CAMO_TAN "Tan" #define DROPSHIP_CAMO_NAVY "Navy" -#define DROPSHIP_CAMO_URBAN "Urban" \ No newline at end of file +#define DROPSHIP_CAMO_URBAN "Urban" 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 1702712370..7476603491 100644 --- a/code/modules/admin/game_master/extra_buttons/rename_platoon.dm +++ b/code/modules/admin/game_master/extra_buttons/rename_platoon.dm @@ -84,4 +84,4 @@ GLOBAL_VAR_INIT(main_platoon_initial_name, GLOB.main_platoon_name) for(var/obj/structure/shuttle/part/dropship1/midway_parts in world) var/turf/turf_to_check = get_turf(midway_parts) if(istype(turf_to_check.loc, /area/shuttle/midway)) - midway_parts.icon = icon_to_change \ No newline at end of file + midway_parts.icon = icon_to_change diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index b5cdd20e31..28a53d866d 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -292,8 +292,6 @@ S["adaptive_zoom"] >> adaptive_zoom S["tooltips"] >> tooltips - S["plat_name"] >> platoon_name - //Sanitize ooccolor = sanitize_hexcolor(ooccolor, CONFIG_GET(string/ooc_color_normal)) lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog)) @@ -359,7 +357,6 @@ custom_cursors = sanitize_integer(custom_cursors, FALSE, TRUE, TRUE) pref_special_job_options = sanitize_islist(pref_special_job_options, list()) pref_job_slots = sanitize_islist(pref_job_slots, list()) - platoon_name = platoon_name ? sanitize_text(platoon_name, initial(platoon_name)) : "Sun Riders" vars["fps"] = fps if(remembered_key_bindings) @@ -470,6 +467,7 @@ S["yautja_status"] << yautja_status S["synth_status"] << synth_status + S["lang_chat_disabled"] << lang_chat_disabled S["show_permission_errors"] << show_permission_errors S["key_bindings"] << key_bindings @@ -484,7 +482,6 @@ S["no_radials_preference"] << no_radials_preference S["no_radial_labels_preference"] << no_radial_labels_preference S["custom_cursors"] << custom_cursors - S["plat_name"] << platoon_name S.Unlock() @@ -587,6 +584,8 @@ S["uplinklocation"] >> uplinklocation S["exploit_record"] >> exploit_record + + S["ds_camo"] >> dropship_camo S["plat_name"] >> platoon_name S.Unlock() @@ -638,6 +637,9 @@ preferred_armor = sanitize_inlist(preferred_armor, GLOB.armor_style_list, "Random") //b_type = sanitize_text(b_type, initial(b_type)) + platoon_name = platoon_name ? sanitize_text(platoon_name, initial(platoon_name)) : "Sun Riders" + dropship_camo = sanitize_inlist(dropship_camo, GLOB.dropship_camos, initial(dropship_camo)) + alternate_option = sanitize_integer(alternate_option, 0, 2, initial(alternate_option)) if(!job_preference_list) ResetJobs() @@ -745,6 +747,8 @@ S["uplinklocation"] << uplinklocation S["exploit_record"] << exploit_record + + S["ds_camo"] << dropship_camo S["plat_name"] << platoon_name S.Unlock() diff --git a/code/modules/gear_presets/uscm_ship.dm b/code/modules/gear_presets/uscm_ship.dm index ad6b6495e0..e67512b961 100644 --- a/code/modules/gear_presets/uscm_ship.dm +++ b/code/modules/gear_presets/uscm_ship.dm @@ -595,7 +595,6 @@ new_human.equip_to_slot_or_del(new /obj/item/device/binoculars/range(new_human), WEAR_L_HAND) /datum/equipment_preset/uscm_ship/so/handle_late_join(mob/living/carbon/human/new_human, late_join) - to_chat(world, "[new_human.name], [late_join ? "YES" : "NO"]") if(!late_join) add_verb(new_human.client, /client/proc/commander_rename_platoon) @@ -624,6 +623,10 @@ new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/general/large(new_human), WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/device/binoculars/range(new_human), WEAR_L_HAND) +/datum/equipment_preset/uscm_ship/so/upp/handle_late_join(mob/living/carbon/human/new_human, late_join) + if(!late_join) + add_verb(new_human.client, /client/proc/commander_rename_platoon) + /datum/equipment_preset/uscm_ship/so/upp/lesser_rank paygrade = "UO1" From 434c83cbe9df2213356346160da597c4b3ad9557 Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:41:06 +0300 Subject: [PATCH 4/8] 1 --- code/__DEFINES/__game.dm | 1 + code/_globalvars/global_lists.dm | 2 +- .../extra_buttons/rename_platoon.dm | 37 ++++++++++++++----- code/modules/client/preferences.dm | 2 +- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/code/__DEFINES/__game.dm b/code/__DEFINES/__game.dm index 385f884bb6..4782d9e743 100644 --- a/code/__DEFINES/__game.dm +++ b/code/__DEFINES/__game.dm @@ -557,3 +557,4 @@ #define DROPSHIP_CAMO_TAN "Tan" #define DROPSHIP_CAMO_NAVY "Navy" #define DROPSHIP_CAMO_URBAN "Urban" +#define DROPSHIP_CAMO_JUNGLE "Jungle" diff --git a/code/_globalvars/global_lists.dm b/code/_globalvars/global_lists.dm index 83057b4ee6..8d9d683318 100644 --- a/code/_globalvars/global_lists.dm +++ b/code/_globalvars/global_lists.dm @@ -213,7 +213,7 @@ GLOBAL_REFERENCE_LIST_INDEXED(hair_gradient_list, /datum/sprite_accessory/hair_g GLOBAL_REFERENCE_LIST_INDEXED(yautja_hair_styles_list, /datum/sprite_accessory/yautja_hair, name) //Dropship camos -GLOBAL_LIST_INIT(dropship_camos, list(DROPSHIP_CAMO_TAN, DROPSHIP_CAMO_NAVY, DROPSHIP_CAMO_URBAN)) +GLOBAL_LIST_INIT(dropship_camos, list(DROPSHIP_CAMO_TAN, DROPSHIP_CAMO_NAVY, DROPSHIP_CAMO_URBAN, DROPSHIP_CAMO_JUNGLE)) //Backpacks var/global/list/backbaglist = list("Backpack", "Satchel") 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 7476603491..067a437070 100644 --- a/code/modules/admin/game_master/extra_buttons/rename_platoon.dm +++ b/code/modules/admin/game_master/extra_buttons/rename_platoon.dm @@ -67,21 +67,40 @@ GLOBAL_VAR_INIT(main_platoon_initial_name, GLOB.main_platoon_name) /proc/change_dropship_camo(camo, mob/renamer) - var/icon_to_change + var/turf_icon + var/cargo_icon + var/cockpit_icon switch(camo) - if(DROPSHIP_CAMO_NAVY) - icon_to_change = 'icons/turf/dropship2.dmi' if(DROPSHIP_CAMO_TAN) - icon_to_change = 'icons/turf/dropship.dmi' + turf_icon = 'icons/turf/dropship.dmi' + cargo_icon = 'icons/obj/structures/doors/dropship1_cargo.dmi' + cockpit_icon = 'icons/obj/structures/doors/dropship1_pilot.dmi' + if(DROPSHIP_CAMO_NAVY) + turf_icon = 'icons/turf/dropship2.dmi' + cargo_icon = 'icons/obj/structures/doors/dropship2_cargo.dmi' + cockpit_icon = 'icons/obj/structures/doors/dropship2_pilot.dmi' if(DROPSHIP_CAMO_URBAN) - icon_to_change = 'icons/turf/dropship3.dmi' - + turf_icon = 'icons/turf/dropship3.dmi' + cargo_icon = 'icons/obj/structures/doors/dropship2_cargo.dmi' + cockpit_icon = 'icons/obj/structures/doors/dropship2_pilot.dmi' + if(DROPSHIP_CAMO_JUNGLE) + turf_icon = 'icons/turf/dropship4.dmi' + cargo_icon = 'icons/obj/structures/doors/dropship4_cargo.dmi' + cockpit_icon = 'icons/obj/structures/doors/dropship4_pilot.dmi' for(var/turf/closed/shuttle/midway/midway_turfs in world) if(istype(midway_turfs.loc, /area/shuttle/midway)) - midway_turfs.icon = icon_to_change - for(var/obj/structure/shuttle/part/dropship1/midway_parts in world) + midway_turfs.icon = turf_icon + for(var/obj/structure/shuttle/part/midway/midway_parts in world) var/turf/turf_to_check = get_turf(midway_parts) if(istype(turf_to_check.loc, /area/shuttle/midway)) - midway_parts.icon = icon_to_change + midway_parts.icon = turf_icon + for(var/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/cargo in world) + var/turf/turf_to_check = get_turf(cargo) + if(istype(turf_to_check.loc, /area/shuttle/midway)) + cargo.icon = cargo_icon + for(var/obj/structure/machinery/door/airlock/hatch/cockpit/cockpit in world) + var/turf/turf_to_check = get_turf(cockpit) + if(istype(turf_to_check.loc, /area/shuttle/midway)) + cockpit.icon = cockpit_icon diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 19d8d6a3e8..59dfda9833 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -248,7 +248,7 @@ var/const/MAX_SAVE_SLOTS = 10 /// Name for platoon used when spawning as LT var/platoon_name = "Sun Riders" /// Dropship camo used when spawning as LT - var/dropship_camo = DROPSHIP_CAMO_TAN + var/dropship_camo = DROPSHIP_CAMO_JUNGLE /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 From 8ba0a40a5dfb6b802973fcbe55bfaa5ce4431a23 Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Tue, 20 Aug 2024 21:12:30 +0300 Subject: [PATCH 5/8] Update chairs.dm --- code/game/objects/structures/stool_bed_chair_nest/chairs.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index ace85b2f23..956c902e96 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -397,6 +397,7 @@ /obj/structure/bed/chair/dropship/passenger/afterbuckle() + . = ..() if(buckled_mob) icon_state = initial(icon_state) + "_buckled" overlays += chairbar From 92a87df927bd750faa5f981230370bd561db6e9d Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Fri, 23 Aug 2024 13:52:27 +0300 Subject: [PATCH 6/8] YES.. --- code/controllers/subsystem/ticker.dm | 2 +- code/game/jobs/job/job.dm | 4 ++-- code/game/jobs/role_authority.dm | 12 ++++++------ code/modules/gear_presets/uscm_ship.dm | 10 ++++++---- code/modules/mob/new_player/new_player.dm | 2 +- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 886799be34..f7345fcc88 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -385,7 +385,7 @@ SUBSYSTEM_DEF(ticker) if(player.job == JOB_CO) captainless = FALSE if(player.job) - RoleAuthority.equip_role(player, RoleAuthority.roles_by_name[player.job], late_join = FALSE) + RoleAuthority.equip_role(player, RoleAuthority.roles_by_name[player.job], _late_join = FALSE) EquipCustomItems(player) if(player.client) var/client/C = player.client diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 103c826ce5..97317916af 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -286,12 +286,12 @@ human.job = title //TODO Why is this a mob variable at all? if(gear_preset_whitelist[job_whitelist]) - arm_equipment(human, gear_preset_whitelist[job_whitelist], FALSE, TRUE) + arm_equipment(human, gear_preset_whitelist[job_whitelist], FALSE, TRUE, late_join = FALSE) var/generated_account = generate_money_account(human) announce_entry_message(human, generated_account, whitelist_status) //Tell them their spawn info. generate_entry_conditions(human, whitelist_status) //Do any other thing that relates to their spawn. else - arm_equipment(human, gear_preset, FALSE, TRUE) //After we move them, we want to equip anything else they should have. + arm_equipment(human, gear_preset, FALSE, TRUE, FALSE) //After we move them, we want to equip anything else they should have. var/generated_account = generate_money_account(human) announce_entry_message(human, generated_account) //Tell them their spawn info. generate_entry_conditions(human) //Do any other thing that relates to their spawn. diff --git a/code/game/jobs/role_authority.dm b/code/game/jobs/role_authority.dm index af57c4323a..0674432c41 100644 --- a/code/game/jobs/role_authority.dm +++ b/code/game/jobs/role_authority.dm @@ -454,7 +454,7 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou M.job = null -/datum/authority/branch/role/proc/equip_role(mob/living/new_mob, datum/job/new_job, turf/late_join) +/datum/authority/branch/role/proc/equip_role(mob/living/new_mob, datum/job/new_job, _late_join) if(!istype(new_mob) || !istype(new_job)) return @@ -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, late_join) + arm_equipment(new_human, new_job.gear_preset_whitelist[job_whitelist], FALSE, TRUE, late_join = _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, late_join) //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 = _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. @@ -500,9 +500,9 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou if(human.assigned_squad) assigned_squad = human.assigned_squad.name - if(isturf(late_join)) - new_human.forceMove(late_join) - else if(late_join) + if(isturf(_late_join)) + new_human.forceMove(_late_join) + else if(_late_join) var/turf/late_join_turf if(GLOB.latejoin_by_squad[assigned_squad]) late_join_turf = get_turf(pick(GLOB.latejoin_by_squad[assigned_squad])) diff --git a/code/modules/gear_presets/uscm_ship.dm b/code/modules/gear_presets/uscm_ship.dm index e67512b961..4a4fb757b1 100644 --- a/code/modules/gear_presets/uscm_ship.dm +++ b/code/modules/gear_presets/uscm_ship.dm @@ -595,11 +595,13 @@ new_human.equip_to_slot_or_del(new /obj/item/device/binoculars/range(new_human), WEAR_L_HAND) /datum/equipment_preset/uscm_ship/so/handle_late_join(mob/living/carbon/human/new_human, late_join) - if(!late_join) - add_verb(new_human.client, /client/proc/commander_rename_platoon) + if(late_join) + return + + add_verb(new_human.client, /client/proc/commander_rename_platoon) - do_rename_platoon(new_human.client.prefs.platoon_name) - change_dropship_camo(new_human.client.prefs.dropship_camo) + do_rename_platoon(new_human.client.prefs.platoon_name) + change_dropship_camo(new_human.client.prefs.dropship_camo) /datum/equipment_preset/uscm_ship/so/lesser_rank paygrade = "MO1" diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 3e98167488..4124199191 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -245,7 +245,7 @@ close_spawn_windows() var/mob/living/carbon/human/character = create_character(TRUE) //creates the human and transfers vars and mind - RoleAuthority.equip_role(character, player_rank, late_join = TRUE) + RoleAuthority.equip_role(character, player_rank, _late_join = TRUE) EquipCustomItems(character) if((security_level > SEC_LEVEL_BLUE || SShijack.hijack_status) && player_rank.gets_emergency_kit) From 14501473128fed50c443072dba4c4933fa0afb8a Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Sat, 24 Aug 2024 23:45:09 +0300 Subject: [PATCH 7/8] no _late_join --- code/controllers/subsystem/ticker.dm | 2 +- code/game/jobs/role_authority.dm | 10 +++++----- code/modules/mob/new_player/new_player.dm | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index f7345fcc88..886799be34 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -385,7 +385,7 @@ SUBSYSTEM_DEF(ticker) if(player.job == JOB_CO) captainless = FALSE if(player.job) - RoleAuthority.equip_role(player, RoleAuthority.roles_by_name[player.job], _late_join = FALSE) + RoleAuthority.equip_role(player, RoleAuthority.roles_by_name[player.job], late_join = FALSE) EquipCustomItems(player) if(player.client) var/client/C = player.client diff --git a/code/game/jobs/role_authority.dm b/code/game/jobs/role_authority.dm index 0674432c41..48adcde63c 100644 --- a/code/game/jobs/role_authority.dm +++ b/code/game/jobs/role_authority.dm @@ -454,7 +454,7 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou M.job = null -/datum/authority/branch/role/proc/equip_role(mob/living/new_mob, datum/job/new_job, _late_join) +/datum/authority/branch/role/proc/equip_role(mob/living/new_mob, datum/job/new_job, late_join) if(!istype(new_mob) || !istype(new_job)) return @@ -482,7 +482,7 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou 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, late_join = _late_join) //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 = 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. @@ -500,9 +500,9 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou if(human.assigned_squad) assigned_squad = human.assigned_squad.name - if(isturf(_late_join)) - new_human.forceMove(_late_join) - else if(_late_join) + if(isturf(late_join)) + new_human.forceMove(late_join) + else if(late_join) var/turf/late_join_turf if(GLOB.latejoin_by_squad[assigned_squad]) late_join_turf = get_turf(pick(GLOB.latejoin_by_squad[assigned_squad])) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 4124199191..3e98167488 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -245,7 +245,7 @@ close_spawn_windows() var/mob/living/carbon/human/character = create_character(TRUE) //creates the human and transfers vars and mind - RoleAuthority.equip_role(character, player_rank, _late_join = TRUE) + RoleAuthority.equip_role(character, player_rank, late_join = TRUE) EquipCustomItems(character) if((security_level > SEC_LEVEL_BLUE || SShijack.hijack_status) && player_rank.gets_emergency_kit) From b15e3eec4c458c34a7e2f7813c5173ec9a8d3b38 Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Sat, 24 Aug 2024 23:48:49 +0300 Subject: [PATCH 8/8] Update role_authority.dm --- code/game/jobs/role_authority.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/jobs/role_authority.dm b/code/game/jobs/role_authority.dm index 48adcde63c..b5f2a2d5cb 100644 --- a/code/game/jobs/role_authority.dm +++ b/code/game/jobs/role_authority.dm @@ -477,7 +477,7 @@ 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, late_join = _late_join) + arm_equipment(new_human, new_job.gear_preset_whitelist[job_whitelist], FALSE, TRUE, late_join = 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.