mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge branch 'master' into upstream-merge-13122
This commit is contained in:
@@ -491,7 +491,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
usr << browse(dat.Join(), "window=ahelp[id];size=620x480")
|
||||
|
||||
/datum/admin_help/proc/Retitle()
|
||||
var/new_title = input(usr, "Enter a title for the ticket", "Rename Ticket", name) as text|null
|
||||
var/new_title = tgui_input_text(usr, "Enter a title for the ticket", "Rename Ticket", name)
|
||||
if(new_title)
|
||||
name = new_title
|
||||
//not saying the original name cause it could be a long ass message
|
||||
|
||||
@@ -210,13 +210,13 @@
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(isnull(tx))
|
||||
tx = input(usr, "Select X coordinate", "Move Atom", null, null) as null|num
|
||||
tx = tgui_input_number(usr, "Select X coordinate", "Move Atom", null, null)
|
||||
if(!tx) return
|
||||
if(isnull(ty))
|
||||
ty = input(usr, "Select Y coordinate", "Move Atom", null, null) as null|num
|
||||
ty = tgui_input_number(usr, "Select Y coordinate", "Move Atom", null, null)
|
||||
if(!ty) return
|
||||
if(isnull(tz))
|
||||
tz = input(usr, "Select Z coordinate", "Move Atom", null, null) as null|num
|
||||
tz = tgui_input_number(usr, "Select Z coordinate", "Move Atom", null, null)
|
||||
if(!tz) return
|
||||
var/turf/T = locate(tx, ty, tz)
|
||||
if(!T)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
if(AH)
|
||||
message_admins("<span class='pm'>[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help.</span>")
|
||||
var/msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null
|
||||
var/msg = tgui_input_text(src,"Message:", "Private message to [key_name(C, 0, 0)]")
|
||||
if (!msg)
|
||||
message_admins("<span class='pm'>[key_name_admin(src)] has cancelled their reply to [key_name(C, 0, 0)]'s admin help.</span>")
|
||||
return
|
||||
@@ -92,7 +92,7 @@
|
||||
if(!ircreplyamount) //to prevent people from spamming irc
|
||||
return
|
||||
if(!msg)
|
||||
msg = input(src,"Message:", "Private message to Administrator") as text|null
|
||||
msg = tgui_input_text(src,"Message:", "Private message to Administrator")
|
||||
|
||||
if(!msg)
|
||||
return
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
//get message text, limit it's length.and clean/escape html
|
||||
if(!msg)
|
||||
msg = input(src,"Message:", "Private message to [key_name(recipient, 0, 0)]") as text|null
|
||||
msg = tgui_input_text(src,"Message:", "Private message to [key_name(recipient, 0, 0)]")
|
||||
|
||||
if(!msg)
|
||||
return
|
||||
@@ -188,7 +188,7 @@
|
||||
spawn() //so we don't hold the caller proc up
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
var/reply = input(recipient, msg,"Admin PM from-[sendername]", "") as text|null //show message and await a reply
|
||||
var/reply = tgui_input_text(recipient, msg,"Admin PM from-[sendername]", "") //show message and await a reply
|
||||
if(recipient && reply)
|
||||
if(sender)
|
||||
recipient.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
|
||||
|
||||
@@ -257,16 +257,16 @@
|
||||
if(BUILDMODE_EDIT)
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
|
||||
|
||||
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
|
||||
master.buildmode.varholder = tgui_input_text(usr,"Enter variable name:" ,"Name", "name")
|
||||
if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0))
|
||||
return 1
|
||||
var/thetype = tgui_input_list(usr,"Select variable type:", "Type", list("text","number","mob-reference","obj-reference","turf-reference"))
|
||||
if(!thetype) return 1
|
||||
switch(thetype)
|
||||
if("text")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", "value") as text
|
||||
master.buildmode.valueholder = tgui_input_text(usr,"Enter variable value:" ,"Value", "value")
|
||||
if("number")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
|
||||
master.buildmode.valueholder = tgui_input_number(usr,"Enter variable value:" ,"Value", 123)
|
||||
if("mob-reference")
|
||||
master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", mob_list)
|
||||
if("obj-reference")
|
||||
@@ -286,11 +286,11 @@
|
||||
var/choice = tgui_alert(usr, "Change the new light range, power, or color?", "Light Maker", list("Range", "Power", "Color"))
|
||||
switch(choice)
|
||||
if("Range")
|
||||
var/input = input(usr, "New light range.","Light Maker",3) as null|num
|
||||
var/input = tgui_input_number(usr, "New light range.","Light Maker",3)
|
||||
if(input)
|
||||
new_light_range = input
|
||||
if("Power")
|
||||
var/input = input(usr, "New light power.","Light Maker",3) as null|num
|
||||
var/input = tgui_input_number(usr, "New light power.","Light Maker",3)
|
||||
if(input)
|
||||
new_light_intensity = input
|
||||
if("Color")
|
||||
@@ -625,7 +625,7 @@
|
||||
return
|
||||
|
||||
/obj/effect/bmode/buildmode/proc/get_path_from_partial_text(default_path)
|
||||
var/desired_path = input(usr, "Enter full or partial typepath.","Typepath","[default_path]")
|
||||
var/desired_path = tgui_input_text(usr, "Enter full or partial typepath.","Typepath","[default_path]")
|
||||
|
||||
var/list/types = typesof(/atom)
|
||||
var/list/matches = list()
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
M.g_skin = hex2num(copytext(new_skin, 4, 6))
|
||||
M.b_skin = hex2num(copytext(new_skin, 6, 8))
|
||||
|
||||
var/new_tone = input(usr, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text
|
||||
var/new_tone = tgui_input_number(usr, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", null, 220, 1)
|
||||
|
||||
if (new_tone)
|
||||
M.s_tone = max(min(round(text2num(new_tone)), 220), 1)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
if("explosion")
|
||||
if(tgui_alert(usr, "The game will be over. Are you really sure?", "Confirmation", list("Continue","Cancel")) == "Cancel")
|
||||
return
|
||||
var/parameter = input(src,"station_missed = ?","Enter Parameter",0) as num
|
||||
var/parameter = tgui_input_number(src,"station_missed = ?","Enter Parameter",0,1,0)
|
||||
var/override
|
||||
switch(parameter)
|
||||
if(1)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
if(tgui_alert(pai, "Do you want to load your pAI data?", "Load", list("Yes", "No")) == "Yes")
|
||||
pai.savefile_load(pai)
|
||||
else
|
||||
pai.name = sanitizeSafe(input(pai, "Enter your pAI name:", "pAI Name", "Personal AI") as text)
|
||||
pai.name = sanitizeSafe(tgui_input_text(pai, "Enter your pAI name:", "pAI Name", "Personal AI"))
|
||||
card.setPersonality(pai)
|
||||
for(var/datum/paiCandidate/candidate in paiController.pai_candidates)
|
||||
if(candidate.key == choice.key)
|
||||
@@ -662,9 +662,9 @@
|
||||
var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to modify time on?", "Change Time", SSplanets.planets)
|
||||
if(istype(planet))
|
||||
var/datum/time/current_time_datum = planet.current_time
|
||||
var/new_hour = input(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh"))) as null|num
|
||||
var/new_hour = tgui_input_number(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh")))
|
||||
if(!isnull(new_hour))
|
||||
var/new_minute = input(usr, "What minute do you want to change to?", "Change Time", text2num(current_time_datum.show_time("mm")) ) as null|num
|
||||
var/new_minute = tgui_input_number(usr, "What minute do you want to change to?", "Change Time", text2num(current_time_datum.show_time("mm")) )
|
||||
if(!isnull(new_minute))
|
||||
var/type_needed = current_time_datum.type
|
||||
var/datum/time/new_time = new type_needed()
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
set desc = "This searches all the active jobban entries for the current round and outputs the results to standard output."
|
||||
set category = "Debug"
|
||||
|
||||
var/job_filter = input(usr, "Contains what?","Job Filter") as text|null
|
||||
var/job_filter = tgui_input_text(usr, "Contains what?","Job Filter")
|
||||
if(!job_filter)
|
||||
return
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/sum = input(usr, "How many times should we throw?") as num
|
||||
var/side = input(usr, "Select the number of sides.") as num
|
||||
var/sum = tgui_input_number(usr, "How many times should we throw?")
|
||||
var/side = tgui_input_number(usr, "Select the number of sides.")
|
||||
if(!side)
|
||||
side = 6
|
||||
if(!sum)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
var/new_fps = round(input(usr, "Sets game frames-per-second. Can potentially break the game (default: [config.fps])", "FPS", world.fps) as num|null)
|
||||
var/new_fps = round(tgui_input_number(usr, "Sets game frames-per-second. Can potentially break the game (default: [config.fps])", "FPS", world.fps))
|
||||
if(new_fps <= 0)
|
||||
to_chat(src, "<span class='danger'>Error: set_server_fps(): Invalid world.fps value. No changes made.</span>")
|
||||
return
|
||||
|
||||
@@ -279,13 +279,13 @@ var/list/debug_verbs = list (
|
||||
/client/proc/count_objects_on_z_level()
|
||||
set category = "Mapping"
|
||||
set name = "Count Objects On Level"
|
||||
var/level = input(usr, "Which z-level?","Level?") as text
|
||||
var/level = tgui_input_text(usr, "Which z-level?","Level?")
|
||||
if(!level) return
|
||||
var/num_level = text2num(level)
|
||||
if(!num_level) return
|
||||
if(!isnum(num_level)) return
|
||||
|
||||
var/type_text = input(usr, "Which type path?","Path?") as text
|
||||
var/type_text = tgui_input_text(usr, "Which type path?","Path?")
|
||||
if(!type_text) return
|
||||
var/type_path = text2path(type_text)
|
||||
if(!type_path) return
|
||||
@@ -323,7 +323,7 @@ var/list/debug_verbs = list (
|
||||
set category = "Mapping"
|
||||
set name = "Count Objects All"
|
||||
|
||||
var/type_text = input(usr, "Which type path?","") as text
|
||||
var/type_text = tgui_input_text(usr, "Which type path?","")
|
||||
if(!type_text) return
|
||||
var/type_path = text2path(type_text)
|
||||
if(!type_path) return
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
if (!holder)
|
||||
return
|
||||
|
||||
var/msg = sanitize(input(usr, "Message:", text("Subtle PM to [M.key]")) as text)
|
||||
var/msg = sanitize(tgui_input_text(usr, "Message:", text("Subtle PM to [M.key]")))
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
@@ -108,7 +108,7 @@
|
||||
if (!holder)
|
||||
return
|
||||
|
||||
var/msg = input(usr, "Message:", text("Enter the text you wish to appear to everyone:")) as text
|
||||
var/msg = tgui_input_text(usr, "Message:", text("Enter the text you wish to appear to everyone:"))
|
||||
if(!(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
|
||||
msg = sanitize(msg)
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
if(!M)
|
||||
return
|
||||
|
||||
var/msg = input(usr, "Message:", text("Enter the text you wish to appear to your target:")) as text
|
||||
var/msg = tgui_input_text(usr, "Message:", text("Enter the text you wish to appear to your target:"))
|
||||
if(msg && !(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
|
||||
msg = sanitize(msg)
|
||||
|
||||
@@ -575,7 +575,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
var/input = sanitize(input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null)
|
||||
var/input = sanitize(tgui_input_text(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", ""))
|
||||
if(!input)
|
||||
return
|
||||
for(var/mob/living/silicon/ai/M in mob_list)
|
||||
@@ -627,8 +627,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
var/input = sanitize(input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null, extra = 0)
|
||||
var/customname = sanitizeSafe(input(usr, "Pick a title for the report.", "Title") as text|null)
|
||||
var/input = sanitize(tgui_input_text(usr, "Please enter anything you want. Anything. Serious.", "What?", "", multiline = TRUE), extra = 0)
|
||||
var/customname = sanitizeSafe(tgui_input_text(usr, "Pick a title for the report.", "Title"))
|
||||
if(!input)
|
||||
return
|
||||
if(!customname)
|
||||
@@ -675,13 +675,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
if(!check_rights(R_DEBUG|R_FUN)) return //VOREStation Edit
|
||||
|
||||
var/devastation = input(usr, "Range of total devastation. -1 to none", text("Input")) as num|null
|
||||
var/devastation = tgui_input_number(usr, "Range of total devastation. -1 to none", text("Input"))
|
||||
if(devastation == null) return
|
||||
var/heavy = input(usr, "Range of heavy impact. -1 to none", text("Input")) as num|null
|
||||
var/heavy = tgui_input_number(usr, "Range of heavy impact. -1 to none", text("Input"))
|
||||
if(heavy == null) return
|
||||
var/light = input(usr, "Range of light impact. -1 to none", text("Input")) as num|null
|
||||
var/light = tgui_input_number(usr, "Range of light impact. -1 to none", text("Input"))
|
||||
if(light == null) return
|
||||
var/flash = input(usr, "Range of flash. -1 to none", text("Input")) as num|null
|
||||
var/flash = tgui_input_number(usr, "Range of flash. -1 to none", text("Input"))
|
||||
if(flash == null) return
|
||||
|
||||
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1))
|
||||
@@ -703,13 +703,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
if(!check_rights(R_DEBUG|R_FUN)) return //VOREStation Edit
|
||||
|
||||
var/heavy = input(usr, "Range of heavy pulse.", text("Input")) as num|null
|
||||
var/heavy = tgui_input_number(usr, "Range of heavy pulse.", text("Input"))
|
||||
if(heavy == null) return
|
||||
var/med = input(usr, "Range of medium pulse.", text("Input")) as num|null
|
||||
var/med = tgui_input_number(usr, "Range of medium pulse.", text("Input"))
|
||||
if(med == null) return
|
||||
var/light = input(usr, "Range of light pulse.", text("Input")) as num|null
|
||||
var/light = tgui_input_number(usr, "Range of light pulse.", text("Input"))
|
||||
if(light == null) return
|
||||
var/long = input(usr, "Range of long pulse.", text("Input")) as num|null
|
||||
var/long = tgui_input_number(usr, "Range of long pulse.", text("Input"))
|
||||
if(long == null) return
|
||||
|
||||
if (heavy || med || light || long)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if(!picked_client)
|
||||
return
|
||||
var/list/types = typesof(/mob/living)
|
||||
var/mob_type = input(src, "Mob path to spawn as?", "Mob") as text
|
||||
var/mob_type = tgui_input_text(src, "Mob path to spawn as?", "Mob")
|
||||
if(!mob_type)
|
||||
return
|
||||
var/list/matches = new()
|
||||
@@ -81,7 +81,7 @@
|
||||
if (!holder)
|
||||
return
|
||||
|
||||
var/msg = input(usr, "Message:", text("Enter the text you wish to appear to everyone:")) as text
|
||||
var/msg = tgui_input_text(usr, "Message:", text("Enter the text you wish to appear to everyone:"))
|
||||
if(!(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
|
||||
msg = sanitize(msg)
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
set category = "Fun"
|
||||
if(!check_rights(R_ADMIN, R_FUN))
|
||||
return
|
||||
|
||||
var/size_multiplier = input(usr, "Input size multiplier.", "Resize", 1) as num|null
|
||||
|
||||
var/size_multiplier = tgui_input_number(usr, "Input size multiplier.", "Resize", 1)
|
||||
if(!size_multiplier)
|
||||
return //cancelled
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
L.resize(size_multiplier, animate = TRUE, uncapped = TRUE, ignore_prefs = TRUE)
|
||||
|
||||
log_and_message_admins("has changed [key_name(L)]'s size multiplier to [size_multiplier].")
|
||||
feedback_add_details("admin_verb","RESIZE")
|
||||
feedback_add_details("admin_verb","RESIZE")
|
||||
|
||||
@@ -43,7 +43,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
|
||||
choice = null
|
||||
while(!choice)
|
||||
choice = sanitize(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""))
|
||||
choice = sanitize(tgui_input_text(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""))
|
||||
if(!choice)
|
||||
if(tgui_alert(usr, "Error, no mission set. Do you want to exit the setup process?","Strike Team",list("Yes","No"))=="Yes")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user