mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 05:07:51 +01:00
The One Where I Port Modals
This commit is contained in:
@@ -98,7 +98,7 @@
|
||||
set name = "Make Robot"
|
||||
|
||||
if(!ticker)
|
||||
alert("Wait until the game starts")
|
||||
tgui_alert_async(usr, "Wait until the game starts")
|
||||
return
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
log_admin("[key_name(src)] has robotized [M.key].")
|
||||
@@ -106,22 +106,22 @@
|
||||
M:Robotize()
|
||||
|
||||
else
|
||||
alert("Invalid mob")
|
||||
tgui_alert_async(usr, "Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_animalize(var/mob/M in mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make Simple Animal"
|
||||
|
||||
if(!ticker)
|
||||
alert("Wait until the game starts")
|
||||
tgui_alert_async(usr, "Wait until the game starts")
|
||||
return
|
||||
|
||||
if(!M)
|
||||
alert("That mob doesn't seem to exist, close the panel and try again.")
|
||||
tgui_alert_async(usr, "That mob doesn't seem to exist, close the panel and try again.")
|
||||
return
|
||||
|
||||
if(istype(M, /mob/new_player))
|
||||
alert("The mob must not be a new_player.")
|
||||
tgui_alert_async(usr, "The mob must not be a new_player.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(src)] has animalized [M.key].")
|
||||
@@ -138,11 +138,11 @@
|
||||
for(var/mob/C in mob_list)
|
||||
if(C.key)
|
||||
available.Add(C)
|
||||
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
|
||||
var/mob/choice = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", available)
|
||||
if(!choice)
|
||||
return 0
|
||||
if(!istype(choice, /mob/observer/dead))
|
||||
var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank them out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
|
||||
var/confirm = tgui_alert(usr, "[choice.key] isn't ghosting right now. Are you sure you want to yank them out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("No", "Yes"))
|
||||
if(confirm != "Yes")
|
||||
return 0
|
||||
var/obj/item/device/paicard/card = new(T)
|
||||
@@ -161,7 +161,7 @@
|
||||
set name = "Make Alien"
|
||||
|
||||
if(!ticker)
|
||||
alert("Wait until the game starts")
|
||||
tgui_alert_async(usr, "Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has alienized [M.key].")
|
||||
@@ -171,7 +171,7 @@
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] made [key_name(M)] into an alien.</span>", 1)
|
||||
else
|
||||
alert("Invalid mob")
|
||||
tgui_alert_async(usr, "Invalid mob")
|
||||
|
||||
|
||||
//TODO: merge the vievars version into this or something maybe mayhaps
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
// to prevent REALLY stupid deletions
|
||||
var/blocked = list(/obj, /mob, /mob/living, /mob/living/carbon, /mob/living/carbon/human, /mob/observer/dead, /mob/living/silicon, /mob/living/silicon/robot, /mob/living/silicon/ai)
|
||||
var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in typesof(/obj) + typesof(/mob) - blocked
|
||||
var/hsbitem = tgui_input_list(usr, "Choose an object to delete.", "Delete:", typesof(/obj) + typesof(/mob) - blocked)
|
||||
if(hsbitem)
|
||||
for(var/atom/O in world)
|
||||
if(istype(O, hsbitem))
|
||||
@@ -272,7 +272,7 @@
|
||||
set name = "Grant Full Access"
|
||||
|
||||
if (!ticker)
|
||||
alert("Wait until the game starts")
|
||||
tgui_alert_async(usr, "Wait until the game starts")
|
||||
return
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -293,7 +293,7 @@
|
||||
H.equip_to_slot_or_del(id, slot_wear_id)
|
||||
H.update_inv_wear_id()
|
||||
else
|
||||
alert("Invalid mob")
|
||||
tgui_alert_async(usr, "Invalid mob")
|
||||
feedback_add_details("admin_verb","GFA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(src)] has granted [M.key] full access.")
|
||||
message_admins("<font color='blue'>[key_name_admin(usr)] has granted [M.key] full access.</font>", 1)
|
||||
@@ -305,7 +305,7 @@
|
||||
|
||||
if(!check_rights(R_DEBUG|R_ADMIN|R_EVENT)) return
|
||||
if(M.ckey)
|
||||
if(alert("This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.",,"Yes","No") != "Yes")
|
||||
if(tgui_alert(usr, "This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.","Confirmation",list("Yes","No")) != "Yes")
|
||||
return
|
||||
else
|
||||
var/mob/observer/dead/ghost = new/mob/observer/dead(M,1)
|
||||
@@ -432,7 +432,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
|
||||
var/decl/hierarchy/outfit/outfit = input("Select outfit.", "Select equipment.") as null|anything in outfits()
|
||||
var/decl/hierarchy/outfit/outfit = tgui_input_list(usr, "Select outfit.", "Select equipment.", outfits())
|
||||
if(!outfit)
|
||||
return
|
||||
|
||||
@@ -453,7 +453,7 @@
|
||||
set name = "Start Singularity"
|
||||
set desc = "Sets up the singularity and all machines to get power flowing through the station"
|
||||
|
||||
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
|
||||
if(tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Start Singularity",list("Yes","No")) != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/power/emitter/E in machines)
|
||||
@@ -499,7 +499,7 @@
|
||||
|
||||
if(!check_rights(R_DEBUG|R_ADMIN)) return
|
||||
|
||||
var/response = alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Setup Completely","Setup except coolant","No")
|
||||
var/response = tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Setup Supermatter",list("Setup Completely","Setup except coolant","No"))
|
||||
|
||||
if(response == "No")
|
||||
return
|
||||
@@ -580,7 +580,7 @@
|
||||
set name = "Debug Mob Lists"
|
||||
set desc = "For when you just gotta know"
|
||||
|
||||
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients"))
|
||||
switch(tgui_input_list(usr, "Which list?", "List Choice", list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients")))
|
||||
if("Players")
|
||||
to_chat(usr, span("filter_debuglogs", jointext(player_list,",")))
|
||||
if("Admins")
|
||||
@@ -606,7 +606,7 @@
|
||||
// DNA2 - Admin Hax
|
||||
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
|
||||
if(!ticker)
|
||||
alert("Wait until the game starts")
|
||||
tgui_alert_async(usr, "Wait until the game starts")
|
||||
return
|
||||
if(istype(M, /mob/living/carbon))
|
||||
M.dna.SetSEState(block,!M.dna.GetSEState(block))
|
||||
@@ -617,7 +617,7 @@
|
||||
message_admins("[key_name_admin(src)] has toggled [M.key]'s [blockname] block [state]!")
|
||||
log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!")
|
||||
else
|
||||
alert("Invalid mob")
|
||||
tgui_alert_async(usr, "Invalid mob")
|
||||
|
||||
/datum/admins/proc/view_runtimes()
|
||||
set category = "Debug"
|
||||
@@ -637,9 +637,9 @@
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
var/datum/planet/planet = input(usr, "Which planet do you want to modify the weather on?", "Change Weather") in SSplanets.planets
|
||||
var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to modify the weather on?", "Change Weather", SSplanets.planets)
|
||||
if(istype(planet))
|
||||
var/datum/weather/new_weather = input(usr, "What weather do you want to change to?", "Change Weather") as null|anything in planet.weather_holder.allowed_weather_types
|
||||
var/datum/weather/new_weather = tgui_input_list(usr, "What weather do you want to change to?", "Change Weather", planet.weather_holder.allowed_weather_types)
|
||||
if(new_weather)
|
||||
planet.weather_holder.change_weather(new_weather)
|
||||
planet.weather_holder.rebuild_forecast()
|
||||
@@ -655,7 +655,7 @@
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
var/datum/planet/planet = input(usr, "Which planet do you want to modify time on?", "Change Time") in SSplanets.planets
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user