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] 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"