mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] remove old inputs (#10038)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f3ebea3af1
commit
965f8f4a61
@@ -59,7 +59,7 @@
|
||||
to_chat(user, span_danger("You are banned from playing a Genaprawn.")) //CHOMPedit
|
||||
return
|
||||
|
||||
var/confirm = alert(user, "Are you sure you want to join as a Genaprawn larva?", "Become Larva", "No", "Yes") //CHOMPedit
|
||||
var/confirm = tgui_alert(user, "Are you sure you want to join as a Genaprawn larva?", "Become Larva", list("No", "Yes")) //CHOMPedit
|
||||
|
||||
if(!src || confirm != "Yes")
|
||||
return
|
||||
|
||||
@@ -60,12 +60,16 @@
|
||||
colourName = "rainbow"
|
||||
uses = 0
|
||||
|
||||
/obj/item/pen/crayon/rainbow/attack_self(mob/living/user as mob)
|
||||
colour = input(user, "Please select the main colour.", "Crayon colour") as color
|
||||
shadeColour = input(user, "Please select the shade colour.", "Crayon colour") as color
|
||||
/obj/item/pen/crayon/rainbow/attack_self(mob/living/user)
|
||||
var/new_colour = tgui_color_picker(user, "Please select the main colour.", "Crayon colour", colour)
|
||||
if(new_colour)
|
||||
colour = new_colour
|
||||
new_colour = tgui_color_picker(user, "Please select the shade colour.", "Crayon shade colour", shadeColour)
|
||||
if(new_colour)
|
||||
shadeColour = new_colour
|
||||
return
|
||||
|
||||
/obj/item/pen/crayon/afterattack(atom/target, mob/user as mob, proximity, click_parameters) // CHOMPEdit - Click parameters
|
||||
/obj/item/pen/crayon/afterattack(atom/target, mob/user, proximity, click_parameters) // CHOMPEdit - Click parameters
|
||||
if(!proximity) return
|
||||
if(istype(target,/turf/simulated/floor))
|
||||
var/drawtype = tgui_input_list(user, "Choose what you'd like to draw.", "Crayon scribbles", list("graffiti","rune","letter","arrow"))
|
||||
@@ -186,7 +190,7 @@
|
||||
colourName = "mime"
|
||||
uses = 0
|
||||
|
||||
/obj/item/pen/crayon/marker/mime/attack_self(mob/living/user as mob) //inversion
|
||||
/obj/item/pen/crayon/marker/mime/attack_self(mob/living/user) //inversion
|
||||
if(colour != "#FFFFFF" && shadeColour != "#000000")
|
||||
colour = "#FFFFFF"
|
||||
shadeColour = "#000000"
|
||||
@@ -204,12 +208,16 @@
|
||||
colourName = "rainbow"
|
||||
uses = 0
|
||||
|
||||
/obj/item/pen/crayon/marker/rainbow/attack_self(mob/living/user as mob)
|
||||
colour = input(user, "Please select the main colour.", "Marker colour") as color
|
||||
shadeColour = input(user, "Please select the shade colour.", "Marker colour") as color
|
||||
/obj/item/pen/crayon/marker/rainbow/attack_self(mob/living/user)
|
||||
var/new_colour = tgui_color_picker(user, "Please select the main colour.", "Marker colour", colour)
|
||||
if(new_colour)
|
||||
colour = new_colour
|
||||
new_colour = tgui_color_picker(user, "Please select the shade colour.", "Marker colour", shadeColour)
|
||||
if(new_colour)
|
||||
shadeColour = new_colour
|
||||
return
|
||||
|
||||
/obj/item/pen/crayon/marker/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
/obj/item/pen/crayon/marker/attack(mob/living/M, mob/living/user)
|
||||
if(M == user)
|
||||
to_chat(user, "You take a bite of the marker and swallow it.")
|
||||
user.nutrition += 1
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(!istype(user)) // Ref no longer valid
|
||||
return
|
||||
|
||||
var/newVal = input(user, "Input a new [href_list["signaler_value"]].", href_list["signaler_value"], (href_list["signaler_value"] == "Code" ? S.code : S.frequency)) as num|null
|
||||
var/newVal = tgui_input_number(user, "Input a new [href_list["signaler_value"]].", href_list["signaler_value"], (href_list["signaler_value"] == "Code" ? S.code : S.frequency), round_value=FALSE)
|
||||
if(newVal)
|
||||
switch(href_list["signaler_value"])
|
||||
if("Code")
|
||||
@@ -99,7 +99,7 @@
|
||||
if(!istype(user)) // Ref no longer valid
|
||||
return
|
||||
|
||||
var/newTag = input(user, "Please enter desired tag.", G.tag) as text|null
|
||||
var/newTag = tgui_input_text(user, "Please enter desired tag.", "Name Tag", G.tag)
|
||||
|
||||
if(newTag)
|
||||
G.tag = newTag
|
||||
@@ -133,7 +133,7 @@
|
||||
return
|
||||
|
||||
var/timeout = world.time + 600
|
||||
var/reason = sanitize(input(user, "Reason:","Why do you require this item?","") as null|text)
|
||||
var/reason = sanitize(tgui_input_text(user, "Reason:","Why do you require this item?",""))
|
||||
if(world.time > timeout)
|
||||
to_chat(user, span_warning("Error. Request timed out."))
|
||||
return
|
||||
@@ -155,7 +155,7 @@
|
||||
return
|
||||
|
||||
if(href_list["edit"])
|
||||
var/new_val = sanitize(input(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]) as null|text)
|
||||
var/new_val = sanitize(tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]))
|
||||
if(!new_val)
|
||||
return
|
||||
|
||||
@@ -219,9 +219,9 @@
|
||||
var/list/L = E.contents[href_list["index"]]
|
||||
|
||||
if(href_list["edit"])
|
||||
var/field = alert(user, "Select which field to edit", , "Name", "Quantity", "Value")
|
||||
var/field = tgui_alert(user, "Select which field to edit", "Field?", list("Name", "Quantity", "Value"))
|
||||
|
||||
var/new_val = sanitize(input(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]) as null|text)
|
||||
var/new_val = sanitize(tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]))
|
||||
if(!new_val)
|
||||
return
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
// Else clause means they're editing/deleting the whole export report, rather than a specific item in it
|
||||
else if(href_list["edit"])
|
||||
var/new_val = sanitize(input(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]) as null|text)
|
||||
var/new_val = sanitize(tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]))
|
||||
if(!new_val)
|
||||
return
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
post_status("alert", href_list["alert"])
|
||||
internal_data["stat_display_special"] = href_list["alert"]
|
||||
if("setmsg")
|
||||
internal_data["stat_display_line[href_list["line"]]"] = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", internal_data["stat_display_line[href_list["line"]]"]) as text|null, 40), 40)
|
||||
internal_data["stat_display_line[href_list["line"]]"] = reject_bad_text(sanitize(tgui_input_text(usr, "Line 1", "Enter Message Text", internal_data["stat_display_line[href_list["line"]]"], 40), 40), 40)
|
||||
else
|
||||
post_status(href_list["stat_display"])
|
||||
internal_data["stat_display_special"] = href_list["stat_display"]
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
desc = "[initial(desc)] This one is assigned to [user.real_name]."
|
||||
named = 1
|
||||
/* //Another way of naming the device. Gives more freedom, but could lead to issues.
|
||||
device_name = copytext(sanitize(input(user, "What would you like to name your device? You must input a name before the device can be used.", "Name your device", "") as null|text),1,MAX_NAME_LEN)
|
||||
device_name = sanitize(tgui_input_text(user, "What would you like to name your device? You must input a name before the device can be used.", "Name your device", "", MAX_NAME_LEN))
|
||||
if(!device_name)
|
||||
return
|
||||
name = "[initial(name)] - [device_name]"
|
||||
named = 1
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
options["Jackhammer Revolver Shotgun (12 Gauge)"] = list(/obj/item/gun/projectile/revolvershotgun, /obj/item/ammo_magazine/m12gdrumjack, /obj/item/ammo_magazine/m12gdrumjack, /obj/item/ammo_magazine/m12gdrumjack/beanbag)
|
||||
options["WT550 Machine Pistol (9mm)"] = list(/obj/item/gun/projectile/automatic/wt550, /obj/item/ammo_magazine/m9mmt/rubber, /obj/item/ammo_magazine/m9mmt, /obj/item/ammo_magazine/m9mmt)
|
||||
options["X01 Energy Gun (Weapon Cell)"] = list(/obj/item/gun/energy/x01, /obj/item/cell/device/weapon, /obj/item/cell/device/weapon)
|
||||
var/choice = input(user,"Would you prefer a Jackhammer shotgun, a WT550 Machine Pistol, or an X01 Energy Gun?") as null|anything in options
|
||||
var/choice = tgui_input_list(user,"Would you prefer a Jackhammer shotgun, a WT550 Machine Pistol, or an X01 Energy Gun?", "Choose Weapon", options)
|
||||
if(src && choice)
|
||||
var/list/things_to_spawn = options[choice]
|
||||
for(var/new_type in things_to_spawn) // Spawn all the things, the gun and the ammo.
|
||||
@@ -29,11 +29,11 @@
|
||||
options["NSCW Variable Pistol(Microbattery)"] = list(/obj/item/storage/secure/briefcase/nsfw_pack_hos)
|
||||
options["E-Gun (Weapon Cell)"] = list(/obj/item/gun/energy/gun, /obj/item/cell/device/weapon, /obj/item/cell/device/weapon)
|
||||
options["Consul Revolver (.44)"] = list(/obj/item/gun/projectile/revolver/consul, /obj/item/ammo_magazine/s44, /obj/item/ammo_magazine/s44, /obj/item/ammo_magazine/s44/rubber)
|
||||
var/choice = input(user,"Would you prefer an NSCW, e-gun or a revolver?") as null|anything in options
|
||||
var/choice = tgui_input_list(user,"Would you prefer an NSCW, e-gun or a revolver?", "Choose Weapon", options)
|
||||
if(src && choice)
|
||||
var/list/things_to_spawn = options[choice]
|
||||
for(var/new_type in things_to_spawn) // Spawn all the things, the gun and the ammo.
|
||||
var/atom/movable/AM = new new_type(get_turf(src))
|
||||
if(istype(AM, /obj/item/gun))
|
||||
to_chat(user, "You have chosen \the [AM].")
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
var/choice = tgui_alert(user, "Adjusting the base color of this canvas will replace ALL pixels with the selected color. Are you sure?", "Confirm Color Fill", list("Yes", "No"))
|
||||
if(choice != "Yes")
|
||||
return
|
||||
var/basecolor = input(user, "Select a base color for the canvas:", "Base Color", canvas_color) as null|color
|
||||
var/basecolor = tgui_color_picker(user, "Select a base color for the canvas:", "Base Color", canvas_color)
|
||||
if(basecolor && Adjacent(user) && user.get_active_hand() == I)
|
||||
canvas_color = basecolor
|
||||
reset_grid()
|
||||
@@ -215,7 +215,7 @@
|
||||
return canvas_color
|
||||
|
||||
/obj/item/canvas/proc/try_rename(mob/user)
|
||||
var/new_name = stripped_input(user,"What do you want to name the painting?", max_length = 250)
|
||||
var/new_name = tgui_input_text(user,"What do you want to name the painting?", max_length = 250, encode=TRUE)
|
||||
if(new_name != painting_name && new_name && CanUseTopic(user, GLOB.tgui_physical_state))
|
||||
painting_name = new_name
|
||||
SStgui.update_uis(src)
|
||||
@@ -306,7 +306,7 @@
|
||||
/obj/item/paint_palette/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/paint_brush))
|
||||
var/obj/item/paint_brush/P = W
|
||||
var/newcolor = input(user, "Select a new paint color:", "Paint Palette", P.selected_color) as null|color
|
||||
var/newcolor = tgui_color_picker(user, "Select a new paint color:", "Paint Palette", P.selected_color)
|
||||
if(newcolor && Adjacent(user, P) && Adjacent(user, src))
|
||||
P.update_paint(newcolor)
|
||||
else
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
if (!can_rotate || admin)
|
||||
to_chat(user, span_warning("The rotation is locked!"))
|
||||
return FALSE
|
||||
var/new_angle = input(user, "Input a new angle for primary reflection face.", "Reflector Angle", rotation_angle) as null|num
|
||||
var/new_angle = tgui_input_number(user, "Input a new angle for primary reflection face.", "Reflector Angle", rotation_angle, 360, -360)
|
||||
if(!CanUseTopic(user))
|
||||
return
|
||||
if(!isnull(new_angle))
|
||||
|
||||
@@ -620,7 +620,7 @@
|
||||
// Otherwise fall back to asking them... and remind them what the current ID is.
|
||||
if(id)
|
||||
to_chat(user, "The window's current ID is [id].")
|
||||
var/t = sanitizeSafe(input(user, "Enter the new ID for the window.", src.name, null), MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(tgui_input_text(user, "Enter the new ID for the window.", src.name, id), MAX_NAME_LEN)
|
||||
if(t && in_range(src, user))
|
||||
src.id = t
|
||||
to_chat(user, span_notice("The new ID of \the [src] is '[id]'."))
|
||||
|
||||
Reference in New Issue
Block a user