Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
AndroBetel committed Aug 19, 2024
1 parent 7d913c8 commit aaee376
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 1 deletion.
5 changes: 5 additions & 0 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 3 additions & 0 deletions code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
21 changes: 21 additions & 0 deletions code/modules/admin/game_master/extra_buttons/rename_platoon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -441,6 +444,7 @@ var/const/MAX_SAVE_SLOTS = 10
dat += "<div id='column1'>"
dat += "<h2><b><u>Platoon Settings:</u></b></h2>"
dat += "<b>Platoon Name:</b> <a href='?_src_=prefs;preference=plat_name;task=input'><b>[platoon_name]</b></a><br>"
dat += "<b>Dropship Camo:</b> <a href='?_src_=prefs;preference=dropship_camo;task=input'><b>[dropship_camo]</b></a><br>"
dat += "</div>"

if(MENU_XENOMORPH)
Expand Down Expand Up @@ -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.)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions code/modules/gear_presets/uscm_ship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit aaee376

Please sign in to comment.