Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
AndroBetel committed Aug 22, 2024
1 parent 32578a7 commit 2d33e72
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
4 changes: 2 additions & 2 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ var/const/MAX_SAVE_SLOTS = 10
if("underwear")
var/list/underwear_options = gender == MALE ? GLOB.underwear_m : GLOB.underwear_f
var/old_gender = gender
var/new_underwear = tgui_input_list(user, "Choose your character's underwear:", "Character Preference", underwear_options)
var/new_underwear = tgui_input_list(user, "Choose your character's underwear:", "Character Preference", underwear_options-GLOB.underwear_restricted)
if(old_gender != gender)
return
if(new_underwear)
Expand All @@ -1604,7 +1604,7 @@ var/const/MAX_SAVE_SLOTS = 10
if("undershirt")
var/list/undershirt_options = gender == MALE ? GLOB.undershirt_m : GLOB.undershirt_f
var/old_gender = gender
var/new_undershirt = tgui_input_list(user, "Choose your character's undershirt:", "Character Preference", undershirt_options)
var/new_undershirt = tgui_input_list(user, "Choose your character's undershirt:", "Character Preference", undershirt_options-GLOB.undershirt_restricted)
if(old_gender != gender)
return
if(new_undershirt)
Expand Down
13 changes: 12 additions & 1 deletion code/modules/mob/new_player/sprite_accessories/undershirt.dm
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
GLOBAL_LIST_INIT_TYPED(undershirt_m, /datum/sprite_accessory/undershirt, setup_undershirt(MALE))
GLOBAL_LIST_INIT_TYPED(undershirt_f, /datum/sprite_accessory/undershirt, setup_undershirt(FEMALE))
GLOBAL_LIST_INIT_TYPED(undershirt_restricted, /datum/sprite_accessory/undershirt, setup_undershirt(null, TRUE))

/proc/setup_undershirt(restricted_gender)
/proc/setup_undershirt(restricted_gender, restricted)
var/list/undershirt_list = list()
for(var/undershirt_type in subtypesof(/datum/sprite_accessory/undershirt))
var/datum/sprite_accessory/undershirt/undershirt_datum = new undershirt_type
if(restricted_gender && undershirt_datum.gender != restricted_gender && (undershirt_datum.gender == MALE || undershirt_datum.gender == FEMALE))
continue
if(restricted && !undershirt_datum.restricted)
continue
if(undershirt_datum.camo_conforming)
undershirt_list["[undershirt_datum.name] (Camo Conforming)"] = undershirt_datum
var/datum/sprite_accessory/undershirt/classic_datum = new undershirt_type
Expand All @@ -28,6 +31,7 @@ GLOBAL_LIST_INIT_TYPED(undershirt_f, /datum/sprite_accessory/undershirt, setup_u
/datum/sprite_accessory/undershirt
icon = 'icons/mob/humans/undershirt.dmi'
var/camo_conforming = FALSE
var/restricted = FALSE

/datum/sprite_accessory/undershirt/proc/get_image(mob_gender)
var/selected_icon_state = icon_state
Expand Down Expand Up @@ -117,3 +121,10 @@ GLOBAL_LIST_INIT_TYPED(undershirt_f, /datum/sprite_accessory/undershirt, setup_u
icon_state = "strapless"
gender = FEMALE
camo_conforming = TRUE

// Restricted
/datum/sprite_accessory/undershirt/telnyashka
name = "Telnyashka"
icon_state = "telnyashka"
gender = NEUTER
restricted = TRUE
7 changes: 6 additions & 1 deletion code/modules/mob/new_player/sprite_accessories/underwear.dm
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
GLOBAL_LIST_INIT_TYPED(underwear_m, /datum/sprite_accessory/underwear, setup_underwear(MALE))
GLOBAL_LIST_INIT_TYPED(underwear_f, /datum/sprite_accessory/underwear, setup_underwear(FEMALE))
GLOBAL_LIST_INIT_TYPED(underwear_restricted, /datum/sprite_accessory/underwear, setup_underwear(null, TRUE))

/proc/setup_underwear(restricted_gender)

/proc/setup_underwear(restricted_gender, restricted)
var/list/underwear_list = list()
for(var/underwear_type in subtypesof(/datum/sprite_accessory/underwear))
var/datum/sprite_accessory/underwear/underwear_datum = new underwear_type
if(restricted_gender && underwear_datum.gender != restricted_gender && (underwear_datum.gender == MALE || underwear_datum.gender == FEMALE))
continue
if(restricted && !underwear_datum.restricted)
continue
if(underwear_datum.camo_conforming)
underwear_list["[underwear_datum.name] (Camo Conforming)"] = underwear_datum
var/datum/sprite_accessory/underwear/classic_datum = new underwear_type
Expand All @@ -28,6 +32,7 @@ GLOBAL_LIST_INIT_TYPED(underwear_f, /datum/sprite_accessory/underwear, setup_und
/datum/sprite_accessory/underwear
icon = 'icons/mob/humans/underwear.dmi'
var/camo_conforming = FALSE
var/restricted = FALSE

/datum/sprite_accessory/underwear/proc/get_image(mob_gender)
var/selected_icon_state = icon_state
Expand Down
Binary file modified icons/mob/humans/undershirt.dmi
Binary file not shown.

0 comments on commit 2d33e72

Please sign in to comment.