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

This commit is contained in:
keronshb
2021-11-05 10:50:08 -04:00
431 changed files with 1464 additions and 1886 deletions
@@ -5625,7 +5625,6 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 4
},
/obj/machinery/door/firedoor,
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/plasteel,
/area/security/brig)
@@ -61634,7 +61633,6 @@
/area/security/prison/upper)
"qtw" = (
/obj/machinery/door/airlock/external{
dir = 2;
name = "Port Docking Bay 4"
},
/obj/effect/mapping_helpers/airlock/cyclelink_helper{
+14 -10
View File
@@ -9261,9 +9261,6 @@
/turf/open/floor/plasteel,
/area/hallway/primary/fore)
"axH" = (
/obj/structure/extinguisher_cabinet{
pixel_y = 30
},
/obj/effect/turf_decal/tile/red{
dir = 4
},
@@ -9274,11 +9271,15 @@
/turf/open/floor/plasteel,
/area/hallway/primary/fore)
"axI" = (
/obj/machinery/airalarm{
pixel_y = 22
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 4
},
/obj/effect/turf_decal/tile/red{
dir = 4
dir = 8
},
/obj/machinery/airalarm{
dir = 1;
pixel_y = -22
},
/turf/open/floor/plasteel,
/area/hallway/primary/fore)
@@ -10265,6 +10266,9 @@
dir = 8
},
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden,
/obj/structure/extinguisher_cabinet{
pixel_y = -32
},
/turf/open/floor/plasteel,
/area/hallway/primary/fore)
"aAg" = (
@@ -80965,7 +80969,7 @@ aaa
aaa
aaa
aaa
syn
aaa
aaa
aaa
aaa
@@ -81222,7 +81226,7 @@ aaa
aaa
aaa
aaa
aaa
syn
aaa
aaa
aaa
@@ -85595,7 +85599,7 @@ avv
xgz
gZF
ayL
pFy
axI
aBd
aCi
aDo
@@ -86364,7 +86368,7 @@ ajM
quY
uFZ
nDM
axI
axL
axG
aAh
aBf
+1 -5
View File
@@ -5,10 +5,6 @@
#define NONE 0
//for convenience
#define ENABLE_BITFIELD(variable, flag) (variable |= (flag))
#define DISABLE_BITFIELD(variable, flag) (variable &= ~(flag))
#define CHECK_BITFIELD(variable, flag) (variable & (flag))
#define TOGGLE_BITFIELD(variable, flag) (variable ^= (flag))
#define COPY_SPECIFIC_BITFIELDS(a,b,flags)\
do{\
var/_old = a & ~(flags);\
@@ -154,7 +150,7 @@ GLOBAL_LIST_INIT(bitflags, list(
//Mob mobility var flags
/// any flag
#define CHECK_MOBILITY(target, flags) CHECK_BITFIELD(target.mobility_flags, flags)
#define CHECK_MOBILITY(target, flags) (target.mobility_flags & flags)
#define CHECK_ALL_MOBILITY(target, flags) CHECK_MULTIPLE_BITFIELDS(target.mobility_flags, flags)
/// can move
+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 = tgui_input_list(creator, "Choose an area to expand or make a new area.", "Area Expansion", areas)
var/area_choice = input(creator, "Choose an area to expand or make a new area.", "Area Expansion") as null|anything in 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 = tgui_input_list(C, "Which character do you wish to use as your appearance.", "", characters)
var/chosen_name = input(C, "Which character do you wish to use as your appearance.") as anything in 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 = tgui_input_list(src,"Choose a file to access:","Download", choices)
var/choice = input(src,"Choose a file to access:","Download",null) as null|anything in choices
switch(choice)
if(null)
return
+1 -1
View File
@@ -59,7 +59,7 @@
for(var/gpath in subtypesof(/obj/item/organ/genital))
var/obj/item/organ/genital/G = gpath
if(!CHECK_BITFIELD(initial(G.genital_flags), GENITAL_BLACKLISTED))
if(!(initial(G.genital_flags) & GENITAL_BLACKLISTED))
GLOB.genitals_list[initial(G.name)] = gpath
//END OF CIT CHANGES
+3 -3
View File
@@ -75,11 +75,11 @@
/proc/choose_reagent_id(mob/user)
var/chosen_id
switch(tgui_alert(user, "Choose a method.", "Add Reagents", list("Search", "Choose from a list", "I'm feeling lucky")))
switch(alert(user, "Choose a method.", "Add Reagents", "Search", "Choose from a list", "I'm feeling lucky"))
if("Search")
var/valid_id
while(!valid_id)
chosen_id = tgui_input_text(user, "Enter the ID of the reagent you want to add.", "Search reagents")
chosen_id = input(user, "Enter the ID of the reagent you want to add.", "Search reagents") as null|text
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 = tgui_input_list(user, "Choose a reagent to add.", "Choose a reagent.", subtypesof(/datum/reagent))
chosen_id = input(user, "Choose a reagent to add.", "Choose a reagent.") as null|anything in 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
tgui_alert(usr, "Invalid name.")
alert("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 = tgui_input_text(user, message, title, default)
var/name = input(user, message, title, default) as text|null
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 = tgui_input_message(user, message, title, default)
var/name = input(user, message, title, default) as message|null
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 = tgui_input_message(user, message, title, default)
var/name = input(user, message, title, default) as message|null
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)
. = tgui_input_list(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs)
. = input(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs[1]) in 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)
. = tgui_input_list(user,"AI signals detected:", "AI Selection", ais)
. = input(user,"AI signals detected:", "AI Selection", ais[1]) in 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 = tgui_input_text(usr, "Enter type to find (blank for all, cancel to cancel)", "Search for type")
value = input("Enter type to find (blank for all, cancel to cancel)", "Search for type") as null|text
if (isnull(value))
return
value = trim(value)
@@ -1089,7 +1089,7 @@ B --><-- A
if(matches.len==1)
chosen = matches[1]
else
chosen = tgui_input_list(usr, "Select a type", "Pick Type", matches)
chosen = input("Select a type", "Pick Type", matches[1]) as null|anything in 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 = tgui_input_list(AI, "Choose who you want to track", "Tracking", AI.trackable_mobs())
var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in 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 = tgui_input_text(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object")
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
if(!screen_l)
return
@@ -81,7 +81,7 @@
S.maptext = "Snap"
S.maptext_width = 64
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")
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
if(!screen_l)
return
+1 -1
View File
@@ -323,7 +323,7 @@
var/obj/item/clothing/mask/M = check
if(M.mask_adjusted)
M.adjustmask(C)
if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS))
if((check.clothing_flags & ALLOWINTERNALS))
internals = TRUE
if(!internals)
to_chat(C, "<span class='warning'>You are not wearing an internals mask!</span>")
+1 -1
View File
@@ -260,7 +260,7 @@
return clamp((1.5 + (w_class/5)) * ((force_override || force) / 1.5), 0, 10 SECONDS) * CONFIG_GET(number/melee_stagger_factor)
/obj/item/proc/do_stagger_action(mob/living/target, mob/living/user, force_override)
if(!CHECK_BITFIELD(target.status_flags, CANSTAGGER))
if(!(target.status_flags & CANSTAGGER))
return FALSE
if(target.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
target.do_staggered_animation()
+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 = tgui_input_list(src, "Select controller to debug", "Debug Controller", controller_choices)
var/datum/controller/controller_string = input("Select controller to debug", "Debug Controller") as null|anything in 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 = tgui_alert(src, "What kind of level would you like to load?", "Load Away/VR", list(AWAY_MISSION_NAME, VIRT_REALITY_NAME, "Cancel"))
var/choice = alert(src, "What kind of level would you like to load?", "Load Away/VR", 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(tgui_alert(src, "There's no home gateway on the station. You sure you want to continue ?", "Uh oh", list("Yes", "No")) != "Yes")
if(alert("There's no home gateway on the station. You sure you want to continue ?", "Uh oh", "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 = tgui_input_list(src, "What kind ? ","Away/VR", list(possible_options + "Custom"))
var/answer = input("What kind ? ","Away/VR") as null|anything in 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 = 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"))
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")
if(set_purchase == "Yes, disable purchases/events")
SSshuttle.shuttle_purchased = SHUTTLEPURCHASE_FORCED
+2 -2
View File
@@ -453,7 +453,7 @@ SUBSYSTEM_DEF(vote)
question = stripped_input(usr,"What is the vote for?")
if(!question)
return 0
var/system_string = tgui_input_list(usr,"Which voting type?",GLOB.vote_type_names[1], GLOB.vote_type_names)
var/system_string = input(usr,"Which voting type?",GLOB.vote_type_names[1]) in 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 = tgui_input_list(usr, "Toggle vote display settings. Cancel to finalize.", toggles, choices)
var/chosen = input(usr, "Toggle vote display settings. Cancel to finalize.", toggles) as null|anything in 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 = tgui_input_list(owner, "Select an APC to remove:","Remove APC Control", areas)
var/removeAPC = input("Select an APC to remove:","Remove APC Control",1) as null|anything in 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 = tgui_input_list(owner, "Select an APC to access:","Access APC Interface", areas)
var/accessAPC = input("Select an APC to access:","Access APC Interface",1) as null|anything in 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"] = tgui_input_num(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]")
settings["mainsettings"][setting]["value"] = input(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]") as num
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"] = tgui_input_list(user, "[settings["mainsettings"][setting]["desc"]]?", "", list("Yes","No"))
settings["mainsettings"][setting]["value"] = input(user, "[settings["mainsettings"][setting]["desc"]]?") in list("Yes","No")
if ("ckey")
settings["mainsettings"][setting]["value"] = tgui_input_list(user, "[settings["mainsettings"][setting]["desc"]]?", "", list("none") + GLOB.directory)
settings["mainsettings"][setting]["value"] = input(user, "[settings["mainsettings"][setting]["desc"]]?") in 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
@@ -29,7 +29,7 @@
expire = _expire
/datum/component/anti_magic/proc/on_equip(datum/source, mob/equipper, slot)
if(!CHECK_BITFIELD(allowed_slots, slotdefine2slotbit(slot))) //Check that the slot is valid for antimagic
if(!(allowed_slots & slotdefine2slotbit(slot))) //Check that the slot is valid for antimagic
UnregisterSignal(equipper, COMSIG_MOB_RECEIVE_MAGIC)
return
RegisterSignal(equipper, COMSIG_MOB_RECEIVE_MAGIC, .proc/protect, TRUE)
+1 -1
View File
@@ -125,7 +125,7 @@
//try to get ammount to use
var/requested_amount
if(precise_insertion)
requested_amount = tgui_input_num(user, "How much do you want to insert?", "Inserting [S.singular_name]s")
requested_amount = input(user, "How much do you want to insert?", "Inserting [S.singular_name]s") as num|null
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 = 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"))
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")
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 = tgui_input_list(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom", symptoms)
var/symptom = input(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom") in 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 = tgui_input_list(src, "Which flavor text would you like to modify?", "", choices)
var/chosen = input(src, "Which flavor text would you like to modify?") as null|anything in 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 = tgui_input_list(user,"Polychromic options", "Recolor [source]", overlays_names)
var/choice = input(user,"Polychromic options", "Recolor [source]") as null|anything in overlays_names
if(!choice || QDELETED(source) || !user.canUseTopic(source, BE_CLOSE, NO_DEXTERY))
return
var/index = overlays_names.Find(choice)
+2 -2
View File
@@ -52,7 +52,7 @@
new /obj/effect/temp_visual/heart(target.loc)
if(pet_emote)
target.emote("me", pet_type, pet_emote)
if(pet_moodlet && !CHECK_BITFIELD(target.flags_1, HOLOGRAM_1)) //prevents unlimited happiness petting park exploit.
if(pet_moodlet && !(target.flags_1 & HOLOGRAM_1)) //prevents unlimited happiness petting park exploit.
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, target, pet_moodlet, target)
/datum/element/wuv/proc/kick_the_dog(mob/target, mob/user)
@@ -60,5 +60,5 @@
return
if(punt_emote)
target.emote("me", punt_type, punt_emote)
if(punt_moodlet && !CHECK_BITFIELD(target.flags_1, HOLOGRAM_1))
if(punt_moodlet && !(target.flags_1 & HOLOGRAM_1))
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, target, punt_moodlet, target)
+5 -5
View File
@@ -385,7 +385,7 @@ GLOBAL_LIST_EMPTY(explosions)
set name = "Check Bomb Impact"
set category = "Debug"
var/newmode = tgui_alert(src, "Use reactionary explosions?","Check Bomb Impact", list("Yes", "No"))
var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "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 = tgui_input_list(src, "Bomb Size?", "", choices)
var/choice = input("Bomb Size?") in choices
switch(choice)
if(null)
return 0
@@ -411,9 +411,9 @@ GLOBAL_LIST_EMPTY(explosions)
heavy = 5
light = 7
if("Custom Bomb")
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):")
dev = input("Devastation range (Tiles):") as num
heavy = input("Heavy impact range (Tiles):") as num
light = input("Light impact range (Tiles):") as num
var/max_range = max(dev, heavy, light)
var/x0 = epicenter.x
+11 -6
View File
@@ -141,7 +141,7 @@
if(isliving(new_character)) //New humans and such are by default enabled arousal. Let's always use the new mind's prefs.
var/mob/living/L = new_character
if(L.client?.prefs && L.client.prefs.auto_ooc && L.client.prefs.chat_toggles & CHAT_OOC)
DISABLE_BITFIELD(L.client.prefs.chat_toggles,CHAT_OOC)
L.client.prefs.chat_toggles &= ~(CHAT_OOC)
hide_ckey = current.client?.prefs?.hide_ckey
@@ -420,7 +420,7 @@
A.admin_remove(usr)
if (href_list["role_edit"])
var/new_role = tgui_input_list(usr, "Select new role", "Assigned role", get_all_jobs())
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in get_all_jobs()
if (!new_role)
return
assigned_role = new_role
@@ -433,6 +433,7 @@
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
@@ -460,7 +461,7 @@
if(1)
target_antag = antag_datums[1]
else
var/datum/antagonist/target = tgui_input_list(usr, "Which antagonist gets the objective:", "Antagonist", list(antag_datums + "(new custom antag)"))
var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", "(new custom antag)") as null|anything in antag_datums + "(new custom antag)"
if (QDELETED(target))
return
else if(target == "(new custom antag)")
@@ -494,7 +495,11 @@
var/datum/objective/X = T
choices[initial(X.name)] = T
var/selected_type = tgui_input_list(usr, "Select objective type:", "Objective type", choices)
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
selected_type = choices[selected_type]
if (!selected_type)
return
@@ -532,7 +537,7 @@
choices[initial(t.employer)] = C
var/datum/antagonist/traitor/T = locate(href_list["target_antag"]) in antag_datums
if(T)
var/selected_type = tgui_input_list(usr, "Select traitor class:", "Traitor class", choices)
var/selected_type = input("Select traitor class:", "Traitor class", T.traitor_kind.employer) as null|anything in choices
selected_type = choices[selected_type]
T.set_traitor_kind(selected_type)
@@ -593,7 +598,7 @@
if(check_rights(R_FUN, 0))
var/datum/component/uplink/U = find_syndicate_uplink()
if(U)
var/crystals = tgui_input_num(usr, "Amount of telecrystals for [key]","Syndicate uplink", U.telecrystals)
var/crystals = input("Amount of telecrystals for [key]","Syndicate uplink", U.telecrystals) as null | num
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 = tgui_input_list(user, "Choose a scent to remember.", "Scent Tracking", sortNames(possible))
tracking_target = input(user, "Choose a scent to remember.", "Scent Tracking") as null|anything in 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>")
+1 -1
View File
@@ -112,7 +112,7 @@
))
if(!can_contaminate || blacklisted[thing.type])
continue
if(CHECK_BITFIELD(thing.rad_flags, RAD_NO_CONTAMINATE) || SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
if((thing.rad_flags & RAD_NO_CONTAMINATE) || SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
continue
contam_atoms += thing
var/did_contam = 0
+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 = tgui_input_num(usr, "Please insert the amount of experience/progress you'd like to add/subtract:")
var/number = input("Please insert the amount of experience/progress you'd like to add/subtract:") as num|null
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 = tgui_input_num(usr, "Please insert the number you want to set the player's exp/progress to:")
var/number = input("Please insert the number you want to set the player's exp/progress to:") as num|null
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 = 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.")
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
if (number >= 0 && number <= S.max_levels)
owner.set_skill_value(S.type, S.get_skill_level_value(number))
return TRUE
+9 -9
View File
@@ -985,14 +985,14 @@
. = ..()
if(href_list[VV_HK_ADD_REAGENT] && check_rights(R_VAREDIT))
if(!reagents)
var/amount = tgui_input_num(usr, "Specify the reagent size of [src]", "Set Reagent Size", 50)
var/amount = input(usr, "Specify the reagent size of [src]", "Set Reagent Size", 50) as num
if(amount)
create_reagents(amount)
if(reagents)
var/chosen_id = choose_reagent_id(usr)
if(chosen_id)
var/amount = tgui_input_num(usr, "Choose the amount to add.", "Choose the amount.", reagents.maximum_volume)
var/amount = input(usr, "Choose the amount to add.", "Choose the amount.", reagents.maximum_volume) as num
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 = tgui_input_list(usr, "Choose the transformation to apply","Transform Mod", list("Scale","Translate","Rotate"))
var/result = input(usr, "Choose the transformation to apply","Transform Mod") as null|anything in list("Scale","Translate","Rotate")
var/matrix/M = transform
switch(result)
if("Scale")
var/x = tgui_input_num(usr, "Choose x mod","Transform Mod")
var/y = tgui_input_num(usr, "Choose y mod","Transform Mod")
var/x = input(usr, "Choose x mod","Transform Mod") as null|num
var/y = input(usr, "Choose y mod","Transform Mod") as null|num
if(!isnull(x) && !isnull(y))
transform = M.Scale(x,y)
if("Translate")
var/x = tgui_input_num(usr, "Choose x mod","Transform Mod")
var/y = tgui_input_num(usr, "Choose y mod","Transform Mod")
var/x = input(usr, "Choose x mod","Transform Mod") as null|num
var/y = input(usr, "Choose y mod","Transform Mod") as null|num
if(!isnull(x) && !isnull(y))
transform = M.Translate(x,y)
if("Rotate")
var/angle = tgui_input_num(usr, "Choose angle to rotate","Transform Mod")
var/angle = input(usr, "Choose angle to rotate","Transform Mod") as null|num
if(!isnull(angle))
transform = M.Turn(angle)
if(href_list[VV_HK_AUTO_RENAME] && check_rights(R_VAREDIT))
var/newname = tgui_input_text(usr, "What do you want to rename this to?", "Automatic Rename")
var/newname = input(usr, "What do you want to rename this to?", "Automatic Rename") as null|text
if(newname)
vv_auto_rename(newname)
if(href_list[VV_HK_EDIT_FILTERS] && check_rights(R_VAREDIT))
+4 -4
View File
@@ -201,7 +201,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
else if (href_list["no_stacking"])
GLOB.dynamic_no_stacking = !GLOB.dynamic_no_stacking
else if (href_list["adjustthreat"])
var/threatadd = tgui_input_num(usr, "Specify how much threat to add (negative to subtract). This can inflate the threat level.", "Adjust Threat", 0)
var/threatadd = input("Specify how much threat to add (negative to subtract). This can inflate the threat level.", "Adjust Threat", 0) as null|num
if(!threatadd)
return
if(threatadd > 0)
@@ -221,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 = tgui_input_num(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null)
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
else if(href_list["force_latejoin_rule"])
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)))
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))
if (!added_rule)
return
forced_latejoin_rule = added_rule
@@ -234,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 = 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)))
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))
if (!added_rule)
return
log_admin("[key_name(usr)] executed the [added_rule] ruleset.")
@@ -63,7 +63,7 @@
required_candidates = 1
weight = 7
cost = 5
requirements = list(40,30,20,10,10,10,10,10,10,10)
requirements = list(101,40,25,20,15,10,10,10,10,10)
repeatable = TRUE
//////////////////////////////////////////////
@@ -159,5 +159,5 @@
required_candidates = 1
weight = 4
cost = 10
requirements = list(101,101,101,50,40,10,10,10,10,10)
requirements = list(101,101,101,50,40,20,20,15,10,10)
repeatable = TRUE
@@ -317,7 +317,7 @@
antag_flag = ROLE_MALF
enemy_roles = list("Security Officer", "Warden","Detective","Head of Security", "Captain", "Scientist", "Chemist", "Research Director", "Chief Engineer")
exclusive_roles = list("AI")
required_enemies = list(4,4,4,4,4,4,2,2,2,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 3
cost = 35
@@ -367,11 +367,11 @@
antag_flag = "wizard mid"
antag_flag_override = ROLE_WIZARD
enemy_roles = list("Security Officer","Detective","Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 2
cost = 20
requirements = list(101,101,100,80,50,30,20,10,10,10)
requirements = list(101,101,100,60,40,20,20,20,10,10)
repeatable = TRUE
var/datum/mind/wizard
@@ -414,11 +414,11 @@
antag_datum = /datum/antagonist/nukeop
antag_flag_override = ROLE_OPERATIVE
enemy_roles = list("AI", "Cyborg", "Security Officer", "Warden","Detective","Head of Security", "Captain")
required_enemies = list(3,3,3,3,3,2,1,1,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 5
weight = 3
cost = 35
requirements = list(101,101,101,80,50,40,30,15,10,10)
requirements = list(101,101,101,60,40,30,20,15,10,10)
var/list/operative_cap = list(2,2,3,3,3,4,5,5,5,5)
var/datum/team/nuclear/nuke_team
flags = HIGH_IMPACT_RULESET
@@ -456,11 +456,11 @@
antag_datum = /datum/antagonist/blob
antag_flag = ROLE_BLOB
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 2
cost = 10
requirements = list(101,101,101,101,70,40,25,20,10,10)
requirements = list(101,101,101,101,50,40,30,20,10,10)
repeatable = TRUE
/datum/dynamic_ruleset/midround/from_ghosts/blob/generate_ruleset_body(mob/applicant)
@@ -475,11 +475,11 @@
protected_roles = list("Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain")
restricted_roles = list("Cyborg", "AI", "Positronic Brain")
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 2
cost = 10
requirements = list(101,101,101,101,70,40,25,20,10,10)
requirements = list(101,101,101,101,50,40,30,20,10,10)
repeatable = TRUE
/datum/dynamic_ruleset/midround/blob_infection/trim_candidates()
@@ -513,11 +513,11 @@
antag_datum = /datum/antagonist/xeno
antag_flag = ROLE_ALIEN
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 3
cost = 10
requirements = list(101,101,101,101,60,50,30,20,10,10)
requirements = list(101,101,101,101,50,40,30,20,10,10)
repeatable = TRUE
var/list/vents = list()
@@ -559,11 +559,11 @@
antag_flag = "Nightmare"
antag_flag_override = ROLE_ALIEN
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 4
cost = 10
requirements = list(101,101,101,40,30,20,10,10,10,10)
requirements = list(101,101,50,30,25,20,10,10,10,10)
repeatable = TRUE
var/list/spawn_locs = list()
@@ -605,11 +605,11 @@
antag_flag = ROLE_SPACE_DRAGON
antag_flag_override = ROLE_SPACE_DRAGON
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 3
cost = 10
requirements = list(101,101,101,101,60,50,30,20,10,10)
requirements = list(101,101,101,101,50,40,30,20,10,10)
repeatable = TRUE
var/list/spawn_locs = list()
@@ -649,12 +649,12 @@
antag_flag = "Abductor"
antag_flag_override = ROLE_ABDUCTOR
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 2
required_applicants = 2
weight = 3
cost = 10
requirements = list(101,101,101,101,101,40,25,20,10,10)
requirements = list(101,101,101,101,101,30,20,15,10,10)
repeatable = TRUE
var/datum/team/abductor_team/new_team
@@ -688,11 +688,11 @@
antag_flag_override = ROLE_ALIEN
required_type = /mob/dead/observer
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 0
weight = 3
cost = 10
requirements = list(101,101,101,101,60,50,30,20,10,10)
requirements = list(101,101,101,101,50,40,30,20,10,10)
repeatable = TRUE
/datum/dynamic_ruleset/midround/swarmers/execute()
@@ -721,11 +721,11 @@
antag_flag = "Space Ninja"
antag_flag_override = ROLE_NINJA
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 4
cost = 10
requirements = list(101,101,101,80,60,50,30,20,10,10)
requirements = list(101,101,101,60,50,30,10,10,10,10)
repeatable = TRUE
var/list/spawn_locs = list()
@@ -762,11 +762,11 @@
antag_flag = "Revenant"
antag_flag_override = ROLE_REVENANT
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 4
cost = 10
requirements = list(101,101,101,70,50,40,20,15,10,10)
requirements = list(101,101,50,30,25,20,10,10,10,10)
repeatable = TRUE
var/dead_mobs_required = 20
var/need_extra_spawns_value = 15
@@ -811,7 +811,7 @@
required_candidates = 1
weight = 4
cost = 10
requirements = list(101,101,101,70,50,40,20,15,10,10)
requirements = list(101,101,50,30,25,20,10,10,10,10)
repeatable = TRUE
/datum/dynamic_ruleset/midround/from_ghosts/sentient_disease/generate_ruleset_body(mob/applicant)
@@ -828,11 +828,11 @@
antag_flag = "Space Pirates"
required_type = /mob/dead/observer
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 0
weight = 4
cost = 10
requirements = list(101,101,101,50,40,25,10,10,10,10)
requirements = list(101,101,101,40,30,20,10,10,10,10)
repeatable = TRUE
/datum/dynamic_ruleset/midround/pirates/acceptable(population=0, threat=0)
@@ -103,7 +103,7 @@
weight = 3
cost = 16
scaling_cost = 10
requirements = list(101,70,60,50,40,20,20,10,10,10)
requirements = list(101,60,50,40,30,20,15,10,10,10)
antag_cap = list("denominator" = 29)
/datum/dynamic_ruleset/roundstart/changeling/pre_execute(population)
@@ -138,7 +138,7 @@
weight = 3
cost = 15
scaling_cost = 9
requirements = list(101,101,101,55,40,25,20,15,10,10)//higher because of 'round end'
requirements = list(101,101,101,50,40,20,20,15,10,10)//higher because of 'round end'
antag_cap = list("denominator" = 24)
@@ -179,7 +179,7 @@
required_candidates = 1
weight = 3
cost = 20
requirements = list(101,101,100,80,50,40,30,20,10,10)//100 because of configt, otherwise equal to nukies
requirements = list(101,101,100,60,40,20,20,20,10,10)//100 because of configt, otherwise equal to nukies
var/list/roundstart_wizards = list()
/datum/dynamic_ruleset/roundstart/wizard/acceptable(population=0, threat=0)
@@ -223,7 +223,7 @@
weight = 2 //lower weight because of easy steamroll potential
cost = 20
//requirements = list(100,90,80,60,40,30,10,10,10,10)
requirements = list(101,101,101,101,60,40,20,10,10,10)
requirements = list(101,101,101,101,50,40,20,10,10,10)
flags = HIGH_IMPACT_RULESET
antag_cap = list("denominator" = 20, "offset" = 1)
var/datum/team/cult/main_cult
@@ -279,7 +279,7 @@
required_candidates = 5
weight = 3
cost = 20
requirements = list(101,101,101,80,50,40,30,15,10,10)
requirements = list(101,101,101,60,40,30,20,15,10,10)
flags = HIGH_IMPACT_RULESET
antag_cap = list("denominator" = 18, "offset" = 1)
var/datum/team/nuclear/nuke_team
@@ -365,7 +365,7 @@
weight = 2
delay = 7 MINUTES
cost = 20
requirements = list(101,101,101,101,60,40,20,10,10,10)
requirements = list(101,101,101,101,50,40,20,10,10,10)
antag_cap = 3
flags = HIGH_IMPACT_RULESET
blocking_rules = list(/datum/dynamic_ruleset/latejoin/provocateur)
@@ -445,7 +445,7 @@
required_candidates = 2
weight = 3 //higher weight than blood cult and revs because it's more balanced
cost = 20
requirements = list(101,101,101,101,60,40,20,10,10,10) //slightly higher than nukies
requirements = list(101,101,101,101,50,40,20,10,10,10) //slightly higher than nukies
flags = HIGH_IMPACT_RULESET
antag_cap = list("denominator" = 20, "offset" = 1)
var/datum/team/clockcult/main_clockcult
@@ -72,9 +72,9 @@
set name = "Run Dynamic Simulations"
set category = "Debug"
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")
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
SSticker.mode = new /datum/game_mode/dynamic
message_admins("Running dynamic simulations...")
+12 -7
View File
@@ -40,11 +40,16 @@ 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
var/mob/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_targets)
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
if (!new_target)
return
@@ -601,12 +606,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 = tgui_input_list(admin,"Select target:", "Objective target", possible_items_all)
var/new_target = input(admin,"Select target:", "Objective target", steal_target) as null|anything in possible_items_all
if (!new_target)
return
if (new_target == "custom") //Can set custom items.
var/custom_path = tgui_input_text(admin,"Search for target item type:","Type")
var/custom_path = input(admin,"Search for target item type:","Type") as null|text
if (!custom_path)
return
var/obj/item/custom_target = pick_closest_path(custom_path, make_types_fancy(subtypesof(/obj/item)))
@@ -723,7 +728,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return checking.researched_nodes.len >= target_amount
/datum/objective/download/admin_edit(mob/admin)
var/count = tgui_input_num(admin,"How many nodes ?","Nodes",target_amount)
var/count = input(admin,"How many nodes ?","Nodes",target_amount) as num|null
if(count)
target_amount = count
update_explanation_text()
@@ -769,7 +774,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return captured_amount >= target_amount
/datum/objective/capture/admin_edit(mob/admin)
var/count = tgui_input_num(admin,"How many mobs to capture ?","capture",target_amount)
var/count = input(admin,"How many mobs to capture ?","capture",target_amount) as num|null
if(count)
target_amount = count
update_explanation_text()
@@ -801,7 +806,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
explanation_text = "Extract [target_amount] compatible genome\s."
/datum/objective/absorb/admin_edit(mob/admin)
var/count = tgui_input_num(admin,"How many people to absorb?","absorb",target_amount)
var/count = input(admin,"How many people to absorb?","absorb",target_amount) as num|null
if(count)
target_amount = count
update_explanation_text()
@@ -891,7 +896,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 = tgui_input_list(admin,"Select target:", "Objective target", possible_targets)
var/mob/new_target = input(admin,"Select target:", "Objective target") as null|anything in 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 = tgui_input_list(user, "Select the new skin!", "PDA Painting", colorlist)
var/choice = input(user, "Select the new skin!", "PDA Painting") as null|anything in 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 = tgui_input_list(user, "Select style.", "Augment Custom Fitting", style_list_icons)
var/augstyle = input(user, "Select style.", "Augment Custom Fitting") as null|anything in 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 = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sortList(list_to_show, /proc/cmp_typepaths_asc))
used_material = input("Choose [used_material]", "Custom Material") as null|anything in 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
+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 = tgui_alert(user, "Choose where to place [O]", "", list("Input", "Cancel", "Output"))
var/choice = alert(user, "Choose where to place [O]", "", "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 = tgui_input_list(src, "Choose which camera you want to view", "Cameras", cameras)
var/camera = input(src, "Choose which camera you want to view", "Cameras") as null|anything in cameras
switchCamera(cameras[camera])
/datum/trackable
@@ -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 = tgui_input_list(user, "Select the device set: ", "Selection", sortList(IO))
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in 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 = tgui_input_list(usr, "Choose which camera you want to view", "Cameras", T)
var/camera = input("Choose which camera you want to view", "Cameras") as null|anything in 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(tgui_input_text(usr, "Enter a custom job assignment.", "Assignment", inserted_modify_id ? inserted_modify_id.assignment : "Unassigned"), MAX_NAME_LEN)
var/newJob = reject_bad_text(input("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 && tgui_alert(usr, "Are you sure?", "Unlink Launchpad", list("I'm Sure", "Abort")) != "Abort")
if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "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 && tgui_alert(usr, "Are you sure?", "Unlink Orbital Pad", list("I'm Sure", "Abort")) != "Abort")
if(usr && alert(usr, "Are you sure?", "Unlink Orbital Pad", "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 = tgui_input_num(usr, "Please input age:", "Med. records", active1.fields["age"])
var/t1 = input("Please input age:", "Med. records", active1.fields["age"], null) as num
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(tgui_input_num(usr, "Choose prisoner's goal:", "Input an Integer", contained_id.goal))
var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null)
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 = tgui_input_num(usr, "Please input age:", "Secure. records", active1.fields["age"])
var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num
if(!canUseSecurityRecordsConsole(usr, "age", a1))
return
active1.fields["age"] = t1
if("species")
if(istype(active1, /datum/data/record))
var/t1 = stripped_input("Please input species name", "Secure. records", active1.fields["species"], null)
var/t1 = input("Select a species", "Species Selection") as null|anything in GLOB.roundstart_races
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
tgui_alert(usr, "You do not have the required rank to do this!")
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 = tgui_input_list(user, "Please select a location to lock in.", "Locking Computer", L)
var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in 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 = tgui_input_list(user, "Please select a station to lock in.", "Locking Computer", L)
var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in 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 = tgui_input_list(user, "Please choose which object to retrieve.","Object recovery", stored_packages)
var/obj/I = input(user, "Please choose which object to retrieve.","Object recovery",null) as null|anything in 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(tgui_alert(target,"Would you like to enter cryosleep?",,list("Yes","No")) == "No")
if(alert(target,"Would you like to enter cryosleep?",,"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)
tgui_alert(target, "You're a [english_list(caught_string)]![generic_plsnoleave_message][addendum]")
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 = tgui_input_list(user, "Please select a paintjob for this airlock.", "", optionlist)
var/paintjob = input(user, "Please select a paintjob for this airlock.") in 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 = tgui_input_list(usr, "Choose an area to call", "Holocall", sortNames(callnames))
var/result = input(usr, "Choose an area to call", "Holocall") as null|anything in 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 && tgui_alert(usr, "Are you sure?", "Unlink Launchpad", list("I'm Sure", "Abort")) != "Abort")
if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "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 = tgui_input_text(user, "Enter identifier for bluespace pipe network", "bluespace pipe", bluespace_network_name)
var/new_name = input(user, "Enter identifier for bluespace pipe network", "bluespace pipe", bluespace_network_name) as text|null
if(!isnull(new_name))
bluespace_network_name = new_name
+2 -2
View File
@@ -62,7 +62,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
update_icon()
/obj/machinery/requests_console/update_icon_state()
if(CHECK_BITFIELD(stat, NOPOWER))
if((stat & NOPOWER))
set_light(0)
else
set_light(1.4, 0.7, "#34D352")//green light
@@ -72,7 +72,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
icon_state="req_comp_open"
else
icon_state="req_comp_rewired"
else if(CHECK_BITFIELD(stat, NOPOWER))
else if((stat & NOPOWER))
if(icon_state != "req_comp_off")
icon_state = "req_comp_off"
else
+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 = tgui_input_num(user, "Please set the timer.", "Timer", "[timer_set]")
var/new_timer = input(user, "Please set the timer.", "Timer", "[timer_set]") as num
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(tgui_alert(user,"Would you like to start the countdown now?",,list("Yes","No")) == "Yes" && in_range(src, user) && isliving(user))
if(alert(user,"Would you like to start the countdown now?",,"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>")
@@ -1,5 +1,5 @@
/*
The log console for viewing the entire telecomms
The log console for viewing the entire telecomms
network log
*/
@@ -15,7 +15,7 @@
var/network = "NULL" // the network to probe
var/notice = ""
var/universal_translate = FALSE // set to TRUE(1) if it can translate nonhuman speech
var/universal_translate = FALSE // set to TRUE(1) if it can translate nonhuman speech
/obj/machinery/computer/telecomms/server/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
@@ -53,7 +53,7 @@
if(!LAZYLEN(SelectedMachine.log_entries))
return data_out
for(var/datum/comm_log_entry/C in SelectedMachine.log_entries)
var/list/data = list()
data["name"] = C.name //name of the file
@@ -104,7 +104,7 @@
data["message"] = C.parameters["message"]
else
data["message"] = "(unintelligible)"
data_out["selected_logs"] += list(data)
return data_out
@@ -133,7 +133,7 @@
if(LAZYLEN(machinelist) > 0)
notice = "FAILED: Cannot probe when buffer full"
return
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list) //telecomms just went global!
if(T.network == network)
LAZYADD(machinelist, T)
@@ -147,7 +147,7 @@
SelectedMachine = T
break
if("delete")
if(!src.allowed(usr) && !CHECK_BITFIELD(obj_flags, EMAGGED))
if(!src.allowed(usr) && !(obj_flags & EMAGGED))
to_chat(usr, "<span class='danger'>ACCESS DENIED.</span>")
return
@@ -156,7 +156,7 @@
return
var/datum/comm_log_entry/D = locate(params["value"])
if(!istype(D))
notice = "NOTICE: Object not found"
notice = "NOTICE: Object not found"
return
notice = "Deleted entry: [D.name]"
LAZYREMOVE(SelectedMachine.log_entries, D)
@@ -94,9 +94,9 @@
if(istype(S) && S.hack_software)
data_out["canhack"] = TRUE
data_out["hacking"] = (hacking || CHECK_BITFIELD(obj_flags, EMAGGED))
data_out["hacking"] = (hacking || (obj_flags & EMAGGED))
if(hacking)
data_out["borg"] = ((isAI(user) || iscyborg(user)) && !CHECK_BITFIELD(obj_flags, EMAGGED)) //even borgs can't read emag
data_out["borg"] = ((isAI(user) || iscyborg(user)) && !(obj_flags & EMAGGED)) //even borgs can't read emag
return data_out
data_out["servers"] = list()
@@ -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 = tgui_input_list(usr, "Select a PDA from the list.", "", sortNames(sendPDAs))
customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortNames(sendPDAs)
else
customrecepient = null
return
@@ -324,7 +324,7 @@
update_static_data(usr)
/obj/machinery/computer/message_monitor/attackby(obj/item/O, mob/living/user, params)
if(O.tool_behaviour == TOOL_SCREWDRIVER && CHECK_BITFIELD(obj_flags, EMAGGED))
if(O.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
//Why this though, you should make it emag to a board level. (i wont do it)
to_chat(user, "<span class='warning'>It is too hot to mess with!</span>")
@@ -333,12 +333,12 @@
/obj/machinery/computer/message_monitor/emag_act(mob/user)
. = ..()
if(CHECK_BITFIELD(obj_flags, EMAGGED))
if((obj_flags & EMAGGED))
return
if(isnull(linkedServer))
to_chat(user, "<span class='notice'>A no server error appears on the screen.</span>")
return
ENABLE_BITFIELD(obj_flags, EMAGGED)
obj_flags |= EMAGGED
spark_system.set_up(5, 0, src)
spark_system.start()
var/obj/item/paper/monitorkey/MK = new(loc, linkedServer)
@@ -366,7 +366,7 @@
message = ""
/obj/machinery/computer/message_monitor/proc/UnmagConsole()
DISABLE_BITFIELD(obj_flags, EMAGGED)
obj_flags &= ~(EMAGGED)
message = ""
/obj/machinery/computer/message_monitor/proc/ResetMessage()
@@ -177,7 +177,7 @@
links.Remove(T)
if("freq")
if("add" in params)
var/newfreq = tgui_input_num(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src.name, null)
var/newfreq = input("Specify a new frequency to filter (GHz). Decimals assigned automatically.", src.name, null) as null|num
if(!canAccess(usr) || !newfreq || isnull(newfreq))
return
@@ -119,7 +119,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
/obj/machinery/telecomms/proc/update_power()
if(toggled)
// if powered, on. if not powered, off. if too damaged, off
if(CHECK_BITFIELD(stat, (BROKEN | NOPOWER | EMPED)))
if(stat &(BROKEN | NOPOWER | EMPED))
on = FALSE
else
on = TRUE
@@ -137,11 +137,11 @@ GLOBAL_LIST_EMPTY(telecomms_list)
/obj/machinery/telecomms/emp_act(severity)
. = ..()
if(CHECK_BITFIELD(., EMP_PROTECT_SELF))
if((. & EMP_PROTECT_SELF))
return
if(prob(severity))
if(!CHECK_BITFIELD(stat, EMPED))
ENABLE_BITFIELD(stat, EMPED)
if(!(stat & EMPED))
stat |= EMPED
var/duration = severity * 35
spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot.
DISABLE_BITFIELD(stat, EMPED)
stat &= ~(EMPED)
+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 = tgui_input_list(user, "You want...","Wish", list("Power","Wealth","The Station To Disappear","To Kill","Nothing"))
var/wish = input("You want...","Wish") as null|anything in 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)
@@ -276,7 +276,7 @@
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/critfail()
..()
if(reagents)
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.reagents_holder_flags &= ~(NO_REACT)
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/can_attach(obj/mecha/medical/M)
if(..())
@@ -407,7 +407,7 @@
return
if(href_list["cut"])
if(cable && cable.amount)
var/m = round(tgui_input_num(chassis.occupant,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)), 1)
var/m = round(input(chassis.occupant,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 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 = tgui_input_num(usr,"Input new output pressure","Pressure setting",internal_tank_valve)
var/new_pressure = input(usr,"Input new output pressure","Pressure setting",internal_tank_valve) as num
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 = tgui_input_list(user, "Who do you wish to unbuckle?","Unbuckle Who?", buckled_mobs)
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in 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 = tgui_input_list(user, "Who do you wish to unbuckle?","Unbuckle Who?", buckled_mobs)
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
return user_unbuckle_mob(unbuckled, user)
+5 -5
View File
@@ -450,8 +450,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
A.Remove(user)
if(item_flags & DROPDEL)
qdel(src)
DISABLE_BITFIELD(item_flags, IN_INVENTORY)
DISABLE_BITFIELD(item_flags, IN_STORAGE)
item_flags &= ~(IN_INVENTORY)
item_flags &= ~(IN_STORAGE)
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
remove_outline()
// if(!silent)
@@ -529,8 +529,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
A.Grant(user)
item_flags |= IN_INVENTORY
if(CHECK_BITFIELD(item_flags, IN_STORAGE)) // Left storage item but somehow has the bitfield active still.
DISABLE_BITFIELD(item_flags, IN_STORAGE)
if((item_flags & IN_STORAGE)) // Left storage item but somehow has the bitfield active still.
item_flags &= ~(IN_STORAGE)
// if(!initial)
// if(equip_sound && (slot_flags & slot))
// playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE)
@@ -1054,7 +1054,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
*/
/obj/item/proc/set_slowdown(new_slowdown)
slowdown = new_slowdown
if(CHECK_BITFIELD(item_flags, IN_INVENTORY))
if((item_flags & IN_INVENTORY))
var/mob/living/L = loc
if(istype(L))
L.update_equipment_speed_mods()
+3 -3
View File
@@ -229,11 +229,11 @@ AI MODULES
laws = list("")
/obj/item/aiModule/supplied/freeform/attack_self(mob/user)
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)
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
if(newpos == null)
return
if(newpos < 15)
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"))
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")
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 = tgui_input_num(user, "Please enter the law you want to delete.", "Law Number", lawpos)
lawpos = input("Please enter the law you want to delete.", "Law Number", lawpos) as num|null
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 = tgui_input_list(user, "Play song", "Track:", tracklist)
var/selected = input(user, "Play song", "Track:") as null|anything in 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 = tgui_input_num(user, "Enter your account ID number.", "Account Reclamation", 111111)
var/new_bank_id = input(user, "Enter your account ID number.", "Account Reclamation", 111111) as num | null
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 = tgui_input_num(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5)
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
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 = tgui_alert(user, "Choose Action", "Agent ID", list("Show", "Forge/Reset", "Change Account ID"))
popup_input = alert(user, "Choose Action", "Agent ID", "Show", "Forge/Reset", "Change Account ID")
else
popup_input = tgui_alert(user, "Choose Action", "Agent ID", list("Show", "Forge/Reset"))
popup_input = alert(user, "Choose Action", "Agent ID", "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(tgui_alert(user, "Are you sure you want to recolor your id?", "Confirm Repaint", list("Yes", "No")) == "Yes")
if(alert("Are you sure you want to recolor your id?", "Confirm Repaint", "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
+5 -5
View File
@@ -190,7 +190,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
qdel(src)
return
// allowing reagents to react after being lit
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.reagents_holder_flags &= ~(NO_REACT)
reagents.handle_reactions()
icon_state = icon_on
item_state = icon_on
@@ -762,7 +762,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!screw)
screw = TRUE
to_chat(user, "<span class='notice'>You open the cap on [src].</span>")
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
reagents.reagents_holder_flags |= OPENCONTAINER
if(obj_flags & EMAGGED)
add_overlay("vapeopen_high")
else if(super)
@@ -772,7 +772,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
else
screw = FALSE
to_chat(user, "<span class='notice'>You close the cap on [src].</span>")
DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
reagents.reagents_holder_flags &= ~(OPENCONTAINER)
cut_overlays()
if(O.tool_behaviour == TOOL_MULTITOOL)
@@ -822,7 +822,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(slot == SLOT_WEAR_MASK)
if(!screw)
to_chat(user, "<span class='notice'>You start puffing on the vape.</span>")
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.reagents_holder_flags &= ~(NO_REACT)
START_PROCESSING(SSobj, src)
else //it will not start if the vape is opened.
to_chat(user, "<span class='warning'>You need to close the cap first!</span>")
@@ -831,7 +831,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
. = ..()
var/mob/living/carbon/C = user
if(C.get_item_by_slot(SLOT_WEAR_MASK) == src)
ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.reagents_holder_flags |= NO_REACT
STOP_PROCESSING(SSobj, src)
/obj/item/clothing/mask/vape/proc/hand_reagents()//had to rename to avoid duplicate error
@@ -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 = tgui_input_list(user,"Choose a new brand","Select an Item", sortList(display_vending_names_paths))
var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in 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 = tgui_input_num(user, "Set a new cost for using this medical kiosk.","New cost", custom_cost)
// var/new_cost = input("Set a new cost for using this medical kiosk.","New cost", custom_cost) as num|null
// 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 = tgui_input_num(user, "Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id)
var/new_cloud = input("Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id) as num|null
if(!new_cloud || (loc != user))
to_chat(user, "<span class='warning'>You must hold the circuitboard to change its Cloud ID!</span>")
return
+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(tgui_alert(user, "Are you sure you want to crash this market with no survivors?", "Protocol CRAB-17", list("Yes", "No")) == "Yes")
if(alert(user, "Are you sure you want to crash this market with no survivors?", "Protocol CRAB-17", "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(tgui_input_num(user,"How many credits do you want to extract from the holochip?"))
var/split_amount = round(input(user,"How many credits do you want to extract from the holochip?") as null|num)
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 = tgui_input_list(user, "Select a species", "Human Spawner", null, GLOB.species_list)
var/choice = input("Select a species", "Human Spawner", null) in 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 = tgui_input_list(M, "Choose the a reskin for [src]","Reskin Object", GLOB.pda_reskins)
var/choice = input(M, "Choose the a reskin for [src]","Reskin Object") as null|anything in 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 = tgui_input_list(U,"Alert severity level","Ping Drones", list("Low","Medium","High","Critical"))
var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in 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 = tgui_input_list(user, "Please select a PDA", "", sortList(plist))
var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
if (!c)
return
@@ -1155,7 +1155,7 @@ GLOBAL_LIST_EMPTY(PDAs)
var/selected = plist[c]
if(aicamera.stored.len)
var/add_photo = tgui_input_list(user,"Do you want to attach a photo?","Photo","No", list("Yes","No"))
var/add_photo = input(user,"Do you want to attach a photo?","Photo","No") as null|anything in 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(tgui_input_text(usr, "Line 1", "Enter Message Text", message1), 40)
message1 = reject_bad_text(input("Line 1", "Enter Message Text", message1) as text|null, 40)
updateSelfDialog()
if("setmsg2")
message2 = reject_bad_text(tgui_input_text(usr, "Line 2", "Enter Message Text", message2), 40)
message2 = reject_bad_text(input("Line 2", "Enter Message Text", message2) as text|null, 40)
updateSelfDialog()
else
post_status(href_list["statdisp"])
+1 -1
View File
@@ -84,7 +84,7 @@
if(flush)
flush = FALSE
else
var/confirm = tgui_alert(usr, "Are you sure you want to wipe this card's memory?", name, list("Yes", "No"))
var/confirm = alert("Are you sure you want to wipe this card's memory?", name, "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 = tgui_input_num(user, "Set the duration (5-300):", "Desynchronizer", duration / 10)
var/new_duration = input(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) as null|num
if(new_duration)
new_duration = new_duration SECONDS
new_duration = clamp(new_duration, 50, max_duration)
@@ -326,7 +326,7 @@
cleaning_cycles--
cleaning = TRUE
for(var/mob/living/carbon/C in (touchable_items))
if((C.status_flags & GODMODE) || !CHECK_BITFIELD(C.vore_flags, DIGESTABLE))
if((C.status_flags & GODMODE) || !(C.vore_flags & DIGESTABLE))
items_preserved += C
else
C.adjustBruteLoss(2)
@@ -335,7 +335,7 @@
var/atom/target = pick(touchable_items)
if(iscarbon(target)) //Handle the target being a mob
var/mob/living/carbon/T = target
if(T.stat == DEAD && CHECK_BITFIELD(T.vore_flags, DIGESTABLE)) //Mob is now dead
if(T.stat == DEAD && (T.vore_flags & DIGESTABLE)) //Mob is now dead
message_admins("[key_name(hound)] has digested [key_name(T)] as a dogborg. ([hound ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[hound.x];Y=[hound.y];Z=[hound.z]'>JMP</a>" : "null"])")
to_chat(hound,"<span class='notice'>You feel your belly slowly churn around [T], breaking them down into a soft slurry to be used as power for your systems.</span>")
to_chat(T,"<span class='notice'>You feel [hound]'s belly slowly churn around your form, breaking you down into a soft slurry to be used as power for [hound]'s systems.</span>")
@@ -433,7 +433,7 @@
var/mob/living/silicon/robot/hound = get_host()
if(!hound || !istype(target) || !proximity || target.anchored)
return
if (!CHECK_BITFIELD(target.vore_flags,DEVOURABLE))
if (!(target.vore_flags & DEVOURABLE))
to_chat(user, "The target registers an error code. Unable to insert into [src].")
return
if(patient)
@@ -8,7 +8,7 @@
. = ..()
if(.)
return
var/new_id = tgui_input_text(user, "Set this kit's electrochromatic ID", "Set ID", id)
var/new_id = input(user, "Set this kit's electrochromatic ID", "Set ID", id) as text|null
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 = tgui_input_list(usr, "Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe", list("Yes", "No"))
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in 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 = tgui_input_list(user, "Which colour do you want to use?","Pipe painter", GLOB.pipe_paint_colors)
paint_color = input("Which colour do you want to use?","Pipe painter") in GLOB.pipe_paint_colors
/obj/item/pipe_painter/examine(mob/user)
. = ..()
@@ -18,7 +18,7 @@
else
if(zero_amount())
return
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"))
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")
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 = tgui_input_num(usr, "Tune frequency ([min]-[max]):", name, format_frequency(frequency))
tune = input("Tune frequency ([min]-[max]):", name, format_frequency(frequency)) as null|num
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 = tgui_input_list(user, "Analyze Potential", "Sequence Analyzer", sortList(options))
var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in 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
+1 -1
View File
@@ -319,7 +319,7 @@
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Repaint", list("Yes", "No")) == "Yes")
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "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 = tgui_input_list(usr, "Choose a color pattern:", "Character Preference", GLOB.hair_gradients_list)
var/new_grad_style = input(usr, "Choose a color pattern:", "Character Preference") as null|anything in 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 = tgui_input_num(usr, "Please set the timer.", "Timer", 10)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
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 = tgui_alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", list("Yes", "No"))
var/response = alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", "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(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Repaint", list("Yes", "No")) == "Yes")
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "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 = tgui_input_list(M,"Which item would you like to order?","Select an Item", stored_options)
var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in 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 = tgui_input_text(M, "What would you like to name the pet? (leave blank for default name)", "Pet Name")
pet_name = input(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 = tgui_input_list(user, "Please select a color:", "Locking Computer", list( "red", "pink", "blue", "cyan", "green", "lime", "yellow", "orange", "violet", "purple", "black", "gray", "white"))
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")
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 = tgui_input_list(user, "Person to track", "Pinpoint", names)
var/A = input(user, "Person to track", "Pinpoint") in 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 = tgui_input_list(user, "Drop what?", cargo)
var/obj/chosen_cargo = input(user, "Drop what?") as null|anything in cargo
if(!chosen_cargo)
return
chosen_cargo.forceMove(get_turf(chosen_cargo))
+1 -1
View File
@@ -48,7 +48,7 @@
var/A
A = tgui_input_list(user, "Area to jump to", "BOOYEA", GLOB.teleportlocs)
A = input(user, "Area to jump to", "BOOYEA", A) as null|anything in GLOB.teleportlocs
if(!src || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !A || !uses)
return
var/area/thearea = GLOB.teleportlocs[A]
+12 -12
View File
@@ -174,11 +174,11 @@
/obj/item/shield/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
if(ismovable(object))
var/atom/movable/AM = object
if(CHECK_BITFIELD(shield_flags, SHIELD_TRANSPARENT) && (AM.pass_flags & PASSGLASS))
if((shield_flags & SHIELD_TRANSPARENT) && (AM.pass_flags & PASSGLASS))
return BLOCK_NONE
if(CHECK_BITFIELD(shield_flags, SHIELD_NO_RANGED) && (attack_type & ATTACK_TYPE_PROJECTILE))
if((shield_flags & SHIELD_NO_RANGED) && (attack_type & ATTACK_TYPE_PROJECTILE))
return BLOCK_NONE
if(CHECK_BITFIELD(shield_flags, SHIELD_NO_MELEE) && (attack_type & ATTACK_TYPE_MELEE))
if((shield_flags & SHIELD_NO_MELEE) && (attack_type & ATTACK_TYPE_MELEE))
return BLOCK_NONE
if(attack_type & ATTACK_TYPE_THROWN)
final_block_chance += 30
@@ -249,15 +249,15 @@
if(attack_type & ATTACK_TYPE_MELEE)
var/obj/hittingthing = object
if(hittingthing.damtype == BURN)
if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_WEAK))
if((shield_flags & SHIELD_ENERGY_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_STRONG))
else if((shield_flags & SHIELD_ENERGY_STRONG))
final_damage *= 0.5
if(hittingthing.damtype == BRUTE)
if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_WEAK))
if((shield_flags & SHIELD_KINETIC_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_STRONG))
else if((shield_flags & SHIELD_KINETIC_STRONG))
final_damage *= 0.5
if(hittingthing.damtype == STAMINA || hittingthing.damtype == TOX || hittingthing.damtype == CLONE || hittingthing.damtype == BRAIN || hittingthing.damtype == OXY)
@@ -266,19 +266,19 @@
if(attack_type & ATTACK_TYPE_PROJECTILE)
var/obj/item/projectile/shootingthing = object
if(is_energy_reflectable_projectile(shootingthing))
if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_WEAK))
if((shield_flags & SHIELD_ENERGY_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_STRONG))
else if((shield_flags & SHIELD_ENERGY_STRONG))
final_damage *= 0.5
if(!is_energy_reflectable_projectile(object))
if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_WEAK))
if((shield_flags & SHIELD_KINETIC_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_STRONG))
else if((shield_flags & SHIELD_KINETIC_STRONG))
final_damage *= 0.5
if(shootingthing.damage_type == STAMINA)
if(CHECK_BITFIELD(shield_flags, SHIELD_DISABLER_DISRUPTED))
if((shield_flags & SHIELD_DISABLER_DISRUPTED))
final_damage *= 3 //disablers melt these kinds of shields. Really meant more for holoshields.
else
final_damage = 0

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