Merge remote-tracking branch 'upstream/master' into familyport

This commit is contained in:
keronshb
2021-10-28 14:41:46 -04:00
387 changed files with 1908 additions and 1658 deletions
+3 -3
View File
@@ -17830,7 +17830,7 @@
/turf/open/floor/wood,
/area/service/bar)
"aRx" = (
/obj/machinery/computer/arcade/minesweeper,
/obj/machinery/computer/arcade/orion_trail,
/turf/open/floor/wood,
/area/service/bar)
"aRy" = (
@@ -60122,7 +60122,7 @@
/turf/open/floor/plasteel,
/area/commons/dorms)
"nZL" = (
/obj/machinery/computer/arcade/minesweeper,
/obj/machinery/computer/arcade/orion_trail,
/turf/open/floor/wood,
/area/command/heads_quarters/captain)
"oax" = (
@@ -64938,7 +64938,7 @@
/turf/open/floor/plasteel,
/area/security/prison/upper)
"vim" = (
/obj/machinery/computer/arcade/minesweeper,
/obj/machinery/computer/arcade/battle,
/obj/effect/decal/cleanable/dirt,
/obj/structure/cable{
icon_state = "1-2"
+2 -2
View File
@@ -858,7 +858,7 @@
/turf/open/floor/plating/airless,
/area/router/aux)
"acf" = (
/obj/machinery/computer/arcade/minesweeper,
/obj/machinery/computer/arcade/battle,
/turf/open/floor/carpet/arcade,
/area/commons/arcade)
"acg" = (
@@ -4505,7 +4505,7 @@
/area/maintenance/solars/starboard/fore)
"alg" = (
/obj/structure/frame/machine,
/obj/item/circuitboard/computer/arcade/minesweeper,
/obj/item/circuitboard/computer/arcade/orion_trail,
/turf/open/floor/plating,
/area/construction/secondary)
"alh" = (
+1 -1
View File
@@ -9501,7 +9501,7 @@
/obj/machinery/camera/autoname{
dir = 4
},
/obj/machinery/computer/arcade/minesweeper{
/obj/machinery/computer/arcade/orion_trail{
dir = 4
},
/turf/open/floor/plasteel,
+1 -1
View File
@@ -70208,7 +70208,7 @@
},
/area/command/gateway)
"pCQ" = (
/obj/machinery/computer/arcade/minesweeper{
/obj/machinery/computer/arcade/battle{
dir = 4
},
/turf/open/floor/plasteel,
+3 -3
View File
@@ -870,7 +870,7 @@
/obj/machinery/light{
dir = 4
},
/obj/machinery/computer/arcade/minesweeper{
/obj/machinery/computer/arcade/orion_trail{
dir = 8
},
/obj/structure/sign/poster/official/nanomichi_ad{
@@ -5842,7 +5842,7 @@
/turf/open/floor/plating,
/area/maintenance/aft/secondary)
"akQ" = (
/obj/machinery/computer/arcade/minesweeper,
/obj/machinery/computer/arcade/battle,
/turf/open/floor/plasteel/dark,
/area/security/prison)
"akR" = (
@@ -34938,7 +34938,7 @@
dir = 1;
pixel_y = -24
},
/obj/machinery/computer/arcade/minesweeper{
/obj/machinery/computer/arcade/orion_trail{
dir = 4
},
/turf/open/floor/plasteel/dark,
+2
View File
@@ -119,6 +119,8 @@
#define STATUS_EFFECT_CLOUDSTRUCK /datum/status_effect/cloudstruck //blinds and applies an overlay.
#define STATUS_EFFECT_GAUNTLET_CONC /datum/status_effect/cgau_conc // it's a slowdown that really should only be applying to large simplemobs
/// shoves inflict this to indicate the next shove while this is in effect should disarm guns
#define STATUS_EFFECT_OFF_BALANCE /datum/status_effect/off_balance
+1 -1
View File
@@ -151,7 +151,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engineerin
if(!place.requires_power || (place.area_flags & NOTELEPORT) || (place.area_flags & HIDDEN_AREA))
continue // No expanding powerless rooms etc
areas[place.name] = place
var/area_choice = input(creator, "Choose an area to expand or make a new area.", "Area Expansion") as null|anything in areas
var/area_choice = tgui_input_list(creator, "Choose an area to expand or make a new area.", "Area Expansion", areas)
area_choice = areas[area_choice]
if(!area_choice)
+1 -1
View File
@@ -60,7 +60,7 @@
S["real_name"] >> name
if(name)
characters[name] = i
var/chosen_name = input(C, "Which character do you wish to use as your appearance.") as anything in characters
var/chosen_name = tgui_input_list(C, "Which character do you wish to use as your appearance.", "", characters)
if(chosen_name)
if(C.prefs.last_custom_holoform > world.time - CUSTOM_HOLOFORM_DELAY)
to_chat(C.mob, "<span class='boldwarning'>You are attempting to set your custom holoform too fast!</span>")
+1 -1
View File
@@ -11,7 +11,7 @@
if(path != root)
choices.Insert(1,"/")
var/choice = input(src,"Choose a file to access:","Download",null) as null|anything in choices
var/choice = tgui_input_list(src,"Choose a file to access:","Download", choices)
switch(choice)
if(null)
return
+3 -3
View File
@@ -75,11 +75,11 @@
/proc/choose_reagent_id(mob/user)
var/chosen_id
switch(alert(user, "Choose a method.", "Add Reagents", "Search", "Choose from a list", "I'm feeling lucky"))
switch(tgui_alert(user, "Choose a method.", "Add Reagents", list("Search", "Choose from a list", "I'm feeling lucky")))
if("Search")
var/valid_id
while(!valid_id)
chosen_id = input(user, "Enter the ID of the reagent you want to add.", "Search reagents") as null|text
chosen_id = tgui_input_text(user, "Enter the ID of the reagent you want to add.", "Search reagents")
if(isnull(chosen_id)) //Get me out of here!
break
if(!ispath(text2path(chosen_id)))
@@ -91,7 +91,7 @@
if(!valid_id)
to_chat(user, "<span class='warning'>A reagent with that ID doesn't exist!</span>")
if("Choose from a list")
chosen_id = input(user, "Choose a reagent to add.", "Choose a reagent.") as null|anything in subtypesof(/datum/reagent)
chosen_id = tgui_input_list(user, "Choose a reagent to add.", "Choose a reagent.", subtypesof(/datum/reagent))
if("I'm feeling lucky")
chosen_id = pick(subtypesof(/datum/reagent))
return chosen_id
+4 -4
View File
@@ -42,7 +42,7 @@
/proc/sanitize_name(t,list/repl_chars = null)
if(t == "space" || t == "floor" || t == "wall" || t == "r-wall" || t == "monkey" || t == "unknown" || t == "inactive ai") //prevents these common metagamey names
alert("Invalid name.")
tgui_alert(usr, "Invalid name.")
return ""
return sanitize(t)
@@ -93,7 +93,7 @@
// Used to get a properly sanitized input, of max_length
// no_trim is self explanatory but it prevents the input from being trimed if you intend to parse newlines or whitespace.
/proc/stripped_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
var/name = input(user, message, title, default) as text|null
var/name = tgui_input_text(user, message, title, default)
if(no_trim)
return copytext(html_encode(name), 1, max_length)
else
@@ -101,7 +101,7 @@
// Used to get a properly sanitized multiline input, of max_length
/proc/stripped_multiline_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
var/name = input(user, message, title, default) as message|null
var/name = tgui_input_message(user, message, title, default)
if(isnull(name)) // Return null if canceled.
return null
if(no_trim)
@@ -113,7 +113,7 @@
* stripped_multiline_input but reflects to the user instead if it's too big and returns null.
*/
/proc/stripped_multiline_input_or_reflect(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
var/name = input(user, message, title, default) as message|null
var/name = tgui_input_message(user, message, title, default)
if(isnull(name)) // Return null if canceled.
return null
if(length(name) > max_length)
+4 -4
View File
@@ -249,7 +249,7 @@ Turf and target are separate in case you want to teleport some distance from a t
var/list/borgs = active_free_borgs()
if(borgs.len)
if(user)
. = input(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs[1]) in borgs
. = tgui_input_list(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs)
else
. = pick(borgs)
return .
@@ -258,7 +258,7 @@ Turf and target are separate in case you want to teleport some distance from a t
var/list/ais = active_ais()
if(ais.len)
if(user)
. = input(user,"AI signals detected:", "AI Selection", ais[1]) in ais
. = tgui_input_list(user,"AI signals detected:", "AI Selection", ais)
else
. = pick(ais)
return .
@@ -1075,7 +1075,7 @@ B --><-- A
/proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
if (value == FALSE) //nothing should be calling us with a number, so this is safe
value = input("Enter type to find (blank for all, cancel to cancel)", "Search for type") as null|text
value = tgui_input_text(usr, "Enter type to find (blank for all, cancel to cancel)", "Search for type")
if (isnull(value))
return
value = trim(value)
@@ -1089,7 +1089,7 @@ B --><-- A
if(matches.len==1)
chosen = matches[1]
else
chosen = input("Select a type", "Pick Type", matches[1]) as null|anything in matches
chosen = tgui_input_list(usr, "Select a type", "Pick Type", matches)
if(!chosen)
return
chosen = matches[chosen]
+1 -1
View File
@@ -33,7 +33,7 @@
if(..())
return
var/mob/living/silicon/ai/AI = usr
var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in AI.trackable_mobs()
var/target_name = tgui_input_list(AI, "Choose who you want to track", "Tracking", AI.trackable_mobs())
AI.ai_camera_track(target_name)
/atom/movable/screen/ai/camera_light
+2 -2
View File
@@ -62,7 +62,7 @@
M.maptext = "Movable"
M.maptext_width = 64
var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object") as text
var/screen_l = tgui_input_text(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object")
if(!screen_l)
return
@@ -81,7 +81,7 @@
S.maptext = "Snap"
S.maptext_width = 64
var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object") as text
var/screen_l = tgui_input_text(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object")
if(!screen_l)
return
+1 -1
View File
@@ -80,7 +80,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
controllers["[controller] (controller.type)"] = controller //we use an associated list to ensure clients can't hold references to controllers
controller_choices += "[controller] (controller.type)"
var/datum/controller/controller_string = input("Select controller to debug", "Debug Controller") as null|anything in controller_choices
var/datum/controller/controller_string = tgui_input_list(src, "Select controller to debug", "Debug Controller", controller_choices)
var/datum/controller/controller = controllers[controller_string]
if (!istype(controller))
+3 -3
View File
@@ -483,7 +483,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
if(!holder ||!check_rights(R_FUN))
return
var/choice = alert(src, "What kind of level would you like to load?", "Load Away/VR", AWAY_MISSION_NAME, VIRT_REALITY_NAME, "Cancel")
var/choice = tgui_alert(src, "What kind of level would you like to load?", "Load Away/VR", list(AWAY_MISSION_NAME, VIRT_REALITY_NAME, "Cancel"))
var/list/possible_options
var/list/ztraits
@@ -493,7 +493,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
ztraits = list(ZTRAIT_AWAY = TRUE, ZTRAIT_VR = TRUE)
if(AWAY_MISSION_NAME)
if(!GLOB.the_gateway)
if(alert("There's no home gateway on the station. You sure you want to continue ?", "Uh oh", "Yes", "No") != "Yes")
if(tgui_alert(src, "There's no home gateway on the station. You sure you want to continue ?", "Uh oh", list("Yes", "No")) != "Yes")
return
possible_options = GLOB.potential_away_levels
ztraits = list(ZTRAIT_AWAY = TRUE)
@@ -503,7 +503,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
var/away_name
var/datum/space_level/away_level
var/answer = input("What kind ? ","Away/VR") as null|anything in list(possible_options + "Custom")
var/answer = tgui_input_list(src, "What kind ? ","Away/VR", list(possible_options + "Custom"))
switch(answer)
if(null)
return
+1 -1
View File
@@ -943,6 +943,6 @@ SUBSYSTEM_DEF(shuttle)
SSblackbox.record_feedback("text", "shuttle_manipulator", 1, "[mdp.name]")
shuttle_loading = FALSE
if(emergency == mdp) //you just changed the emergency shuttle, there are events in game + captains that can change your snowflake choice.
var/set_purchase = alert(usr, "Do you want to also disable shuttle purchases/random events that would change the shuttle?", "Butthurt Admin Prevention", "Yes, disable purchases/events", "No, I want to possibly get owned")
var/set_purchase = tgui_alert(usr, "Do you want to also disable shuttle purchases/random events that would change the shuttle?", "Butthurt Admin Prevention", list("Yes, disable purchases/events", "No, I want to possibly get owned"))
if(set_purchase == "Yes, disable purchases/events")
SSshuttle.shuttle_purchased = SHUTTLEPURCHASE_FORCED
+3 -3
View File
@@ -326,7 +326,7 @@ SUBSYSTEM_DEF(vote)
return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.")
GLOB.master_mode = "dynamic"
if(. == "extended")
GLOB.dynamic_forced_extended = TRUE
GLOB.dynamic_extended = TRUE
message_admins("The gamemode has been voted for, and has been changed to: [GLOB.master_mode]")
log_admin("Gamemode has been voted for and switched to: [GLOB.master_mode].")
if("restart")
@@ -453,7 +453,7 @@ SUBSYSTEM_DEF(vote)
question = stripped_input(usr,"What is the vote for?")
if(!question)
return 0
var/system_string = input(usr,"Which voting type?",GLOB.vote_type_names[1]) in GLOB.vote_type_names
var/system_string = tgui_input_list(usr,"Which voting type?",GLOB.vote_type_names[1], GLOB.vote_type_names)
vote_system = GLOB.vote_type_names[system_string]
for(var/i=1,i<=10,i++)
var/option = capitalize(stripped_input(usr,"Please enter an option or hit cancel to finish"))
@@ -469,7 +469,7 @@ SUBSYSTEM_DEF(vote)
var/bitflag = GLOB.display_vote_settings[A]
toggletext = "[toggles & bitflag ? "Show" : "Hide"] [A]"
choices[toggletext] = bitflag
var/chosen = input(usr, "Toggle vote display settings. Cancel to finalize.", toggles) as null|anything in choices
var/chosen = tgui_input_list(usr, "Toggle vote display settings. Cancel to finalize.", toggles, choices)
if(!chosen)
keep_going = FALSE
else
+2 -2
View File
@@ -564,7 +564,7 @@
var/list/areas = list()
for (var/area/a in owner.siliconaccessareas)
areas[a.name] = a
var/removeAPC = input("Select an APC to remove:","Remove APC Control",1) as null|anything in areas
var/removeAPC = tgui_input_list(owner, "Select an APC to remove:","Remove APC Control", areas)
if (!removeAPC)
return
var/area/area = areas[removeAPC]
@@ -586,7 +586,7 @@
var/list/areas = list()
for (var/area/a in owner.siliconaccessareas)
areas[a.name] = a
var/accessAPC = input("Select an APC to access:","Access APC Interface",1) as null|anything in areas
var/accessAPC = tgui_input_list(owner, "Select an APC to access:","Access APC Interface", areas)
if (!accessAPC)
return
var/area/area = areas[accessAPC]
+3 -3
View File
@@ -376,13 +376,13 @@
if ("string")
settings["mainsettings"][setting]["value"] = stripped_input(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]", settings["mainsettings"][setting]["value"])
if ("number")
settings["mainsettings"][setting]["value"] = input(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]") as num
settings["mainsettings"][setting]["value"] = tgui_input_num(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]")
if ("color")
settings["mainsettings"][setting]["value"] = input(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]", settings["mainsettings"][setting]["value"]) as color
if ("boolean")
settings["mainsettings"][setting]["value"] = input(user, "[settings["mainsettings"][setting]["desc"]]?") in list("Yes","No")
settings["mainsettings"][setting]["value"] = tgui_input_list(user, "[settings["mainsettings"][setting]["desc"]]?", "", list("Yes","No"))
if ("ckey")
settings["mainsettings"][setting]["value"] = input(user, "[settings["mainsettings"][setting]["desc"]]?") in list("none") + GLOB.directory
settings["mainsettings"][setting]["value"] = tgui_input_list(user, "[settings["mainsettings"][setting]["desc"]]?", "", list("none") + GLOB.directory)
if (settings["mainsettings"][setting]["callback"])
var/datum/callback/callback = settings["mainsettings"][setting]["callback"]
settings = callback.Invoke(settings)
+1 -1
View File
@@ -125,7 +125,7 @@
//try to get ammount to use
var/requested_amount
if(precise_insertion)
requested_amount = input(user, "How much do you want to insert?", "Inserting [S.singular_name]s") as num|null
requested_amount = tgui_input_num(user, "How much do you want to insert?", "Inserting [S.singular_name]s")
else
requested_amount= S.amount
@@ -5,7 +5,7 @@
var/list/obj/item/storage/backpack/holding/matching = typecache_filter_list(W.GetAllContents(), typecacheof(/obj/item/storage/backpack/holding))
matching -= A
if(istype(W, /obj/item/storage/backpack/holding) || matching.len)
var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Abort", "Proceed")
var/safety = tgui_alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", list("Abort", "Proceed"))
if(safety != "Proceed" || QDELETED(A) || QDELETED(W) || QDELETED(user) || !user.canUseTopic(A, BE_CLOSE, iscarbon(user)))
return
var/turf/loccheck = get_turf(A)
+1 -1
View File
@@ -450,7 +450,7 @@
symptoms += SSdisease.list_symptoms.Copy()
do
if(user)
var/symptom = input(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom") in symptoms
var/symptom = tgui_input_list(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom", symptoms)
if(isnull(symptom))
return
else if(istext(symptom))
+1 -1
View File
@@ -112,7 +112,7 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
var/datum/element/flavor_text/F = i
choices[F.flavor_name] = F
var/chosen = input(src, "Which flavor text would you like to modify?") as null|anything in choices
var/chosen = tgui_input_list(src, "Which flavor text would you like to modify?", "", choices)
if(!chosen)
return
var/datum/element/flavor_text/F = choices[chosen]
+1 -1
View File
@@ -122,7 +122,7 @@
overlays += mutable_appearance(f_icon, overlays_states[i], color = M.color)
/datum/element/polychromic/proc/set_color(atom/source, mob/user)
var/choice = input(user,"Polychromic options", "Recolor [source]") as null|anything in overlays_names
var/choice = tgui_input_list(user,"Polychromic options", "Recolor [source]", overlays_names)
if(!choice || QDELETED(source) || !user.canUseTopic(source, BE_CLOSE, NO_DEXTERY))
return
var/index = overlays_names.Find(choice)
+5 -5
View File
@@ -385,7 +385,7 @@ GLOBAL_LIST_EMPTY(explosions)
set name = "Check Bomb Impact"
set category = "Debug"
var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "Yes", "No")
var/newmode = tgui_alert(src, "Use reactionary explosions?","Check Bomb Impact", list("Yes", "No"))
var/turf/epicenter = get_turf(mob)
if(!epicenter)
return
@@ -394,7 +394,7 @@ GLOBAL_LIST_EMPTY(explosions)
var/heavy = 0
var/light = 0
var/list/choices = list("Small Bomb","Medium Bomb","Big Bomb","Custom Bomb")
var/choice = input("Bomb Size?") in choices
var/choice = tgui_input_list(src, "Bomb Size?", "", choices)
switch(choice)
if(null)
return 0
@@ -411,9 +411,9 @@ GLOBAL_LIST_EMPTY(explosions)
heavy = 5
light = 7
if("Custom Bomb")
dev = input("Devastation range (Tiles):") as num
heavy = input("Heavy impact range (Tiles):") as num
light = input("Light impact range (Tiles):") as num
dev = tgui_input_num(src, "Devastation range (Tiles):")
heavy = tgui_input_num(src, "Heavy impact range (Tiles):")
light = tgui_input_num(src, "Light impact range (Tiles):")
var/max_range = max(dev, heavy, light)
var/x0 = epicenter.x
+5 -10
View File
@@ -420,7 +420,7 @@
A.admin_remove(usr)
if (href_list["role_edit"])
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in get_all_jobs()
var/new_role = tgui_input_list(usr, "Select new role", "Assigned role", get_all_jobs())
if (!new_role)
return
assigned_role = new_role
@@ -433,7 +433,6 @@
else if (href_list["obj_edit"] || href_list["obj_add"])
var/objective_pos //Edited objectives need to keep same order in antag objective list
var/def_value
var/datum/antagonist/target_antag
var/datum/objective/old_objective //The old objective we're replacing/editing
var/datum/objective/new_objective //New objective we're be adding
@@ -461,7 +460,7 @@
if(1)
target_antag = antag_datums[1]
else
var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", "(new custom antag)") as null|anything in antag_datums + "(new custom antag)"
var/datum/antagonist/target = tgui_input_list(usr, "Which antagonist gets the objective:", "Antagonist", list(antag_datums + "(new custom antag)"))
if (QDELETED(target))
return
else if(target == "(new custom antag)")
@@ -495,11 +494,7 @@
var/datum/objective/X = T
choices[initial(X.name)] = T
if(old_objective)
if(old_objective.name in choices)
def_value = old_objective.name
var/selected_type = input("Select objective type:", "Objective type", def_value) as null|anything in choices
var/selected_type = tgui_input_list(usr, "Select objective type:", "Objective type", choices)
selected_type = choices[selected_type]
if (!selected_type)
return
@@ -537,7 +532,7 @@
choices[initial(t.employer)] = C
var/datum/antagonist/traitor/T = locate(href_list["target_antag"]) in antag_datums
if(T)
var/selected_type = input("Select traitor class:", "Traitor class", T.traitor_kind.employer) as null|anything in choices
var/selected_type = tgui_input_list(usr, "Select traitor class:", "Traitor class", choices)
selected_type = choices[selected_type]
T.set_traitor_kind(selected_type)
@@ -598,7 +593,7 @@
if(check_rights(R_FUN, 0))
var/datum/component/uplink/U = find_syndicate_uplink()
if(U)
var/crystals = input("Amount of telecrystals for [key]","Syndicate uplink", U.telecrystals) as null | num
var/crystals = tgui_input_num(usr, "Amount of telecrystals for [key]","Syndicate uplink", U.telecrystals)
if(!isnull(crystals))
U.telecrystals = crystals
message_admins("[key_name_admin(usr)] changed [current]'s telecrystal count to [crystals].")
+1 -1
View File
@@ -242,7 +242,7 @@
if(!length(possible))
to_chat(user,"<span class='warning'>Despite your best efforts, there are no scents to be found on [sniffed]...</span>")
return
tracking_target = input(user, "Choose a scent to remember.", "Scent Tracking") as null|anything in sortNames(possible)
tracking_target = tgui_input_list(user, "Choose a scent to remember.", "Scent Tracking", sortNames(possible))
if(!tracking_target)
if(!old_target)
to_chat(user,"<span class='warning'>You decide against remembering any scents. Instead, you notice your own nose in your peripheral vision. This goes on to remind you of that one time you started breathing manually and couldn't stop. What an awful day that was.</span>")
+4 -4
View File
@@ -21,7 +21,7 @@
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "SkillPanel", "[owner.name]'s Skills")
ui.set_autoupdate(FALSE)
ui.set_autoupdate(FALSE)
ui.open()
else if(need_static_data_update)
update_static_data(user)
@@ -57,7 +57,7 @@
if(!check_rights(R_DEBUG))
return
var/skill = text2path(params["skill"])
var/number = input("Please insert the amount of experience/progress you'd like to add/subtract:") as num|null
var/number = tgui_input_num(usr, "Please insert the amount of experience/progress you'd like to add/subtract:")
if (number)
owner.set_skill_value(skill, owner.get_skill_value(skill, FALSE) + number)
return TRUE
@@ -65,7 +65,7 @@
if(!check_rights(R_DEBUG))
return
var/skill = text2path(params["skill"])
var/number = input("Please insert the number you want to set the player's exp/progress to:") as num|null
var/number = tgui_input_num(usr, "Please insert the number you want to set the player's exp/progress to:")
if (!isnull(number))
owner.set_skill_value(skill, number)
return TRUE
@@ -73,7 +73,7 @@
if(!check_rights(R_DEBUG))
return
var/datum/skill/level/S = GLOB.skill_datums[text2path(params["skill"])]
var/number = input("Please insert a whole number between 0[S.associative ? " ([S.unskilled_tier])" : ""] and [S.max_levels][S.associative ? " ([S.levels[S.max_levels]])" : ""] corresponding to the level you'd like to set the player to.") as num|null
var/number = tgui_input_num(usr, "Please insert a whole number between 0[S.associative ? " ([S.unskilled_tier])" : ""] and [S.max_levels][S.associative ? " ([S.levels[S.max_levels]])" : ""] corresponding to the level you'd like to set the player to.")
if (number >= 0 && number <= S.max_levels)
owner.set_skill_value(S.type, S.get_skill_level_value(number))
return TRUE
+13
View File
@@ -1134,3 +1134,16 @@
else if(fake_msg)
to_chat(owner, fake_msg)
msg_stage++
/datum/status_effect/cgau_conc
id = "cgau_conc"
examine_text = "<span class='warning'>SUBJECTPRONOUN rocks from side to side, confused.</span>"
duration = 5 SECONDS
/datum/status_effect/cgau_conc/on_creation(mob/living/new_owner, ...)
. = ..()
new_owner.add_movespeed_modifier(/datum/movespeed_modifier/gauntlet_concussion)
/datum/status_effect/cgau_conc/on_remove()
owner.remove_movespeed_modifier(/datum/movespeed_modifier/gauntlet_concussion)
. = ..()
+9 -9
View File
@@ -985,14 +985,14 @@
. = ..()
if(href_list[VV_HK_ADD_REAGENT] && check_rights(R_VAREDIT))
if(!reagents)
var/amount = input(usr, "Specify the reagent size of [src]", "Set Reagent Size", 50) as num
var/amount = tgui_input_num(usr, "Specify the reagent size of [src]", "Set Reagent Size", 50)
if(amount)
create_reagents(amount)
if(reagents)
var/chosen_id = choose_reagent_id(usr)
if(chosen_id)
var/amount = input(usr, "Choose the amount to add.", "Choose the amount.", reagents.maximum_volume) as num
var/amount = tgui_input_num(usr, "Choose the amount to add.", "Choose the amount.", reagents.maximum_volume)
if(amount)
reagents.add_reagent(chosen_id, amount)
log_admin("[key_name(usr)] has added [amount] units of [chosen_id] to [src]")
@@ -1002,25 +1002,25 @@
if(href_list[VV_HK_TRIGGER_EMP] && check_rights(R_FUN))
usr.client.cmd_admin_emp(src)
if(href_list[VV_HK_MODIFY_TRANSFORM] && check_rights(R_VAREDIT))
var/result = input(usr, "Choose the transformation to apply","Transform Mod") as null|anything in list("Scale","Translate","Rotate")
var/result = tgui_input_list(usr, "Choose the transformation to apply","Transform Mod", list("Scale","Translate","Rotate"))
var/matrix/M = transform
switch(result)
if("Scale")
var/x = input(usr, "Choose x mod","Transform Mod") as null|num
var/y = input(usr, "Choose y mod","Transform Mod") as null|num
var/x = tgui_input_num(usr, "Choose x mod","Transform Mod")
var/y = tgui_input_num(usr, "Choose y mod","Transform Mod")
if(!isnull(x) && !isnull(y))
transform = M.Scale(x,y)
if("Translate")
var/x = input(usr, "Choose x mod","Transform Mod") as null|num
var/y = input(usr, "Choose y mod","Transform Mod") as null|num
var/x = tgui_input_num(usr, "Choose x mod","Transform Mod")
var/y = tgui_input_num(usr, "Choose y mod","Transform Mod")
if(!isnull(x) && !isnull(y))
transform = M.Translate(x,y)
if("Rotate")
var/angle = input(usr, "Choose angle to rotate","Transform Mod") as null|num
var/angle = tgui_input_num(usr, "Choose angle to rotate","Transform Mod")
if(!isnull(angle))
transform = M.Turn(angle)
if(href_list[VV_HK_AUTO_RENAME] && check_rights(R_VAREDIT))
var/newname = input(usr, "What do you want to rename this to?", "Automatic Rename") as null|text
var/newname = tgui_input_text(usr, "What do you want to rename this to?", "Automatic Rename")
if(newname)
vv_auto_rename(newname)
if(href_list[VV_HK_EDIT_FILTERS] && check_rights(R_VAREDIT))
+51 -19
View File
@@ -1,13 +1,16 @@
#define RULESET_STOP_PROCESSING 1
#define FAKE_REPORT_CHANCE 8
#define FAKE_REPORT_CHANCE 20
#define REPORT_NEG_DIVERGENCE -15
#define REPORT_POS_DIVERGENCE 15
#define EXTENDED_CURVE_CENTER -7
// Are HIGH_IMPACT_RULESETs allowed to stack?
GLOBAL_VAR_INIT(dynamic_no_stacking, TRUE)
// If enabled does not accept or execute any rulesets.
GLOBAL_VAR_INIT(dynamic_forced_extended, FALSE)
// Antags still allowed, but no roundstart antags + midrounds are low impact
GLOBAL_VAR_INIT(dynamic_extended, FALSE)
// How high threat is required for HIGH_IMPACT_RULESETs stacking.
// This is independent of dynamic_no_stacking.
GLOBAL_VAR_INIT(dynamic_stacking_limit, 90)
@@ -163,6 +166,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
dat += "Split parameters: centre = [roundstart_split_curve_centre] ; width = [roundstart_split_curve_width].<br/>"
dat += "<i>On average, <b>[peaceful_percentage]</b>% of the rounds are more peaceful.</i><br/>"
dat += "Forced extended: <a href='?src=\ref[src];[HrefToken()];forced_extended=1'><b>[GLOB.dynamic_forced_extended ? "On" : "Off"]</b></a><br/>"
dat += "Dynamic extended: <a href='?src=\ref[src];[HrefToken()];extended=1'><b>[GLOB.dynamic_extended ? "On" : "Off"]</b></a><br/>"
dat += "No stacking (only one round-ender): <a href='?src=\ref[src];[HrefToken()];no_stacking=1'><b>[GLOB.dynamic_no_stacking ? "On" : "Off"]</b></a><br/>"
dat += "Stacking limit: [GLOB.dynamic_stacking_limit] <a href='?src=\ref[src];[HrefToken()];stacking_limit=1'>\[Adjust\]</A>"
dat += "<br/>"
@@ -192,10 +196,12 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
return
if (href_list["forced_extended"])
GLOB.dynamic_forced_extended = !GLOB.dynamic_forced_extended
else if (href_list["extended"])
GLOB.dynamic_extended = !GLOB.dynamic_extended
else if (href_list["no_stacking"])
GLOB.dynamic_no_stacking = !GLOB.dynamic_no_stacking
else if (href_list["adjustthreat"])
var/threatadd = input("Specify how much threat to add (negative to subtract). This can inflate the threat level.", "Adjust Threat", 0) as null|num
var/threatadd = tgui_input_num(usr, "Specify how much threat to add (negative to subtract). This can inflate the threat level.", "Adjust Threat", 0)
if(!threatadd)
return
if(threatadd > 0)
@@ -215,9 +221,9 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
else if (href_list["threatlog"])
show_threatlog(usr)
else if (href_list["stacking_limit"])
GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num
GLOB.dynamic_stacking_limit = tgui_input_num(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null)
else if(href_list["force_latejoin_rule"])
var/added_rule = input(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", null) as null|anything in sortNames(init_rulesets(/datum/dynamic_ruleset/latejoin))
var/added_rule = tgui_input_list(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", sortNames(init_rulesets(/datum/dynamic_ruleset/latejoin)))
if (!added_rule)
return
forced_latejoin_rule = added_rule
@@ -228,7 +234,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
log_admin("[key_name(usr)] cleared the forced latejoin ruleset.")
message_admins("[key_name(usr)] cleared the forced latejoin ruleset.")
else if(href_list["force_midround_rule"])
var/added_rule = input(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", null) as null|anything in sortNames(init_rulesets(/datum/dynamic_ruleset/midround))
var/added_rule = tgui_input_list(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", sortNames(init_rulesets(/datum/dynamic_ruleset/midround)))
if (!added_rule)
return
log_admin("[key_name(usr)] executed the [added_rule] ruleset.")
@@ -309,9 +315,10 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
/// Generates the threat level using lorentz distribution and assigns peaceful_percentage.
/datum/game_mode/dynamic/proc/generate_threat()
if(GLOB.dynamic_extended)
threat_curve_centre = EXTENDED_CURVE_CENTER
var/relative_threat = LORENTZ_DISTRIBUTION(threat_curve_centre, threat_curve_width)
threat_level = round(lorentz_to_amount(relative_threat), 0.1)
peaceful_percentage = round(LORENTZ_CUMULATIVE_DISTRIBUTION(relative_threat, threat_curve_centre, threat_curve_width), 0.01)*100
SSblackbox.record_feedback("tally","dynamic_threat",threat_level,"Initial threat level")
@@ -321,14 +328,18 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
/// Generates the midround and roundstart budgets
/datum/game_mode/dynamic/proc/generate_budgets()
var/relative_round_start_budget_scale = LORENTZ_DISTRIBUTION(roundstart_split_curve_centre, roundstart_split_curve_width)
round_start_budget = round((lorentz_to_amount(relative_round_start_budget_scale) / 100) * threat_level, 0.1)
initial_round_start_budget = round_start_budget
mid_round_budget = threat_level - round_start_budget
if(GLOB.dynamic_extended)
mid_round_budget = threat_level
round_start_budget = 0
else
var/relative_round_start_budget_scale = LORENTZ_DISTRIBUTION(roundstart_split_curve_centre, roundstart_split_curve_width)
round_start_budget = round((lorentz_to_amount(relative_round_start_budget_scale) / 100) * threat_level, 0.1)
initial_round_start_budget = round_start_budget
mid_round_budget = threat_level - round_start_budget
/datum/game_mode/dynamic/proc/setup_parameters()
log_game("DYNAMIC: Dynamic mode parameters for the round:")
log_game("DYNAMIC: Centre is [threat_curve_centre], Width is [threat_curve_width], Forced extended is [GLOB.dynamic_forced_extended ? "Enabled" : "Disabled"], No stacking is [GLOB.dynamic_no_stacking ? "Enabled" : "Disabled"].")
log_game("DYNAMIC: Centre is [threat_curve_centre], Width is [threat_curve_width], Extended is [GLOB.dynamic_extended ? "Enabled" : "Disabled"], No stacking is [GLOB.dynamic_no_stacking ? "Enabled" : "Disabled"].")
log_game("DYNAMIC: Stacking limit is [GLOB.dynamic_stacking_limit].")
if(GLOB.dynamic_forced_threat_level >= 0)
threat_level = round(GLOB.dynamic_forced_threat_level, 0.1)
@@ -346,9 +357,15 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
shown_threat = clamp(threat_level + rand(REPORT_NEG_DIVERGENCE, REPORT_POS_DIVERGENCE), 0, 100)
/datum/game_mode/dynamic/proc/set_cooldowns()
var/coeff = GLOB.dynamic_extended ? 2 : 1
latejoin_delay_min *= coeff
latejoin_delay_max *= coeff
var/latejoin_injection_cooldown_middle = 0.5*(latejoin_delay_max + latejoin_delay_min)
latejoin_injection_cooldown = round(clamp(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), latejoin_delay_min, latejoin_delay_max)) + world.time
midround_delay_min *= coeff
midround_delay_max *= coeff
var/midround_injection_cooldown_middle = 0.5*(midround_delay_max + midround_delay_min)
midround_injection_cooldown = round(clamp(EXP_DISTRIBUTION(midround_injection_cooldown_middle), midround_delay_min, midround_delay_max)) + world.time
@@ -456,6 +473,9 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
if (GLOB.dynamic_forced_extended)
log_game("DYNAMIC: Starting a round of forced extended.")
return TRUE
if (GLOB.dynamic_extended)
log_game("DYNAMIC: Starting a round of dynamic extended.")
return TRUE
var/list/drafted_rules = list()
for (var/datum/dynamic_ruleset/roundstart/rule in roundstart_rules)
if (!rule.weight)
@@ -563,9 +583,10 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
return FALSE
// Check if the ruleset is high impact and if a high impact ruleset has been executed
else if(new_rule.flags & HIGH_IMPACT_RULESET)
if(threat_level < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
if(high_impact_ruleset_executed)
return FALSE
if(GLOB.dynamic_extended)
return FALSE
if(high_impact_ruleset_executed && threat_level < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
return FALSE
var/population = current_players[CURRENT_LIVING_PLAYERS].len
if((new_rule.acceptable(population, threat_level) && new_rule.cost <= mid_round_budget) || forced)
@@ -598,8 +619,8 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
/datum/game_mode/dynamic/proc/midround_rule_draft()
set waitfor = FALSE
if (midround_injection_cooldown < world.time)
/*if (GLOB.dynamic_forced_extended)
return*/
if (GLOB.dynamic_forced_extended)
return
// Somehow it managed to trigger midround multiple times so this was moved here.
// There is no way this should be able to trigger an injection twice now.
@@ -620,6 +641,11 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
for (var/datum/dynamic_ruleset/midround/rule in midround_rules)
if (!rule.weight)
continue
if(rule.flags & HIGH_IMPACT_RULESET)
if (high_impact_ruleset_executed && threat_level < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
continue
if(GLOB.dynamic_extended)
continue
if (rule.acceptable(current_players[CURRENT_LIVING_PLAYERS].len, threat_level) && mid_round_budget >= rule.cost)
rule.trim_candidates()
if (rule.ready())
@@ -642,11 +668,17 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
forced_injection = dry_run
return 100
var/chance = 0
var/max_pop_per_antag = max(5,15 - round(threat_level/10) - round(current_players[CURRENT_LIVING_PLAYERS].len/5))
var/effective_living_players = current_players[CURRENT_LIVING_PLAYERS].len
if(GLOB.dynamic_extended)
effective_living_players = min(effective_living_players, length(SSjob.get_living_sec())*2 + length(SSjob.get_living_heads()))
var/max_pop_per_antag = max(5,15 - round(threat_level/10) - round(effective_living_players/5))
if (!current_players[CURRENT_LIVING_ANTAGS].len)
chance += 50 // No antags at all? let's boost those odds!
if(GLOB.dynamic_extended)
chance += min(50,effective_living_players*5)
else
chance += 50 // No antags at all? let's boost those odds!
else
var/current_pop_per_antag = current_players[CURRENT_LIVING_PLAYERS].len / current_players[CURRENT_LIVING_ANTAGS].len
var/current_pop_per_antag = effective_living_players / current_players[CURRENT_LIVING_ANTAGS].len
if (current_pop_per_antag > max_pop_per_antag)
chance += min(50, 25+10*(current_pop_per_antag-max_pop_per_antag))
else
@@ -72,9 +72,9 @@
set name = "Run Dynamic Simulations"
set category = "Debug"
var/simulations = input(usr, "Enter number of simulations") as num
var/roundstart_players = input(usr, "Enter number of round start players") as num
var/forced_threat_level = input(usr, "Enter forced threat level, if you want one") as num | null
var/simulations = tgui_input_num(usr, "Enter number of simulations")
var/roundstart_players = tgui_input_num(usr, "Enter number of round start players")
var/forced_threat_level = tgui_input_num(usr, "Enter forced threat level, if you want one")
SSticker.mode = new /datum/game_mode/dynamic
message_admins("Running dynamic simulations...")
+7 -12
View File
@@ -40,16 +40,11 @@ GLOBAL_LIST_EMPTY(objectives)
//Shared by few objective types
/datum/objective/proc/admin_simple_target_pick(mob/admin)
var/list/possible_targets = list("Free objective")
var/def_value
for(var/datum/mind/possible_target in SSticker.minds)
if ((possible_target != src) && ishuman(possible_target.current))
possible_targets += possible_target.current
if(target && target.current)
def_value = target.current
var/mob/new_target = input(admin,"Select target:", "Objective target", def_value) as null|anything in possible_targets
var/mob/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_targets)
if (!new_target)
return
@@ -606,12 +601,12 @@ GLOBAL_LIST_EMPTY(possible_items)
/datum/objective/steal/admin_edit(mob/admin)
var/list/possible_items_all = GLOB.possible_items+"custom"
var/new_target = input(admin,"Select target:", "Objective target", steal_target) as null|anything in possible_items_all
var/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_items_all)
if (!new_target)
return
if (new_target == "custom") //Can set custom items.
var/custom_path = input(admin,"Search for target item type:","Type") as null|text
var/custom_path = tgui_input_text(admin,"Search for target item type:","Type")
if (!custom_path)
return
var/obj/item/custom_target = pick_closest_path(custom_path, make_types_fancy(subtypesof(/obj/item)))
@@ -728,7 +723,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return checking.researched_nodes.len >= target_amount
/datum/objective/download/admin_edit(mob/admin)
var/count = input(admin,"How many nodes ?","Nodes",target_amount) as num|null
var/count = tgui_input_num(admin,"How many nodes ?","Nodes",target_amount)
if(count)
target_amount = count
update_explanation_text()
@@ -774,7 +769,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return captured_amount >= target_amount
/datum/objective/capture/admin_edit(mob/admin)
var/count = input(admin,"How many mobs to capture ?","capture",target_amount) as num|null
var/count = tgui_input_num(admin,"How many mobs to capture ?","capture",target_amount)
if(count)
target_amount = count
update_explanation_text()
@@ -806,7 +801,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
explanation_text = "Extract [target_amount] compatible genome\s."
/datum/objective/absorb/admin_edit(mob/admin)
var/count = input(admin,"How many people to absorb?","absorb",target_amount) as num|null
var/count = tgui_input_num(admin,"How many people to absorb?","absorb",target_amount)
if(count)
target_amount = count
update_explanation_text()
@@ -896,7 +891,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/destroy/admin_edit(mob/admin)
var/list/possible_targets = active_ais(1)
if(possible_targets.len)
var/mob/new_target = input(admin,"Select target:", "Objective target") as null|anything in possible_targets
var/mob/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_targets)
target = new_target.mind
else
to_chat(admin, "No active AIs with minds")
+1 -1
View File
@@ -112,7 +112,7 @@
if(!storedpda)
to_chat(user, "<span class='notice'>[src] is empty.</span>")
return
var/choice = input(user, "Select the new skin!", "PDA Painting") as null|anything in colorlist
var/choice = tgui_input_list(user, "Select the new skin!", "PDA Painting", colorlist)
if(!choice || !storedpda || !in_range(src, user))
return
var/list/P = colorlist[choice]
+9 -9
View File
@@ -8,14 +8,14 @@
max_integrity = 200
var/obj/item/bodypart/storedpart
var/initial_icon_state
var/static/list/style_list_icons = list("standard" = 'icons/mob/augmentation/augments.dmi',
"engineer" = 'icons/mob/augmentation/augments_engineer.dmi',
"security" = 'icons/mob/augmentation/augments_security.dmi',
"mining" = 'icons/mob/augmentation/augments_mining.dmi',
"Talon" = 'icons/mob/augmentation/cosmetic_prosthetic/talon.dmi',
"Nanotrasen" = 'icons/mob/augmentation/cosmetic_prosthetic/nanotrasen.dmi',
"Hephaesthus" = 'icons/mob/augmentation/cosmetic_prosthetic/hephaestus.dmi',
"Bishop" = 'icons/mob/augmentation/cosmetic_prosthetic/bishop.dmi',
var/static/list/style_list_icons = list("standard" = 'icons/mob/augmentation/augments.dmi',
"engineer" = 'icons/mob/augmentation/augments_engineer.dmi',
"security" = 'icons/mob/augmentation/augments_security.dmi',
"mining" = 'icons/mob/augmentation/augments_mining.dmi',
"Talon" = 'icons/mob/augmentation/cosmetic_prosthetic/talon.dmi',
"Nanotrasen" = 'icons/mob/augmentation/cosmetic_prosthetic/nanotrasen.dmi',
"Hephaesthus" = 'icons/mob/augmentation/cosmetic_prosthetic/hephaestus.dmi',
"Bishop" = 'icons/mob/augmentation/cosmetic_prosthetic/bishop.dmi',
"Xion" = 'icons/mob/augmentation/cosmetic_prosthetic/xion.dmi',
"Grayson" = 'icons/mob/augmentation/cosmetic_prosthetic/grayson.dmi',
"Cybersolutions" = 'icons/mob/augmentation/cosmetic_prosthetic/cybersolutions.dmi',
@@ -116,7 +116,7 @@
add_fingerprint(user)
if(storedpart)
var/augstyle = input(user, "Select style.", "Augment Custom Fitting") as null|anything in style_list_icons
var/augstyle = tgui_input_list(user, "Select style.", "Augment Custom Fitting", style_list_icons)
if(!augstyle)
return
if(!in_range(src, user))
+1 -1
View File
@@ -184,7 +184,7 @@
if(materials.materials[i] > 0)
list_to_show += i
used_material = input("Choose [used_material]", "Custom Material") as null|anything in sortList(list_to_show, /proc/cmp_typepaths_asc)
used_material = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sortList(list_to_show, /proc/cmp_typepaths_asc))
if(!used_material)
return //Didn't pick any material, so you can't build shit either.
custom_materials[used_material] += amount_needed
+102
View File
@@ -0,0 +1,102 @@
// like a recycler, but for plants only ig
/obj/machinery/autoloom
name = "autoloom"
desc = "A large processing machine used to process raw biological matter, like cotton or logs. It also looks like a recycler. There's a display on the side."
icon = 'icons/obj/recycling.dmi'
icon_state = "grinder-o0"
layer = ABOVE_ALL_MOB_LAYER // Overhead
density = TRUE
circuit = /obj/item/circuitboard/machine/autoloom
var/icon_name = "grinder-o"
var/eat_dir = WEST
var/process_efficiency = 0
var/static/list/can_process = typecacheof(list(
/obj/item/stack/sheet/cotton,
/obj/item/grown/log,
/obj/item/grown/cotton
))
/obj/machinery/autoloom/RefreshParts()
for(var/obj/item/stock_parts/manipulator/M in component_parts)
process_efficiency = M.rating
/obj/machinery/recycler/examine(mob/user)
. = ..()
. += "<span class='notice'>Biomatter processing efficiency at <b>[amount_produced*100]%</b>.</span>"
/obj/machinery/autoloom/power_change()
..()
update_icon()
/obj/machinery/autoloom/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "grinder-oOpen", "grinder-o0", I))
return
if(default_pry_open(I))
return
if(default_unfasten_wrench(user, I))
return
if(default_deconstruction_crowbar(I))
return
return ..()
/obj/machinery/autoloom/update_icon_state()
var/is_powered = !(stat & (BROKEN|NOPOWER))
icon_state = icon_name + "[is_powered]" // add the blood tag at the end
/obj/machinery/autoloom/CanPass(atom/movable/AM)
. = ..()
if(!anchored)
return
var/move_dir = get_dir(loc, AM.loc)
if(move_dir == eat_dir)
return TRUE
/obj/machinery/autoloom/Crossed(atom/movable/AM)
eat(AM)
. = ..()
/obj/machinery/autoloom/proc/eat(atom/movable/AM0, sound=TRUE)
if(stat & (BROKEN|NOPOWER))
return
if(!isturf(AM0.loc))
return //I don't know how you called Crossed() but stop it.
if(is_type_in_list(AM0, can_process))
process_item(AM0)
/obj/machinery/autoloom/proc/process_item(obj/item/I)
. = list()
for(var/A in I)
var/atom/movable/AM = A
AM.forceMove(loc)
if(AM.loc == loc)
. += AM
I.forceMove(loc)
if(istype(I, /obj/item/grown/log))
var/obj/item/grown/log/L = I
var/seed_modifier = 0
if(L.seed)
seed_modifier = round(L.seed.potency / 25)
new L.plank_type(src.loc, process_efficiency + seed_modifier)
qdel(L)
return
if(istype(I, /obj/item/stack/sheet/cotton))
var/obj/item/stack/sheet/cotton/RS = I
var/tomake = round((RS.amount / 4) * process_efficiency)
new RS.loom_result(src.loc, tomake)
qdel(RS)
return
if(istype(I, /obj/item/grown/cotton))
var/obj/item/grown/cotton/RC = I
var/cottonAmt = 1 + round(RC.seed.potency / 25)
var/newRaw = new RC.cotton_type(src.loc, cottonAmt)
qdel(RC)
process_item(newRaw)
return
+1 -1
View File
@@ -185,7 +185,7 @@
to_chat(user, "<span class='warning'>This machine already has bags attached.</span>")
if(!bag && !outbag)
var/choice = alert(user, "Choose where to place [O]", "", "Input", "Cancel", "Output")
var/choice = tgui_alert(user, "Choose where to place [O]", "", list("Input", "Cancel", "Output"))
switch(choice)
if("Cancel")
return FALSE
+1 -1
View File
@@ -16,7 +16,7 @@
/mob/living/silicon/ai/proc/show_camera_list()
var/list/cameras = get_camera_list()
var/camera = input(src, "Choose which camera you want to view", "Cameras") as null|anything in cameras
var/camera = tgui_input_list(src, "Choose which camera you want to view", "Cameras", cameras)
switchCamera(cameras[camera])
/datum/trackable
+2 -3
View File
@@ -82,9 +82,8 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
// If it's a generic arcade machine, pick a random arcade
// circuit board for it and make the new machine
if(!circuit)
var/list/gameodds = list(/obj/item/circuitboard/computer/arcade/battle = 33,
/obj/item/circuitboard/computer/arcade/orion_trail = 33,
/obj/item/circuitboard/computer/arcade/minesweeper = 33,
var/list/gameodds = list(/obj/item/circuitboard/computer/arcade/battle = 50,
/obj/item/circuitboard/computer/arcade/orion_trail = 50,
/obj/item/circuitboard/computer/arcade/amputation = 2)
var/thegame = pickweight(gameodds)
var/obj/item/circuitboard/CB = new thegame()
@@ -1,413 +0,0 @@
#define MINESWEEPER_GAME_MAIN_MENU 0
#define MINESWEEPER_GAME_PLAYING 1
#define MINESWEEPER_GAME_LOST 2
#define MINESWEEPER_GAME_WON 3
#define MINESWEEPERIMG(what) {"<img style='border:0' <span class="minesweeper16x16 [#what]"></span>"} //Basically bypassing asset.icon_tag()
/obj/machinery/computer/arcade/minesweeper
name = "Minesweeper"
desc = "An arcade machine that generates grids. It seems that the machine sparks and screeches when a grid is generated, as if it cannot cope with the intensity of generating the grid."
icon_state = "arcade"
circuit = /obj/item/circuitboard/computer/arcade/minesweeper
var/area
var/difficulty = "" //To show what difficulty you are playing
var/flag_text = ""
var/flagging = FALSE
var/game_status = MINESWEEPER_GAME_MAIN_MENU
var/mine_limit = 0
var/mine_placed = 0
var/mine_sound = TRUE //So it doesn't get repeated when multiple mines are exposed
var/randomcolour = 1
var/randomnumber = 1 //Random emagged game iteration number to be displayed, put here so it is persistent across one individual arcade machine
var/safe_squares_revealed
var/saved_web = "" //To display the web if you click on the arcade
var/win_condition
var/rows = 1
var/columns = 1
var/table[31][51] //Make the board boys, 30x50 board
var/spark_spam = FALSE
/obj/machinery/computer/arcade/minesweeper/interact(mob/user)
var/emagged = CHECK_BITFIELD(obj_flags, EMAGGED)
var/dat
if(game_status == MINESWEEPER_GAME_MAIN_MENU)
dat += "<head><title>Minesweeper</title></head><div align='center'><b>Minesweeper[emagged ? " <font color='red'>EXTREME EDITION</font>: Iteration <font color='[randomcolour]'>#[randomnumber]</font>" : ""]</b><br>" //Different colour mix for every random number made
dat += "<font size='2'> [emagged ? "Explode in the game, explode in real life" : "Reveal all the squares without hitting a mine"]!<br>What difficulty do you want to play?<br><br><br><br><b><a href='byond://?src=[REF(src)];Easy=1'><font color='#cc66ff'>Easy (9x9 board, 10 mines)</font></a><br><a href='byond://?src=[REF(src)];Intermediate=1'><font color='#cc66ff'>Intermediate (16x16 board, 40 mines)</font></a><br><a href='byond://?src=[REF(src)];Hard=1'><font color='#cc66ff'>Hard (16x30 board, 99 mines)</font></a><br><a href='byond://?src=[REF(src)];Custom=1'><font color='#cc66ff'>Custom</font>"
else
dat = saved_web
user = usr
var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/simple/minesweeper)
assets.send(user)
user << browse(dat,"window=minesweeper,size=400x500")
add_fingerprint(user)
. = ..()
/obj/machinery/computer/arcade/minesweeper/proc/reset_spark_spam()
spark_spam = FALSE
/obj/machinery/computer/arcade/minesweeper/Topic(href, href_list)
. = ..()
if(.)
return
var/exploding_hell = FALSE //For emagged failures
var/reset_board = FALSE
var/mob/living/user = usr //To identify who the hell is using this window, this should also make things like aliens and monkeys able to use the machine!!
var/web_difficulty_menu = "<font size='2'> Reveal all the squares without hitting a mine!<br>What difficulty do you want to play?<br><br><br><br><b><a href='byond://?src=[REF(src)];Easy=1'><font color='#cc66ff'>Easy (9x9 board, 10 mines)</font></a><br><a href='byond://?src=[REF(src)];Intermediate=1'><font color='#cc66ff'>Intermediate (16x16 board, 40 mines)</font></a><br><a href='byond://?src=[REF(src)];Hard=1'><font color='#cc66ff'>Hard (16x30 board, 99 mines)</font></a><br><a href='byond://?src=[REF(src)];Custom=1'><font color='#cc66ff'>Custom</font>"
var/web = "<head><title>Minesweeper</title></head><div align='center'><b>Minesweeper</b><br>"
var/static_web = "<head><title>Minesweeper</title></head><div align='center'><b>Minesweeper</b><br>" //When we need to revert to the main menu we set web as this
web = static_web
if(CHECK_BITFIELD(obj_flags, EMAGGED))
web = "<head><title>Minesweeper</title></head><body><div align='center'><b>Minesweeper <font color='red'>EXTREME EDITION</font>: Iteration <font color='[randomcolour]'>#[randomnumber]</font></b><br>" //Different colour mix for every random number made
if(!spark_spam)
do_sparks(5, 1, src)
spark_spam = TRUE
addtimer(CALLBACK(src, .proc/reset_spark_spam), 30)
var/startup_sound = CHECK_BITFIELD(obj_flags, EMAGGED) ? 'sound/arcade/minesweeper_emag2.ogg' : 'sound/arcade/minesweeper_startup.ogg'
if(href_list["Main_Menu"])
game_status = MINESWEEPER_GAME_MAIN_MENU
mine_limit = 0
rows = 0
columns = 0
mine_placed = 0
if(href_list["Easy"])
playsound(loc, startup_sound, 50, FALSE, extrarange = -3)
flag_text = "OFF"
game_status = MINESWEEPER_GAME_PLAYING
reset_board = TRUE
difficulty = "Easy"
rows = 10 //9x9 board
columns = 10
mine_limit = 10
if(href_list["Intermediate"])
playsound(loc, startup_sound, 50, FALSE, extrarange = -3)
flag_text = "OFF"
game_status = MINESWEEPER_GAME_PLAYING
reset_board = TRUE
difficulty = "Intermediate"
rows = 17 //16x16 board
columns = 17
mine_limit = 40
if(href_list["Hard"])
playsound(loc, startup_sound, 50, FALSE, extrarange = -3)
flag_text = "OFF"
game_status = MINESWEEPER_GAME_PLAYING
reset_board = TRUE
difficulty = "Hard"
rows = 17 //16x30 board
columns = 31
mine_limit = 99
if(href_list["Custom"])
if(custom_generation(usr))
flag_text = "OFF"
game_status = MINESWEEPER_GAME_PLAYING
reset_board = TRUE
difficulty = "Custom"
playsound(loc, startup_sound, 50, FALSE, extrarange = -3)
if(href_list["Flag"])
playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, FALSE, extrarange = -3)
if(!flagging)
flagging = TRUE
flag_text = "ON"
else
flagging = FALSE
flag_text = "OFF"
if(game_status == MINESWEEPER_GAME_MAIN_MENU)
if(CHECK_BITFIELD(obj_flags, EMAGGED))
playsound(loc, 'sound/arcade/minesweeper_emag2.ogg', 50, FALSE, extrarange = -3)
web += "<font size='2'>Explode in the game, explode in real life!<br>What difficulty do you want to play?<br><br><br><br><b><a href='byond://?src=[REF(src)];Easy=1'><font color='#cc66ff'>Easy (9x9 board, 10 mines)</font></a><br><a href='byond://?src=[REF(src)];Intermediate=1'><font color='#cc66ff'>Intermediate (16x16 board, 40 mines)</font></a><br><a href='byond://?src=[REF(src)];Hard=1'><font color='#cc66ff'>Hard (16x30 board, 99 mines)</font></a><br><a href='byond://?src=[REF(src)];Custom=1'><font color='#cc66ff'>Custom</font>"
else
playsound(loc, 'sound/arcade/minesweeper_startup.ogg', 50, FALSE, extrarange = -3)
web += web_difficulty_menu
if(game_status == MINESWEEPER_GAME_PLAYING)
mine_sound = TRUE
area = (rows-1)*(columns-1)
if(reset_board)
mine_placed = 0
var/reset_everything = TRUE
make_mines(reset_everything)
safe_squares_revealed = 0
win_condition = area-mine_placed
if(game_status != MINESWEEPER_GAME_MAIN_MENU)
for(var/y1=1;y1<rows;y1++)
for(var/x1=1;x1<columns;x1++)
var/coordinates
coordinates = (y1*100)+x1
if(href_list["[coordinates]"])
if(game_status == MINESWEEPER_GAME_PLAYING) //Don't do anything if we won or something
if(!flagging)
if(table[y1][x1] < 10 && table[y1][x1] >= 0) //Check that it's not already revealed, and stop flag removal if we're out of flag mode
table[y1][x1] += 10
if(table[y1][x1] != 10)
playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, FALSE, extrarange = -3)
else
if(game_status != MINESWEEPER_GAME_LOST && game_status != MINESWEEPER_GAME_WON)
game_status = MINESWEEPER_GAME_LOST
if(CHECK_BITFIELD(obj_flags, EMAGGED) && !exploding_hell)
exploding_hell = TRUE
explode_EVERYTHING()
if(QDELETED(src))
return
if(mine_sound)
switch(rand(1,3)) //Play every time a mine is hit
if(1)
playsound(loc, 'sound/arcade/minesweeper_explosion1.ogg', 50, FALSE, extrarange = -3)
if(2)
playsound(loc, 'sound/arcade/minesweeper_explosion2.ogg', 50, FALSE, extrarange = -3)
if(3)
playsound(loc, 'sound/arcade/minesweeper_explosion3.ogg', 50, FALSE, extrarange = -3)
mine_sound = FALSE
else
playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, FALSE, extrarange = -3)
if(table[y1][x1] >= 0) //Check that it's not already flagged
table[y1][x1] -= 10
else if(table[y1][x1] < 0) //If flagged, remove the flag
table[y1][x1] += 10
if(table[y1][x1] > 10 && !reset_board)
safe_squares_revealed += 1
var/y2 = y1
var/x2 = x1
work_squares(y2, x2) //Work squares while in this loop so there's less load
reset_board = FALSE
CHECK_TICK
web += "<table>" //Start setting up the html table
web += "<tbody>"
for(var/y1=1;y1<rows;y1++)
web += "<tr>"
for(var/x1=1;x1<columns;x1++)
var/coordinates
coordinates = (y1*100)+x1
switch(table[y1][x1])
if(-10 to -1)
if(game_status != MINESWEEPER_GAME_PLAYING)
web += "<td>[MINESWEEPERIMG(flag)]</td>"
else
web += "<td><a href='byond://?src=[REF(src)];[coordinates]=1'>[MINESWEEPERIMG(flag)]</a></td>"
if(0)
if(game_status != MINESWEEPER_GAME_PLAYING)
web += "<td>[MINESWEEPERIMG(mine)]</td>"
else
web += "<td><a href='byond://?src=[REF(src)];[coordinates]=1'>[MINESWEEPERIMG(hidden)]</a></td>" //Make unique hrefs for every square
if(1 to 9)
if(game_status != MINESWEEPER_GAME_PLAYING)
web += "<td>[MINESWEEPERIMG(hidden)]</td>"
else
web += "<td><a href='byond://?src=[REF(src)];[coordinates]=1'>[MINESWEEPERIMG(hidden)]</a></td>" //Make unique hrefs for every square
if(10)
web += "<td>[MINESWEEPERIMG(minehit)]</td>"
if(11)
web += "<td>[MINESWEEPERIMG(empty)]</td>"
if(12)
web += "<td>[MINESWEEPERIMG(1)]</td>"
if(13)
web += "<td>[MINESWEEPERIMG(2)]</td>"
if(14)
web += "<td>[MINESWEEPERIMG(3)]</td>"
if(15)
web += "<td>[MINESWEEPERIMG(4)]</td>"
if(16)
web += "<td>[MINESWEEPERIMG(5)]</td>"
if(17)
web += "<td>[MINESWEEPERIMG(6)]</td>"
if(18)
web += "<td>[MINESWEEPERIMG(7)]</td>"
if(19)
web += "<td>[MINESWEEPERIMG(8)]</td>"
CHECK_TICK
web += "</tr>"
web += "</table>"
web += "</tbody>"
web += "<br>"
if(safe_squares_revealed >= win_condition && game_status == MINESWEEPER_GAME_PLAYING)
game_status = MINESWEEPER_GAME_WON
if(rows < 10 || columns < 10) //If less than easy difficulty
playsound(loc, 'sound/arcade/minesweeper_winfail.ogg', 50, FALSE, extrarange = -3)
say("You cleared the board of all mines, but you picked too small of a board! Try again with at least a 9x9 board!")
else
playsound(loc, 'sound/arcade/minesweeper_win.ogg', 50, FALSE, extrarange = -3)
say("You cleared the board of all mines! Congratulations!")
if(CHECK_BITFIELD(obj_flags, EMAGGED))
var/itemname
switch(rand(1,3))
if(1)
itemname = "a syndicate bomb beacon"
new /obj/item/sbeacondrop/bomb(loc)
if(2)
itemname = "a rocket launcher"
new /obj/item/gun/ballistic/rocketlauncher/unrestricted(loc)
new /obj/item/ammo_casing/caseless/rocket(loc)
new /obj/item/ammo_casing/caseless/rocket(loc)
new /obj/item/ammo_casing/caseless/rocket(loc)
if(3)
itemname = "two bags of c4"
new /obj/item/storage/backpack/duffelbag/syndie/c4(loc)
new /obj/item/storage/backpack/duffelbag/syndie/x4(loc)
message_admins("[key_name_admin(user)] won emagged Minesweeper and got [itemname]!")
visible_message("<span class='notice'>[src] dispenses [itemname]!</span>", "<span class='notice'>You hear a chime and a clunk.</span>")
DISABLE_BITFIELD(obj_flags, EMAGGED)
else
var/dope_prizes = (area >= 480) ? 6 : (area >= 256) ? 4 : 2
prizevend(user, dope_prizes)
if(game_status == MINESWEEPER_GAME_WON)
web += "[(rows < 10 || columns < 10) ? "<font size='4'>You won, but your board was too small! Pick a bigger board next time!" : "<font size='6'>Congratulations, you have won!"]<br><font size='3'>Want to play again?<br><b><a href='byond://?src=[REF(src)];Easy=1'><font color='#cc66ff'>Easy (9x9 board, 10 mines)</font></a><br><a href='byond://?src=[REF(src)];Intermediate=1'><font color='#cc66ff'>Intermediate (16x16 board, 40 mines)</font></a><br><a href='byond://?src=[REF(src)];Hard=1'><font color='#cc66ff'>Hard (16x30 board, 99 mines)</font></a><br><a href='byond://?src=[REF(src)];Custom=1'><font color='#cc66ff'>Custom</font></a></b><br><a href='byond://?src=[REF(src)];Main_Menu=1'><font color='#cc66ff'>Return to Main Menu</font></a></b><br>"
if(game_status == MINESWEEPER_GAME_LOST)
web += "<font size='6'>You have lost!<br><font size='3'>Try again?<br><b><a href='byond://?src=[REF(src)];Easy=1'><font color='#cc66ff'>Easy (9x9 board, 10 mines)</font></a><br><a href='byond://?src=[REF(src)];Intermediate=1'><font color='#cc66ff'>Intermediate (16x16 board, 40 mines)</font></a><br><a href='byond://?src=[REF(src)];Hard=1'><font color='#cc66ff'>Hard (16x30 board, 99 mines)</font></a><br><a href='byond://?src=[REF(src)];Custom=1'><font color='#cc66ff'>Custom</font></a></b><br><a href='byond://?src=[REF(src)];Main_Menu=1'><font color='#cc66ff'>Return to Main Menu</font></a></b><br>"
if(game_status == MINESWEEPER_GAME_PLAYING)
web += "<a href='byond://?src=[REF(src)];Main_Menu=1'><font color='#cc66ff'>Return to Main Menu</font></a><br>"
web += "<div align='right'>Difficulty: [difficulty]<br>Mines: [mine_placed]<br>Rows: [rows-1]<br>Columns: [columns-1]<br><a href='byond://?src=[REF(src)];Flag=1'><font color='#cc66ff'>Flagging mode: [flag_text]</font></a></div>"
web += "</div>"
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/simple/minesweeper)
saved_web = sheet.css_tag()
saved_web += web
updateDialog()
return
/obj/machinery/computer/arcade/minesweeper/emag_act(mob/user)
. = ..()
if(CHECK_BITFIELD(obj_flags, EMAGGED))
return
desc = "An arcade machine that generates grids. It's clunking and sparking everywhere, almost as if threatening to explode at any moment!"
do_sparks(5, 1, src)
randomnumber = rand(1,255)
randomcolour = rgb(randomnumber,randomnumber/2,randomnumber/3)
ENABLE_BITFIELD(obj_flags, EMAGGED)
if(game_status == MINESWEEPER_GAME_MAIN_MENU)
to_chat(user, "<span class='warning'>An ominous tune plays from the arcade's speakers!</span>")
playsound(user, 'sound/arcade/minesweeper_emag1.ogg', 100, FALSE, extrarange = 3)
else //Can't let you do that, star fox!
to_chat(user, "<span class='warning'>The machine buzzes and sparks... the game has been reset!</span>")
playsound(user, 'sound/machines/buzz-sigh.ogg', 100, FALSE, extrarange = 3) //Loud buzz
game_status = MINESWEEPER_GAME_MAIN_MENU
return TRUE
/obj/machinery/computer/arcade/minesweeper/proc/custom_generation(mob/user)
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, FALSE, extrarange = -3) //Entered into the menu so ping sound
var/new_rows = input(user, "How many rows do you want? (Minimum: 4, Maximum: 30)", "Minesweeper Rows") as null|num
if(!new_rows || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return FALSE
new_rows = clamp(new_rows + 1, 4, 20)
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, FALSE, extrarange = -3)
var/new_columns = input(user, "How many columns do you want? (Minimum: 4, Maximum: 50)", "Minesweeper Squares") as null|num
if(!new_columns || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return FALSE
new_columns = clamp(new_columns + 1, 4, 30)
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, FALSE, extrarange = -3)
var/grid_area = (new_rows - 1) * (new_columns - 1)
var/lower_limit = round(grid_area*0.156)
var/upper_limit = round(grid_area*0.85)
var/new_mine_limit = input(user, "How many mines do you want? (Minimum: [lower_limit], Maximum: [upper_limit])", "Minesweeper Mines") as null|num
if(!new_mine_limit || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return FALSE
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, FALSE, extrarange = -3)
rows = new_rows
columns = new_columns
mine_limit = clamp(new_mine_limit, lower_limit, upper_limit)
return TRUE
/obj/machinery/computer/arcade/minesweeper/proc/make_mines(var/reset_everything)
if(mine_placed < mine_limit)
for(var/y1=1;y1<rows;y1++) //Board resetting and mine building
for(var/x1=1;x1<columns;x1++)
if(prob(area/mine_limit) && mine_placed < mine_limit && table[y1][x1] != 0) //Unlikely for this to happen but this has eaten mines before
table[y1][x1] = 0
mine_placed += 1
else if(reset_everything)
table[y1][x1] = 1
reset_everything = FALSE
make_mines() //In case the first pass doesn't generate enough mines
/obj/machinery/computer/arcade/minesweeper/proc/work_squares(var/y2, var/x2, var/y3, var/x3)
if(y3 > 0 && x3 > 0)
y2 = y3
x2 = x3
if(table[y2][x2] == 1)
for(y3=y2-1;y3<y2+2;y3++)
if(y3 >= rows || y3 < 1)
continue
for(x3=x2-1;x3<x2+2;x3++)
if(x3 >= columns || x3 < 1)
continue
if(table[y3][x3] == 0)
table[y2][x2] += 1
if(table[y2][x2] == 11)
for(y3=y2-1;y3<y2+2;y3++)
if(y3 >= rows || y3 < 1)
continue
for(x3=x2-1;x3<x2+2;x3++)
if(x3 >= columns || x3 < 1)
continue
if(table[y3][x3] > 0 && table[y3][x3] < 10)
table[y3][x3] += 10
work_squares(y3, x3) //Refresh so we check everything we might be missing
/obj/machinery/computer/arcade/minesweeper/proc/explode_EVERYTHING()
var/mob/living/user = usr
to_chat(user, "<span class='boldwarning'>You feel a great sense of dread wash over you, as if you just unleashed armageddon upon yourself!</span>")
var/row_limit = rows-1
var/column_limit = columns-1
var/mine_limit_v2 = mine_limit
if(rows > 21)
row_limit = 20
if(columns > 21)
column_limit = 20
if(mine_limit > (rows*columns) * 0.25)
mine_limit_v2 = 24
message_admins("[key_name_admin(user)] failed an emagged Minesweeper arcade and has unleashed an explosion armageddon of size [row_limit],[column_limit] around [ADMIN_LOOKUPFLW(user.loc)]!")
if(mine_limit_v2 < 10)
explosion(loc, 2, 5, 10, 15) //Thought you could survive by putting as few mines as possible, huh??
else
explosion(loc, 1, 3, rand(1,5), rand(1,10))
var/list/targets = list()
var/cur_y = y - round(row_limit * 0.5, 1)
var/starting_row = 1
if(cur_y < 1)
starting_row -= cur_y - 1
cur_y = 1
var/start_x = x - round(column_limit * 0.5, 1)
var/starting_column = 1
if(start_x < 1)
starting_column -= start_x - 1
start_x = 1
for(var/row in starting_row to length(table)) //translate the mines locations into actual turf coordinates.
if(!locate(cur_y, start_x, z))
break
var/cur_x = start_x
for(var/column in starting_column to length(table[row]))
var/coord_value = table[row][column]
if(coord_value == 10 || coord_value == 0) //there is a mine in here.
var/turf/T = locate(cur_y, cur_x, z)
if(!T)
break
targets += T
cur_x++
cur_y++
var/num_explosions = 0
for(var/T in shuffle(targets)) //Create a shitton of explosions in irl turfs if we lose, it will probably kill us
addtimer(CALLBACK(GLOBAL_PROC, /proc/explosion, T, 0, rand(1,2),rand(1,5),rand(3,10), FALSE), 15 * ++num_explosions)
if(num_explosions == mine_limit_v2)
return
#undef MINESWEEPERIMG
#undef MINESWEEPER_GAME_MAIN_MENU
#undef MINESWEEPER_GAME_PLAYING
#undef MINESWEEPER_GAME_LOST
#undef MINESWEEPER_GAME_WON
@@ -251,7 +251,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
IO |= text[1]
if(!IO.len)
to_chat(user, "<span class='alert'>No machinery detected.</span>")
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in sortList(IO)
var/S = tgui_input_list(user, "Select the device set: ", "Selection", sortList(IO))
if(src)
src.input_tag = "[S]_in"
src.output_tag = "[S]_out"
@@ -269,7 +269,7 @@
T["[netcam.c_tag][netcam.can_use() ? null : " (Deactivated)"]"] = netcam
playsound(origin, 'sound/machines/terminal_prompt.ogg', 25, 0)
var/camera = input("Choose which camera you want to view", "Cameras") as null|anything in T
var/camera = tgui_input_list(usr, "Choose which camera you want to view", "Cameras", T)
var/obj/machinery/camera/final = T[camera]
playsound(src, "terminal_type", 25, 0)
if(final)
+1 -1
View File
@@ -447,7 +447,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if (authenticated == 2)
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
var/newJob = reject_bad_text(input("Enter a custom job assignment.", "Assignment", inserted_modify_id ? inserted_modify_id.assignment : "Unassigned"), MAX_NAME_LEN)
var/newJob = reject_bad_text(tgui_input_text(usr, "Enter a custom job assignment.", "Assignment", inserted_modify_id ? inserted_modify_id.assignment : "Unassigned"), MAX_NAME_LEN)
if(newJob)
t1 = newJob
@@ -116,7 +116,7 @@
return
current_pad.display_name = new_name
if("remove")
if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort")
if(usr && tgui_alert(usr, "Are you sure?", "Unlink Launchpad", list("I'm Sure", "Abort")) != "Abort")
launchpads -= current_pad
selected_id = null
. = TRUE
@@ -155,7 +155,7 @@
return
current_pad.display_name = new_name
if("remove")
if(usr && alert(usr, "Are you sure?", "Unlink Orbital Pad", "I'm Sure", "Abort") != "Abort")
if(usr && tgui_alert(usr, "Are you sure?", "Unlink Orbital Pad", list("I'm Sure", "Abort")) != "Abort")
mechpads -= current_pad
LAZYREMOVE(current_pad.consoles, src)
selected_id = null
+1 -1
View File
@@ -289,7 +289,7 @@
active1.fields["gender"] = "Male"
if("age")
if(active1)
var/t1 = input("Please input age:", "Med. records", active1.fields["age"], null) as num
var/t1 = tgui_input_num(usr, "Please input age:", "Med. records", active1.fields["age"])
if(!canUseMedicalRecordsConsole(usr, t1, a1))
return
active1.fields["age"] = t1
@@ -99,7 +99,7 @@
if("reset")
contained_id.points = 0
if("setgoal")
var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null)
var/num = round(tgui_input_num(usr, "Choose prisoner's goal:", "Input an Integer", contained_id.goal))
if(num >= 0)
num = min(num,1000) //Cap the quota to the equivilent of 10 minutes.
contained_id.goal = num
+3 -3
View File
@@ -577,13 +577,13 @@ What a mess.*/
active1.fields["gender"] = "Male"
if("age")
if(istype(active1, /datum/data/record))
var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num
var/t1 = tgui_input_num(usr, "Please input age:", "Secure. records", active1.fields["age"])
if(!canUseSecurityRecordsConsole(usr, "age", a1))
return
active1.fields["age"] = t1
if("species")
if(istype(active1, /datum/data/record))
var/t1 = input("Select a species", "Species Selection") as null|anything in GLOB.roundstart_races
var/t1 = stripped_input("Please input species name", "Secure. records", active1.fields["species"], null)
if(!canUseSecurityRecordsConsole(usr, t1, a1))
return
active1.fields["species"] = t1
@@ -687,7 +687,7 @@ What a mess.*/
temp += "<li><a href='?src=[REF(src)];choice=Change Rank;rank=[rank]'>[rank]</a></li>"
temp += "</ul>"
else
alert(usr, "You do not have the required rank to do this!")
tgui_alert(usr, "You do not have the required rank to do this!")
//TEMPORARY MENU FUNCTIONS
else//To properly clear as per clear screen.
temp=null
+2 -2
View File
@@ -139,7 +139,7 @@
if(is_eligible(M))
L[avoid_assoc_duplicate_keys(M.real_name, areaindex)] = M
var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in L
var/desc = tgui_input_list(user, "Please select a location to lock in.", "Locking Computer", L)
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //check if we are still around
return
target = L[desc]
@@ -167,7 +167,7 @@
if(!L.len)
to_chat(user, "<span class='alert'>No active connected stations located.</span>")
return
var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in L
var/desc = tgui_input_list(user, "Please select a station to lock in.", "Locking Computer", L)
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //again, check if we are still around
return
var/obj/machinery/teleport/station/target_station = L[desc]
+3 -3
View File
@@ -101,7 +101,7 @@
updateUsrDialog()
return
var/obj/I = input(user, "Please choose which object to retrieve.","Object recovery",null) as null|anything in stored_packages
var/obj/I = tgui_input_list(user, "Please choose which object to retrieve.","Object recovery", stored_packages)
playsound(src, "terminal_type", 25, 0)
if(!I)
return
@@ -439,7 +439,7 @@
to_chat(user, "<span class='danger'>You can't put [target] into [src]. They're conscious.</span>")
return
else if(target.client)
if(alert(target,"Would you like to enter cryosleep?",,"Yes","No") == "No")
if(tgui_alert(target,"Would you like to enter cryosleep?",,list("Yes","No")) == "No")
return
var/generic_plsnoleave_message = " Please adminhelp before leaving the round, even if there are no administrators online!"
@@ -462,7 +462,7 @@
LAZYADD(caught_string, "Revolutionary")
if(caught_string)
alert(target, "You're a [english_list(caught_string)]![generic_plsnoleave_message][addendum]")
tgui_alert(target, "You're a [english_list(caught_string)]![generic_plsnoleave_message][addendum]")
target.client.cryo_warned = world.time
return
+2 -2
View File
@@ -102,7 +102,7 @@
rad_insulation = RAD_MEDIUM_INSULATION
var/static/list/airlock_overlays = list()
/// sigh
var/unelectrify_timerid
@@ -1212,7 +1212,7 @@
else
optionlist = list("Standard", "Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Freezer", "Science", "Virology", "Mining", "Maintenance", "External", "External Maintenance")
var/paintjob = input(user, "Please select a paintjob for this airlock.") in optionlist
var/paintjob = tgui_input_list(user, "Please select a paintjob for this airlock.", "", optionlist)
if((!in_range(src, usr) && src.loc != usr) || !W.use_paint(user))
return
switch(paintjob)
+1 -1
View File
@@ -264,7 +264,7 @@ GLOBAL_LIST_EMPTY(network_holopads)
if(A)
LAZYADD(callnames[A], I)
callnames -= get_area(src)
var/result = input(usr, "Choose an area to call", "Holocall") as null|anything in sortNames(callnames)
var/result = tgui_input_list(usr, "Choose an area to call", "Holocall", sortNames(callnames))
if(QDELETED(usr) || !result || outgoing_call)
return
if(usr.loc == loc)
+1 -1
View File
@@ -339,7 +339,7 @@
pad.display_name = new_name
if("remove")
. = TRUE
if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort")
if(usr && tgui_alert(usr, "Are you sure?", "Unlink Launchpad", list("I'm Sure", "Abort")) != "Abort")
pad = null
if("launch")
sending = TRUE
+1 -1
View File
@@ -245,7 +245,7 @@ Buildable meters
disposable = FALSE
/obj/item/pipe/bluespace/attack_self(mob/user)
var/new_name = input(user, "Enter identifier for bluespace pipe network", "bluespace pipe", bluespace_network_name) as text|null
var/new_name = tgui_input_text(user, "Enter identifier for bluespace pipe network", "bluespace pipe", bluespace_network_name)
if(!isnull(new_name))
bluespace_network_name = new_name
+2 -2
View File
@@ -193,11 +193,11 @@
playsound(loc, 'sound/machines/click.ogg', 30, 1)
/obj/machinery/syndicatebomb/proc/settings(mob/user)
var/new_timer = input(user, "Please set the timer.", "Timer", "[timer_set]") as num
var/new_timer = tgui_input_num(user, "Please set the timer.", "Timer", "[timer_set]")
if(in_range(src, user) && isliving(user)) //No running off and setting bombs from across the station
timer_set = clamp(new_timer, minimum_timer, maximum_timer)
loc.visible_message("<span class='notice'>[icon2html(src, viewers(src))] timer set for [timer_set] seconds.</span>")
if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, user) && isliving(user))
if(tgui_alert(user,"Would you like to start the countdown now?",,list("Yes","No")) == "Yes" && in_range(src, user) && isliving(user))
if(defused || active)
if(defused)
visible_message("<span class='warning'>[icon2html(src, viewers(src))] Device error: User intervention required.</span>")
@@ -316,7 +316,7 @@
// Get out list of viable PDAs
var/list/obj/item/pda/sendPDAs = get_viewable_pdas()
if(GLOB.PDAs && LAZYLEN(GLOB.PDAs) > 0)
customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortNames(sendPDAs)
customrecepient = tgui_input_list(usr, "Select a PDA from the list.", "", sortNames(sendPDAs))
else
customrecepient = null
return
@@ -177,7 +177,7 @@
links.Remove(T)
if("freq")
if("add" in params)
var/newfreq = input("Specify a new frequency to filter (GHz). Decimals assigned automatically.", src.name, null) as null|num
var/newfreq = tgui_input_num(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src.name, null)
if(!canAccess(usr) || !newfreq || isnull(newfreq))
return
+1 -1
View File
@@ -38,7 +38,7 @@
to_chat(user, "You have a very great feeling about this!")
else
to_chat(user, "The Wish Granter awaits your wish.")
var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","The Station To Disappear","To Kill","Nothing")
var/wish = tgui_input_list(user, "You want...","Wish", list("Power","Wealth","The Station To Disappear","To Kill","Nothing"))
switch(wish)
if("Power") //Gives infinite power in exchange for infinite power going off in your face!
if(charges <= 0)
@@ -407,7 +407,7 @@
return
if(href_list["cut"])
if(cable && cable.amount)
var/m = round(input(chassis.occupant,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1)
var/m = round(tgui_input_num(chassis.occupant,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)), 1)
m = min(m, cable.amount)
if(m)
use_cable(m)
+1 -1
View File
@@ -246,7 +246,7 @@
output_maintenance_dialog(id_card, usr)
if(href_list["set_internal_tank_valve"] && state >=1)
var/new_pressure = input(usr,"Input new output pressure","Pressure setting",internal_tank_valve) as num
var/new_pressure = tgui_input_num(usr,"Input new output pressure","Pressure setting",internal_tank_valve)
if(new_pressure)
internal_tank_valve = new_pressure
to_chat(usr, "The internal pressure valve has been set to [internal_tank_valve]kPa.")
+2 -2
View File
@@ -18,7 +18,7 @@
if(act_intent == INTENT_HELP || act_intent == INTENT_GRAB)
return
if(buckled_mobs.len > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?","Unbuckle Who?", buckled_mobs)
if(user_unbuckle_mob(unbuckled,user))
return 1
else
@@ -161,6 +161,6 @@
else if(length(buckled_mobs) == 1)
return user_unbuckle_mob(buckled_mobs[1], user)
else
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?","Unbuckle Who?", buckled_mobs)
return user_unbuckle_mob(unbuckled, user)
+3 -3
View File
@@ -229,11 +229,11 @@ AI MODULES
laws = list("")
/obj/item/aiModule/supplied/freeform/attack_self(mob/user)
var/newpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num|null
var/newpos = tgui_input_num(user, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos)
if(newpos == null)
return
if(newpos < 15)
var/response = alert("Error: The law priority of [newpos] is invalid, Law priorities below 14 are reserved for core laws, Would you like to change that that to 15?", "Invalid law priority", "Change to 15", "Cancel")
var/response = tgui_alert(user, "Error: The law priority of [newpos] is invalid, Law priorities below 14 are reserved for core laws, Would you like to change that that to 15?", "Invalid law priority", list("Change to 15", "Cancel"))
if (!response || response == "Cancel")
return
newpos = 15
@@ -264,7 +264,7 @@ AI MODULES
var/lawpos = 1
/obj/item/aiModule/remove/attack_self(mob/user)
lawpos = input("Please enter the law you want to delete.", "Law Number", lawpos) as num|null
lawpos = tgui_input_num(user, "Please enter the law you want to delete.", "Law Number", lawpos)
if(lawpos == null)
return
if(lawpos <= 0)
+1 -1
View File
@@ -25,7 +25,7 @@
for(var/datum/track/S in SSjukeboxes.songs)
if(istype(S) && (S.song_associated_id in availabletrackids))
tracklist[S.song_name] = S
var/selected = input(user, "Play song", "Track:") as null|anything in tracklist
var/selected = tgui_input_list(user, "Play song", "Track:", tracklist)
if(QDELETED(src) || !selected || !istype(tracklist[selected], /datum/track))
return
var/jukeboxslottotake = SSjukeboxes.addjukebox(src, tracklist[selected])
+5 -5
View File
@@ -302,7 +302,7 @@
. = FALSE
var/datum/bank_account/old_account = registered_account
var/new_bank_id = input(user, "Enter your account ID number.", "Account Reclamation", 111111) as num | null
var/new_bank_id = tgui_input_num(user, "Enter your account ID number.", "Account Reclamation", 111111)
if (isnull(new_bank_id))
return
@@ -344,7 +344,7 @@
registered_account.bank_card_talk("<span class='warning'>ERROR: UNABLE TO LOGIN DUE TO SCHEDULED MAINTENANCE. MAINTENANCE IS SCHEDULED TO COMPLETE IN [(registered_account.withdrawDelay - world.time)/10] SECONDS.</span>", TRUE)
return
var/amount_to_remove = input(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5) as num|null
var/amount_to_remove = tgui_input_num(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5)
if(!amount_to_remove || amount_to_remove < 0)
return
@@ -478,9 +478,9 @@
var/popup_input
if(bank_support == ID_FREE_BANK_ACCOUNT)
popup_input = alert(user, "Choose Action", "Agent ID", "Show", "Forge/Reset", "Change Account ID")
popup_input = tgui_alert(user, "Choose Action", "Agent ID", list("Show", "Forge/Reset", "Change Account ID"))
else
popup_input = alert(user, "Choose Action", "Agent ID", "Show", "Forge/Reset")
popup_input = tgui_alert(user, "Choose Action", "Agent ID", list("Show", "Forge/Reset"))
if(!user.canUseTopic(src, BE_CLOSE, FALSE))
return
if(popup_input == "Forge/Reset" && !forged)
@@ -843,7 +843,7 @@
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return TRUE
if(alert("Are you sure you want to recolor your id?", "Confirm Repaint", "Yes", "No") == "Yes")
if(tgui_alert(user, "Are you sure you want to recolor your id?", "Confirm Repaint", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",id_color) as color|null
if(!in_range(src, user) || !energy_color_input)
return TRUE
@@ -259,11 +259,6 @@
build_path = /obj/machinery/computer/arcade/orion_trail
/obj/item/circuitboard/computer/arcade/minesweeper
name = "Minesweeper (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/arcade/minesweeper
/obj/item/circuitboard/computer/holodeck// Not going to let people get this, but it's just here for future
name = "Holodeck Control (Computer Board)"
icon_state = "generic"
@@ -654,7 +654,7 @@
display_vending_names_paths = list()
for(var/path in vending_names_paths)
display_vending_names_paths[vending_names_paths[path]] = path
var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in sortList(display_vending_names_paths)
var/choice = tgui_input_list(user,"Choose a new brand","Select an Item", sortList(display_vending_names_paths))
set_type(display_vending_names_paths[choice])
else
return ..()
@@ -856,7 +856,7 @@
// /obj/item/circuitboard/machine/medical_kiosk/multitool_act(mob/living/user)
// . = ..()
// var/new_cost = input("Set a new cost for using this medical kiosk.","New cost", custom_cost) as num|null
// var/new_cost = tgui_input_num(user, "Set a new cost for using this medical kiosk.","New cost", custom_cost)
// if(!new_cost || (loc != user))
// to_chat(user, "<span class='warning'>You must hold the circuitboard to change its cost!</span>")
// return
@@ -1050,7 +1050,7 @@
/obj/item/circuitboard/machine/public_nanite_chamber/multitool_act(mob/living/user)
. = ..()
var/new_cloud = input("Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id) as num|null
var/new_cloud = tgui_input_num(user, "Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id)
if(!new_cloud || (loc != user))
to_chat(user, "<span class='warning'>You must hold the circuitboard to change its Cloud ID!</span>")
return
@@ -1295,6 +1295,15 @@
/obj/item/stock_parts/manipulator = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/autoloom
name = "Autoloom (Machine Board)"
icon_state = "service"
build_path = /obj/machinery/autoloom
req_components = list(
/obj/item/stock_parts/matter_bin = 1,
/obj/item/stock_parts/manipulator = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/seed_extractor
name = "Seed Extractor (Machine Board)"
icon_state = "service"
+1 -1
View File
@@ -14,7 +14,7 @@
if(dumped)
to_chat(user, "<span class='warning'>You already activated Protocol CRAB-17.</span>")
return FALSE
if(alert(user, "Are you sure you want to crash this market with no survivors?", "Protocol CRAB-17", "Yes", "No") == "Yes")
if(tgui_alert(user, "Are you sure you want to crash this market with no survivors?", "Protocol CRAB-17", list("Yes", "No")) == "Yes")
if(dumped || QDELETED(src)) //Prevents fuckers from cheesing alert
return FALSE
var/turf/targetturf = get_safe_random_station_turf()
+1 -1
View File
@@ -95,7 +95,7 @@
/obj/item/holochip/AltClick(mob/user)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
var/split_amount = round(input(user,"How many credits do you want to extract from the holochip?") as null|num)
var/split_amount = round(tgui_input_num(user,"How many credits do you want to extract from the holochip?"))
if(split_amount == null || split_amount <= 0 || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
else
+2 -2
View File
@@ -21,9 +21,9 @@
/obj/item/debug/human_spawner/attack_self(mob/user)
..()
var/choice = input("Select a species", "Human Spawner", null) in GLOB.species_list
var/choice = tgui_input_list(user, "Select a species", "Human Spawner", null, GLOB.species_list)
selected_species = GLOB.species_list[choice]
/* Revive this once we purge all the istype checks for tools for tool_behaviour
/obj/item/debug/omnitool
name = "omnitool"
+4 -4
View File
@@ -144,7 +144,7 @@ GLOBAL_LIST_EMPTY(PDAs)
dat += "\n[V]: <span class='reallybig'>[output]</span>"
to_chat(M, dat)
var/choice = input(M, "Choose the a reskin for [src]","Reskin Object") as null|anything in GLOB.pda_reskins
var/choice = tgui_input_list(M, "Choose the a reskin for [src]","Reskin Object", GLOB.pda_reskins)
var/new_icon = GLOB.pda_reskins[choice]
if(QDELETED(src) || isnull(new_icon) || new_icon == icon || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
@@ -619,7 +619,7 @@ GLOBAL_LIST_EMPTY(PDAs)
playsound(src, 'sound/machines/terminal_select.ogg', 15, 1)
if("Drone Phone")
var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical")
var/alert_s = tgui_input_list(U,"Alert severity level","Ping Drones", list("Low","Medium","High","Critical"))
var/area/A = get_area(U)
if(A && alert_s && !QDELETED(U))
var/msg = "<span class='boldnotice'>NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!</span>"
@@ -1147,7 +1147,7 @@ GLOBAL_LIST_EMPTY(PDAs)
plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P
var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
var/c = tgui_input_list(user, "Please select a PDA", "", sortList(plist))
if (!c)
return
@@ -1155,7 +1155,7 @@ GLOBAL_LIST_EMPTY(PDAs)
var/selected = plist[c]
if(aicamera.stored.len)
var/add_photo = input(user,"Do you want to attach a photo?","Photo","No") as null|anything in list("Yes","No")
var/add_photo = tgui_input_list(user,"Do you want to attach a photo?","Photo","No", list("Yes","No"))
if(add_photo=="Yes")
var/datum/picture/Pic = aicamera.selectpicture(user)
aiPDA.picture = Pic
+2 -2
View File
@@ -656,10 +656,10 @@ Code:
if("alert")
post_status("alert", href_list["alert"])
if("setmsg1")
message1 = reject_bad_text(input("Line 1", "Enter Message Text", message1) as text|null, 40)
message1 = reject_bad_text(tgui_input_text(usr, "Line 1", "Enter Message Text", message1), 40)
updateSelfDialog()
if("setmsg2")
message2 = reject_bad_text(input("Line 2", "Enter Message Text", message2) as text|null, 40)
message2 = reject_bad_text(tgui_input_text(usr, "Line 2", "Enter Message Text", message2), 40)
updateSelfDialog()
else
post_status(href_list["statdisp"])
+1 -1
View File
@@ -84,7 +84,7 @@
if(flush)
flush = FALSE
else
var/confirm = alert("Are you sure you want to wipe this card's memory?", name, "Yes", "No")
var/confirm = tgui_alert(usr, "Are you sure you want to wipe this card's memory?", name, list("Yes", "No"))
if(confirm == "Yes" && !..())
flush = TRUE
if(AI && AI.loc == src)
@@ -36,7 +36,7 @@
. = ..()
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
var/new_duration = input(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) as null|num
var/new_duration = tgui_input_num(user, "Set the duration (5-300):", "Desynchronizer", duration / 10)
if(new_duration)
new_duration = new_duration SECONDS
new_duration = clamp(new_duration, 50, max_duration)
@@ -8,7 +8,7 @@
. = ..()
if(.)
return
var/new_id = input(user, "Set this kit's electrochromatic ID", "Set ID", id) as text|null
var/new_id = tgui_input_text(user, "Set this kit's electrochromatic ID", "Set ID", id)
if(isnull(new_id))
return
id = new_id
+1 -1
View File
@@ -87,7 +87,7 @@
pai.master_dna = M.dna.unique_enzymes
to_chat(pai, "<span class='notice'>You have been bound to a new master.</span>")
if(href_list["wipe"])
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
var/confirm = tgui_input_list(usr, "Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe", list("Yes", "No"))
if(confirm == "Yes")
if(pai)
to_chat(pai, "<span class='warning'>You feel yourself slipping away from reality.</span>")
@@ -23,7 +23,7 @@
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
/obj/item/pipe_painter/attack_self(mob/user)
paint_color = input("Which colour do you want to use?","Pipe painter") in GLOB.pipe_paint_colors
paint_color = tgui_input_list(user, "Which colour do you want to use?","Pipe painter", GLOB.pipe_paint_colors)
/obj/item/pipe_painter/examine(mob/user)
. = ..()
@@ -18,7 +18,7 @@
else
if(zero_amount())
return
chosen_circuit = input("What type of circuit would you like to remove?", "Choose a Circuit Type", chosen_circuit) as null|anything in list("airlock","firelock","fire alarm","air alarm","APC")
chosen_circuit = tgui_input_list(user, "What type of circuit would you like to remove?", "Choose a Circuit Type", list("airlock","firelock","fire alarm","air alarm","APC"))
if(zero_amount() || !chosen_circuit || !in_range(src,user))
return
switch(chosen_circuit)
@@ -150,7 +150,7 @@
if(tune == "input")
var/min = format_frequency(freerange ? MIN_FREE_FREQ : MIN_FREQ)
var/max = format_frequency(freerange ? MAX_FREE_FREQ : MAX_FREQ)
tune = input("Tune frequency ([min]-[max]):", name, format_frequency(frequency)) as null|num
tune = tgui_input_num(usr, "Tune frequency ([min]-[max]):", name, format_frequency(frequency))
if(!isnull(tune) && !..())
if (tune < MIN_FREE_FREQ && tune <= MAX_FREE_FREQ / 10)
// allow typing 144.7 to get 1447
+1 -1
View File
@@ -946,7 +946,7 @@ GENETICS SCANNER
for(var/A in buffer)
options += get_display_name(A)
var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options)
var/answer = tgui_input_list(user, "Analyze Potential", "Sequence Analyzer", sortList(options))
if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
var/sequence
for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list
+4 -3
View File
@@ -23,7 +23,7 @@
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
resistance_flags = FIRE_PROOF
wound_bonus = -110
wound_bonus = -40
bare_wound_bonus = 20
block_parry_data = /datum/block_parry_data/dual_esword
block_chance = 60
@@ -133,7 +133,7 @@
total_mass = initial(total_mass)
wielded = FALSE
hitsound = "swing_hit"
slowdown_wielded -= slowdown_wielded
slowdown -= slowdown_wielded
STOP_PROCESSING(SSobj, src)
set_light(0)
RemoveElement(/datum/element/sword_point)
@@ -278,6 +278,7 @@
desc = "A supermassive weapon envisioned to cleave the very fabric of space and time itself in twain, the hypereutactic blade dynamically flash-forges a hypereutactic crystaline nanostructure capable of passing through most known forms of matter like a hot knife through butter."
force = 7
hitsound_on = 'sound/weapons/nebhit.ogg'
wound_bonus = -20
armour_penetration = 60
light_color = "#37FFF7"
rainbow_colors = list("#FF0000", "#FFFF00", "#00FF00", "#00FFFF", "#0000FF","#FF00FF", "#3399ff", "#ff9900", "#fb008b", "#9800ff", "#00ffa3", "#ccff00")
@@ -318,7 +319,7 @@
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Repaint", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null
if(!energy_color_input || !user.canUseTopic(src, BE_CLOSE, FALSE) || hacked)
return
+1 -1
View File
@@ -23,7 +23,7 @@
return
var/mob/living/carbon/human/human_target = target
var/new_grad_style = input(usr, "Choose a color pattern:", "Character Preference") as null|anything in GLOB.hair_gradients_list
var/new_grad_style = tgui_input_list(usr, "Choose a color pattern:", "Character Preference", GLOB.hair_gradients_list)
if(!new_grad_style)
return
+1 -1
View File
@@ -95,7 +95,7 @@
if(nadeassembly)
nadeassembly.attack_self(user)
return
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
var/newtime = tgui_input_num(usr, "Please set the timer.", "Timer", 10)
if(user.get_active_held_item() == src)
newtime = clamp(newtime, 10, 60000)
det_time = newtime
@@ -33,7 +33,7 @@
return FALSE
if(cause == "action_button" && !popup)
popup = TRUE
var/response = alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", "Yes", "No")
var/response = tgui_alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", list("Yes", "No"))
popup = FALSE
if(response == "No")
return FALSE
+1 -1
View File
@@ -415,7 +415,7 @@
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return TRUE
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Repaint", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null
if(energy_color_input)
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
+2 -2
View File
@@ -26,7 +26,7 @@
stored_options = generate_display_names()
if(!stored_options.len)
return
var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in stored_options
var/choice = tgui_input_list(M,"Which item would you like to order?","Select an Item", stored_options)
if(!choice || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
@@ -182,7 +182,7 @@
return carrier
/obj/item/choice_beacon/pet/spawn_option(atom/choice,mob/living/M)
pet_name = input(M, "What would you like to name the pet? (leave blank for default name)", "Pet Name")
pet_name = tgui_input_text(M, "What would you like to name the pet? (leave blank for default name)", "Pet Name")
..()
//choice boxes (they just open in your hand instead of making a pod)
+1 -1
View File
@@ -56,7 +56,7 @@
icon_state = "paint_neutral"
/obj/item/paint/anycolor/attack_self(mob/user)
var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "pink", "blue", "cyan", "green", "lime", "yellow", "orange", "violet", "purple", "black", "gray", "white")
var/t1 = tgui_input_list(user, "Please select a color:", "Locking Computer", list( "red", "pink", "blue", "cyan", "green", "lime", "yellow", "orange", "violet", "purple", "black", "gray", "white"))
if ((user.get_active_held_item() != src || user.stat || user.restrained()))
return
switch(t1)
+1 -1
View File
@@ -154,7 +154,7 @@
user.visible_message("<span class='notice'>[user]'s pinpointer fails to detect a signal.</span>", "<span class='notice'>Your pinpointer fails to detect a signal.</span>")
return
var/A = input(user, "Person to track", "Pinpoint") in names
var/A = tgui_input_list(user, "Person to track", "Pinpoint", names)
if(!A || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
return
+1 -1
View File
@@ -997,7 +997,7 @@
to_chat(user, "<span class='warning'>[target] is firmly secured!</span>")
/obj/item/cyborg_clamp/attack_self(mob/user)
var/obj/chosen_cargo = input(user, "Drop what?") as null|anything in cargo
var/obj/chosen_cargo = tgui_input_list(user, "Drop what?", cargo)
if(!chosen_cargo)
return
chosen_cargo.forceMove(get_turf(chosen_cargo))
+1 -1
View File
@@ -48,7 +48,7 @@
var/A
A = input(user, "Area to jump to", "BOOYEA", A) as null|anything in GLOB.teleportlocs
A = tgui_input_list(user, "Area to jump to", "BOOYEA", GLOB.teleportlocs)
if(!src || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !A || !uses)
return
var/area/thearea = GLOB.teleportlocs[A]
+1 -1
View File
@@ -465,7 +465,7 @@
return
//get amount from user
var/max = get_amount()
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as null|num)
var/stackmaterial = round(tgui_input_num(user,"How many sheets do you wish to take out of this stack? (Maximum [max])"))
max = get_amount()
stackmaterial = min(max, stackmaterial)
if(stackmaterial == null || stackmaterial <= 0 || !user.canUseTopic(src, BE_CLOSE, TRUE, FALSE)) //, !iscyborg(user)
+1 -1
View File
@@ -24,7 +24,7 @@
var/custom_name
if(icon_state == "daki_base")
body_choice = input("Pick a body.") in dakimakura_options
body_choice = tgui_input_list(user, "Pick a body.", "", dakimakura_options)
icon_state = "daki_[body_choice]"
custom_name = stripped_input(user, "What's her name?")
if(length(custom_name) > MAX_NAME_LEN)
+1 -1
View File
@@ -164,7 +164,7 @@
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L
var/t1 = tgui_input_list(user, "Please select a teleporter to lock in on.", "Hand Teleporter", L)
if (!t1 || user.get_active_held_item() != src || user.incapacitated())
return
if(active_portal_pairs.len >= max_portal_pairs)
+1 -1
View File
@@ -340,7 +340,7 @@
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return TRUE
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Repaint", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null
if(energy_color_input)
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
+3 -3
View File
@@ -282,14 +282,14 @@
message_admins("<span class='notice'>[key_name_admin(usr)] modified the armor on [src] ([type]) to melee: [armor.melee], bullet: [armor.bullet], laser: [armor.laser], energy: [armor.energy], bomb: [armor.bomb], bio: [armor.bio], rad: [armor.rad], fire: [armor.fire], acid: [armor.acid]</span>")
if(href_list[VV_HK_MASS_DEL_TYPE])
if(check_rights(R_DEBUG|R_SERVER))
var/action_type = alert("Strict type ([type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
var/action_type = tgui_alert(usr, "Strict type ([type]) or type and all subtypes?",,list("Strict type","Type and subtypes","Cancel"))
if(action_type == "Cancel" || !action_type)
return
if(alert("Are you really sure you want to delete all objects of type [type]?",,"Yes","No") != "Yes")
if(tgui_alert(usr, "Are you really sure you want to delete all objects of type [type]?",,list("Yes","No")) != "Yes")
return
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
if(tgui_alert(usr, "Second confirmation required. Delete?",,list("Yes","No")) != "Yes")
return
var/O_type = type
+1 -1
View File
@@ -120,7 +120,7 @@
/obj/structure/sign/barsign/proc/pick_sign(mob/user)
var/picked_name = input(user, "Available Signage", "Bar Sign", name) as null|anything in barsigns
var/picked_name = tgui_input_list(user, "Available Signage", "Bar Sign", barsigns)
if(!picked_name)
return
set_sign(picked_name)
@@ -40,13 +40,13 @@
return TRUE
/obj/structure/closet/secure_closet/genpop/proc/handle_edit_sentence(mob/user)
var/prisoner_name = input(user, "Please input the name of the prisoner.", "Prisoner Name", registered_id.registered_name) as text|null
var/prisoner_name = tgui_input_text(user, "Please input the name of the prisoner.", "Prisoner Name", registered_id.registered_name)
if(prisoner_name == null | !user.Adjacent(src))
return FALSE
var/sentence_length = input(user, "Please input the length of their sentence in minutes (0 for perma).", "Sentence Length", registered_id.sentence) as num|null
var/sentence_length = tgui_input_num(user, "Please input the length of their sentence in minutes (0 for perma).", "Sentence Length", registered_id.sentence)
if(sentence_length == null | !user.Adjacent(src))
return FALSE
var/crimes = input(user, "Please input their crimes.", "Crimes", registered_id.crime) as text|null
var/crimes = tgui_input_text(user, "Please input their crimes.", "Crimes", registered_id.crime)
if(crimes == null | !user.Adjacent(src))
return FALSE
@@ -71,7 +71,7 @@
if(!broken && locked && registered_id != null)
var/name = registered_id.registered_name
var/result = alert(user, "This locker currently contains [name]'s personal belongings ","Locker In Use","Reset","Amend ID", "Open")
var/result = tgui_alert(user, "This locker currently contains [name]'s personal belongings ","Locker In Use",list("Reset","Amend ID", "Open"))
if(!user.Adjacent(src))
return
if(result == "Reset")
+1 -1
View File
@@ -470,7 +470,7 @@
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE)
return
var/new_price_input = input(usr,"Set the sale price for this vend-a-tray.","new price",0) as num|null
var/new_price_input = tgui_input_num(usr,"Set the sale price for this vend-a-tray.","new price",sale_price)
if(isnull(new_price_input) || (payments_acc != potential_acc.registered_account))
to_chat(usr, "<span class='warning'>[src] rejects your new price.</span>")
return
+4 -4
View File
@@ -37,7 +37,7 @@
if(!(GLOB.socks_list[H.socks]?.has_color))
undergarment_choices -= "Socks Color"
var/choice = input(H, "Underwear, Undershirt, or Socks?", "Changing") as null|anything in undergarment_choices
var/choice = tgui_input_list(H, "Underwear, Undershirt, or Socks?", "Changing", undergarment_choices)
if(!H.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
var/dye_undie = FALSE
@@ -45,21 +45,21 @@
var/dye_socks = FALSE
switch(choice)
if("Underwear")
var/new_undies = input(H, "Select your underwear", "Changing") as null|anything in GLOB.underwear_list
var/new_undies = tgui_input_list(H, "Select your underwear", "Changing", GLOB.underwear_list)
if(new_undies)
H.underwear = new_undies
H.saved_underwear = new_undies
var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[new_undies]
dye_undie = B?.has_color
if("Undershirt")
var/new_undershirt = input(H, "Select your undershirt", "Changing") as null|anything in GLOB.undershirt_list
var/new_undershirt = tgui_input_list(H, "Select your undershirt", "Changing", GLOB.undershirt_list)
if(new_undershirt)
H.undershirt = new_undershirt
H.saved_undershirt = new_undershirt
var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[new_undershirt]
dye_shirt = T?.has_color
if("Socks")
var/new_socks = input(H, "Select your socks", "Changing") as null|anything in GLOB.socks_list
var/new_socks = tgui_input_list(H, "Select your socks", "Changing", GLOB.socks_list)
if(new_socks)
H.socks = new_socks
H.saved_socks = new_socks

Some files were not shown because too many files have changed in this diff Show More