mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
The One Where I Port Modals
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
to_chat(usr, "This map is not appropriate for this verb.")
|
||||
return
|
||||
|
||||
var/response = input(usr, "Are you sure?", "Engine setup") as null|anything in list("No", "Yes")
|
||||
var/response = tgui_alert(usr, "Are you sure?", "Engine setup", list("No", "Yes"))
|
||||
if(!response || response == "No")
|
||||
return
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(fusion_cores)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
var/new_ident = input("Enter a new ident tag.", "Fusion Core", id_tag) as null|text
|
||||
var/new_ident = input(usr, "Enter a new ident tag.", "Fusion Core", id_tag) as null|text
|
||||
if(new_ident && user.Adjacent(src))
|
||||
id_tag = new_ident
|
||||
return
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/obj/machinery/computer/fusion_core_control/attackby(var/obj/item/thing, var/mob/user)
|
||||
..()
|
||||
if(istype(thing, /obj/item/device/multitool))
|
||||
var/new_ident = sanitize_text(input("Enter a new ident tag.", "Core Control", monitor.core_tag) as null|text)
|
||||
var/new_ident = sanitize_text(input(usr, "Enter a new ident tag.", "Core Control", monitor.core_tag) as null|text)
|
||||
if(new_ident && user.Adjacent(src))
|
||||
monitor.core_tag = new_ident
|
||||
// id_tag = new_ident
|
||||
@@ -185,7 +185,7 @@
|
||||
if(href_list["str"])
|
||||
var/val = text2num(href_list["str"])
|
||||
if(!val) //Value is 0, which is manual entering.
|
||||
cur_viewed_device.set_strength(input("Enter the new field power density (W.m^-3)", "Fusion Control", cur_viewed_device.field_strength) as num)
|
||||
cur_viewed_device.set_strength(input(usr, "Enter the new field power density (W.m^-3)", "Fusion Control", cur_viewed_device.field_strength) as num)
|
||||
else
|
||||
cur_viewed_device.set_strength(cur_viewed_device.field_strength + val)
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
/obj/machinery/computer/fusion_fuel_control/attackby(var/obj/item/W, var/mob/user)
|
||||
..()
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
var/new_ident = input("Enter a new ident tag.", "Fuel Control", monitor.fuel_tag) as null|text
|
||||
var/new_ident = input(usr, "Enter a new ident tag.", "Fuel Control", monitor.fuel_tag) as null|text
|
||||
if(new_ident && user.Adjacent(src))
|
||||
monitor.fuel_tag = new_ident
|
||||
return
|
||||
|
||||
@@ -43,7 +43,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
|
||||
/obj/machinery/fusion_fuel_injector/attackby(obj/item/W, mob/user)
|
||||
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
var/new_ident = input("Enter a new ident tag.", "Fuel Injector", id_tag) as null|text
|
||||
var/new_ident = input(usr, "Enter a new ident tag.", "Fuel Injector", id_tag) as null|text
|
||||
if(new_ident && user.Adjacent(src))
|
||||
id_tag = new_ident
|
||||
return
|
||||
|
||||
@@ -53,7 +53,7 @@ GLOBAL_LIST_EMPTY(gyrotrons)
|
||||
|
||||
/obj/machinery/power/emitter/gyrotron/attackby(var/obj/item/W, var/mob/user)
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
var/new_ident = input("Enter a new ident tag.", "Gyrotron", id_tag) as null|text
|
||||
var/new_ident = input(usr, "Enter a new ident tag.", "Gyrotron", id_tag) as null|text
|
||||
if(new_ident && user.Adjacent(src))
|
||||
id_tag = new_ident
|
||||
return
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
return
|
||||
|
||||
if(href_list["modifypower"])
|
||||
var/new_val = input("Enter new emission power level (1 - 50)", "Modifying power level", G.mega_energy) as num
|
||||
var/new_val = input(usr, "Enter new emission power level (1 - 50)", "Modifying power level", G.mega_energy) as num
|
||||
if(!new_val)
|
||||
to_chat(usr, "<span class='warning'>That's not a valid number.</span>")
|
||||
return 1
|
||||
@@ -100,7 +100,7 @@
|
||||
return 1
|
||||
|
||||
if(href_list["modifyrate"])
|
||||
var/new_val = input("Enter new emission delay between 1 and 10 seconds.", "Modifying emission rate", G.rate) as num
|
||||
var/new_val = input(usr, "Enter new emission delay between 1 and 10 seconds.", "Modifying emission rate", G.rate) as num
|
||||
if(!new_val)
|
||||
to_chat(usr, "<span class='warning'>That's not a valid number.</span>")
|
||||
return 1
|
||||
@@ -119,7 +119,7 @@
|
||||
/obj/machinery/computer/gyrotron_control/attackby(var/obj/item/W, var/mob/user)
|
||||
..()
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
var/new_ident = input("Enter a new ident tag.", "Gyrotron Control", monitor.gyro_tag) as null|text
|
||||
var/new_ident = input(usr, "Enter a new ident tag.", "Gyrotron Control", monitor.gyro_tag) as null|text
|
||||
if(new_ident && user.Adjacent(src))
|
||||
monitor.gyro_tag = new_ident
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user