mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 12:02:31 +01:00
More gear tweak pain (#18607)
* sdfa * sfda * just to be safe, add some html strips guards to text inputs
This commit is contained in:
@@ -69,7 +69,7 @@ var/datum/gear_tweak/lipstick_application/gear_tweak_lipstick_application = new(
|
||||
return "No"
|
||||
|
||||
/datum/gear_tweak/lipstick_application/get_metadata(var/user, var/metadata, var/title = "Character Preference")
|
||||
var/selected_lipstick = input(user, "Do you want your character to start with lipstick applied?", title, metadata) as null|anything in list("Yes", "No")
|
||||
var/selected_lipstick = tgui_input_list(user, "Do you want your character to start with lipstick applied?", title, list("Yes", "No"), metadata)
|
||||
if(selected_lipstick)
|
||||
return selected_lipstick
|
||||
|
||||
|
||||
@@ -479,7 +479,7 @@ var/datum/gear_tweak/hair_block/gear_tweak_hair_block = new()
|
||||
return "Default"
|
||||
|
||||
/datum/gear_tweak/hair_block/get_metadata(var/user, var/metadata)
|
||||
return input(user, "Choose whether you want your headgear to block hair, or use the headgear's default.", "Hair Blocking", metadata) as anything in list("Yes", "No", "Default")
|
||||
return tgui_input_list(user, "Choose whether you want your headgear to block hair, or use the headgear's default.", "Hair Blocking", list("Yes", "No", "Default"), metadata)
|
||||
|
||||
/datum/gear_tweak/hair_block/tweak_item(var/obj/item/clothing/head/H, var/metadata)
|
||||
if(!istype(H))
|
||||
|
||||
@@ -175,7 +175,7 @@ var/datum/gear_tweak/shoe_layer/gear_tweak_shoe_layer = new()
|
||||
return "Over"
|
||||
|
||||
/datum/gear_tweak/shoe_layer/get_metadata(var/user, var/metadata)
|
||||
return input(user, "Choose whether you want the shoe to go over or under the uniform.", "Shoe Layer", metadata) as anything in list("Over", "Under")
|
||||
return tgui_input_list(user, "Choose whether you want the shoe to go over or under the uniform.", "Shoe Layer", list("Over", "Under"), metadata)
|
||||
|
||||
/datum/gear_tweak/shoe_layer/tweak_item(var/obj/item/clothing/shoes/S, var/metadata)
|
||||
if(!istype(S))
|
||||
|
||||
@@ -470,7 +470,8 @@ var/datum/gear_tweak/uniform_rolled_state/gear_tweak_uniform_rolled_state = new(
|
||||
if(rolled_down_state != -1 || ("[initial(uniform.icon_state)]_d[initial(uniform.contained_sprite) ? "_un" : "_s"]" in icon_states(under_icon)))
|
||||
possible_states += UNIFORM_ROLLED_DOWN
|
||||
|
||||
var/input = input(user, "Choose in which state you want your uniform to spawn in.", "Uniform State", metadata) as null|anything in possible_states
|
||||
var/input = tgui_input_list(user, "Choose in which state you want your uniform to spawn in.", "Uniform State", possible_states, metadata)
|
||||
|
||||
if(!input)
|
||||
input = metadata
|
||||
return input
|
||||
|
||||
@@ -257,7 +257,7 @@ var/datum/gear_tweak/social_credit/social_credit_tweak = new()
|
||||
return 5
|
||||
|
||||
/datum/gear_tweak/social_credit/get_metadata(var/user, var/metadata)
|
||||
var/credit_score = input(user, "Set the credit score your passport will display, refer to the wiki to gauge it. (It will be slightly randomized to simulate Nralakk calculations.)", "Social Credit Score") as null|num
|
||||
var/credit_score = tgui_input_number(user, "Set the credit score your passport will display, refer to the wiki to gauge it. (It will be slightly randomized to simulate Nralakk calculations.)", "Social Credit Score", round_value = FALSE)
|
||||
if(credit_score)
|
||||
return round(credit_score, 0.01)
|
||||
return metadata
|
||||
|
||||
Reference in New Issue
Block a user