mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 18:22:14 +00:00
[MIRROR] TGUI list conversions + bug fixes [MDB IGNORE] (#10355)
* TGUI list conversions + bug fixes * Fixing conflicts * Maintaining a few modular files while we're at it... Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engineerin
|
|||||||
. = list()
|
. = list()
|
||||||
var/list/checked_turfs = list()
|
var/list/checked_turfs = list()
|
||||||
var/list/found_turfs = list(origin)
|
var/list/found_turfs = list(origin)
|
||||||
while(found_turfs.len)
|
while(length(found_turfs))
|
||||||
var/turf/sourceT = found_turfs[1]
|
var/turf/sourceT = found_turfs[1]
|
||||||
found_turfs.Cut(1, 2)
|
found_turfs.Cut(1, 2)
|
||||||
var/dir_flags = checked_turfs[sourceT]
|
var/dir_flags = checked_turfs[sourceT]
|
||||||
@@ -54,23 +54,23 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engineerin
|
|||||||
if(!turfs)
|
if(!turfs)
|
||||||
to_chat(creator, span_warning("The new area must be completely airtight and not a part of a shuttle."))
|
to_chat(creator, span_warning("The new area must be completely airtight and not a part of a shuttle."))
|
||||||
return
|
return
|
||||||
if(turfs.len > BP_MAX_ROOM_SIZE)
|
if(length(turfs) > BP_MAX_ROOM_SIZE)
|
||||||
to_chat(creator, span_warning("The room you're in is too big. It is [turfs.len >= BP_MAX_ROOM_SIZE *2 ? "more than 100" : ((turfs.len / BP_MAX_ROOM_SIZE)-1)*100]% larger than allowed."))
|
to_chat(creator, span_warning("The room you're in is too big. It is [length(turfs) >= BP_MAX_ROOM_SIZE *2 ? "more than 100" : ((length(turfs) / BP_MAX_ROOM_SIZE)-1)*100]% larger than allowed."))
|
||||||
return
|
return
|
||||||
var/list/areas = list("New Area" = /area)
|
var/list/areas = list("New Area" = /area)
|
||||||
for(var/i in 1 to turfs.len)
|
for(var/i in 1 to length(turfs))
|
||||||
var/area/place = get_area(turfs[i])
|
var/area/place = get_area(turfs[i])
|
||||||
if(blacklisted_areas[place.type])
|
if(blacklisted_areas[place.type])
|
||||||
continue
|
continue
|
||||||
if(!place.requires_power || (place.area_flags & NOTELEPORT) || (place.area_flags & HIDDEN_AREA))
|
if(!place.requires_power || (place.area_flags & NOTELEPORT) || (place.area_flags & HIDDEN_AREA))
|
||||||
continue // No expanding powerless rooms etc
|
continue // No expanding powerless rooms etc
|
||||||
areas[place.name] = place
|
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(isnull(area_choice))
|
||||||
|
|
||||||
if(!area_choice)
|
|
||||||
to_chat(creator, span_warning("No choice selected. The area remains undefined."))
|
to_chat(creator, span_warning("No choice selected. The area remains undefined."))
|
||||||
return
|
return
|
||||||
|
area_choice = areas[area_choice]
|
||||||
|
|
||||||
var/area/newA
|
var/area/newA
|
||||||
var/area/oldA = get_area(get_turf(creator))
|
var/area/oldA = get_area(get_turf(creator))
|
||||||
if(!isarea(area_choice))
|
if(!isarea(area_choice))
|
||||||
@@ -83,7 +83,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engineerin
|
|||||||
else
|
else
|
||||||
newA = area_choice
|
newA = area_choice
|
||||||
|
|
||||||
for(var/i in 1 to turfs.len)
|
for(var/i in 1 to length(turfs))
|
||||||
var/turf/thing = turfs[i]
|
var/turf/thing = turfs[i]
|
||||||
var/area/old_area = thing.loc
|
var/area/old_area = thing.loc
|
||||||
newA.contents += thing
|
newA.contents += thing
|
||||||
|
|||||||
@@ -42,11 +42,11 @@
|
|||||||
var/heart_nominee
|
var/heart_nominee
|
||||||
switch(attempt)
|
switch(attempt)
|
||||||
if(1)
|
if(1)
|
||||||
heart_nominee = input(src, "What was their name? Just a first or last name may be enough. (Leave blank to cancel)", "<3?")
|
heart_nominee = tgui_input_text(src, "What was their name? Just a first or last name may be enough.", "<3?")
|
||||||
if(2)
|
if(2)
|
||||||
heart_nominee = input(src, "Try again, what was their name? Just a first or last name may be enough. (Leave blank to cancel)", "<3?")
|
heart_nominee = tgui_input_text(src, "Try again, what was their name? Just a first or last name may be enough.", "<3?")
|
||||||
if(3)
|
if(3)
|
||||||
heart_nominee = input(src, "One more try, what was their name? Just a first or last name may be enough. (Leave blank to cancel)", "<3?")
|
heart_nominee = tgui_input_text(src, "One more try, what was their name? Just a first or last name may be enough.", "<3?")
|
||||||
|
|
||||||
if(isnull(heart_nominee) || heart_nominee == "")
|
if(isnull(heart_nominee) || heart_nominee == "")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -97,6 +97,10 @@
|
|||||||
choice_list[memory_iter.name] = memory_iter
|
choice_list[memory_iter.name] = memory_iter
|
||||||
|
|
||||||
var/choice = tgui_input_list(usr, "Select a memory to [verbage]", "Memory Selection?", choice_list)
|
var/choice = tgui_input_list(usr, "Select a memory to [verbage]", "Memory Selection?", choice_list)
|
||||||
|
if(isnull(choice))
|
||||||
|
return FALSE
|
||||||
|
if(isnull(choice_list[choice]))
|
||||||
|
return FALSE
|
||||||
var/datum/memory/memory_choice = choice_list[choice]
|
var/datum/memory/memory_choice = choice_list[choice]
|
||||||
|
|
||||||
return memory_choice
|
return memory_choice
|
||||||
|
|||||||
@@ -34,6 +34,8 @@
|
|||||||
return
|
return
|
||||||
var/mob/living/silicon/ai/AI = usr
|
var/mob/living/silicon/ai/AI = usr
|
||||||
var/target_name = tgui_input_list(AI, "Select a target", "Tracking", AI.trackable_mobs())
|
var/target_name = tgui_input_list(AI, "Select a target", "Tracking", AI.trackable_mobs())
|
||||||
|
if(isnull(target_name))
|
||||||
|
return
|
||||||
AI.ai_camera_track(target_name)
|
AI.ai_camera_track(target_name)
|
||||||
|
|
||||||
/atom/movable/screen/ai/camera_light
|
/atom/movable/screen/ai/camera_light
|
||||||
|
|||||||
@@ -259,7 +259,9 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
entered_rune_name = tgui_input_list(cultist, "Choose a rite to scribe", "Sigils of Power", GLOB.rune_types)
|
entered_rune_name = tgui_input_list(cultist, "Choose a rite to scribe", "Sigils of Power", GLOB.rune_types)
|
||||||
if(!entered_rune_name || !can_scribe_rune(tool, cultist))
|
if(isnull(entered_rune_name))
|
||||||
|
return FALSE
|
||||||
|
if(!can_scribe_rune(tool, cultist))
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
rune_to_scribe = GLOB.rune_types[entered_rune_name]
|
rune_to_scribe = GLOB.rune_types[entered_rune_name]
|
||||||
@@ -447,7 +449,7 @@
|
|||||||
to_chat(cultist, span_warning("This veil is not weak enough here - it can only be scribed in [english_list(summon_objective.summon_spots)]!"))
|
to_chat(cultist, span_warning("This veil is not weak enough here - it can only be scribed in [english_list(summon_objective.summon_spots)]!"))
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
if(fail_if_last_site && summon_objective.summon_spots.len <= 1)
|
if(fail_if_last_site && length(summon_objective.summon_spots) <= 1)
|
||||||
to_chat(cultist, span_warning("This rune cannot be scribed here - the ritual site must be reserved for the final summoning!"))
|
to_chat(cultist, span_warning("This rune cannot be scribed here - the ritual site must be reserved for the final summoning!"))
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
if(istype(I, /obj/item/stack) && precise_insertion)
|
if(istype(I, /obj/item/stack) && precise_insertion)
|
||||||
var/atom/current_parent = parent
|
var/atom/current_parent = parent
|
||||||
var/obj/item/stack/S = I
|
var/obj/item/stack/S = I
|
||||||
requested_amount = input(user, "How much do you want to insert?", "Inserting [S.singular_name]s") as num|null
|
requested_amount = round(tgui_input_number(user, "How much do you want to insert?", "Inserting [S.singular_name]s"))
|
||||||
if(isnull(requested_amount) || (requested_amount <= 0))
|
if(isnull(requested_amount) || (requested_amount <= 0))
|
||||||
return
|
return
|
||||||
if(QDELETED(I) || QDELETED(user) || QDELETED(src) || parent != current_parent || user.physical_can_use_topic(current_parent) < UI_INTERACTIVE || user.get_active_held_item() != active_held)
|
if(QDELETED(I) || QDELETED(user) || QDELETED(src) || parent != current_parent || user.physical_can_use_topic(current_parent) < UI_INTERACTIVE || user.get_active_held_item() != active_held)
|
||||||
|
|||||||
@@ -451,7 +451,7 @@
|
|||||||
symptoms += SSdisease.list_symptoms.Copy()
|
symptoms += SSdisease.list_symptoms.Copy()
|
||||||
do
|
do
|
||||||
if(user)
|
if(user)
|
||||||
var/symptom = input(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom") in sort_list(symptoms, /proc/cmp_typepaths_asc)
|
var/symptom = tgui_input_list(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom", sort_list(symptoms, /proc/cmp_typepaths_asc))
|
||||||
if(isnull(symptom))
|
if(isnull(symptom))
|
||||||
return
|
return
|
||||||
else if(istext(symptom))
|
else if(istext(symptom))
|
||||||
@@ -465,7 +465,7 @@
|
|||||||
|
|
||||||
if(D.symptoms.len > 0)
|
if(D.symptoms.len > 0)
|
||||||
|
|
||||||
var/new_name = stripped_input(user, "Name your new disease.", "New Name")
|
var/new_name = tgui_input_text(user, "Name your new disease", "New Name", max_length = MAX_NAME_LEN)
|
||||||
if(!new_name)
|
if(!new_name)
|
||||||
return
|
return
|
||||||
D.Refresh()
|
D.Refresh()
|
||||||
@@ -474,11 +474,10 @@
|
|||||||
|
|
||||||
var/list/targets = list("Random")
|
var/list/targets = list("Random")
|
||||||
targets += sort_names(GLOB.human_list)
|
targets += sort_names(GLOB.human_list)
|
||||||
var/target = input(user, "Pick a viable human target for the disease.", "Disease Target") as null|anything in targets
|
var/target = tgui_input_list(user, "Viable human target", "Disease Target", targets)
|
||||||
|
if(isnull(target))
|
||||||
var/mob/living/carbon/human/H
|
|
||||||
if(!target)
|
|
||||||
return
|
return
|
||||||
|
var/mob/living/carbon/human/H
|
||||||
if(target == "Random")
|
if(target == "Random")
|
||||||
for(var/human in shuffle(GLOB.human_list))
|
for(var/human in shuffle(GLOB.human_list))
|
||||||
H = human
|
H = human
|
||||||
|
|||||||
@@ -62,11 +62,13 @@
|
|||||||
available_surgeries[surgeryloop_two.name] = surgeryloop_two
|
available_surgeries[surgeryloop_two.name] = surgeryloop_two
|
||||||
break
|
break
|
||||||
|
|
||||||
if(!available_surgeries.len)
|
if(!length(available_surgeries))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/pick_your_surgery = tgui_input_list(user, "Which procedure?", "Surgery", sort_list(available_surgeries))
|
var/pick_your_surgery = tgui_input_list(user, "Which procedure?", "Surgery", sort_list(available_surgeries))
|
||||||
if(pick_your_surgery && user?.Adjacent(livingtarget) && (source in user))
|
if(isnull(pick_your_surgery))
|
||||||
|
return
|
||||||
|
if(user?.Adjacent(livingtarget) && (source in user))
|
||||||
var/datum/surgery/surgeryinstance_notonmob = available_surgeries[pick_your_surgery]
|
var/datum/surgery/surgeryinstance_notonmob = available_surgeries[pick_your_surgery]
|
||||||
|
|
||||||
for(var/i_three in livingtarget.surgeries)
|
for(var/i_three in livingtarget.surgeries)
|
||||||
|
|||||||
@@ -61,9 +61,9 @@
|
|||||||
if(!length(possible))
|
if(!length(possible))
|
||||||
to_chat(user,span_warning("Despite your best efforts, there are no scents to be found on [sniffed]..."))
|
to_chat(user,span_warning("Despite your best efforts, there are no scents to be found on [sniffed]..."))
|
||||||
return
|
return
|
||||||
tracking_target = input(user, "Choose a scent to remember.", "Scent Tracking") as null|anything in sort_names(possible)
|
tracking_target = tgui_input_list(user, "Scent to remember", "Scent Tracking", sort_names(possible))
|
||||||
if(!tracking_target)
|
if(isnull(tracking_target))
|
||||||
if(!old_target)
|
if(isnull(old_target))
|
||||||
to_chat(user,span_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."))
|
to_chat(user,span_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."))
|
||||||
return
|
return
|
||||||
tracking_target = old_target
|
tracking_target = old_target
|
||||||
@@ -242,7 +242,7 @@
|
|||||||
if(BP.body_part != HEAD && BP.body_part != CHEST)
|
if(BP.body_part != HEAD && BP.body_part != CHEST)
|
||||||
if(BP.dismemberable)
|
if(BP.dismemberable)
|
||||||
parts += BP
|
parts += BP
|
||||||
if(!parts.len)
|
if(!length(parts))
|
||||||
to_chat(usr, span_notice("You can't shed any more limbs!"))
|
to_chat(usr, span_notice("You can't shed any more limbs!"))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
chosen_camera = named_cameras[1]
|
chosen_camera = named_cameras[1]
|
||||||
else
|
else
|
||||||
chosen_camera = tgui_input_list(ai, "Choose a camera to jump to", "Camera Selection", named_cameras)
|
chosen_camera = tgui_input_list(ai, "Choose a camera to jump to", "Camera Selection", named_cameras)
|
||||||
if(!chosen_camera)
|
if(isnull(chosen_camera))
|
||||||
return
|
return
|
||||||
var/obj/machinery/camera/selected_camera = named_cameras[chosen_camera]
|
var/obj/machinery/camera/selected_camera = named_cameras[chosen_camera]
|
||||||
if(!selected_camera.can_use())
|
if(!selected_camera.can_use())
|
||||||
|
|||||||
@@ -159,11 +159,11 @@
|
|||||||
|
|
||||||
if(occupant_typecache)
|
if(occupant_typecache)
|
||||||
occupant_typecache = typecacheof(occupant_typecache)
|
occupant_typecache = typecacheof(occupant_typecache)
|
||||||
|
|
||||||
if((resistance_flags & INDESTRUCTIBLE) && component_parts){ // This is needed to prevent indestructible machinery still blowing up. If an explosion occurs on the same tile as the indestructible machinery without the PREVENT_CONTENTS_EXPLOSION_1 flag, /datum/controller/subsystem/explosions/proc/propagate_blastwave will call ex_act on all movable atoms inside the machine, including the circuit board and component parts. However, if those parts get deleted, the entire machine gets deleted, allowing for INDESTRUCTIBLE machines to be destroyed. (See #62164 for more info)
|
if((resistance_flags & INDESTRUCTIBLE) && component_parts){ // This is needed to prevent indestructible machinery still blowing up. If an explosion occurs on the same tile as the indestructible machinery without the PREVENT_CONTENTS_EXPLOSION_1 flag, /datum/controller/subsystem/explosions/proc/propagate_blastwave will call ex_act on all movable atoms inside the machine, including the circuit board and component parts. However, if those parts get deleted, the entire machine gets deleted, allowing for INDESTRUCTIBLE machines to be destroyed. (See #62164 for more info)
|
||||||
flags_1 |= PREVENT_CONTENTS_EXPLOSION_1
|
flags_1 |= PREVENT_CONTENTS_EXPLOSION_1
|
||||||
}
|
}
|
||||||
|
|
||||||
return INITIALIZE_HINT_LATELOAD
|
return INITIALIZE_HINT_LATELOAD
|
||||||
|
|
||||||
/obj/machinery/LateInitialize()
|
/obj/machinery/LateInitialize()
|
||||||
@@ -627,11 +627,13 @@
|
|||||||
if(!Adjacent(user) || !can_buckle || !has_buckled_mobs()) //so that borgs (but not AIs, sadly (perhaps in a future PR?)) can unbuckle people from machines
|
if(!Adjacent(user) || !can_buckle || !has_buckled_mobs()) //so that borgs (but not AIs, sadly (perhaps in a future PR?)) can unbuckle people from machines
|
||||||
return _try_interact(user)
|
return _try_interact(user)
|
||||||
|
|
||||||
if(buckled_mobs.len <= 1)
|
if(length(buckled_mobs) <= 1)
|
||||||
if(user_unbuckle_mob(buckled_mobs[1],user))
|
if(user_unbuckle_mob(buckled_mobs[1],user))
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in sort_names(buckled_mobs)
|
var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?", "Unbuckle", sort_names(buckled_mobs))
|
||||||
|
if(isnull(unbuckled))
|
||||||
|
return FALSE
|
||||||
if(user_unbuckle_mob(unbuckled,user))
|
if(user_unbuckle_mob(unbuckled,user))
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
|
|||||||
@@ -207,7 +207,7 @@
|
|||||||
list_to_show += i
|
list_to_show += i
|
||||||
|
|
||||||
used_material = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sort_list(list_to_show, /proc/cmp_typepaths_asc))
|
used_material = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sort_list(list_to_show, /proc/cmp_typepaths_asc))
|
||||||
if(!used_material)
|
if(isnull(used_material))
|
||||||
return //Didn't pick any material, so you can't build shit either.
|
return //Didn't pick any material, so you can't build shit either.
|
||||||
custom_materials[used_material] += amount_needed
|
custom_materials[used_material] += amount_needed
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@
|
|||||||
else
|
else
|
||||||
LAZYADD(not_imported, blueprint.name)
|
LAZYADD(not_imported, blueprint.name)
|
||||||
if(not_imported)
|
if(not_imported)
|
||||||
to_chat(user, span_warning("The following design[not_imported.len > 1 ? "s" : ""] couldn't be imported: [english_list(not_imported)]"))
|
to_chat(user, span_warning("The following design[length(not_imported) > 1 ? "s" : ""] couldn't be imported: [english_list(not_imported)]"))
|
||||||
busy = FALSE
|
busy = FALSE
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
@@ -348,7 +348,7 @@
|
|||||||
. += span_notice("The status display reads: Storing up to <b>[materials.max_amount]</b> material units.<br>Material consumption at <b>[creation_efficiency*100]%</b>.")
|
. += span_notice("The status display reads: Storing up to <b>[materials.max_amount]</b> material units.<br>Material consumption at <b>[creation_efficiency*100]%</b>.")
|
||||||
|
|
||||||
/obj/machinery/autolathe/proc/can_build(datum/design/D, amount = 1)
|
/obj/machinery/autolathe/proc/can_build(datum/design/D, amount = 1)
|
||||||
if(D.make_reagents.len)
|
if(length(D.make_reagents))
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : creation_efficiency)
|
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : creation_efficiency)
|
||||||
|
|||||||
@@ -231,10 +231,12 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/camera/xray, 0)
|
|||||||
droppable_parts += assembly.emp_module
|
droppable_parts += assembly.emp_module
|
||||||
if(assembly.proxy_module)
|
if(assembly.proxy_module)
|
||||||
droppable_parts += assembly.proxy_module
|
droppable_parts += assembly.proxy_module
|
||||||
if(!droppable_parts.len)
|
if(!length(droppable_parts))
|
||||||
return
|
return
|
||||||
var/obj/item/choice = input(user, "Select a part to remove:", src) as null|obj in sort_names(droppable_parts)
|
var/obj/item/choice = tgui_input_list(user, "Select a part to remove", "Part Removal", sort_names(droppable_parts))
|
||||||
if(!choice || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(isnull(choice))
|
||||||
|
return
|
||||||
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return
|
return
|
||||||
to_chat(user, span_notice("You remove [choice] from [src]."))
|
to_chat(user, span_notice("You remove [choice] from [src]."))
|
||||||
if(choice == assembly.xray_module)
|
if(choice == assembly.xray_module)
|
||||||
|
|||||||
@@ -201,10 +201,12 @@
|
|||||||
droppable_parts += emp_module
|
droppable_parts += emp_module
|
||||||
if(proxy_module)
|
if(proxy_module)
|
||||||
droppable_parts += proxy_module
|
droppable_parts += proxy_module
|
||||||
if(!droppable_parts.len)
|
if(!length(droppable_parts))
|
||||||
return
|
return
|
||||||
var/obj/item/choice = input(user, "Select a part to remove:", src) as null|obj in sort_names(droppable_parts)
|
var/obj/item/choice = tgui_input_list(user, "Select a part to remove", "Part Removal", sort_names(droppable_parts))
|
||||||
if(!choice || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(isnull(choice))
|
||||||
|
return
|
||||||
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return
|
return
|
||||||
to_chat(user, span_notice("You remove [choice] from [src]."))
|
to_chat(user, span_notice("You remove [choice] from [src]."))
|
||||||
drop_upgrade(choice)
|
drop_upgrade(choice)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
for (var/obj/machinery/camera/C in L)
|
for (var/obj/machinery/camera/C in L)
|
||||||
var/list/tempnetwork = C.network&src.network
|
var/list/tempnetwork = C.network&src.network
|
||||||
if (tempnetwork.len)
|
if (length(tempnetwork))
|
||||||
T[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C
|
T[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C
|
||||||
|
|
||||||
return T
|
return T
|
||||||
@@ -17,6 +17,10 @@
|
|||||||
/mob/living/silicon/ai/proc/show_camera_list()
|
/mob/living/silicon/ai/proc/show_camera_list()
|
||||||
var/list/cameras = get_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 = tgui_input_list(src, "Choose which camera you want to view", "Cameras", cameras)
|
||||||
|
if(isnull(camera))
|
||||||
|
return
|
||||||
|
if(isnull(cameras[camera]))
|
||||||
|
return
|
||||||
switchCamera(cameras[camera])
|
switchCamera(cameras[camera])
|
||||||
|
|
||||||
/datum/trackable
|
/datum/trackable
|
||||||
@@ -145,7 +149,7 @@
|
|||||||
var/obj/machinery/camera/a
|
var/obj/machinery/camera/a
|
||||||
var/obj/machinery/camera/b
|
var/obj/machinery/camera/b
|
||||||
|
|
||||||
for (var/i = L.len, i > 0, i--)
|
for (var/i = length(L), i > 0, i--)
|
||||||
for (var/j = 1 to i - 1)
|
for (var/j = 1 to i - 1)
|
||||||
a = L[j]
|
a = L[j]
|
||||||
b = L[j + 1]
|
b = L[j + 1]
|
||||||
|
|||||||
@@ -159,9 +159,9 @@
|
|||||||
var/list/keys = list()
|
var/list/keys = list()
|
||||||
for(var/mob/M in GLOB.player_list)
|
for(var/mob/M in GLOB.player_list)
|
||||||
keys += M.client
|
keys += M.client
|
||||||
var/client/selection = input("Please, select a player!", "Team member", null, null) as null|anything in sort_key(keys)
|
var/client/selection = tgui_input_list(user, "Select a player", "Team member", sort_key(keys))
|
||||||
//Could be freeform if you want to add disconnected i guess
|
//Could be freeform if you want to add disconnected i guess
|
||||||
if(!selection)
|
if(isnull(selection))
|
||||||
return
|
return
|
||||||
key = selection.ckey
|
key = selection.ckey
|
||||||
if(!team_keys[team])
|
if(!team_keys[team])
|
||||||
|
|||||||
@@ -424,7 +424,9 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
|||||||
IO |= text[1]
|
IO |= text[1]
|
||||||
if(!IO.len)
|
if(!IO.len)
|
||||||
to_chat(user, span_alert("No machinery detected."))
|
to_chat(user, span_alert("No machinery detected."))
|
||||||
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in sort_list(IO)
|
var/S = tgui_input_list(user, "Select the device set", "Reconnect", sort_list(IO))
|
||||||
|
if(isnull(S))
|
||||||
|
return
|
||||||
if(src)
|
if(src)
|
||||||
src.input_tag = "[S]_in"
|
src.input_tag = "[S]_in"
|
||||||
src.output_tag = "[S]_out"
|
src.output_tag = "[S]_out"
|
||||||
|
|||||||
@@ -137,19 +137,19 @@
|
|||||||
var/camera_location
|
var/camera_location
|
||||||
var/turf/myturf = get_turf(src)
|
var/turf/myturf = get_turf(src)
|
||||||
if(eyeobj.use_static != FALSE)
|
if(eyeobj.use_static != FALSE)
|
||||||
if((!z_lock.len || (myturf.z in z_lock)) && GLOB.cameranet.checkTurfVis(myturf))
|
if((!length(z_lock) || (myturf.z in z_lock)) && GLOB.cameranet.checkTurfVis(myturf))
|
||||||
camera_location = myturf
|
camera_location = myturf
|
||||||
else
|
else
|
||||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||||
if(!C.can_use() || z_lock.len && !(C.z in z_lock))
|
if(!C.can_use() || length(z_lock) && !(C.z in z_lock))
|
||||||
continue
|
continue
|
||||||
var/list/network_overlap = networks & C.network
|
var/list/network_overlap = networks & C.network
|
||||||
if(network_overlap.len)
|
if(length(network_overlap))
|
||||||
camera_location = get_turf(C)
|
camera_location = get_turf(C)
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
camera_location = myturf
|
camera_location = myturf
|
||||||
if(z_lock.len && !(myturf.z in z_lock))
|
if(length(z_lock) && !(myturf.z in z_lock))
|
||||||
camera_location = locate(round(world.maxx/2), round(world.maxy/2), z_lock[1])
|
camera_location = locate(round(world.maxx/2), round(world.maxy/2), z_lock[1])
|
||||||
|
|
||||||
if(camera_location)
|
if(camera_location)
|
||||||
@@ -274,7 +274,7 @@
|
|||||||
var/list/L = list()
|
var/list/L = list()
|
||||||
|
|
||||||
for (var/obj/machinery/camera/cam in GLOB.cameranet.cameras)
|
for (var/obj/machinery/camera/cam in GLOB.cameranet.cameras)
|
||||||
if(origin.z_lock.len && !(cam.z in origin.z_lock))
|
if(length(origin.z_lock) && !(cam.z in origin.z_lock))
|
||||||
continue
|
continue
|
||||||
L.Add(cam)
|
L.Add(cam)
|
||||||
|
|
||||||
@@ -284,13 +284,17 @@
|
|||||||
|
|
||||||
for (var/obj/machinery/camera/netcam in L)
|
for (var/obj/machinery/camera/netcam in L)
|
||||||
var/list/tempnetwork = netcam.network & origin.networks
|
var/list/tempnetwork = netcam.network & origin.networks
|
||||||
if (tempnetwork.len)
|
if (length(tempnetwork))
|
||||||
if(!netcam.c_tag)
|
if(!netcam.c_tag)
|
||||||
continue
|
continue
|
||||||
T["[netcam.c_tag][netcam.can_use() ? null : " (Deactivated)"]"] = netcam
|
T["[netcam.c_tag][netcam.can_use() ? null : " (Deactivated)"]"] = netcam
|
||||||
|
|
||||||
playsound(origin, 'sound/machines/terminal_prompt.ogg', 25, FALSE)
|
playsound(origin, 'sound/machines/terminal_prompt.ogg', 25, FALSE)
|
||||||
var/camera = tgui_input_list(usr, "Camera to view", "Cameras", T)
|
var/camera = tgui_input_list(usr, "Camera to view", "Cameras", T)
|
||||||
|
if(isnull(camera))
|
||||||
|
return
|
||||||
|
if(isnull(T[camera]))
|
||||||
|
return
|
||||||
var/obj/machinery/camera/final = T[camera]
|
var/obj/machinery/camera/final = T[camera]
|
||||||
playsound(src, "terminal_type", 25, FALSE)
|
playsound(src, "terminal_type", 25, FALSE)
|
||||||
if(final)
|
if(final)
|
||||||
|
|||||||
@@ -697,7 +697,7 @@ GLOBAL_VAR_INIT(cops_arrived, FALSE)
|
|||||||
if(!SScommunications.can_announce(user, is_ai))
|
if(!SScommunications.can_announce(user, is_ai))
|
||||||
to_chat(user, span_alert("Intercomms recharging. Please stand by."))
|
to_chat(user, span_alert("Intercomms recharging. Please stand by."))
|
||||||
return
|
return
|
||||||
var/input = stripped_input(user, "Please choose a message to announce to the station crew.", "What?")
|
var/input = tgui_input_text(user, "Message to announce to the station crew", "Announcement")
|
||||||
if(!input || !user.canUseTopic(src, !issilicon(usr)))
|
if(!input || !user.canUseTopic(src, !issilicon(usr)))
|
||||||
return
|
return
|
||||||
if(!(user.can_speak())) //No more cheating, mime/random mute guy!
|
if(!(user.can_speak())) //No more cheating, mime/random mute guy!
|
||||||
|
|||||||
@@ -98,10 +98,10 @@
|
|||||||
if("reset")
|
if("reset")
|
||||||
contained_id.points = 0
|
contained_id.points = 0
|
||||||
if("setgoal")
|
if("setgoal")
|
||||||
var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null)
|
var/num = tgui_input_text(usr, "Enter the prisoner's goal", "Prisoner Management", 1, 1000, 1)
|
||||||
if(num >= 0)
|
if(isnull(num))
|
||||||
num = min(num,1000) //Cap the quota to the equivilent of 10 minutes.
|
return
|
||||||
contained_id.goal = num
|
contained_id.goal = round(num)
|
||||||
else if(href_list["inject1"])
|
else if(href_list["inject1"])
|
||||||
var/obj/item/implant/I = locate(href_list["inject1"]) in GLOB.tracked_chem_implants
|
var/obj/item/implant/I = locate(href_list["inject1"]) in GLOB.tracked_chem_implants
|
||||||
if(I && istype(I))
|
if(I && istype(I))
|
||||||
|
|||||||
@@ -612,19 +612,19 @@ What a mess.*/
|
|||||||
printing = null
|
printing = null
|
||||||
if("Print Poster")
|
if("Print Poster")
|
||||||
if(!( printing ))
|
if(!( printing ))
|
||||||
var/wanted_name = stripped_input(usr, "Please enter an alias for the criminal:", "Print Wanted Poster", active1.fields["name"])
|
var/wanted_name = tgui_input_text(usr, "Enter an alias for the criminal", "Print Wanted Poster", active1.fields["name"])
|
||||||
if(wanted_name)
|
if(wanted_name)
|
||||||
var/default_description = "A poster declaring [wanted_name] to be a dangerous individual, wanted by Nanotrasen. Report any sightings to security immediately."
|
var/default_description = "A poster declaring [wanted_name] to be a dangerous individual, wanted by Nanotrasen. Report any sightings to security immediately."
|
||||||
var/list/crimes = active2.fields["crim"]
|
var/list/crimes = active2.fields["crim"]
|
||||||
if(crimes.len)
|
if(length(crimes))
|
||||||
default_description += "\n[wanted_name] is wanted for the following crimes:\n"
|
default_description += "\n[wanted_name] is wanted for the following crimes:\n"
|
||||||
for(var/datum/data/crime/c in active2.fields["crim"])
|
for(var/datum/data/crime/c in active2.fields["crim"])
|
||||||
default_description += "\n[c.crimeName]\n"
|
default_description += "\n[c.crimeName]\n"
|
||||||
default_description += "[c.crimeDetails]\n"
|
default_description += "[c.crimeDetails]\n"
|
||||||
|
|
||||||
var/headerText = stripped_input(usr, "Please enter Poster Heading (Max 7 Chars):", "Print Wanted Poster", "WANTED", 8)
|
var/headerText = tgui_input_text(usr, "Enter a poster heading", "Print Wanted Poster", "WANTED", 7)
|
||||||
|
|
||||||
var/info = stripped_multiline_input(usr, "Please input a description for the poster:", "Print Wanted Poster", default_description, null)
|
var/info = tgui_input_text(usr, "Input a description for the poster", "Print Wanted Poster", default_description)
|
||||||
if(info)
|
if(info)
|
||||||
playsound(loc, 'sound/items/poster_being_created.ogg', 100, TRUE)
|
playsound(loc, 'sound/items/poster_being_created.ogg', 100, TRUE)
|
||||||
printing = 1
|
printing = 1
|
||||||
@@ -635,13 +635,13 @@ What a mess.*/
|
|||||||
printing = 0
|
printing = 0
|
||||||
if("Print Missing")
|
if("Print Missing")
|
||||||
if(!( printing ))
|
if(!( printing ))
|
||||||
var/missing_name = stripped_input(usr, "Please enter an alias for the missing person:", "Print Missing Persons Poster", active1.fields["name"])
|
var/missing_name = tgui_input_text(usr, "Enter an alias for the missing person", "Print Missing Persons Poster", active1.fields["name"])
|
||||||
if(missing_name)
|
if(missing_name)
|
||||||
var/default_description = "A poster declaring [missing_name] to be a missing individual, missed by Nanotrasen. Report any sightings to security immediately."
|
var/default_description = "A poster declaring [missing_name] to be a missing individual, missed by Nanotrasen. Report any sightings to security immediately."
|
||||||
|
|
||||||
var/headerText = stripped_input(usr, "Please enter Poster Heading (Max 7 Chars):", "Print Missing Persons Poster", "MISSING", 8)
|
var/headerText = tgui_input_text(usr, "Enter a poster heading", "Print Missing Persons Poster", "MISSING", 7)
|
||||||
|
|
||||||
var/info = stripped_multiline_input(usr, "Please input a description for the poster:", "Print Missing Persons Poster", default_description, null)
|
var/info = tgui_input_text(usr, "Input a description for the poster", "Print Missing Persons Poster", default_description)
|
||||||
if(info)
|
if(info)
|
||||||
playsound(loc, 'sound/items/poster_being_created.ogg', 100, TRUE)
|
playsound(loc, 'sound/items/poster_being_created.ogg', 100, TRUE)
|
||||||
printing = 1
|
printing = 1
|
||||||
@@ -669,7 +669,7 @@ What a mess.*/
|
|||||||
if(!( istype(active2, /datum/data/record) ))
|
if(!( istype(active2, /datum/data/record) ))
|
||||||
return
|
return
|
||||||
var/a2 = active2
|
var/a2 = active2
|
||||||
var/t1 = stripped_multiline_input("Add Comment:", "Secure. records", null, null)
|
var/t1 = tgui_input_text(usr, "Add a comment", "Security Records")
|
||||||
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
||||||
return
|
return
|
||||||
var/counter = 1
|
var/counter = 1
|
||||||
@@ -763,7 +763,7 @@ What a mess.*/
|
|||||||
switch(href_list["field"])
|
switch(href_list["field"])
|
||||||
if("name")
|
if("name")
|
||||||
if(istype(active1, /datum/data/record) || istype(active2, /datum/data/record))
|
if(istype(active1, /datum/data/record) || istype(active2, /datum/data/record))
|
||||||
var/t1 = stripped_input(usr, "Please input name:", "Secure. records", active1.fields["name"], MAX_MESSAGE_LEN)
|
var/t1 = tgui_input_text(usr, "Input a name", "Security Records", active1.fields["name"])
|
||||||
if(!canUseSecurityRecordsConsole(usr, t1, a1))
|
if(!canUseSecurityRecordsConsole(usr, t1, a1))
|
||||||
return
|
return
|
||||||
if(istype(active1, /datum/data/record))
|
if(istype(active1, /datum/data/record))
|
||||||
@@ -772,7 +772,7 @@ What a mess.*/
|
|||||||
active2.fields["name"] = t1
|
active2.fields["name"] = t1
|
||||||
if("id")
|
if("id")
|
||||||
if(istype(active2, /datum/data/record) || istype(active1, /datum/data/record))
|
if(istype(active2, /datum/data/record) || istype(active1, /datum/data/record))
|
||||||
var/t1 = stripped_input(usr, "Please input id:", "Secure. records", active1.fields["id"], null)
|
var/t1 = tgui_input_text(usr, "Input an id", "Security Records", active1.fields["id"])
|
||||||
if(!canUseSecurityRecordsConsole(usr, t1, a1))
|
if(!canUseSecurityRecordsConsole(usr, t1, a1))
|
||||||
return
|
return
|
||||||
if(istype(active1, /datum/data/record))
|
if(istype(active1, /datum/data/record))
|
||||||
@@ -781,7 +781,7 @@ What a mess.*/
|
|||||||
active2.fields["id"] = t1
|
active2.fields["id"] = t1
|
||||||
if("fingerprint")
|
if("fingerprint")
|
||||||
if(istype(active1, /datum/data/record))
|
if(istype(active1, /datum/data/record))
|
||||||
var/t1 = stripped_input(usr, "Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null)
|
var/t1 = tgui_input_text(usr, "Input a fingerprint hash", "Security Records", active1.fields["fingerprint"])
|
||||||
if(!canUseSecurityRecordsConsole(usr, t1, a1))
|
if(!canUseSecurityRecordsConsole(usr, t1, a1))
|
||||||
return
|
return
|
||||||
active1.fields["fingerprint"] = t1
|
active1.fields["fingerprint"] = t1
|
||||||
@@ -795,7 +795,7 @@ What a mess.*/
|
|||||||
active1.fields["gender"] = "Male"
|
active1.fields["gender"] = "Male"
|
||||||
if("age")
|
if("age")
|
||||||
if(istype(active1, /datum/data/record))
|
if(istype(active1, /datum/data/record))
|
||||||
var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num|null
|
var/t1 = tgui_input_number(usr, "Input age", "Security records", active1.fields["age"], AGE_MAX, AGE_MIN)
|
||||||
|
|
||||||
if (!t1)
|
if (!t1)
|
||||||
return
|
return
|
||||||
@@ -805,7 +805,9 @@ What a mess.*/
|
|||||||
active1.fields["age"] = t1
|
active1.fields["age"] = t1
|
||||||
if("species")
|
if("species")
|
||||||
if(istype(active1, /datum/data/record))
|
if(istype(active1, /datum/data/record))
|
||||||
var/t1 = input("Select a species", "Species Selection") as null|anything in get_selectable_species()
|
var/t1 = tgui_input_list(usr, "Select a species", "Species Selection", get_selectable_species())
|
||||||
|
if(isnull(t1))
|
||||||
|
return
|
||||||
if(!canUseSecurityRecordsConsole(usr, t1, a1))
|
if(!canUseSecurityRecordsConsole(usr, t1, a1))
|
||||||
return
|
return
|
||||||
active1.fields["species"] = t1
|
active1.fields["species"] = t1
|
||||||
@@ -855,8 +857,8 @@ What a mess.*/
|
|||||||
print_photo(P.picture.picture_image, active1.fields["name"])
|
print_photo(P.picture.picture_image, active1.fields["name"])
|
||||||
if("crim_add")
|
if("crim_add")
|
||||||
if(istype(active1, /datum/data/record))
|
if(istype(active1, /datum/data/record))
|
||||||
var/t1 = stripped_input(usr, "Please input crime names:", "Secure. records", "", null)
|
var/t1 = tgui_input_text(usr, "Input crime names", "Security Records")
|
||||||
var/t2 = stripped_input(usr, "Please input crime details:", "Secure. records", "", null)
|
var/t2 = tgui_input_text(usr, "Input crime details", "Security Records")
|
||||||
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
||||||
return
|
return
|
||||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, station_time_timestamp())
|
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, station_time_timestamp())
|
||||||
@@ -871,7 +873,7 @@ What a mess.*/
|
|||||||
if("add_details")
|
if("add_details")
|
||||||
if(istype(active1, /datum/data/record))
|
if(istype(active1, /datum/data/record))
|
||||||
if(href_list["cdataid"])
|
if(href_list["cdataid"])
|
||||||
var/t1 = stripped_input(usr, "Please input crime details:", "Secure. records", "", null)
|
var/t1 = tgui_input_text(usr, "Input crime details", "Security Records")
|
||||||
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
||||||
return
|
return
|
||||||
GLOB.data_core.addCrimeDetails(active1.fields["id"], href_list["cdataid"], t1)
|
GLOB.data_core.addCrimeDetails(active1.fields["id"], href_list["cdataid"], t1)
|
||||||
@@ -880,17 +882,13 @@ What a mess.*/
|
|||||||
if(istype(active1, /datum/data/record))
|
if(istype(active1, /datum/data/record))
|
||||||
var/maxFine = CONFIG_GET(number/maxfine)
|
var/maxFine = CONFIG_GET(number/maxfine)
|
||||||
|
|
||||||
var/t1 = stripped_input(usr, "Please input citation crime:", "Secure. records", "", null)
|
var/t1 = tgui_input_text(usr, "Input citation crime", "Security Records")
|
||||||
var/fine = FLOOR(input(usr, "Please input citation fine, up to [maxFine]:", "Secure. records", 50) as num|null, 1)
|
var/fine = round(tgui_input_number(usr, "Input citation fine", "Security Records", 50, maxFine, 1))
|
||||||
|
|
||||||
if (isnull(fine))
|
if (isnull(fine))
|
||||||
return
|
return
|
||||||
fine = min(fine, maxFine)
|
fine = min(fine, maxFine)
|
||||||
|
|
||||||
if(fine < 0)
|
|
||||||
to_chat(usr, span_warning("You're pretty sure that's not how money works."))
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -918,7 +916,7 @@ What a mess.*/
|
|||||||
GLOB.data_core.removeCitation(active1.fields["id"], href_list["cdataid"])
|
GLOB.data_core.removeCitation(active1.fields["id"], href_list["cdataid"])
|
||||||
if("notes")
|
if("notes")
|
||||||
if(istype(active2, /datum/data/record))
|
if(istype(active2, /datum/data/record))
|
||||||
var/t1 = stripped_input(usr, "Please summarize notes:", "Secure. records", active2.fields["notes"], null)
|
var/t1 = tgui_input_text(usr, "Please summarize notes", "Security Records", active2.fields["notes"])
|
||||||
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
||||||
return
|
return
|
||||||
active2.fields["notes"] = t1
|
active2.fields["notes"] = t1
|
||||||
|
|||||||
@@ -188,16 +188,20 @@
|
|||||||
var/list/targets = get_targets()
|
var/list/targets = get_targets()
|
||||||
|
|
||||||
if (regime_set == "Teleporter")
|
if (regime_set == "Teleporter")
|
||||||
var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in sort_list(targets)
|
var/desc = tgui_input_list(usr, "Select a location to lock in", "Locking Computer", sort_list(targets))
|
||||||
|
if(isnull(desc))
|
||||||
|
return
|
||||||
set_teleport_target(targets[desc])
|
set_teleport_target(targets[desc])
|
||||||
var/turf/target_turf = get_turf(targets[desc])
|
var/turf/target_turf = get_turf(targets[desc])
|
||||||
log_game("[key_name(user)] has set the teleporter target to [targets[desc]] at [AREACOORD(target_turf)]")
|
log_game("[key_name(user)] has set the teleporter target to [targets[desc]] at [AREACOORD(target_turf)]")
|
||||||
else
|
else
|
||||||
if (targets.len == 0)
|
if (!length(targets))
|
||||||
to_chat(user, span_alert("No active connected stations located."))
|
to_chat(user, span_alert("No active connected stations located."))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in sort_list(targets)
|
var/desc = tgui_input_list(usr, "Select a station to lock in", "Locking Computer", sort_list(targets))
|
||||||
|
if(isnull(desc))
|
||||||
|
return
|
||||||
var/obj/machinery/teleport/station/target_station = targets[desc]
|
var/obj/machinery/teleport/station/target_station = targets[desc]
|
||||||
if(!target_station || !target_station.teleporter_hub)
|
if(!target_station || !target_station.teleporter_hub)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1240,7 +1240,7 @@
|
|||||||
|
|
||||||
// reads from the airlock painter's `available paintjob` list. lets the player choose a paint option, or cancel painting
|
// reads from the airlock painter's `available paintjob` list. lets the player choose a paint option, or cancel painting
|
||||||
var/current_paintjob = tgui_input_list(user, "Paintjob for this airlock", "Customize", sort_list(painter.available_paint_jobs))
|
var/current_paintjob = tgui_input_list(user, "Paintjob for this airlock", "Customize", sort_list(painter.available_paint_jobs))
|
||||||
if(!current_paintjob) // if the user clicked cancel on the popup, return
|
if(isnull(current_paintjob)) // if the user clicked cancel on the popup, return
|
||||||
return
|
return
|
||||||
|
|
||||||
var/airlock_type = painter.available_paint_jobs["[current_paintjob]"] // get the airlock type path associated with the airlock name the user just chose
|
var/airlock_type = painter.available_paint_jobs["[current_paintjob]"] // get the airlock type path associated with the airlock name the user just chose
|
||||||
@@ -1390,7 +1390,7 @@
|
|||||||
if(!electronics)
|
if(!electronics)
|
||||||
ae = new/obj/item/electronics/airlock(loc)
|
ae = new/obj/item/electronics/airlock(loc)
|
||||||
gen_access()
|
gen_access()
|
||||||
if(req_one_access.len)
|
if(length(req_one_access))
|
||||||
ae.one_access = 1
|
ae.one_access = 1
|
||||||
ae.accesses = req_one_access
|
ae.accesses = req_one_access
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -31,11 +31,12 @@
|
|||||||
return
|
return
|
||||||
if (deconstruction != BLASTDOOR_FINISHED)
|
if (deconstruction != BLASTDOOR_FINISHED)
|
||||||
return
|
return
|
||||||
var/change_id = input("Set the shutters/blast door/blast door controllers ID. It must be a number between 1 and 100.", "ID", id) as num|null
|
var/change_id = tgui_input_number(user, "Set the door controllers ID", "Door Controller ID", id, 100, 1)
|
||||||
if(change_id)
|
if(isnull(change_id))
|
||||||
id = clamp(round(change_id, 1), 1, 100)
|
return
|
||||||
to_chat(user, span_notice("You change the ID to [id]."))
|
id = round(change_id)
|
||||||
balloon_alert(user, "ID changed")
|
to_chat(user, span_notice("You change the ID to [id]."))
|
||||||
|
balloon_alert(user, "ID changed")
|
||||||
|
|
||||||
/obj/machinery/door/poddoor/crowbar_act(mob/living/user, obj/item/tool)
|
/obj/machinery/door/poddoor/crowbar_act(mob/living/user, obj/item/tool)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -325,7 +325,9 @@ Possible to do for anyone motivated enough:
|
|||||||
LAZYADD(callnames[A], I)
|
LAZYADD(callnames[A], I)
|
||||||
callnames -= get_area(src)
|
callnames -= get_area(src)
|
||||||
var/result = tgui_input_list(usr, "Choose an area to call", "Holocall", sort_names(callnames))
|
var/result = tgui_input_list(usr, "Choose an area to call", "Holocall", sort_names(callnames))
|
||||||
if(QDELETED(usr) || !result || outgoing_call)
|
if(isnull(result))
|
||||||
|
return
|
||||||
|
if(QDELETED(usr) || outgoing_call)
|
||||||
return
|
return
|
||||||
if(usr.loc == loc)
|
if(usr.loc == loc)
|
||||||
var/input = text2num(params["headcall"])
|
var/input = text2num(params["headcall"])
|
||||||
@@ -753,15 +755,15 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
|||||||
if(time_delta >= 1)
|
if(time_delta >= 1)
|
||||||
disk.record.entries += list(list(HOLORECORD_DELAY,time_delta))
|
disk.record.entries += list(list(HOLORECORD_DELAY,time_delta))
|
||||||
disk.record.entries += list(list(HOLORECORD_SAY,message))
|
disk.record.entries += list(list(HOLORECORD_SAY,message))
|
||||||
if(disk.record.entries.len >= HOLORECORD_MAX_LENGTH)
|
if(length(disk.record.entries) >= HOLORECORD_MAX_LENGTH)
|
||||||
record_stop()
|
record_stop()
|
||||||
|
|
||||||
/obj/machinery/holopad/proc/replay_entry(entry_number)
|
/obj/machinery/holopad/proc/replay_entry(entry_number)
|
||||||
if(!replay_mode)
|
if(!replay_mode)
|
||||||
return
|
return
|
||||||
if (!disk.record.entries.len) // check for zero entries such as photographs and no text recordings
|
if (!length(disk.record.entries)) // check for zero entries such as photographs and no text recordings
|
||||||
return // and pretty much just display them statically untill manually stopped
|
return // and pretty much just display them statically untill manually stopped
|
||||||
if(disk.record.entries.len < entry_number)
|
if(length(disk.record.entries) < entry_number)
|
||||||
if(loop_mode)
|
if(loop_mode)
|
||||||
entry_number = 1
|
entry_number = 1
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -553,7 +553,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/newscaster/security_unit, 30)
|
|||||||
for(var/datum/newscaster/feed_channel/F in GLOB.news_network.network_channels)
|
for(var/datum/newscaster/feed_channel/F in GLOB.news_network.network_channels)
|
||||||
if( (!F.locked || F.author == scanned_user) && !F.censored)
|
if( (!F.locked || F.author == scanned_user) && !F.censored)
|
||||||
available_channels += F.channel_name
|
available_channels += F.channel_name
|
||||||
channel_name = input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in sort_list(available_channels)
|
var/channel_choice = tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", sort_list(available_channels))
|
||||||
|
if(isnull(channel_choice))
|
||||||
|
return
|
||||||
|
channel_name = channel_choice
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
else if(href_list["set_new_message"])
|
else if(href_list["set_new_message"])
|
||||||
var/temp_message = tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", msg, multiline = TRUE)
|
var/temp_message = tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", msg, multiline = TRUE)
|
||||||
|
|||||||
@@ -181,13 +181,13 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(istype(I, /obj/item/pen)) //you can rename turrets like bots!
|
if(istype(I, /obj/item/pen)) //you can rename turrets like bots!
|
||||||
var/t = stripped_input(user, "Enter new turret name", name, finish_name)
|
var/choice = tgui_input_text(user, "Enter a new turret name", "Turret Classification", finish_name, MAX_NAME_LEN)
|
||||||
if(!t)
|
if(!choice)
|
||||||
return
|
return
|
||||||
if(!Adjacent(user))
|
if(!user.canUseTopic(src, BE_CLOSE))
|
||||||
return
|
return
|
||||||
|
|
||||||
finish_name = t
|
finish_name = choice
|
||||||
return
|
return
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|||||||
@@ -198,17 +198,19 @@
|
|||||||
notify_ghosts("\A [src] has been activated at [get_area(src)]!", source = src, action = NOTIFY_ORBIT, flashwindow = FALSE, header = "Bomb Planted")
|
notify_ghosts("\A [src] has been activated at [get_area(src)]!", source = src, action = NOTIFY_ORBIT, flashwindow = FALSE, header = "Bomb Planted")
|
||||||
|
|
||||||
/obj/machinery/syndicatebomb/proc/settings(mob/user)
|
/obj/machinery/syndicatebomb/proc/settings(mob/user)
|
||||||
|
if(!user.canUseTopic(src, !issilicon(user)))
|
||||||
|
return
|
||||||
var/new_timer = tgui_input_number(user, "Set the timer", "Countdown", timer_set, maximum_timer, minimum_timer)
|
var/new_timer = tgui_input_number(user, "Set the timer", "Countdown", timer_set, maximum_timer, minimum_timer)
|
||||||
if (isnull(new_timer))
|
if (isnull(new_timer))
|
||||||
return
|
return
|
||||||
new_timer = round(new_timer)
|
if(!user.canUseTopic(src, !issilicon(user)))
|
||||||
if(in_range(src, user) && isliving(user)) //No running off and setting bombs from across the station
|
return
|
||||||
timer_set = clamp(new_timer, minimum_timer, maximum_timer)
|
timer_set = round(new_timer)
|
||||||
loc.visible_message(span_notice("[icon2html(src, viewers(src))] timer set for [timer_set] seconds."))
|
loc.visible_message(span_notice("[icon2html(src, viewers(src))] timer set for [timer_set] seconds."))
|
||||||
var/choice = tgui_alert(user, "Would you like to start the countdown now?", "Bomb Timer", list("Yes","No"))
|
var/choice = tgui_alert(user, "Would you like to start the countdown now?", "Bomb Timer", list("Yes","No"))
|
||||||
if(choice != "Yes")
|
if(choice != "Yes")
|
||||||
return
|
return
|
||||||
if(!in_range(src, user) || !isliving(user))
|
if(!user.canUseTopic(src, !issilicon(user)))
|
||||||
return
|
return
|
||||||
if(active)
|
if(active)
|
||||||
to_chat(user, span_warning("The bomb is already active!"))
|
to_chat(user, span_warning("The bomb is already active!"))
|
||||||
|
|||||||
@@ -288,10 +288,11 @@
|
|||||||
for (var/obj/machinery/telecomms/message_server/M in GLOB.telecomms_list)
|
for (var/obj/machinery/telecomms/message_server/M in GLOB.telecomms_list)
|
||||||
message_servers += M
|
message_servers += M
|
||||||
|
|
||||||
if(message_servers.len > 1)
|
if(length(message_servers) > 1)
|
||||||
linkedServer = tgui_input_list(usr, "Please select a server", "Server Selection", message_servers)
|
linkedServer = tgui_input_list(usr, "Please select a server", "Server Selection", message_servers)
|
||||||
message = span_alert("NOTICE: Server selected.")
|
if(linkedServer)
|
||||||
else if(message_servers.len > 0)
|
message = span_alert("NOTICE: Server selected.")
|
||||||
|
else if(length(message_servers) > 0)
|
||||||
linkedServer = message_servers[1]
|
linkedServer = message_servers[1]
|
||||||
message = span_notice("NOTICE: Only Single Server Detected - Server selected.")
|
message = span_notice("NOTICE: Only Single Server Detected - Server selected.")
|
||||||
else
|
else
|
||||||
@@ -388,7 +389,7 @@
|
|||||||
if("Recepient")
|
if("Recepient")
|
||||||
//Get out list of viable PDAs
|
//Get out list of viable PDAs
|
||||||
var/list/obj/item/pda/sendPDAs = get_viewable_pdas()
|
var/list/obj/item/pda/sendPDAs = get_viewable_pdas()
|
||||||
if(GLOB.PDAs && GLOB.PDAs.len > 0)
|
if(GLOB.PDAs && length(GLOB.PDAs) > 0)
|
||||||
customrecepient = tgui_input_list(usr, "Select a PDA from the list", "PDA Selection", sendPDAs)
|
customrecepient = tgui_input_list(usr, "Select a PDA from the list", "PDA Selection", sendPDAs)
|
||||||
else
|
else
|
||||||
customrecepient = null
|
customrecepient = null
|
||||||
|
|||||||
@@ -18,8 +18,10 @@
|
|||||||
if(.)
|
if(.)
|
||||||
return
|
return
|
||||||
if(can_buckle && has_buckled_mobs())
|
if(can_buckle && has_buckled_mobs())
|
||||||
if(buckled_mobs.len > 1)
|
if(length(buckled_mobs) > 1)
|
||||||
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in sort_names(buckled_mobs)
|
var/mob/living/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?", "Unbuckle", sort_names(buckled_mobs))
|
||||||
|
if(isnull(unbuckled))
|
||||||
|
return
|
||||||
if(user_unbuckle_mob(unbuckled,user))
|
if(user_unbuckle_mob(unbuckled,user))
|
||||||
return TRUE
|
return TRUE
|
||||||
else
|
else
|
||||||
@@ -44,8 +46,10 @@
|
|||||||
if(.)
|
if(.)
|
||||||
return
|
return
|
||||||
if(Adjacent(user) && can_buckle && has_buckled_mobs())
|
if(Adjacent(user) && can_buckle && has_buckled_mobs())
|
||||||
if(buckled_mobs.len > 1)
|
if(length(buckled_mobs) > 1)
|
||||||
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in sort_names(buckled_mobs)
|
var/mob/living/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?", "Unbuckle", sort_names(buckled_mobs))
|
||||||
|
if(isnull(unbuckled))
|
||||||
|
return
|
||||||
return user_unbuckle_mob(unbuckled,user)
|
return user_unbuckle_mob(unbuckled,user)
|
||||||
else
|
else
|
||||||
return user_unbuckle_mob(buckled_mobs[1], user)
|
return user_unbuckle_mob(buckled_mobs[1], user)
|
||||||
@@ -71,7 +75,7 @@
|
|||||||
/atom/movable/proc/has_buckled_mobs()
|
/atom/movable/proc/has_buckled_mobs()
|
||||||
if(!buckled_mobs)
|
if(!buckled_mobs)
|
||||||
return FALSE
|
return FALSE
|
||||||
if(buckled_mobs.len)
|
if(length(buckled_mobs))
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -419,7 +419,9 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/e
|
|||||||
affixes.Add(suffixes)
|
affixes.Add(suffixes)
|
||||||
|
|
||||||
//admin picks, cleanup the ones we didn't do and handle chosen
|
//admin picks, cleanup the ones we didn't do and handle chosen
|
||||||
var/picked_affix_name = input(usr, "Choose an affix to add to [src]...", "Enchant [src]") as null|anything in affixes
|
var/picked_affix_name = tgui_input_list(usr, "Affix to add to [src]", "Enchant [src]", affixes)
|
||||||
|
if(isnull(picked_affix_name))
|
||||||
|
return
|
||||||
if(!affixes[picked_affix_name] || QDELETED(src))
|
if(!affixes[picked_affix_name] || QDELETED(src))
|
||||||
return
|
return
|
||||||
var/datum/fantasy_affix/affix = affixes[picked_affix_name]
|
var/datum/fantasy_affix/affix = affixes[picked_affix_name]
|
||||||
|
|||||||
@@ -246,15 +246,10 @@ AI MODULES
|
|||||||
laws = list("")
|
laws = list("")
|
||||||
|
|
||||||
/obj/item/ai_module/supplied/freeform/attack_self(mob/user)
|
/obj/item/ai_module/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_number(user, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority ", lawpos, 50, 15)
|
||||||
if(newpos == null)
|
if(isnull(newpos))
|
||||||
return
|
return
|
||||||
if(newpos < 15)
|
lawpos = round(newpos)
|
||||||
var/response = tgui_alert(usr, "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
|
|
||||||
lawpos = min(newpos, 50)
|
|
||||||
var/targName = tgui_input_text(user, "Enter a new law for the AI.", "Freeform Law Entry", laws[1], CONFIG_GET(number/max_law_len), TRUE)
|
var/targName = tgui_input_text(user, "Enter a new law for the AI.", "Freeform Law Entry", laws[1], CONFIG_GET(number/max_law_len), TRUE)
|
||||||
if(!targName)
|
if(!targName)
|
||||||
return
|
return
|
||||||
@@ -290,12 +285,8 @@ AI MODULES
|
|||||||
var/lawpos = 1
|
var/lawpos = 1
|
||||||
|
|
||||||
/obj/item/ai_module/remove/attack_self(mob/user)
|
/obj/item/ai_module/remove/attack_self(mob/user)
|
||||||
lawpos = input("Please enter the law you want to delete.", "Law Number", lawpos) as num|null
|
lawpos = tgui_input_number(user, "Law to delete", "Law Removal", lawpos, 50, 1)
|
||||||
if(lawpos == null)
|
if(isnull(lawpos))
|
||||||
return
|
|
||||||
if(lawpos <= 0)
|
|
||||||
to_chat(user, span_warning("Error: The law number of [lawpos] is invalid."))
|
|
||||||
lawpos = 1
|
|
||||||
return
|
return
|
||||||
to_chat(user, span_notice("Law [lawpos] selected."))
|
to_chat(user, span_notice("Law [lawpos] selected."))
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -459,7 +459,7 @@
|
|||||||
to_chat(user, span_warning("[src] doesn't have a linked account to deposit into!"))
|
to_chat(user, span_warning("[src] doesn't have a linked account to deposit into!"))
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
if (!money || !money.len)
|
if (!money || !length(money))
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
var/total = 0
|
var/total = 0
|
||||||
@@ -489,49 +489,38 @@
|
|||||||
. = FALSE
|
. = FALSE
|
||||||
var/datum/bank_account/old_account = registered_account
|
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_number(user, "Enter your account ID number", "Account Reclamation", 111111, 999999, 111111)
|
||||||
|
if(isnull(new_bank_id))
|
||||||
if (isnull(new_bank_id))
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!alt_click_can_use_id(user))
|
if(!alt_click_can_use_id(user))
|
||||||
return
|
return
|
||||||
if(!new_bank_id || new_bank_id < 111111 || new_bank_id > 999999)
|
if(registered_account && registered_account.account_id == new_bank_id)
|
||||||
to_chat(user, span_warning("The account ID number needs to be between 111111 and 999999."))
|
|
||||||
return
|
|
||||||
if (registered_account && registered_account.account_id == new_bank_id)
|
|
||||||
to_chat(user, span_warning("The account ID was already assigned to this card."))
|
to_chat(user, span_warning("The account ID was already assigned to this card."))
|
||||||
return
|
return
|
||||||
|
var/datum/bank_account/account = SSeconomy.bank_accounts_by_id["[new_bank_id]"]
|
||||||
var/datum/bank_account/B = SSeconomy.bank_accounts_by_id["[new_bank_id]"]
|
if(isnull(account))
|
||||||
if(B)
|
to_chat(user, span_warning("The account ID number provided is invalid."))
|
||||||
if (old_account)
|
return
|
||||||
old_account.bank_cards -= src
|
if(old_account)
|
||||||
|
old_account.bank_cards -= src
|
||||||
B.bank_cards += src
|
account.bank_cards += src
|
||||||
registered_account = B
|
registered_account = account
|
||||||
to_chat(user, span_notice("The provided account has been linked to this ID card."))
|
to_chat(user, span_notice("The provided account has been linked to this ID card."))
|
||||||
|
return TRUE
|
||||||
return TRUE
|
|
||||||
|
|
||||||
to_chat(user, span_warning("The account ID number provided is invalid."))
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/card/id/AltClick(mob/living/user)
|
/obj/item/card/id/AltClick(mob/living/user)
|
||||||
if(!alt_click_can_use_id(user))
|
if(!alt_click_can_use_id(user))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!registered_account)
|
if(!registered_account)
|
||||||
set_new_account(user)
|
set_new_account(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
if (registered_account.being_dumped)
|
if (registered_account.being_dumped)
|
||||||
registered_account.bank_card_talk(span_warning("内部服务器错误"), TRUE)
|
registered_account.bank_card_talk(span_warning("内部服务器错误"), TRUE)
|
||||||
return
|
return
|
||||||
|
var/amount_to_remove = round(tgui_input_number(user, "How much do you want to withdraw?", "Withdraw Funds", 1, registered_account.account_balance, 1))
|
||||||
var/amount_to_remove = FLOOR(input(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5) as num|null, 1)
|
if(isnull(amount_to_remove))
|
||||||
|
return
|
||||||
if(!amount_to_remove || amount_to_remove < 0)
|
if(amount_to_remove < 1 || amount_to_remove > registered_account.account_balance)
|
||||||
return
|
return
|
||||||
if(!alt_click_can_use_id(user))
|
if(!alt_click_can_use_id(user))
|
||||||
return
|
return
|
||||||
@@ -980,19 +969,21 @@
|
|||||||
/obj/item/card/id/advanced/prisoner/attackby(obj/item/card/id/C, mob/user)
|
/obj/item/card/id/advanced/prisoner/attackby(obj/item/card/id/C, mob/user)
|
||||||
..()
|
..()
|
||||||
var/list/id_access = C.GetAccess()
|
var/list/id_access = C.GetAccess()
|
||||||
if(ACCESS_BRIG in id_access)
|
if(!(ACCESS_BRIG in id_access))
|
||||||
if(timed)
|
return
|
||||||
timed = FALSE
|
if(timed)
|
||||||
time_to_assign = initial(time_to_assign)
|
timed = FALSE
|
||||||
registered_name = initial(registered_name)
|
time_to_assign = initial(time_to_assign)
|
||||||
STOP_PROCESSING(SSobj, src)
|
registered_name = initial(registered_name)
|
||||||
to_chat(user, "Restating prisoner ID to default parameters.")
|
STOP_PROCESSING(SSobj, src)
|
||||||
return
|
to_chat(user, "Restating prisoner ID to default parameters.")
|
||||||
time_to_assign = input(user,"Set sentence time in seconds.","Set sentence time in seconds.",0) as num|null
|
return
|
||||||
if(isnull(time_to_assign) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
var/choice = tgui_input_number(user, "Sentence time in seconds", "Sentencing")
|
||||||
return
|
if(isnull(time_to_assign) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
to_chat(user, "You set the sentence time to [time_to_assign] seconds.")
|
return
|
||||||
timed = TRUE
|
time_to_assign = round(choice)
|
||||||
|
to_chat(user, "You set the sentence time to [time_to_assign] seconds.")
|
||||||
|
timed = TRUE
|
||||||
|
|
||||||
/obj/item/card/id/advanced/prisoner/proc/start_timer()
|
/obj/item/card/id/advanced/prisoner/proc/start_timer()
|
||||||
say("Sentence started, welcome to the corporate rehabilitation center!")
|
say("Sentence started, welcome to the corporate rehabilitation center!")
|
||||||
@@ -1271,7 +1262,7 @@
|
|||||||
return
|
return
|
||||||
if(popup_input == "Forge/Reset")
|
if(popup_input == "Forge/Reset")
|
||||||
if(!forged)
|
if(!forged)
|
||||||
var/input_name = stripped_input(user, "What name would you like to put on this card? Leave blank to randomise.", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name), MAX_NAME_LEN)
|
var/input_name = tgui_input_text(user, "What name would you like to put on this card? Leave blank to randomise.", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name), MAX_NAME_LEN)
|
||||||
input_name = sanitize_name(input_name)
|
input_name = sanitize_name(input_name)
|
||||||
if(!input_name)
|
if(!input_name)
|
||||||
// Invalid/blank names give a randomly generated one.
|
// Invalid/blank names give a randomly generated one.
|
||||||
@@ -1298,18 +1289,17 @@
|
|||||||
var/fake_trim_name = "[trim.assignment] ([trim.trim_state])"
|
var/fake_trim_name = "[trim.assignment] ([trim.trim_state])"
|
||||||
trim_list[fake_trim_name] = trim_path
|
trim_list[fake_trim_name] = trim_path
|
||||||
|
|
||||||
var/selected_trim_path
|
var/selected_trim_path = tgui_input_list(user, "Select trim to apply to your card.\nNote: This will not grant any trim accesses.", "Forge Trim", sort_list(trim_list, /proc/cmp_typepaths_asc))
|
||||||
selected_trim_path = input("Select trim to apply to your card.\nNote: This will not grant any trim accesses.", "Forge Trim", selected_trim_path) as null|anything in sort_list(trim_list, /proc/cmp_typepaths_asc)
|
|
||||||
if(selected_trim_path)
|
if(selected_trim_path)
|
||||||
SSid_access.apply_trim_to_chameleon_card(src, trim_list[selected_trim_path])
|
SSid_access.apply_trim_to_chameleon_card(src, trim_list[selected_trim_path])
|
||||||
|
|
||||||
var/target_occupation = stripped_input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels.", "Agent card job assignment", assignment ? assignment : "Assistant", MAX_MESSAGE_LEN)
|
var/target_occupation = tgui_input_text(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels.", "Agent card job assignment", assignment ? assignment : "Assistant")
|
||||||
if(target_occupation)
|
if(target_occupation)
|
||||||
assignment = target_occupation
|
assignment = target_occupation
|
||||||
|
|
||||||
var/new_age = input(user, "Choose the ID's age:\n([AGE_MIN]-[AGE_MAX])", "Agent card age") as num|null
|
var/new_age = tgui_input_number(user, "Choose the ID's age", "Agent card age", AGE_MIN, AGE_MAX, AGE_MIN)
|
||||||
if(new_age)
|
if(new_age)
|
||||||
registered_age = max(round(text2num(new_age)), 0)
|
registered_age = round(new_age)
|
||||||
|
|
||||||
if(tgui_alert(user, "Activate wallet ID spoofing, allowing this card to force itself to occupy the visible ID slot in wallets?", "Wallet ID Spoofing", list("Yes", "No")) == "Yes")
|
if(tgui_alert(user, "Activate wallet ID spoofing, allowing this card to force itself to occupy the visible ID slot in wallets?", "Wallet ID Spoofing", list("Yes", "No")) == "Yes")
|
||||||
ADD_TRAIT(src, TRAIT_MAGNETIC_ID_CARD, CHAMELEON_ITEM_TRAIT)
|
ADD_TRAIT(src, TRAIT_MAGNETIC_ID_CARD, CHAMELEON_ITEM_TRAIT)
|
||||||
|
|||||||
@@ -22,10 +22,14 @@
|
|||||||
|
|
||||||
/obj/item/choice_beacon/proc/generate_options(mob/living/M)
|
/obj/item/choice_beacon/proc/generate_options(mob/living/M)
|
||||||
var/list/display_names = generate_display_names()
|
var/list/display_names = generate_display_names()
|
||||||
if(!display_names.len)
|
if(!length(display_names))
|
||||||
return
|
return
|
||||||
var/choice = tgui_input_list(M, "Which item would you like to order?", "Select an Item", display_names)
|
var/choice = tgui_input_list(M, "Which item would you like to order?", "Select an Item", display_names)
|
||||||
if(!choice || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(isnull(choice))
|
||||||
|
return
|
||||||
|
if(isnull(display_names[choice]))
|
||||||
|
return
|
||||||
|
if(!M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return
|
return
|
||||||
|
|
||||||
spawn_option(display_names[choice],M)
|
spawn_option(display_names[choice],M)
|
||||||
|
|||||||
@@ -455,7 +455,7 @@
|
|||||||
if (is_special_type)
|
if (is_special_type)
|
||||||
return FALSE
|
return FALSE
|
||||||
var/position = fridges_name_paths.Find(build_path, fridges_name_paths)
|
var/position = fridges_name_paths.Find(build_path, fridges_name_paths)
|
||||||
position = (position == fridges_name_paths.len) ? 1 : (position + 1)
|
position = (position == length(fridges_name_paths)) ? 1 : (position + 1)
|
||||||
build_path = fridges_name_paths[position]
|
build_path = fridges_name_paths[position]
|
||||||
to_chat(user, span_notice("You set the board to [fridges_name_paths[build_path]]."))
|
to_chat(user, span_notice("You set the board to [fridges_name_paths[build_path]]."))
|
||||||
return TRUE
|
return TRUE
|
||||||
@@ -564,7 +564,11 @@
|
|||||||
display_vending_names_paths = list()
|
display_vending_names_paths = list()
|
||||||
for(var/path in vending_names_paths)
|
for(var/path in vending_names_paths)
|
||||||
display_vending_names_paths[vending_names_paths[path]] = path
|
display_vending_names_paths[vending_names_paths[path]] = path
|
||||||
var/choice = input(user, "Choose a new brand", "Select an Item") as null|anything in sort_list(display_vending_names_paths)
|
var/choice = tgui_input_list(user, "Choose a new brand", "Select an Item", sort_list(display_vending_names_paths))
|
||||||
|
if(isnull(choice))
|
||||||
|
return
|
||||||
|
if(isnull(display_vending_names_paths[choice]))
|
||||||
|
return
|
||||||
set_type(display_vending_names_paths[choice])
|
set_type(display_vending_names_paths[choice])
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
@@ -734,11 +738,13 @@
|
|||||||
|
|
||||||
/obj/item/circuitboard/machine/medical_kiosk/multitool_act(mob/living/user)
|
/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_number(user, "New cost for using this medical kiosk", "Pricing", custom_cost, 1000, 10)
|
||||||
if(!new_cost || (loc != user))
|
if(isnull(new_cost))
|
||||||
|
return
|
||||||
|
if(loc != user)
|
||||||
to_chat(user, span_warning("You must hold the circuitboard to change its cost!"))
|
to_chat(user, span_warning("You must hold the circuitboard to change its cost!"))
|
||||||
return
|
return
|
||||||
custom_cost = clamp(round(new_cost, 1), 10, 1000)
|
custom_cost = round(new_cost)
|
||||||
to_chat(user, span_notice("The cost is now set to [custom_cost]."))
|
to_chat(user, span_notice("The cost is now set to [custom_cost]."))
|
||||||
|
|
||||||
/obj/item/circuitboard/machine/medical_kiosk/examine(mob/user)
|
/obj/item/circuitboard/machine/medical_kiosk/examine(mob/user)
|
||||||
|
|||||||
@@ -140,7 +140,9 @@
|
|||||||
return
|
return
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return
|
return
|
||||||
var/new_style = input(user, "Select a facial hairstyle", "Grooming") as null|anything in GLOB.facial_hairstyles_list
|
var/new_style = tgui_input_list(user, "Select a facial hairstyle", "Grooming", GLOB.facial_hairstyles_list)
|
||||||
|
if(isnull(new_style))
|
||||||
|
return
|
||||||
if(!get_location_accessible(H, location))
|
if(!get_location_accessible(H, location))
|
||||||
to_chat(user, span_warning("The mask is in the way!"))
|
to_chat(user, span_warning("The mask is in the way!"))
|
||||||
return
|
return
|
||||||
@@ -186,7 +188,9 @@
|
|||||||
return
|
return
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return
|
return
|
||||||
var/new_style = input(user, "Select a hairstyle", "Grooming") as null|anything in GLOB.hairstyles_list
|
var/new_style = tgui_input_list(user, "Select a hairstyle", "Grooming", GLOB.hairstyles_list)
|
||||||
|
if(isnull(new_style))
|
||||||
|
return
|
||||||
if(!get_location_accessible(H, location))
|
if(!get_location_accessible(H, location))
|
||||||
to_chat(user, span_warning("The headgear is in the way!"))
|
to_chat(user, span_warning("The headgear is in the way!"))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -248,7 +248,7 @@
|
|||||||
if("select_colour")
|
if("select_colour")
|
||||||
. = can_change_colour && select_colour(usr)
|
. = can_change_colour && select_colour(usr)
|
||||||
if("enter_text")
|
if("enter_text")
|
||||||
var/txt = input(usr, "Choose what to write.", "Scribbles", text_buffer) as text|null
|
var/txt = tgui_input_text(usr, "Choose what to write", "Scribbles", text_buffer)
|
||||||
if(isnull(txt))
|
if(isnull(txt))
|
||||||
return
|
return
|
||||||
txt = crayon_text_strip(txt)
|
txt = crayon_text_strip(txt)
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
/obj/item/holochip/AltClick(mob/user)
|
/obj/item/holochip/AltClick(mob/user)
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||||
return
|
return
|
||||||
var/split_amount = tgui_input_number(user, "How many credits do you want to extract from the holochip?", "Holochip")
|
var/split_amount = tgui_input_number(user, "How many credits do you want to extract from the holochip?", "Holochip", 1, credits, 1)
|
||||||
if(isnull(split_amount))
|
if(isnull(split_amount))
|
||||||
return
|
return
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||||
|
|||||||
@@ -618,8 +618,10 @@ GLOBAL_LIST_EMPTY(PDAs)
|
|||||||
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
|
||||||
if("Drone Phone")
|
if("Drone Phone")
|
||||||
var/alert_s = tgui_input_list(U, "Alert severity level", "Ping Drones", list("Low","Medium","High","Critical"))
|
var/alert_s = tgui_input_list(U, "Alert severity level", "Ping Drones", list("Low","Medium","High","Critical"))
|
||||||
|
if(isnull(alert_s))
|
||||||
|
return
|
||||||
var/area/A = get_area(U)
|
var/area/A = get_area(U)
|
||||||
if(A && alert_s && !QDELETED(U))
|
if(A && !QDELETED(U))
|
||||||
var/msg = span_boldnotice("NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!")
|
var/msg = span_boldnotice("NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!")
|
||||||
_alert_drones(msg, TRUE, U)
|
_alert_drones(msg, TRUE, U)
|
||||||
to_chat(U, msg)
|
to_chat(U, msg)
|
||||||
@@ -1264,8 +1266,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
|||||||
plist[avoid_assoc_duplicate_keys(pda.owner, namecounts)] = pda
|
plist[avoid_assoc_duplicate_keys(pda.owner, namecounts)] = pda
|
||||||
|
|
||||||
var/choice = tgui_input_list(user, "Please select a PDA", "PDA Messenger", sort_list(plist))
|
var/choice = tgui_input_list(user, "Please select a PDA", "PDA Messenger", sort_list(plist))
|
||||||
|
if (isnull(choice))
|
||||||
if (!choice)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
var/selected = plist[choice]
|
var/selected = plist[choice]
|
||||||
|
|||||||
@@ -35,12 +35,12 @@
|
|||||||
/obj/item/desynchronizer/AltClick(mob/living/user)
|
/obj/item/desynchronizer/AltClick(mob/living/user)
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||||
return
|
return
|
||||||
var/new_duration = input(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) as null|num
|
var/new_duration = tgui_input_number(user, "Set the duration", "Desynchronizer", duration / 10, max_duration, 5 SECONDS)
|
||||||
if(new_duration)
|
if(isnull(new_duration))
|
||||||
new_duration = new_duration SECONDS
|
return
|
||||||
new_duration = clamp(new_duration, 50, max_duration)
|
new_duration = new_duration SECONDS
|
||||||
duration = new_duration
|
duration = round(new_duration)
|
||||||
to_chat(user, span_notice("You set the duration to [DisplayTimeText(duration)]."))
|
to_chat(user, span_notice("You set the duration to [DisplayTimeText(duration)]."))
|
||||||
|
|
||||||
/obj/item/desynchronizer/proc/desync(mob/living/user)
|
/obj/item/desynchronizer/proc/desync(mob/living/user)
|
||||||
if(sync_holder)
|
if(sync_holder)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
user.visible_message(span_notice("[user] paints \the [P] [paint_color]."),span_notice("You paint \the [P] [paint_color]."))
|
user.visible_message(span_notice("[user] paints \the [P] [paint_color]."),span_notice("You paint \the [P] [paint_color]."))
|
||||||
|
|
||||||
/obj/item/pipe_painter/attack_self(mob/user)
|
/obj/item/pipe_painter/attack_self(mob/user)
|
||||||
paint_color = tgui_input_list(usr, "Which colour do you want to use?","Pipe painter",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)
|
/obj/item/pipe_painter/examine(mob/user)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -19,15 +19,15 @@
|
|||||||
else
|
else
|
||||||
if(is_zero_amount(delete_if_zero = TRUE))
|
if(is_zero_amount(delete_if_zero = TRUE))
|
||||||
return
|
return
|
||||||
chosen_circuit = input("What type of circuit would you like to remove?", "Choose a Circuit Type", chosen_circuit) in list("airlock","firelock","fire alarm","air alarm","APC","cancel")
|
chosen_circuit = tgui_input_list(user, "Circuit to remove", "Circuit Removal", list("airlock","firelock","fire alarm","air alarm","APC"), chosen_circuit)
|
||||||
|
if(isnull(chosen_circuit))
|
||||||
|
to_chat(user, span_notice("You wisely avoid putting your hands anywhere near [src]."))
|
||||||
|
return
|
||||||
if(is_zero_amount(delete_if_zero = TRUE))
|
if(is_zero_amount(delete_if_zero = TRUE))
|
||||||
return
|
return
|
||||||
if(loc != user)
|
if(loc != user)
|
||||||
return
|
return
|
||||||
switch(chosen_circuit)
|
switch(chosen_circuit)
|
||||||
if("cancel")
|
|
||||||
to_chat(user, span_notice("You wisely avoid putting your hands anywhere near [src]."))
|
|
||||||
return
|
|
||||||
if("airlock")
|
if("airlock")
|
||||||
circuit_type = /obj/item/electronics/airlock
|
circuit_type = /obj/item/electronics/airlock
|
||||||
if("firelock")
|
if("firelock")
|
||||||
|
|||||||
@@ -917,7 +917,9 @@ GENE SCANNER
|
|||||||
options += get_display_name(A)
|
options += get_display_name(A)
|
||||||
|
|
||||||
var/answer = tgui_input_list(user, "Analyze Potential", "Sequence Analyzer", sort_list(options))
|
var/answer = tgui_input_list(user, "Analyze Potential", "Sequence Analyzer", sort_list(options))
|
||||||
if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(isnull(answer))
|
||||||
|
return
|
||||||
|
if(ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
var/sequence
|
var/sequence
|
||||||
for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list
|
for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list
|
||||||
if(get_display_name(A) == answer)
|
if(get_display_name(A) == answer)
|
||||||
|
|||||||
@@ -29,13 +29,15 @@
|
|||||||
return //SKYRAT EDIT ADDITION
|
return //SKYRAT EDIT ADDITION
|
||||||
|
|
||||||
var/mob/living/carbon/human/human_target = target
|
var/mob/living/carbon/human/human_target = target
|
||||||
var/beard_or_hair = input(user, "What do you want to dye?", "Character Preference") as null|anything in list("Hair", "Facial Hair")
|
var/beard_or_hair = tgui_alert(user, "What do you want to dye?", "Character Preference", list("Hair", "Facial Hair"))
|
||||||
if(!beard_or_hair || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE))
|
if(!beard_or_hair || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/list/choices = beard_or_hair == "Hair" ? GLOB.hair_gradients_list : GLOB.facial_hair_gradients_list
|
var/list/choices = beard_or_hair == "Hair" ? GLOB.hair_gradients_list : GLOB.facial_hair_gradients_list
|
||||||
var/new_grad_style = input(user, "Choose a color pattern:", "Character Preference") as null|anything in choices
|
var/new_grad_style = tgui_input_list(user, "Choose a color pattern", "Character Preference", choices)
|
||||||
if(!new_grad_style || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE))
|
if(isnull(new_grad_style))
|
||||||
|
return
|
||||||
|
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/new_grad_color = input(user, "Choose a secondary hair color:", "Character Preference",human_target.grad_color) as color|null
|
var/new_grad_color = input(user, "Choose a secondary hair color:", "Character Preference",human_target.grad_color) as color|null
|
||||||
|
|||||||
@@ -69,14 +69,11 @@
|
|||||||
detonate()
|
detonate()
|
||||||
|
|
||||||
/obj/item/grenade/c4/attack_self(mob/user)
|
/obj/item/grenade/c4/attack_self(mob/user)
|
||||||
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num|null
|
var/newtime = tgui_input_number(usr, "Please set the timer", "C4 Timer", 10, 60000, 10)
|
||||||
|
|
||||||
if (isnull(newtime))
|
if (isnull(newtime))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(user.get_active_held_item() == src)
|
if(user.get_active_held_item() == src)
|
||||||
newtime = clamp(newtime, 10, 60000)
|
det_time = round(newtime)
|
||||||
det_time = newtime
|
|
||||||
to_chat(user, "Timer set for [det_time] seconds.")
|
to_chat(user, "Timer set for [det_time] seconds.")
|
||||||
|
|
||||||
/obj/item/grenade/c4/afterattack(atom/movable/bomb_target, mob/user, flag)
|
/obj/item/grenade/c4/afterattack(atom/movable/bomb_target, mob/user, flag)
|
||||||
|
|||||||
@@ -139,15 +139,17 @@
|
|||||||
names[crewmember_name] = H
|
names[crewmember_name] = H
|
||||||
name_counts[crewmember_name] = 1
|
name_counts[crewmember_name] = 1
|
||||||
|
|
||||||
if(!names.len)
|
if(!length(names))
|
||||||
user.visible_message(span_notice("[user]'s pinpointer fails to detect a signal."), span_notice("Your pinpointer fails to detect a signal."))
|
user.visible_message(span_notice("[user]'s pinpointer fails to detect a signal."), span_notice("Your pinpointer fails to detect a signal."))
|
||||||
return
|
return
|
||||||
|
var/pinpoint_target = tgui_input_list(user, "Person to track", "Pinpoint", sort_list(names))
|
||||||
var/A = input(user, "Person to track", "Pinpoint") in sort_list(names)
|
if(isnull(pinpoint_target))
|
||||||
if(!A || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
|
|
||||||
return
|
return
|
||||||
|
if(isnull(names[pinpoint_target]))
|
||||||
target = names[A]
|
return
|
||||||
|
if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
|
||||||
|
return
|
||||||
|
target = names[pinpoint_target]
|
||||||
toggle_on()
|
toggle_on()
|
||||||
user.visible_message(span_notice("[user] activates [user.p_their()] pinpointer."), span_notice("You activate your pinpointer."))
|
user.visible_message(span_notice("[user] activates [user.p_their()] pinpointer."), span_notice("You activate your pinpointer."))
|
||||||
|
|
||||||
|
|||||||
@@ -40,27 +40,30 @@
|
|||||||
* * user The mob that is being teleported
|
* * user The mob that is being teleported
|
||||||
*/
|
*/
|
||||||
/obj/item/teleportation_scroll/proc/teleportscroll(mob/user)
|
/obj/item/teleportation_scroll/proc/teleportscroll(mob/user)
|
||||||
var/A
|
if(!length(GLOB.teleportlocs))
|
||||||
|
to_chat(user, span_warning("There are no locations available"))
|
||||||
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
|
return
|
||||||
var/area/thearea = GLOB.teleportlocs[A]
|
var/jump_target = tgui_input_list(user, "Area to jump to", "BOOYEA", GLOB.teleportlocs)
|
||||||
|
if(isnull(jump_target))
|
||||||
|
return
|
||||||
|
if(!src || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !uses)
|
||||||
|
return
|
||||||
|
var/area/thearea = GLOB.teleportlocs[jump_target]
|
||||||
|
|
||||||
var/datum/effect_system/smoke_spread/smoke = new
|
var/datum/effect_system/smoke_spread/smoke = new
|
||||||
smoke.set_up(2, user.loc)
|
smoke.set_up(2, user.loc)
|
||||||
smoke.attach(user)
|
smoke.attach(user)
|
||||||
smoke.start()
|
smoke.start()
|
||||||
var/list/L = list()
|
var/list/possible_locations = list()
|
||||||
for(var/turf/T in get_area_turfs(thearea.type))
|
for(var/turf/target_turf in get_area_turfs(thearea.type))
|
||||||
if(!T.is_blocked_turf())
|
if(!target_turf.is_blocked_turf())
|
||||||
L += T
|
possible_locations += target_turf
|
||||||
|
|
||||||
if(!L.len)
|
if(!length(possible_locations))
|
||||||
to_chat(user, span_warning("The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry."))
|
to_chat(user, span_warning("The spell matrix was unable to locate a suitable teleport destination for an unknown reason."))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(do_teleport(user, pick(L), channel = TELEPORT_CHANNEL_MAGIC, forced = TRUE))
|
if(do_teleport(user, pick(possible_locations), channel = TELEPORT_CHANNEL_MAGIC, forced = TRUE))
|
||||||
smoke.start()
|
smoke.start()
|
||||||
uses--
|
uses--
|
||||||
if(!uses)
|
if(!uses)
|
||||||
|
|||||||
@@ -186,8 +186,10 @@
|
|||||||
|
|
||||||
locations["None (Dangerous)"] = PORTAL_LOCATION_DANGEROUS
|
locations["None (Dangerous)"] = PORTAL_LOCATION_DANGEROUS
|
||||||
|
|
||||||
var/teleport_location_key = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in locations
|
var/teleport_location_key = tgui_input_list(user, "Teleporter to lock on", "Hand Teleporter", sort_list(locations))
|
||||||
if (!teleport_location_key || user.get_active_held_item() != src || user.incapacitated())
|
if (isnull(teleport_location_key))
|
||||||
|
return
|
||||||
|
if(user.get_active_held_item() != src || user.incapacitated())
|
||||||
return
|
return
|
||||||
|
|
||||||
// Not always a datum, but needed for IS_WEAKREF_OF to cast properly.
|
// Not always a datum, but needed for IS_WEAKREF_OF to cast properly.
|
||||||
@@ -210,7 +212,7 @@
|
|||||||
|
|
||||||
/// Takes either PORTAL_LOCATION_DANGEROUS or an /obj/machinery/computer/teleport/computer.
|
/// Takes either PORTAL_LOCATION_DANGEROUS or an /obj/machinery/computer/teleport/computer.
|
||||||
/obj/item/hand_tele/proc/try_create_portal_to(mob/user, teleport_location)
|
/obj/item/hand_tele/proc/try_create_portal_to(mob/user, teleport_location)
|
||||||
if (active_portal_pairs.len >= max_portal_pairs)
|
if (length(active_portal_pairs) >= max_portal_pairs)
|
||||||
user.show_message(span_notice("[src] is recharging!"))
|
user.show_message(span_notice("[src] is recharging!"))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -253,20 +253,24 @@
|
|||||||
if (!owner)
|
if (!owner)
|
||||||
owner = user.real_name
|
owner = user.real_name
|
||||||
|
|
||||||
if(beacons.len)
|
if(length(beacons))
|
||||||
beacons.Cut()
|
beacons.Cut()
|
||||||
for(var/obj/machinery/navbeacon/B in GLOB.wayfindingbeacons)
|
for(var/obj/machinery/navbeacon/B in GLOB.wayfindingbeacons)
|
||||||
beacons[B.codes["wayfinding"]] = B
|
beacons[B.codes["wayfinding"]] = B
|
||||||
|
|
||||||
if(!beacons.len)
|
if(!length(beacons))
|
||||||
to_chat(user, span_notice("Your pinpointer fails to detect a signal."))
|
to_chat(user, span_notice("Your pinpointer fails to detect a signal."))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/A = tgui_input_list(user, "Select a location", "Pinpoint", sort_list(beacons))
|
var/wayfind_target = tgui_input_list(user, "Select a location", "Pinpoint", sort_list(beacons))
|
||||||
if(!A || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
|
if(isnull(wayfind_target))
|
||||||
return
|
return
|
||||||
|
if(isnull(beacons[wayfind_target]))
|
||||||
target = beacons[A]
|
to_chat(user, span_warning("Your pinpointer fails to detect a signal."))
|
||||||
|
return
|
||||||
|
if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
|
||||||
|
return
|
||||||
|
target = beacons[wayfind_target]
|
||||||
toggle_on()
|
toggle_on()
|
||||||
to_chat(user, span_notice("You activate your pinpointer."))
|
to_chat(user, span_notice("You activate your pinpointer."))
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@
|
|||||||
|
|
||||||
/obj/structure/sign/barsign/proc/pick_sign(mob/user)
|
/obj/structure/sign/barsign/proc/pick_sign(mob/user)
|
||||||
var/picked_name = tgui_input_list(user, "Available Signage", "Bar Sign", sort_list(get_bar_names()))
|
var/picked_name = tgui_input_list(user, "Available Signage", "Bar Sign", sort_list(get_bar_names()))
|
||||||
if(!picked_name)
|
if(isnull(picked_name))
|
||||||
return
|
return
|
||||||
chosen_sign = set_sign_by_name(picked_name)
|
chosen_sign = set_sign_by_name(picked_name)
|
||||||
SSblackbox.record_feedback("tally", "barsign_picked", 1, chosen_sign.type)
|
SSblackbox.record_feedback("tally", "barsign_picked", 1, chosen_sign.type)
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
/obj/structure/bonfire/attackby(obj/item/used_item, mob/living/user, params)
|
/obj/structure/bonfire/attackby(obj/item/used_item, mob/living/user, params)
|
||||||
if(istype(used_item, /obj/item/stack/rods) && !can_buckle && !grill)
|
if(istype(used_item, /obj/item/stack/rods) && !can_buckle && !grill)
|
||||||
var/obj/item/stack/rods/rods = used_item
|
var/obj/item/stack/rods/rods = used_item
|
||||||
var/choice = input(user, "What would you like to construct?", "Bonfire") as null|anything in list("Stake","Grill")
|
var/choice = tgui_alert(user, "What would you like to construct?", "Bonfire", list("Stake","Grill"))
|
||||||
if(!choice)
|
if(isnull(choice))
|
||||||
return
|
return
|
||||||
rods.use(1)
|
rods.use(1)
|
||||||
switch(choice)
|
switch(choice)
|
||||||
|
|||||||
@@ -67,7 +67,11 @@
|
|||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
var/list/buildlist = list("Walls and Floors" = RCD_FLOORWALL, "Airlocks" = RCD_AIRLOCK, "Deconstruction" = RCD_DECONSTRUCT, "Windows and Grilles" = RCD_WINDOWGRILLE)
|
var/list/buildlist = list("Walls and Floors" = RCD_FLOORWALL, "Airlocks" = RCD_AIRLOCK, "Deconstruction" = RCD_DECONSTRUCT, "Windows and Grilles" = RCD_WINDOWGRILLE)
|
||||||
var/buildmode = input(owner, "Set construction mode.", "Base Console", null) in buildlist
|
var/buildmode = tgui_input_list(owner, "Set construction mode", "Base Console", buildlist)
|
||||||
|
if(isnull(buildmode))
|
||||||
|
return
|
||||||
|
if(isnull(buildlist[buildmode]))
|
||||||
|
return
|
||||||
check_rcd()
|
check_rcd()
|
||||||
base_console.internal_rcd.construction_mode = buildlist[buildmode]
|
base_console.internal_rcd.construction_mode = buildlist[buildmode]
|
||||||
to_chat(owner, "Build mode is now [buildmode].")
|
to_chat(owner, "Build mode is now [buildmode].")
|
||||||
|
|||||||
@@ -508,14 +508,14 @@
|
|||||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE)
|
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE)
|
||||||
return
|
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_number(usr, "Sale price for this vend-a-tray", "New Price", 10, 1000, 1)
|
||||||
if(isnull(new_price_input) || (payments_acc != potential_acc.registered_account))
|
if(isnull(new_price_input) || (payments_acc != potential_acc.registered_account))
|
||||||
to_chat(usr, span_warning("[src] rejects your new price."))
|
to_chat(usr, span_warning("[src] rejects your new price."))
|
||||||
return
|
return
|
||||||
if(!usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) )
|
if(!usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) )
|
||||||
to_chat(usr, span_warning("You need to get closer!"))
|
to_chat(usr, span_warning("You need to get closer!"))
|
||||||
return
|
return
|
||||||
new_price_input = clamp(round(new_price_input, 1), 10, 1000)
|
new_price_input = round(new_price_input)
|
||||||
sale_price = new_price_input
|
sale_price = new_price_input
|
||||||
to_chat(usr, span_notice("The cost is now set to [sale_price]."))
|
to_chat(usr, span_notice("The cost is now set to [sale_price]."))
|
||||||
SStgui.update_uis(src)
|
SStgui.update_uis(src)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
|
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
|
||||||
if(istype(W, /obj/item/pen))
|
if(istype(W, /obj/item/pen))
|
||||||
var/t = tgui_input_text(user, "Enter the name for the door.", name, created_name, MAX_NAME_LEN)
|
var/t = tgui_input_text(user, "Enter the name for the door", "Airlock Renaming", created_name, MAX_NAME_LEN)
|
||||||
if(!t)
|
if(!t)
|
||||||
return
|
return
|
||||||
if(!in_range(src, usr) && loc != usr)
|
if(!in_range(src, usr) && loc != usr)
|
||||||
|
|||||||
@@ -28,44 +28,47 @@
|
|||||||
return
|
return
|
||||||
if(!Adjacent(user))//no tele-grooming
|
if(!Adjacent(user))//no tele-grooming
|
||||||
return
|
return
|
||||||
if(ishuman(user))
|
if(!ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
return
|
||||||
|
var/mob/living/carbon/human/dressing_human = user
|
||||||
|
|
||||||
if(H.dna && H.dna.species && (NO_UNDERWEAR in H.dna.species.species_traits))
|
if(dressing_human.dna && dressing_human.dna.species && (NO_UNDERWEAR in dressing_human.dna.species.species_traits))
|
||||||
to_chat(user, span_warning("You are not capable of wearing underwear."))
|
to_chat(user, span_warning("You are not capable of wearing underwear."))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/choice = input(user, "Underwear, Undershirt, or Socks?", "Changing") as null|anything in list("Underwear","Underwear Color","Undershirt","Undershirt Color","Socks","Socks Color") //SKYRAT EDIT ADDITION - Colorable Undershirt/Socks
|
var/choice = tgui_input_list(user, "Underwear, Undershirt, or Socks?", "Changing", list("Underwear", "Underwear Color", "Undershirt", "Socks", "Undershirt Color", "Socks Color")) //SKYRAT EDIT ADDITION - Colorable Undershirt/Socks
|
||||||
|
if(isnull(choice))
|
||||||
|
return
|
||||||
|
|
||||||
if(!Adjacent(user))
|
if(!Adjacent(user))
|
||||||
return
|
return
|
||||||
switch(choice)
|
switch(choice)
|
||||||
if("Underwear")
|
if("Underwear")
|
||||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in GLOB.underwear_list
|
var/new_undies = tgui_input_list(user, "Select your underwear", "Changing", GLOB.underwear_list)
|
||||||
if(new_undies)
|
if(new_undies)
|
||||||
H.underwear = new_undies
|
dressing_human.underwear = new_undies
|
||||||
|
if("Underwear Color")
|
||||||
|
var/new_underwear_color = input(dressing_human, "Choose your underwear color", "Underwear Color", dressing_human.underwear_color) as color|null
|
||||||
|
if(new_underwear_color)
|
||||||
|
dressing_human.underwear_color = sanitize_hexcolor(new_underwear_color)
|
||||||
|
if("Undershirt")
|
||||||
|
var/new_undershirt = tgui_input_list(user, "Select your undershirt", "Changing", GLOB.undershirt_list)
|
||||||
|
if(new_undershirt)
|
||||||
|
dressing_human.undershirt = new_undershirt
|
||||||
|
if("Socks")
|
||||||
|
var/new_socks = tgui_input_list(user, "Select your socks", "Changing", GLOB.socks_list)
|
||||||
|
if(new_socks)
|
||||||
|
dressing_human.socks = new_socks
|
||||||
|
//SKYRAT EDIT ADDITION BEGIN - Colorable Undershirt/Socks
|
||||||
|
if("Undershirt Color")
|
||||||
|
var/new_undershirt_color = input(dressing_human, "Choose your undershirt color", "Undershirt Color", dressing_human.undershirt_color) as color|null
|
||||||
|
if(new_undershirt_color)
|
||||||
|
dressing_human.undershirt_color = sanitize_hexcolor(new_undershirt_color)
|
||||||
|
if("Socks Color")
|
||||||
|
var/new_socks_color = input(dressing_human, "Choose your socks color", "Socks Color", dressing_human.socks_color) as color|null
|
||||||
|
if(new_socks_color)
|
||||||
|
dressing_human.socks_color = sanitize_hexcolor(new_socks_color)
|
||||||
|
//SKYRAT EDIT ADDITION END - Colorable Undershirt/Socks
|
||||||
|
|
||||||
if("Underwear Color")
|
add_fingerprint(dressing_human)
|
||||||
var/new_underwear_color = input(H, "Choose your underwear color", "Underwear Color",H.underwear_color) as color|null
|
dressing_human.update_body()
|
||||||
if(new_underwear_color)
|
|
||||||
H.underwear_color = sanitize_hexcolor(new_underwear_color)
|
|
||||||
if("Undershirt")
|
|
||||||
var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in GLOB.undershirt_list
|
|
||||||
if(new_undershirt)
|
|
||||||
H.undershirt = new_undershirt
|
|
||||||
//SKYRAT EDIT ADDITION BEGIN - Colorable Undershirt/Socks
|
|
||||||
if("Undershirt Color")
|
|
||||||
var/new_undershirt_color = input(H, "Choose your undershirt color", "Undershirt Color",H.undershirt_color) as color|null
|
|
||||||
if(new_undershirt_color)
|
|
||||||
H.undershirt_color = sanitize_hexcolor(new_undershirt_color)
|
|
||||||
if("Socks")
|
|
||||||
var/new_socks = input(user, "Select your socks", "Changing") as null|anything in GLOB.socks_list
|
|
||||||
if(new_socks)
|
|
||||||
H.socks= new_socks
|
|
||||||
if("Socks Color")
|
|
||||||
var/new_socks_color = input(H, "Choose your socks color", "Socks Color",H.socks_color) as color|null
|
|
||||||
if(new_socks_color)
|
|
||||||
H.socks_color = sanitize_hexcolor(new_socks_color)
|
|
||||||
//SKYRAT EDIT ADDITION END - Colorable Undershirt/Socks
|
|
||||||
add_fingerprint(H)
|
|
||||||
H.update_body()
|
|
||||||
|
|||||||
@@ -178,9 +178,10 @@
|
|||||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/new_layer = input("Select a layer", "Layer") as null|anything in layers
|
var/new_layer = tgui_input_list(user, "Select a layer", "Layer", layers)
|
||||||
if(new_layer)
|
if(isnull(new_layer))
|
||||||
target_layer = layers[new_layer]
|
return
|
||||||
|
target_layer = layers[new_layer]
|
||||||
|
|
||||||
///A faster reinforced plunger
|
///A faster reinforced plunger
|
||||||
/obj/item/plunger/reinforced
|
/obj/item/plunger/reinforced
|
||||||
|
|||||||
@@ -30,22 +30,25 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
|||||||
|
|
||||||
//handle facial hair (if necessary)
|
//handle facial hair (if necessary)
|
||||||
if(hairdresser.gender != FEMALE)
|
if(hairdresser.gender != FEMALE)
|
||||||
var/new_style = input(user, "Select a facial hairstyle", "Grooming") as null|anything in GLOB.facial_hairstyles_list
|
var/new_style = tgui_input_list(user, "Select a facial hairstyle", "Grooming", GLOB.facial_hairstyles_list)
|
||||||
|
if(isnull(new_style))
|
||||||
|
return TRUE
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return TRUE //no tele-grooming
|
return TRUE //no tele-grooming
|
||||||
if(new_style)
|
hairdresser.facial_hairstyle = new_style
|
||||||
hairdresser.facial_hairstyle = new_style
|
|
||||||
else
|
else
|
||||||
hairdresser.facial_hairstyle = "Shaved"
|
hairdresser.facial_hairstyle = "Shaved"
|
||||||
|
|
||||||
//handle normal hair
|
//handle normal hair
|
||||||
var/new_style = input(user, "Select a hairstyle", "Grooming") as null|anything in GLOB.hairstyles_list
|
var/new_style = tgui_input_list(user, "Select a hairstyle", "Grooming", GLOB.hairstyles_list)
|
||||||
|
if(isnull(new_style))
|
||||||
|
return TRUE
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return TRUE //no tele-grooming
|
return TRUE //no tele-grooming
|
||||||
if(HAS_TRAIT(hairdresser, TRAIT_BALD))
|
if(HAS_TRAIT(hairdresser, TRAIT_BALD))
|
||||||
to_chat(hairdresser, span_notice("If only growing back hair were that easy for you..."))
|
to_chat(hairdresser, span_notice("If only growing back hair were that easy for you..."))
|
||||||
if(new_style)
|
|
||||||
hairdresser.hairstyle = new_style
|
hairdresser.hairstyle = new_style
|
||||||
|
|
||||||
hairdresser.update_hair()
|
hairdresser.update_hair()
|
||||||
*/
|
*/
|
||||||
@@ -132,7 +135,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
|||||||
/obj/structure/mirror/magic/Initialize(mapload)
|
/obj/structure/mirror/magic/Initialize(mapload)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
if(selectable_races.len)
|
if(length(selectable_races))
|
||||||
return
|
return
|
||||||
for(var/datum/species/species_type as anything in subtypesof(/datum/species))
|
for(var/datum/species/species_type as anything in subtypesof(/datum/species))
|
||||||
if(initial(species_type.changesource_flags) & race_flags)
|
if(initial(species_type.changesource_flags) & race_flags)
|
||||||
@@ -148,14 +151,16 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
|||||||
|
|
||||||
var/mob/living/carbon/human/amazed_human = user
|
var/mob/living/carbon/human/amazed_human = user
|
||||||
|
|
||||||
var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("name", "race", "gender", "hair", "eyes")
|
var/choice = tgui_input_list(user, "Something to change?", "Magical Grooming", list("name", "race", "gender", "hair", "eyes"))
|
||||||
|
if(isnull(choice))
|
||||||
|
return TRUE
|
||||||
|
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
switch(choice)
|
switch(choice)
|
||||||
if("name")
|
if("name")
|
||||||
var/newname = sanitize_name(stripped_input(amazed_human, "Who are we again?", "Name change", amazed_human.name, MAX_NAME_LEN), allow_numbers = TRUE) //It's magic so whatever.
|
var/newname = sanitize_name(tgui_input_text(amazed_human, "Who are we again?", "Name change", amazed_human.name, MAX_NAME_LEN), allow_numbers = TRUE) //It's magic so whatever.
|
||||||
if(!newname)
|
if(!newname)
|
||||||
return TRUE
|
return TRUE
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
@@ -168,8 +173,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
|||||||
amazed_human.mind.name = newname
|
amazed_human.mind.name = newname
|
||||||
|
|
||||||
if("race")
|
if("race")
|
||||||
var/racechoice = input(amazed_human, "What are we again?", "Race change") as null|anything in selectable_races
|
var/racechoice = tgui_input_list(amazed_human, "What are we again?", "Race change", selectable_races)
|
||||||
if(!racechoice || !selectable_races[racechoice])
|
if(isnull(racechoice))
|
||||||
|
return TRUE
|
||||||
|
if(selectable_races[racechoice])
|
||||||
return TRUE
|
return TRUE
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return TRUE
|
return TRUE
|
||||||
@@ -178,7 +185,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
|||||||
amazed_human.set_species(newrace, icon_update = FALSE)
|
amazed_human.set_species(newrace, icon_update = FALSE)
|
||||||
|
|
||||||
if(amazed_human.dna.species.use_skintones)
|
if(amazed_human.dna.species.use_skintones)
|
||||||
var/new_s_tone = input(user, "Choose your skin tone:", "Race change") as null|anything in GLOB.skin_tones
|
var/new_s_tone = tgui_input_list(user, "Choose your skin tone", "Race change", GLOB.skin_tones)
|
||||||
if(new_s_tone)
|
if(new_s_tone)
|
||||||
amazed_human.skin_tone = new_s_tone
|
amazed_human.skin_tone = new_s_tone
|
||||||
amazed_human.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
|
amazed_human.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
|
||||||
@@ -283,7 +290,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
|
|||||||
var/turf/user_turf = get_turf(user)
|
var/turf/user_turf = get_turf(user)
|
||||||
var/list/levels = SSmapping.levels_by_trait(ZTRAIT_SPACE_RUINS)
|
var/list/levels = SSmapping.levels_by_trait(ZTRAIT_SPACE_RUINS)
|
||||||
var/turf/dest
|
var/turf/dest
|
||||||
if(levels.len)
|
if(length(levels))
|
||||||
dest = locate(user_turf.x, user_turf.y, pick(levels))
|
dest = locate(user_turf.x, user_turf.y, pick(levels))
|
||||||
|
|
||||||
user_turf.ChangeTurf(/turf/open/chasm, flags = CHANGETURF_INHERIT_AIR)
|
user_turf.ChangeTurf(/turf/open/chasm, flags = CHANGETURF_INHERIT_AIR)
|
||||||
|
|||||||
@@ -98,10 +98,10 @@
|
|||||||
if(engraved)
|
if(engraved)
|
||||||
to_chat(user, span_warning("This plaque has already been engraved."))
|
to_chat(user, span_warning("This plaque has already been engraved."))
|
||||||
return
|
return
|
||||||
var/namechoice = input(user, "Title this plaque. (e.g. 'Best HoP Award', 'Great Ashwalker War Memorial')", "Plaque Customization")
|
var/namechoice = tgui_input_text(user, "Title this plaque. (e.g. 'Best HoP Award', 'Great Ashwalker War Memorial')", "Plaque Customization", max_length = MAX_NAME_LEN)
|
||||||
if(!namechoice)
|
if(!namechoice)
|
||||||
return
|
return
|
||||||
var/descriptionchoice = input(user, "Engrave this plaque's text.", "Plaque Customization")
|
var/descriptionchoice = tgui_input_text(user, "Engrave this plaque's text", "Plaque Customization")
|
||||||
if(!descriptionchoice)
|
if(!descriptionchoice)
|
||||||
return
|
return
|
||||||
if(!Adjacent(user)) //Make sure user is adjacent still
|
if(!Adjacent(user)) //Make sure user is adjacent still
|
||||||
@@ -130,10 +130,10 @@
|
|||||||
if(engraved)
|
if(engraved)
|
||||||
to_chat(user, span_warning("This plaque has already been engraved."))
|
to_chat(user, span_warning("This plaque has already been engraved."))
|
||||||
return
|
return
|
||||||
var/namechoice = input(user, "Title this plaque. (e.g. 'Best HoP Award', 'Great Ashwalker War Memorial')", "Plaque Customization")
|
var/namechoice = tgui_input_text(user, "Title this plaque. (e.g. 'Best HoP Award', 'Great Ashwalker War Memorial')", "Plaque Customization", max_length = MAX_NAME_LEN)
|
||||||
if(!namechoice)
|
if(!namechoice)
|
||||||
return
|
return
|
||||||
var/descriptionchoice = input(user, "Engrave this plaque's text.", "Plaque Customization")
|
var/descriptionchoice = tgui_input_text(user, "Engrave this plaque's text", "Plaque Customization")
|
||||||
if(!descriptionchoice)
|
if(!descriptionchoice)
|
||||||
return
|
return
|
||||||
if(!Adjacent(user)) //Make sure user is adjacent still
|
if(!Adjacent(user)) //Make sure user is adjacent still
|
||||||
|
|||||||
@@ -132,8 +132,8 @@
|
|||||||
if(is_editable && istype(I, /obj/item/pen))
|
if(is_editable && istype(I, /obj/item/pen))
|
||||||
if(!length(GLOB.editable_sign_types))
|
if(!length(GLOB.editable_sign_types))
|
||||||
CRASH("GLOB.editable_sign_types failed to populate")
|
CRASH("GLOB.editable_sign_types failed to populate")
|
||||||
var/choice = input(user, "Select a sign type.", "Sign Customization") as null|anything in GLOB.editable_sign_types
|
var/choice = tgui_input_list(user, "Select a sign type", "Sign Customization", GLOB.editable_sign_types)
|
||||||
if(!choice)
|
if(isnull(choice))
|
||||||
return
|
return
|
||||||
if(!Adjacent(user)) //Make sure user is adjacent still.
|
if(!Adjacent(user)) //Make sure user is adjacent still.
|
||||||
to_chat(user, span_warning("You need to stand next to the sign to change it!"))
|
to_chat(user, span_warning("You need to stand next to the sign to change it!"))
|
||||||
@@ -160,14 +160,12 @@
|
|||||||
if(is_editable && istype(I, /obj/item/pen))
|
if(is_editable && istype(I, /obj/item/pen))
|
||||||
if(!length(GLOB.editable_sign_types))
|
if(!length(GLOB.editable_sign_types))
|
||||||
CRASH("GLOB.editable_sign_types failed to populate")
|
CRASH("GLOB.editable_sign_types failed to populate")
|
||||||
var/choice = input(user, "Select a sign type.", "Sign Customization") as null|anything in GLOB.editable_sign_types
|
var/choice = tgui_input_list(user, "Select a sign type", "Sign Customization", GLOB.editable_sign_types)
|
||||||
if(!choice)
|
if(isnull(choice))
|
||||||
return
|
return
|
||||||
if(!Adjacent(user)) //Make sure user is adjacent still.
|
if(!Adjacent(user)) //Make sure user is adjacent still.
|
||||||
to_chat(user, span_warning("You need to stand next to the sign to change it!"))
|
to_chat(user, span_warning("You need to stand next to the sign to change it!"))
|
||||||
return
|
return
|
||||||
if(!choice)
|
|
||||||
return
|
|
||||||
user.visible_message(span_notice("You begin changing [src]."))
|
user.visible_message(span_notice("You begin changing [src]."))
|
||||||
if(!do_after(user, 4 SECONDS, target = src))
|
if(!do_after(user, 4 SECONDS, target = src))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -34,8 +34,10 @@
|
|||||||
virgin = FALSE
|
virgin = FALSE
|
||||||
notify_ghosts("Someone has begun playing with a [src.name] in [get_area(src)]!", source = src, header = "Spirit board")
|
notify_ghosts("Someone has begun playing with a [src.name] in [get_area(src)]!", source = src, header = "Spirit board")
|
||||||
|
|
||||||
planchette = input("Choose the letter.", "Seance!") as null|anything in list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
|
planchette = tgui_input_list(M, "Choose the letter.", "Seance!", list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"))
|
||||||
if(!planchette || !Adjacent(M) || next_use > world.time)
|
if(isnull(planchette))
|
||||||
|
return
|
||||||
|
if(!Adjacent(M) || next_use > world.time)
|
||||||
return
|
return
|
||||||
M.log_message("picked a letter on [src], which was \"[planchette]\".", LOG_GAME)
|
M.log_message("picked a letter on [src], which was \"[planchette]\".", LOG_GAME)
|
||||||
next_use = world.time + rand(30,50)
|
next_use = world.time + rand(30,50)
|
||||||
|
|||||||
@@ -245,7 +245,7 @@
|
|||||||
ae.forceMove(drop_location())
|
ae.forceMove(drop_location())
|
||||||
|
|
||||||
else if(istype(W, /obj/item/pen))
|
else if(istype(W, /obj/item/pen))
|
||||||
var/t = tgui_input_text(user, "Enter the name for the door.", "Windoor", created_name, MAX_NAME_LEN)
|
var/t = tgui_input_text(user, "Enter the name for the door", "Windoor Renaming", created_name, MAX_NAME_LEN)
|
||||||
if(!t)
|
if(!t)
|
||||||
return
|
return
|
||||||
if(!in_range(src, usr) && loc != usr)
|
if(!in_range(src, usr) && loc != usr)
|
||||||
|
|||||||
@@ -44,8 +44,9 @@
|
|||||||
|
|
||||||
var/list/combined = sort_list(logs_present) + sort_list(logs_missing)
|
var/list/combined = sort_list(logs_present) + sort_list(logs_missing)
|
||||||
|
|
||||||
var/selected = input("Investigate what?", "Investigate") as null|anything in combined
|
var/selected = tgui_input_list(src, "Investigate what?", "Investigation", combined)
|
||||||
|
if(isnull(selected))
|
||||||
|
return
|
||||||
if(!(selected in combined) || selected == "---")
|
if(!(selected in combined) || selected == "---")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -511,12 +511,12 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
|||||||
set desc = "Cause an explosion of varying strength at your location."
|
set desc = "Cause an explosion of varying strength at your location."
|
||||||
|
|
||||||
var/list/choices = list("Small Bomb (1, 2, 3, 3)", "Medium Bomb (2, 3, 4, 4)", "Big Bomb (3, 5, 7, 5)", "Maxcap", "Custom Bomb")
|
var/list/choices = list("Small Bomb (1, 2, 3, 3)", "Medium Bomb (2, 3, 4, 4)", "Big Bomb (3, 5, 7, 5)", "Maxcap", "Custom Bomb")
|
||||||
var/choice = tgui_input_list(usr, "What size explosion would you like to produce? NOTE: You can do all this rapidly and in an IC manner (using cruise missiles!) with the Config/Launch Supplypod verb. WARNING: These ignore the maxcap", "Drop Bomb", choices)
|
var/choice = tgui_input_list(src, "What size explosion would you like to produce? NOTE: You can do all this rapidly and in an IC manner (using cruise missiles!) with the Config/Launch Supplypod verb. WARNING: These ignore the maxcap", "Drop Bomb", choices)
|
||||||
|
if(isnull(choice))
|
||||||
|
return
|
||||||
var/turf/epicenter = mob.loc
|
var/turf/epicenter = mob.loc
|
||||||
|
|
||||||
switch(choice)
|
switch(choice)
|
||||||
if(null)
|
|
||||||
return
|
|
||||||
if("Small Bomb (1, 2, 3, 3)")
|
if("Small Bomb (1, 2, 3, 3)")
|
||||||
explosion(epicenter, devastation_range = 1, heavy_impact_range = 2, light_impact_range = 3, flash_range = 3, adminlog = TRUE, ignorecap = TRUE, explosion_cause = mob)
|
explosion(epicenter, devastation_range = 1, heavy_impact_range = 2, light_impact_range = 3, flash_range = 3, adminlog = TRUE, ignorecap = TRUE, explosion_cause = mob)
|
||||||
if("Medium Bomb (2, 3, 4, 4)")
|
if("Medium Bomb (2, 3, 4, 4)")
|
||||||
@@ -800,7 +800,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
|||||||
|
|
||||||
candidates = get_area_turfs(area)
|
candidates = get_area_turfs(area)
|
||||||
|
|
||||||
if (candidates.len)
|
if (length(candidates))
|
||||||
k = 100
|
k = 100
|
||||||
|
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -167,7 +167,7 @@
|
|||||||
if(suit)
|
if(suit)
|
||||||
suit = new suit //initial() doesn't like lists
|
suit = new suit //initial() doesn't like lists
|
||||||
options = suit.allowed
|
options = suit.allowed
|
||||||
if(!options.len) //nothing will happen, but don't let the user think it's broken
|
if(!length(options)) //nothing will happen, but don't let the user think it's broken
|
||||||
to_chat(owner, span_warning("No options available for the current suit."))
|
to_chat(owner, span_warning("No options available for the current suit."))
|
||||||
|
|
||||||
if("belt")
|
if("belt")
|
||||||
@@ -189,8 +189,12 @@
|
|||||||
if("r_pocket")
|
if("r_pocket")
|
||||||
choose_any_item(slot)
|
choose_any_item(slot)
|
||||||
|
|
||||||
if(length(options))
|
if(!length(options))
|
||||||
set_item(slot, tgui_input_list(owner, "Choose an item", OUTFIT_EDITOR_NAME, options))
|
return
|
||||||
|
var/option = tgui_input_list(owner, "Choose an item", OUTFIT_EDITOR_NAME, options)
|
||||||
|
if(isnull(option))
|
||||||
|
return
|
||||||
|
set_item(slot, option)
|
||||||
|
|
||||||
|
|
||||||
#undef OUTFIT_EDITOR_NAME
|
#undef OUTFIT_EDITOR_NAME
|
||||||
|
|||||||
@@ -58,8 +58,11 @@
|
|||||||
owner.holder.load_outfit(owner.mob)
|
owner.holder.load_outfit(owner.mob)
|
||||||
if("copy")
|
if("copy")
|
||||||
var/datum/outfit/outfit = tgui_input_list(owner, "Pick an outfit to copy from", "Outfit Manager", subtypesof(/datum/outfit))
|
var/datum/outfit/outfit = tgui_input_list(owner, "Pick an outfit to copy from", "Outfit Manager", subtypesof(/datum/outfit))
|
||||||
if(ispath(outfit))
|
if(isnull(outfit))
|
||||||
owner.open_outfit_editor(new outfit)
|
return
|
||||||
|
if(!ispath(outfit))
|
||||||
|
return
|
||||||
|
owner.open_outfit_editor(new outfit)
|
||||||
|
|
||||||
var/datum/outfit/target_outfit = locate(params["outfit"])
|
var/datum/outfit/target_outfit = locate(params["outfit"])
|
||||||
if(!istype(target_outfit))
|
if(!istype(target_outfit))
|
||||||
|
|||||||
@@ -14,7 +14,9 @@
|
|||||||
var/random_appearance
|
var/random_appearance
|
||||||
|
|
||||||
/datum/smite/custom_imaginary_friend/configure(client/user)
|
/datum/smite/custom_imaginary_friend/configure(client/user)
|
||||||
friend_candidate_client = tgui_input_list(user, "Pick the player to put in control.", "New Imaginary Friend", sort_list(GLOB.clients))
|
friend_candidate_client = tgui_input_list(user, "Pick the player to put in control", "New Imaginary Friend", sort_list(GLOB.clients))
|
||||||
|
if(isnull(friend_candidate_client))
|
||||||
|
return
|
||||||
|
|
||||||
if(QDELETED(friend_candidate_client))
|
if(QDELETED(friend_candidate_client))
|
||||||
to_chat(user, span_notice("Selected player no longer has a client, aborting."))
|
to_chat(user, span_notice("Selected player no longer has a client, aborting."))
|
||||||
|
|||||||
@@ -1596,7 +1596,7 @@
|
|||||||
if(!check_rights(R_ADMIN))
|
if(!check_rights(R_ADMIN))
|
||||||
return
|
return
|
||||||
var/list/type_choices = typesof(/datum/station_goal)
|
var/list/type_choices = typesof(/datum/station_goal)
|
||||||
var/picked = tgui_input_list(usr, "Choose goal type",, type_choices)
|
var/picked = tgui_input_list(usr, "Choose goal type", "Station Goal", type_choices)
|
||||||
if(!picked)
|
if(!picked)
|
||||||
return
|
return
|
||||||
var/datum/station_goal/G = new picked()
|
var/datum/station_goal/G = new picked()
|
||||||
|
|||||||
@@ -322,13 +322,14 @@ GLOBAL_LIST_INIT_TYPED(sdql_spells, /obj/effect/proc_holder/spell, list())
|
|||||||
saved_vars[params["name"]] = !saved_vars[params["name"]]
|
saved_vars[params["name"]] = !saved_vars[params["name"]]
|
||||||
if("path_variable")
|
if("path_variable")
|
||||||
var/new_path = tgui_input_list(user, "Select type.", "Add SDQL Spell", typesof(text2path(params["root_path"])))
|
var/new_path = tgui_input_list(user, "Select type.", "Add SDQL Spell", typesof(text2path(params["root_path"])))
|
||||||
if(new_path)
|
if(isnull(new_path))
|
||||||
saved_vars[params["name"]] = new_path
|
return
|
||||||
var/datum/sample = new new_path
|
saved_vars[params["name"]] = new_path
|
||||||
var/list/overrides = list_vars[special_var_lists[params["name"]]]
|
var/datum/sample = new new_path
|
||||||
overrides = overrides&sample.vars
|
var/list/overrides = list_vars[special_var_lists[params["name"]]]
|
||||||
qdel(sample)
|
overrides = overrides&sample.vars
|
||||||
icon_needs_updating(params["name"])
|
qdel(sample)
|
||||||
|
icon_needs_updating(params["name"])
|
||||||
if("list_variable_add")
|
if("list_variable_add")
|
||||||
if(!list_vars[params["list"]])
|
if(!list_vars[params["list"]])
|
||||||
list_vars[params["list"]] = list()
|
list_vars[params["list"]] = list()
|
||||||
|
|||||||
@@ -153,21 +153,26 @@
|
|||||||
usr.forceMove(M.loc)
|
usr.forceMove(M.loc)
|
||||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Get Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
SSblackbox.record_feedback("tally", "admin_verb", 1, "Get Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
/client/proc/sendmob(mob/M in sort_mobs())
|
/client/proc/sendmob(mob/jumper in sort_mobs())
|
||||||
set category = "Admin.Game"
|
set category = "Admin.Game"
|
||||||
set name = "Send Mob"
|
set name = "Send Mob"
|
||||||
if(!src.holder)
|
if(!src.holder)
|
||||||
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
||||||
return
|
return
|
||||||
var/area/A = input(usr, "Pick an area.", "Pick an area") in GLOB.sortedAreas|null
|
if(!length(GLOB.sortedAreas))
|
||||||
if(A && istype(A))
|
to_chat(src, "No areas found.", confidential = TRUE)
|
||||||
var/list/turfs = get_area_turfs(A)
|
return
|
||||||
if(length(turfs) && M.forceMove(pick(turfs)))
|
var/area/target_area = tgui_input_list(src, "Pick an area", "Send Mob", GLOB.sortedAreas)
|
||||||
|
if(isnull(target_area))
|
||||||
log_admin("[key_name(usr)] teleported [key_name(M)] to [AREACOORD(M)]")
|
return
|
||||||
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)] to [AREACOORD(M)]"
|
if(!istype(target_area))
|
||||||
message_admins(msg)
|
return
|
||||||
admin_ticket_log(M, msg)
|
var/list/turfs = get_area_turfs(target_area)
|
||||||
else
|
if(length(turfs) && jumper.forceMove(pick(turfs)))
|
||||||
to_chat(src, "Failed to move mob to a valid location.", confidential = TRUE)
|
log_admin("[key_name(usr)] teleported [key_name(jumper)] to [AREACOORD(jumper)]")
|
||||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Send Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(jumper)] to [AREACOORD(jumper)]"
|
||||||
|
message_admins(msg)
|
||||||
|
admin_ticket_log(jumper, msg)
|
||||||
|
else
|
||||||
|
to_chat(src, "Failed to move mob to a valid location.", confidential = TRUE)
|
||||||
|
SSblackbox.record_feedback("tally", "admin_verb", 1, "Send Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|||||||
@@ -84,11 +84,12 @@
|
|||||||
return
|
return
|
||||||
switch (action)
|
switch (action)
|
||||||
if ("set_charge")
|
if ("set_charge")
|
||||||
var/newcharge = input("New charge (0-[borg.cell.maxcharge]):", borg.name, borg.cell.charge) as num|null
|
var/newcharge = tgui_input_number(usr, "Set new charge", borg.name, borg.cell.charge, borg.cell.maxcharge)
|
||||||
if (newcharge)
|
if (isnull(newcharge))
|
||||||
borg.cell.charge = clamp(newcharge, 0, borg.cell.maxcharge)
|
return
|
||||||
message_admins("[key_name_admin(user)] set the charge of [ADMIN_LOOKUPFLW(borg)] to [borg.cell.charge].")
|
borg.cell.charge = clamp(newcharge, 0, borg.cell.maxcharge)
|
||||||
log_silicon("[key_name(user)] set the charge of [key_name(borg)] to [borg.cell.charge].")
|
message_admins("[key_name_admin(user)] set the charge of [ADMIN_LOOKUPFLW(borg)] to [borg.cell.charge].")
|
||||||
|
log_silicon("[key_name(user)] set the charge of [key_name(borg)] to [borg.cell.charge].")
|
||||||
if ("remove_cell")
|
if ("remove_cell")
|
||||||
QDEL_NULL(borg.cell)
|
QDEL_NULL(borg.cell)
|
||||||
message_admins("[key_name_admin(user)] deleted the cell of [ADMIN_LOOKUPFLW(borg)].")
|
message_admins("[key_name_admin(user)] deleted the cell of [ADMIN_LOOKUPFLW(borg)].")
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
|||||||
if(C.key)
|
if(C.key)
|
||||||
available.Add(C)
|
available.Add(C)
|
||||||
var/mob/choice = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", sort_names(available))
|
var/mob/choice = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", sort_names(available))
|
||||||
if(!choice)
|
if(isnull(choice))
|
||||||
return
|
return
|
||||||
if(!isobserver(choice))
|
if(!isobserver(choice))
|
||||||
var/confirm = tgui_alert(usr, "[choice.key] isn't ghosting right now. Are you sure you want to yank them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("Yes", "No"))
|
var/confirm = tgui_alert(usr, "[choice.key] isn't ghosting right now. Are you sure you want to yank them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("Yes", "No"))
|
||||||
@@ -534,8 +534,10 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
|||||||
set category = "Debug"
|
set category = "Debug"
|
||||||
set name = "Debug Mob Lists"
|
set name = "Debug Mob Lists"
|
||||||
set desc = "For when you just gotta know"
|
set desc = "For when you just gotta know"
|
||||||
|
var/chosen_list = tgui_input_list(usr, "Which list?", "Select List", list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))
|
||||||
switch(tgui_input_list(usr, "Which list?",, list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients")))
|
if(isnull(chosen_list))
|
||||||
|
return
|
||||||
|
switch(chosen_list)
|
||||||
if("Players")
|
if("Players")
|
||||||
to_chat(usr, jointext(GLOB.player_list,","), confidential = TRUE)
|
to_chat(usr, jointext(GLOB.player_list,","), confidential = TRUE)
|
||||||
if("Admins")
|
if("Admins")
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/client/proc/manipulate_organs(mob/living/carbon/C in world)
|
/client/proc/manipulate_organs(mob/living/carbon/C in world)
|
||||||
set name = "Manipulate Organs"
|
set name = "Manipulate Organs"
|
||||||
set category = "Debug"
|
set category = "Debug"
|
||||||
var/operation = input("Select organ operation.", "Organ Manipulation", "cancel") as null|anything in list("add organ", "add implant", "drop organ/implant", "remove organ/implant", "cancel")
|
var/operation = tgui_input_list(usr, "Select organ operation", "Organ Manipulation", list("add organ", "add implant", "drop organ/implant", "remove organ/implant"))
|
||||||
if (!operation)
|
if (isnull(operation))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/list/organs = list()
|
var/list/organs = list()
|
||||||
@@ -12,8 +12,10 @@
|
|||||||
var/dat = replacetext("[path]", "/obj/item/organ/", ":")
|
var/dat = replacetext("[path]", "/obj/item/organ/", ":")
|
||||||
organs[dat] = path
|
organs[dat] = path
|
||||||
|
|
||||||
var/obj/item/organ/organ = input("Select organ type:", "Organ Manipulation", null) as null|anything in organs
|
var/obj/item/organ/organ = tgui_input_list(usr, "Select organ type", "Organ Manipulation", organs)
|
||||||
if(!organ)
|
if(isnull(organ))
|
||||||
|
return
|
||||||
|
if(isnull(organs[organ]))
|
||||||
return
|
return
|
||||||
organ = organs[organ]
|
organ = organs[organ]
|
||||||
organ = new organ
|
organ = new organ
|
||||||
@@ -26,8 +28,10 @@
|
|||||||
var/dat = replacetext("[path]", "/obj/item/implant/", ":")
|
var/dat = replacetext("[path]", "/obj/item/implant/", ":")
|
||||||
organs[dat] = path
|
organs[dat] = path
|
||||||
|
|
||||||
var/obj/item/implant/organ = input("Select implant type:", "Organ Manipulation", null) as null|anything in organs
|
var/obj/item/implant/organ = tgui_input_list(usr, "Select implant type", "Organ Manipulation", organs)
|
||||||
if(!organ)
|
if(isnull(organ))
|
||||||
|
return
|
||||||
|
if(isnull(organs[organ]))
|
||||||
return
|
return
|
||||||
organ = organs[organ]
|
organ = organs[organ]
|
||||||
organ = new organ
|
organ = new organ
|
||||||
@@ -44,12 +48,12 @@
|
|||||||
var/obj/item/implant/I = X
|
var/obj/item/implant/I = X
|
||||||
organs["[I.name] ([I.type])"] = I
|
organs["[I.name] ([I.type])"] = I
|
||||||
|
|
||||||
var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) as null|anything in organs
|
var/obj/item/organ = tgui_input_list(usr, "Select organ/implant", "Organ Manipulation", organs)
|
||||||
if(!organ)
|
if(isnull(organ))
|
||||||
|
return
|
||||||
|
if(isnull(organs[organ]))
|
||||||
return
|
return
|
||||||
organ = organs[organ]
|
organ = organs[organ]
|
||||||
if(!organ)
|
|
||||||
return
|
|
||||||
var/obj/item/organ/O
|
var/obj/item/organ/O
|
||||||
var/obj/item/implant/I
|
var/obj/item/implant/I
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
maprotatechoices[mapname] = VM
|
maprotatechoices[mapname] = VM
|
||||||
var/chosenmap = tgui_input_list(usr, "Choose a map to change to", "Change Map", sort_list(maprotatechoices)|"Custom")
|
var/chosenmap = tgui_input_list(usr, "Choose a map to change to", "Change Map", sort_list(maprotatechoices)|"Custom")
|
||||||
if (!chosenmap)
|
if (isnull(chosenmap))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(chosenmap == "Custom")
|
if(chosenmap == "Custom")
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
options += "Delete Shuttle"
|
options += "Delete Shuttle"
|
||||||
options += "Into The Sunset (delete & greentext 'escape')"
|
options += "Into The Sunset (delete & greentext 'escape')"
|
||||||
|
|
||||||
var/selection = input(user, "Select where to fly [name || id]:", "Fly Shuttle") as null|anything in options
|
var/selection = tgui_input_list(user, "Select where to fly [name || id]:", "Fly Shuttle", options)
|
||||||
if(!selection)
|
if(isnull(selection))
|
||||||
return
|
return
|
||||||
|
|
||||||
switch(selection)
|
switch(selection)
|
||||||
@@ -77,8 +77,8 @@
|
|||||||
if (canDock(S) == SHUTTLE_CAN_DOCK)
|
if (canDock(S) == SHUTTLE_CAN_DOCK)
|
||||||
options[S.name || S.id] = S
|
options[S.name || S.id] = S
|
||||||
|
|
||||||
var/selection = input(user, "Select the new arrivals destination:", "Fly Shuttle") as null|anything in options
|
var/selection = tgui_input_list(user, "New arrivals destination", "Fly Shuttle", options)
|
||||||
if(!selection)
|
if(isnull(selection))
|
||||||
return
|
return
|
||||||
target_dock = options[selection]
|
target_dock = options[selection]
|
||||||
if(!QDELETED(target_dock))
|
if(!QDELETED(target_dock))
|
||||||
|
|||||||
@@ -62,7 +62,9 @@
|
|||||||
names += "---Elements---"
|
names += "---Elements---"
|
||||||
names += sort_list(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
|
names += sort_list(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
|
||||||
var/result = tgui_input_list(usr, "Choose a component/element to add", "Add Component", names)
|
var/result = tgui_input_list(usr, "Choose a component/element to add", "Add Component", names)
|
||||||
if(!usr || !result || result == "---Components---" || result == "---Elements---")
|
if(isnull(result))
|
||||||
|
return
|
||||||
|
if(!usr || result == "---Components---" || result == "---Elements---")
|
||||||
return
|
return
|
||||||
if(QDELETED(src))
|
if(QDELETED(src))
|
||||||
to_chat(usr, "That thing doesn't exist anymore!", confidential = TRUE)
|
to_chat(usr, "That thing doesn't exist anymore!", confidential = TRUE)
|
||||||
@@ -100,7 +102,9 @@
|
|||||||
// We have to list every element here because there is no way to know what element is on this object without doing some sort of hack.
|
// We have to list every element here because there is no way to know what element is on this object without doing some sort of hack.
|
||||||
names += sort_list(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
|
names += sort_list(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
|
||||||
var/path = tgui_input_list(usr, "Choose a component/element to remove. All elements listed here may not be on the datum.", "Remove element", names)
|
var/path = tgui_input_list(usr, "Choose a component/element to remove. All elements listed here may not be on the datum.", "Remove element", names)
|
||||||
if(!usr || !path || path == "---Components---" || path == "---Elements---")
|
if(isnull(path))
|
||||||
|
return
|
||||||
|
if(!usr || path == "---Components---" || path == "---Elements---")
|
||||||
return
|
return
|
||||||
if(QDELETED(src))
|
if(QDELETED(src))
|
||||||
to_chat(usr, "That thing doesn't exist anymore!")
|
to_chat(usr, "That thing doesn't exist anymore!")
|
||||||
|
|||||||
@@ -71,7 +71,11 @@
|
|||||||
for(var/i in 1 to GLOB.blob_nodes.len)
|
for(var/i in 1 to GLOB.blob_nodes.len)
|
||||||
var/obj/structure/blob/special/node/B = GLOB.blob_nodes[i]
|
var/obj/structure/blob/special/node/B = GLOB.blob_nodes[i]
|
||||||
nodes["Blob Node #[i] ([get_area_name(B)])"] = B
|
nodes["Blob Node #[i] ([get_area_name(B)])"] = B
|
||||||
var/node_name = input(src, "Choose a node to jump to.", "Node Jump") in nodes
|
var/node_name = tgui_input_list(src, "Choose a node to jump to", "Node Jump", nodes)
|
||||||
|
if(isnull(node_name))
|
||||||
|
return FALSE
|
||||||
|
if(isnull(nodes[node_name]))
|
||||||
|
return FALSE
|
||||||
var/obj/structure/blob/special/node/chosen_node = nodes[node_name]
|
var/obj/structure/blob/special/node/chosen_node = nodes[node_name]
|
||||||
if(chosen_node)
|
if(chosen_node)
|
||||||
forceMove(chosen_node.loc)
|
forceMove(chosen_node.loc)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
names += "[prof.name]"
|
names += "[prof.name]"
|
||||||
|
|
||||||
var/chosen_name = tgui_input_list(user, "Target DNA", "Transformation", sort_list(names))
|
var/chosen_name = tgui_input_list(user, "Target DNA", "Transformation", sort_list(names))
|
||||||
if(!chosen_name)
|
if(isnull(chosen_name))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/changelingprofile/chosen_prof = changeling.get_dna(chosen_name)
|
var/datum/changelingprofile/chosen_prof = changeling.get_dna(chosen_name)
|
||||||
|
|||||||
@@ -40,15 +40,15 @@
|
|||||||
break
|
break
|
||||||
if(rune)
|
if(rune)
|
||||||
limit = MAX_BLOODCHARGE
|
limit = MAX_BLOODCHARGE
|
||||||
if(spells.len >= limit)
|
if(length(spells) >= limit)
|
||||||
if(rune)
|
if(rune)
|
||||||
to_chat(owner, span_cultitalic("You cannot store more than [MAX_BLOODCHARGE] spells. <b>Pick a spell to remove.</b>"))
|
to_chat(owner, span_cultitalic("You cannot store more than [MAX_BLOODCHARGE] spells. <b>Pick a spell to remove.</b>"))
|
||||||
else
|
else
|
||||||
to_chat(owner, span_cultitalic("<b><u>You cannot store more than [RUNELESS_MAX_BLOODCHARGE] spells without an empowering rune! Pick a spell to remove.</b></u>"))
|
to_chat(owner, span_cultitalic("<b><u>You cannot store more than [RUNELESS_MAX_BLOODCHARGE] spells without an empowering rune! Pick a spell to remove.</b></u>"))
|
||||||
var/nullify_spell = tgui_input_list(owner, "Spell to remove", "Current Spells", spells)
|
var/nullify_spell = tgui_input_list(owner, "Spell to remove", "Current Spells", spells)
|
||||||
if(nullify_spell)
|
if(isnull(nullify_spell))
|
||||||
qdel(nullify_spell)
|
return
|
||||||
return
|
qdel(nullify_spell)
|
||||||
var/entered_spell_name
|
var/entered_spell_name
|
||||||
var/datum/action/innate/cult/blood_spell/BS
|
var/datum/action/innate/cult/blood_spell/BS
|
||||||
var/list/possible_spells = list()
|
var/list/possible_spells = list()
|
||||||
@@ -58,13 +58,15 @@
|
|||||||
possible_spells[cult_name] = J
|
possible_spells[cult_name] = J
|
||||||
possible_spells += "(REMOVE SPELL)"
|
possible_spells += "(REMOVE SPELL)"
|
||||||
entered_spell_name = tgui_input_list(owner, "Blood spell to prepare", "Spell Choices", possible_spells)
|
entered_spell_name = tgui_input_list(owner, "Blood spell to prepare", "Spell Choices", possible_spells)
|
||||||
|
if(isnull(entered_spell_name))
|
||||||
|
return
|
||||||
if(entered_spell_name == "(REMOVE SPELL)")
|
if(entered_spell_name == "(REMOVE SPELL)")
|
||||||
var/nullify_spell = tgui_input_list(owner, "Spell to remove", "Current Spells", spells)
|
var/nullify_spell = tgui_input_list(owner, "Spell to remove", "Current Spells", spells)
|
||||||
if(nullify_spell)
|
if(isnull(nullify_spell))
|
||||||
qdel(nullify_spell)
|
return
|
||||||
return
|
qdel(nullify_spell)
|
||||||
BS = possible_spells[entered_spell_name]
|
BS = possible_spells[entered_spell_name]
|
||||||
if(QDELETED(src) || owner.incapacitated() || !BS || (rune && !(locate(/obj/effect/rune/empower) in range(1, owner))) || (spells.len >= limit))
|
if(QDELETED(src) || owner.incapacitated() || !BS || (rune && !(locate(/obj/effect/rune/empower) in range(1, owner))) || (length(spells) >= limit))
|
||||||
return
|
return
|
||||||
to_chat(owner,span_warning("You begin to carve unnatural symbols into your flesh!"))
|
to_chat(owner,span_warning("You begin to carve unnatural symbols into your flesh!"))
|
||||||
SEND_SOUND(owner, sound('sound/weapons/slice.ogg',0,1,10))
|
SEND_SOUND(owner, sound('sound/weapons/slice.ogg',0,1,10))
|
||||||
@@ -478,7 +480,7 @@
|
|||||||
for(var/obj/effect/rune/teleport/teleport_rune as anything in GLOB.teleport_runes)
|
for(var/obj/effect/rune/teleport/teleport_rune as anything in GLOB.teleport_runes)
|
||||||
potential_runes[avoid_assoc_duplicate_keys(teleport_rune.listkey, teleportnames)] = teleport_rune
|
potential_runes[avoid_assoc_duplicate_keys(teleport_rune.listkey, teleportnames)] = teleport_rune
|
||||||
|
|
||||||
if(!potential_runes.len)
|
if(!length(potential_runes))
|
||||||
to_chat(user, span_warning("There are no valid runes to teleport to!"))
|
to_chat(user, span_warning("There are no valid runes to teleport to!"))
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -488,6 +490,11 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/input_rune_key = tgui_input_list(user, "Rune to teleport to", "Teleportation Target", potential_runes) //we know what key they picked
|
var/input_rune_key = tgui_input_list(user, "Rune to teleport to", "Teleportation Target", potential_runes) //we know what key they picked
|
||||||
|
if(isnull(input_rune_key))
|
||||||
|
return
|
||||||
|
if(isnull(potential_runes[input_rune_key]))
|
||||||
|
to_chat(user, span_warning("You must pick a valid rune!"))
|
||||||
|
return
|
||||||
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
|
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
|
||||||
if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !actual_selected_rune || !proximity)
|
if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !actual_selected_rune || !proximity)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -162,8 +162,8 @@ Striking a noncultist, however, will tear their flesh."}
|
|||||||
|
|
||||||
/obj/item/cult_bastard/examine(mob/user)
|
/obj/item/cult_bastard/examine(mob/user)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(contents.len)
|
if(length(contents))
|
||||||
. += "<b>There are [contents.len] souls trapped within the sword's core.</b>"
|
. += "<b>There are [length(contents)] souls trapped within the sword's core.</b>"
|
||||||
else
|
else
|
||||||
. += "The sword appears to be quite lifeless."
|
. += "The sword appears to be quite lifeless."
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ Striking a noncultist, however, will tear their flesh."}
|
|||||||
stone.attack(human_target, user)
|
stone.attack(human_target, user)
|
||||||
if(!LAZYLEN(stone.contents))
|
if(!LAZYLEN(stone.contents))
|
||||||
qdel(stone)
|
qdel(stone)
|
||||||
if(istype(target, /obj/structure/constructshell) && contents.len)
|
if(istype(target, /obj/structure/constructshell) && length(contents))
|
||||||
var/obj/item/soulstone/stone = contents[1]
|
var/obj/item/soulstone/stone = contents[1]
|
||||||
if(!istype(stone))
|
if(!istype(stone))
|
||||||
stone.forceMove(drop_location())
|
stone.forceMove(drop_location())
|
||||||
@@ -665,41 +665,39 @@ Striking a noncultist, however, will tear their flesh."}
|
|||||||
to_chat(user, "That doesn't seem to do anything useful.")
|
to_chat(user, "That doesn't seem to do anything useful.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(A, /obj/item))
|
if(!istype(A, /obj/item))
|
||||||
|
|
||||||
var/list/cultists = list()
|
|
||||||
for(var/datum/mind/M as anything in get_antag_minds(/datum/antagonist/cult))
|
|
||||||
if(M.current && M.current.stat != DEAD)
|
|
||||||
cultists |= M.current
|
|
||||||
var/mob/living/cultist_to_receive = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", (cultists - user))
|
|
||||||
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated())
|
|
||||||
return
|
|
||||||
if(!cultist_to_receive)
|
|
||||||
to_chat(user, "<span class='cult italic'>You require a destination!</span>")
|
|
||||||
log_game("Void torch failed - no target")
|
|
||||||
return
|
|
||||||
if(cultist_to_receive.stat == DEAD)
|
|
||||||
to_chat(user, "<span class='cult italic'>[cultist_to_receive] has died!</span>")
|
|
||||||
log_game("Void torch failed - target died")
|
|
||||||
return
|
|
||||||
if(!IS_CULTIST(cultist_to_receive))
|
|
||||||
to_chat(user, "<span class='cult italic'>[cultist_to_receive] is not a follower of the Geometer!</span>")
|
|
||||||
log_game("Void torch failed - target was deconverted")
|
|
||||||
return
|
|
||||||
if(A in user.get_all_contents())
|
|
||||||
to_chat(user, "<span class='cult italic'>[A] must be on a surface in order to teleport it!</span>")
|
|
||||||
return
|
|
||||||
to_chat(user, "<span class='cult italic'>You ignite [A] with \the [src], turning it to ash, but through the torch's flames you see that [A] has reached [cultist_to_receive]!</span>")
|
|
||||||
cultist_to_receive.put_in_hands(A)
|
|
||||||
charges--
|
|
||||||
to_chat(user, "\The [src] now has [charges] charge\s.")
|
|
||||||
if(charges == 0)
|
|
||||||
qdel(src)
|
|
||||||
|
|
||||||
else
|
|
||||||
..()
|
..()
|
||||||
to_chat(user, span_warning("\The [src] can only transport items!"))
|
to_chat(user, span_warning("\The [src] can only transport items!"))
|
||||||
|
return
|
||||||
|
|
||||||
|
var/list/cultists = list()
|
||||||
|
for(var/datum/mind/M as anything in get_antag_minds(/datum/antagonist/cult))
|
||||||
|
if(M.current && M.current.stat != DEAD)
|
||||||
|
cultists |= M.current
|
||||||
|
var/mob/living/cultist_to_receive = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", (cultists - user))
|
||||||
|
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated())
|
||||||
|
return
|
||||||
|
if(isnull(cultist_to_receive))
|
||||||
|
to_chat(user, "<span class='cult italic'>You require a destination!</span>")
|
||||||
|
log_game("Void torch failed - no target")
|
||||||
|
return
|
||||||
|
if(cultist_to_receive.stat == DEAD)
|
||||||
|
to_chat(user, "<span class='cult italic'>[cultist_to_receive] has died!</span>")
|
||||||
|
log_game("Void torch failed - target died")
|
||||||
|
return
|
||||||
|
if(!IS_CULTIST(cultist_to_receive))
|
||||||
|
to_chat(user, "<span class='cult italic'>[cultist_to_receive] is not a follower of the Geometer!</span>")
|
||||||
|
log_game("Void torch failed - target was deconverted")
|
||||||
|
return
|
||||||
|
if(A in user.get_all_contents())
|
||||||
|
to_chat(user, "<span class='cult italic'>[A] must be on a surface in order to teleport it!</span>")
|
||||||
|
return
|
||||||
|
to_chat(user, "<span class='cult italic'>You ignite [A] with \the [src], turning it to ash, but through the torch's flames you see that [A] has reached [cultist_to_receive]!</span>")
|
||||||
|
cultist_to_receive.put_in_hands(A)
|
||||||
|
charges--
|
||||||
|
to_chat(user, "\The [src] now has [charges] charge\s.")
|
||||||
|
if(charges == 0)
|
||||||
|
qdel(src)
|
||||||
|
|
||||||
/obj/item/melee/cultblade/halberd
|
/obj/item/melee/cultblade/halberd
|
||||||
name = "bloody halberd"
|
name = "bloody halberd"
|
||||||
|
|||||||
@@ -97,10 +97,10 @@ Runes can either be invoked by one's self or with many different cultists. Each
|
|||||||
to_chat(user, span_warning("You aren't able to understand the words of [src]."))
|
to_chat(user, span_warning("You aren't able to understand the words of [src]."))
|
||||||
return
|
return
|
||||||
var/list/invokers = can_invoke(user)
|
var/list/invokers = can_invoke(user)
|
||||||
if(invokers.len >= req_cultists)
|
if(length(invokers) >= req_cultists)
|
||||||
invoke(invokers)
|
invoke(invokers)
|
||||||
else
|
else
|
||||||
to_chat(user, span_danger("You need [req_cultists - invokers.len] more adjacent cultists to use this rune in such a manner."))
|
to_chat(user, span_danger("You need [req_cultists - length(invokers)] more adjacent cultists to use this rune in such a manner."))
|
||||||
fail_invoke()
|
fail_invoke()
|
||||||
|
|
||||||
/obj/effect/rune/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
/obj/effect/rune/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||||
@@ -221,7 +221,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
|||||||
for(var/mob/living/M in T)
|
for(var/mob/living/M in T)
|
||||||
if(!IS_CULTIST(M))
|
if(!IS_CULTIST(M))
|
||||||
myriad_targets |= M
|
myriad_targets |= M
|
||||||
if(!myriad_targets.len)
|
if(!length(myriad_targets))
|
||||||
fail_invoke()
|
fail_invoke()
|
||||||
log_game("Offer rune failed - no eligible targets")
|
log_game("Offer rune failed - no eligible targets")
|
||||||
return
|
return
|
||||||
@@ -250,7 +250,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
|||||||
rune_in_use = FALSE
|
rune_in_use = FALSE
|
||||||
|
|
||||||
/obj/effect/rune/convert/proc/do_convert(mob/living/convertee, list/invokers)
|
/obj/effect/rune/convert/proc/do_convert(mob/living/convertee, list/invokers)
|
||||||
if(invokers.len < 2)
|
if(length(invokers) < 2)
|
||||||
for(var/M in invokers)
|
for(var/M in invokers)
|
||||||
to_chat(M, span_warning("You need at least two invokers to convert [convertee]!"))
|
to_chat(M, span_warning("You need at least two invokers to convert [convertee]!"))
|
||||||
log_game("Offer rune failed - tried conversion with one invoker")
|
log_game("Offer rune failed - tried conversion with one invoker")
|
||||||
@@ -307,7 +307,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
|||||||
log_game("Offer rune failed - tried sacrificing already sacrificed target.")
|
log_game("Offer rune failed - tried sacrificing already sacrificed target.")
|
||||||
return FALSE
|
return FALSE
|
||||||
//SKYRAT ADDITION END
|
//SKYRAT ADDITION END
|
||||||
if((((ishuman(sacrificial) || iscyborg(sacrificial)) && sacrificial.stat != DEAD) || C.cult_team.is_sacrifice_target(sacrificial.mind)) && invokers.len < 3)
|
if((((ishuman(sacrificial) || iscyborg(sacrificial)) && sacrificial.stat != DEAD) || C.cult_team.is_sacrifice_target(sacrificial.mind)) && length(invokers) < 3)
|
||||||
for(var/M in invokers)
|
for(var/M in invokers)
|
||||||
to_chat(M, span_cultitalic("[sacrificial] is too greatly linked to the world! You need three acolytes!"))
|
to_chat(M, span_cultitalic("[sacrificial] is too greatly linked to the world! You need three acolytes!"))
|
||||||
log_game("Offer rune failed - not enough acolytes and target is living or sac target")
|
log_game("Offer rune failed - not enough acolytes and target is living or sac target")
|
||||||
@@ -411,7 +411,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
|||||||
if(teleport_rune != src && !is_away_level(teleport_rune.z))
|
if(teleport_rune != src && !is_away_level(teleport_rune.z))
|
||||||
potential_runes[avoid_assoc_duplicate_keys(teleport_rune.listkey, teleportnames)] = teleport_rune
|
potential_runes[avoid_assoc_duplicate_keys(teleport_rune.listkey, teleportnames)] = teleport_rune
|
||||||
|
|
||||||
if(!potential_runes.len)
|
if(!length(potential_runes))
|
||||||
to_chat(user, span_warning("There are no valid runes to teleport to!"))
|
to_chat(user, span_warning("There are no valid runes to teleport to!"))
|
||||||
log_game("Teleport rune failed - no other teleport runes")
|
log_game("Teleport rune failed - no other teleport runes")
|
||||||
fail_invoke()
|
fail_invoke()
|
||||||
@@ -425,6 +425,11 @@ structure_check() searches for nearby cultist structures required for the invoca
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/input_rune_key = tgui_input_list(user, "Rune to teleport to", "Teleportation Target", potential_runes) //we know what key they picked
|
var/input_rune_key = tgui_input_list(user, "Rune to teleport to", "Teleportation Target", potential_runes) //we know what key they picked
|
||||||
|
if(isnull(input_rune_key))
|
||||||
|
return
|
||||||
|
if(isnull(potential_runes[input_rune_key]))
|
||||||
|
fail_invoke()
|
||||||
|
return
|
||||||
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
|
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
|
||||||
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated() || !actual_selected_rune)
|
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated() || !actual_selected_rune)
|
||||||
fail_invoke()
|
fail_invoke()
|
||||||
@@ -577,13 +582,15 @@ structure_check() searches for nearby cultist structures required for the invoca
|
|||||||
for(var/mob/living/M in T.contents)
|
for(var/mob/living/M in T.contents)
|
||||||
if(IS_CULTIST(M) && (M.stat == DEAD || !M.client || M.client.is_afk()))
|
if(IS_CULTIST(M) && (M.stat == DEAD || !M.client || M.client.is_afk()))
|
||||||
potential_revive_mobs |= M
|
potential_revive_mobs |= M
|
||||||
if(!potential_revive_mobs.len)
|
if(!length(potential_revive_mobs))
|
||||||
to_chat(user, "<span class='cult italic'>There are no dead cultists on the rune!</span>")
|
to_chat(user, "<span class='cult italic'>There are no dead cultists on the rune!</span>")
|
||||||
log_game("Raise Dead rune failed - no cultists to revive")
|
log_game("Raise Dead rune failed - no cultists to revive")
|
||||||
fail_invoke()
|
fail_invoke()
|
||||||
return
|
return
|
||||||
if(potential_revive_mobs.len > 1)
|
if(length(potential_revive_mobs) > 1)
|
||||||
mob_to_revive = tgui_input_list(user, "Cultist to revive", "Revive Cultist", potential_revive_mobs)
|
mob_to_revive = tgui_input_list(user, "Cultist to revive", "Revive Cultist", potential_revive_mobs)
|
||||||
|
if(isnull(mob_to_revive))
|
||||||
|
return
|
||||||
else
|
else
|
||||||
mob_to_revive = potential_revive_mobs[1]
|
mob_to_revive = potential_revive_mobs[1]
|
||||||
if(QDELETED(src) || !validness_checks(mob_to_revive, user))
|
if(QDELETED(src) || !validness_checks(mob_to_revive, user))
|
||||||
@@ -684,10 +691,14 @@ structure_check() searches for nearby cultist structures required for the invoca
|
|||||||
for(var/datum/mind/M as anything in get_antag_minds(/datum/antagonist/cult))
|
for(var/datum/mind/M as anything in get_antag_minds(/datum/antagonist/cult))
|
||||||
if(!(M.current in invokers) && M.current && M.current.stat != DEAD)
|
if(!(M.current in invokers) && M.current && M.current.stat != DEAD)
|
||||||
cultists |= M.current
|
cultists |= M.current
|
||||||
|
if(length(cultists) <= 1)
|
||||||
|
to_chat(user, span_warning("There are no cultists to summon!"))
|
||||||
|
fail_invoke()
|
||||||
|
return
|
||||||
var/mob/living/cultist_to_summon = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", cultists)
|
var/mob/living/cultist_to_summon = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", cultists)
|
||||||
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated())
|
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated())
|
||||||
return
|
return
|
||||||
if(!cultist_to_summon)
|
if(isnull(cultist_to_summon))
|
||||||
to_chat(user, "<span class='cult italic'>You require a summoning target!</span>")
|
to_chat(user, "<span class='cult italic'>You require a summoning target!</span>")
|
||||||
fail_invoke()
|
fail_invoke()
|
||||||
log_game("Summon Cultist rune failed - no target")
|
log_game("Summon Cultist rune failed - no target")
|
||||||
@@ -828,7 +839,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
|||||||
for(var/mob/dead/observer/O in T)
|
for(var/mob/dead/observer/O in T)
|
||||||
if(O.client && !is_banned_from(O.ckey, ROLE_CULTIST) && !QDELETED(src) && !(isAdminObserver(O) && (O.client.prefs.toggles & ADMIN_IGNORE_CULT_GHOST)) && !QDELETED(O))
|
if(O.client && !is_banned_from(O.ckey, ROLE_CULTIST) && !QDELETED(src) && !(isAdminObserver(O) && (O.client.prefs.toggles & ADMIN_IGNORE_CULT_GHOST)) && !QDELETED(O))
|
||||||
ghosts_on_rune += O
|
ghosts_on_rune += O
|
||||||
if(!ghosts_on_rune.len)
|
if(!length(ghosts_on_rune))
|
||||||
to_chat(user, span_cultitalic("There are no spirits near [src]!"))
|
to_chat(user, span_cultitalic("There are no spirits near [src]!"))
|
||||||
fail_invoke()
|
fail_invoke()
|
||||||
log_game("Manifest rune failed - no nearby ghosts")
|
log_game("Manifest rune failed - no nearby ghosts")
|
||||||
@@ -926,7 +937,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
|||||||
var/mob/living/user = invokers[1]
|
var/mob/living/user = invokers[1]
|
||||||
var/datum/antagonist/cult/user_antag = user.mind.has_antag_datum(/datum/antagonist/cult,TRUE)
|
var/datum/antagonist/cult/user_antag = user.mind.has_antag_datum(/datum/antagonist/cult,TRUE)
|
||||||
var/datum/objective/eldergod/summon_objective = locate() in user_antag.cult_team.objectives
|
var/datum/objective/eldergod/summon_objective = locate() in user_antag.cult_team.objectives
|
||||||
if(summon_objective.summon_spots.len <= 1)
|
if(length(summon_objective.summon_spots) <= 1)
|
||||||
to_chat(user, span_cultlarge("Only one ritual site remains - it must be reserved for the final summoning!"))
|
to_chat(user, span_cultlarge("Only one ritual site remains - it must be reserved for the final summoning!"))
|
||||||
return
|
return
|
||||||
if(!(place in summon_objective.summon_spots))
|
if(!(place in summon_objective.summon_spots))
|
||||||
@@ -940,7 +951,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
|||||||
for(var/mob/living/M in GLOB.player_list)
|
for(var/mob/living/M in GLOB.player_list)
|
||||||
if(IS_CULTIST(M))
|
if(IS_CULTIST(M))
|
||||||
intensity++
|
intensity++
|
||||||
intensity = max(60, 360 - (360*(intensity/GLOB.player_list.len + 0.3)**2)) //significantly lower intensity for "winning" cults
|
intensity = max(60, 360 - (360*(intensity/length(GLOB.player_list) + 0.3)**2)) //significantly lower intensity for "winning" cults
|
||||||
var/duration = intensity*10
|
var/duration = intensity*10
|
||||||
playsound(T, 'sound/magic/enter_blood.ogg', 100, TRUE)
|
playsound(T, 'sound/magic/enter_blood.ogg', 100, TRUE)
|
||||||
visible_message(span_warning("A colossal shockwave of energy bursts from the rune, disintegrating it in the process!"))
|
visible_message(span_warning("A colossal shockwave of energy bursts from the rune, disintegrating it in the process!"))
|
||||||
|
|||||||
@@ -338,7 +338,7 @@
|
|||||||
if(!rune_ref.resolve())
|
if(!rune_ref.resolve())
|
||||||
current_runes -= rune_ref
|
current_runes -= rune_ref
|
||||||
|
|
||||||
if(current_runes.len >= max_rune_amt)
|
if(length(current_runes) >= max_rune_amt)
|
||||||
to_chat(user,span_notice("The blade cannot support more runes!"))
|
to_chat(user,span_notice("The blade cannot support more runes!"))
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -350,7 +350,7 @@
|
|||||||
drawing = TRUE
|
drawing = TRUE
|
||||||
|
|
||||||
var/type = pick_list[tgui_input_list(user, "Choose the rune", "Rune", pick_list) ]
|
var/type = pick_list[tgui_input_list(user, "Choose the rune", "Rune", pick_list) ]
|
||||||
if(!type)
|
if(isnull(type))
|
||||||
drawing = FALSE
|
drawing = FALSE
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
for(var/atom/requirements as anything in atoms)
|
for(var/atom/requirements as anything in atoms)
|
||||||
fingerprints |= requirements.return_fingerprints()
|
fingerprints |= requirements.return_fingerprints()
|
||||||
list_clear_nulls(fingerprints)
|
list_clear_nulls(fingerprints)
|
||||||
if(fingerprints.len == 0)
|
if(!length(fingerprints))
|
||||||
return FALSE
|
return FALSE
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
@@ -160,12 +160,12 @@
|
|||||||
compiled_list |= human_to_check.real_name
|
compiled_list |= human_to_check.real_name
|
||||||
compiled_list[human_to_check.real_name] = human_to_check
|
compiled_list[human_to_check.real_name] = human_to_check
|
||||||
|
|
||||||
if(compiled_list.len == 0)
|
if(!length(compiled_list))
|
||||||
to_chat(user, span_warning("These items don't possess the required fingerprints or DNA."))
|
to_chat(user, span_warning("These items don't possess the required fingerprints or DNA."))
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
var/chosen_mob = tgui_input_list(user, "Select the person you wish to curse","Your target", sort_list(compiled_list, /proc/cmp_mob_realname_dsc))
|
var/chosen_mob = tgui_input_list(user, "Select the person you wish to curse", "Eldritch Curse", sort_list(compiled_list, /proc/cmp_mob_realname_dsc))
|
||||||
if(!chosen_mob)
|
if(isnull(chosen_mob))
|
||||||
return FALSE
|
return FALSE
|
||||||
curse(compiled_list[chosen_mob])
|
curse(compiled_list[chosen_mob])
|
||||||
addtimer(CALLBACK(src, .proc/uncurse, compiled_list[chosen_mob]),timer)
|
addtimer(CALLBACK(src, .proc/uncurse, compiled_list[chosen_mob]),timer)
|
||||||
@@ -292,7 +292,12 @@
|
|||||||
if(!targeted)
|
if(!targeted)
|
||||||
break
|
break
|
||||||
targets["[targeted.current.real_name] the [targeted.assigned_role.title][is_teammate ? " (ally)" : ""]"] = targeted.current
|
targets["[targeted.current.real_name] the [targeted.assigned_role.title][is_teammate ? " (ally)" : ""]"] = targeted.current
|
||||||
heart.target = targets[input(user,"Choose your next target","Target") in targets]
|
var/chosen_target = tgui_input_list(user, "Choose a target", "Eldritch Targeting", targets)
|
||||||
|
if(isnull(chosen_target))
|
||||||
|
return FALSE
|
||||||
|
if(isnull(targets[chosen_target]))
|
||||||
|
return FALSE
|
||||||
|
heart.target = targets[chosen_target]
|
||||||
qdel(temp_objective)
|
qdel(temp_objective)
|
||||||
if(heart.target)
|
if(heart.target)
|
||||||
to_chat(user,span_warning("Your new target has been selected, go and sacrifice [heart.target.real_name]!"))
|
to_chat(user,span_warning("Your new target has been selected, go and sacrifice [heart.target.real_name]!"))
|
||||||
|
|||||||
@@ -586,7 +586,9 @@
|
|||||||
if(!originator?.linked_mobs[living_owner])
|
if(!originator?.linked_mobs[living_owner])
|
||||||
CRASH("Uh oh the mansus link got somehow activated without it being linked to a raw prophet or the mob not being in a list of mobs that should be able to do it.")
|
CRASH("Uh oh the mansus link got somehow activated without it being linked to a raw prophet or the mob not being in a list of mobs that should be able to do it.")
|
||||||
|
|
||||||
var/message = sanitize(input("Message:", "Telepathy from the Manse") as text|null)
|
var/message = sanitize(tgui_input_text(living_owner, "Enter your message", "Telepathy from the Manse"))
|
||||||
|
if(!message)
|
||||||
|
return
|
||||||
|
|
||||||
if(QDELETED(living_owner))
|
if(QDELETED(living_owner))
|
||||||
return
|
return
|
||||||
@@ -595,14 +597,14 @@
|
|||||||
to_chat(living_owner, span_warning("The link seems to have been severed..."))
|
to_chat(living_owner, span_warning("The link seems to have been severed..."))
|
||||||
Remove(living_owner)
|
Remove(living_owner)
|
||||||
return
|
return
|
||||||
if(message)
|
|
||||||
var/msg = "<i><font color=#568b00>\[Mansus Link\] <b>[living_owner]:</b> [message]</font></i>"
|
|
||||||
log_directed_talk(living_owner, originator, msg, LOG_SAY, "Mansus Link")
|
|
||||||
to_chat(originator.linked_mobs, msg)
|
|
||||||
|
|
||||||
for(var/dead_mob in GLOB.dead_mob_list)
|
var/msg = "<i><font color=#568b00>\[Mansus Link\] <b>[living_owner]:</b> [message]</font></i>"
|
||||||
var/link = FOLLOW_LINK(dead_mob, living_owner)
|
log_directed_talk(living_owner, originator, msg, LOG_SAY, "Mansus Link")
|
||||||
to_chat(dead_mob, "[link] [msg]")
|
to_chat(originator.linked_mobs, msg)
|
||||||
|
|
||||||
|
for(var/dead_mob in GLOB.dead_mob_list)
|
||||||
|
var/link = FOLLOW_LINK(dead_mob, living_owner)
|
||||||
|
to_chat(dead_mob, "[link] [msg]")
|
||||||
|
|
||||||
/obj/effect/proc_holder/spell/pointed/trigger/blind/eldritch
|
/obj/effect/proc_holder/spell/pointed/trigger/blind/eldritch
|
||||||
range = 10
|
range = 10
|
||||||
|
|||||||
@@ -81,7 +81,12 @@
|
|||||||
for(var/X in subtypesof(/obj/item/eldritch_potion))
|
for(var/X in subtypesof(/obj/item/eldritch_potion))
|
||||||
var/obj/item/eldritch_potion/potion = X
|
var/obj/item/eldritch_potion/potion = X
|
||||||
lst[initial(potion.name)] = potion
|
lst[initial(potion.name)] = potion
|
||||||
var/type = lst[input(user,"Choose your brew","Brew") in lst]
|
var/chosen_type = tgui_input_list(user, "Choose a brew", "Brewing", lst)
|
||||||
|
if(isnull(chosen_type))
|
||||||
|
return
|
||||||
|
if(isnull(lst[chosen_type]))
|
||||||
|
return
|
||||||
|
var/type = lst[chosen_type]
|
||||||
playsound(src, 'sound/misc/desecration-02.ogg', 75, TRUE)
|
playsound(src, 'sound/misc/desecration-02.ogg', 75, TRUE)
|
||||||
new type(drop_location())
|
new type(drop_location())
|
||||||
current_mass = 0
|
current_mass = 0
|
||||||
|
|||||||
@@ -180,11 +180,10 @@
|
|||||||
to_chat(user,span_notice("You can't afford this."))
|
to_chat(user,span_notice("You can't afford this."))
|
||||||
return
|
return
|
||||||
var/sniped_amount = painting_metadata.credit_value
|
var/sniped_amount = painting_metadata.credit_value
|
||||||
var/offer_amount = input(user,"How much do you want to offer ? Minimum : [painting_metadata.credit_value]","Patronage Amount", painting_metadata.credit_value + 1) as num|null
|
var/offer_amount = tgui_input_number(user, "How much do you want to offer?", "Patronage Amount", (painting_metadata.credit_value + 1), account.account_balance, painting_metadata.credit_value)
|
||||||
if(account.account_balance < offer_amount)
|
if(isnull(offer_amount))
|
||||||
to_chat(user,span_notice("You can't afford this."))
|
|
||||||
return
|
return
|
||||||
if(!offer_amount || sniped_amount != painting_metadata.credit_value || offer_amount < painting_metadata.credit_value+1 || !user.canUseTopic(src))
|
if(offer_amount <= 0 || sniped_amount != painting_metadata.credit_value || offer_amount < painting_metadata.credit_value+1 || !user.canUseTopic(src))
|
||||||
return
|
return
|
||||||
if(!account.adjust_money(-offer_amount))
|
if(!account.adjust_money(-offer_amount))
|
||||||
to_chat(user,span_warning("Transaction failure. Please try again."))
|
to_chat(user,span_warning("Transaction failure. Please try again."))
|
||||||
|
|||||||
@@ -14,10 +14,11 @@
|
|||||||
. += span_notice("Its channel ID is '[id]'.")
|
. += span_notice("Its channel ID is '[id]'.")
|
||||||
|
|
||||||
/obj/item/assembly/control/multitool_act(mob/living/user)
|
/obj/item/assembly/control/multitool_act(mob/living/user)
|
||||||
var/change_id = input("Set the shutters/blast door/blast door controllers ID. It must be a number between 1 and 100.", "ID", id) as num|null
|
var/change_id = tgui_input_number(user, "Set the door controllers ID", "ID", id, 100, 1)
|
||||||
if(change_id)
|
if(isnull(change_id))
|
||||||
id = clamp(round(change_id, 1), 1, 100)
|
return
|
||||||
to_chat(user, span_notice("You change the ID to [id]."))
|
id = round(change_id)
|
||||||
|
to_chat(user, span_notice("You change the ID to [id]."))
|
||||||
|
|
||||||
/obj/item/assembly/control/activate()
|
/obj/item/assembly/control/activate()
|
||||||
var/openclose
|
var/openclose
|
||||||
|
|||||||
@@ -620,8 +620,10 @@ GLOBAL_LIST_INIT(gas_id_to_canister, init_gas_id_to_canister())
|
|||||||
return
|
return
|
||||||
switch(action)
|
switch(action)
|
||||||
if("relabel")
|
if("relabel")
|
||||||
var/label = tgui_input_list(usr, "New canister label", name, GLOB.gas_id_to_canister)
|
var/label = tgui_input_list(usr, "New canister label", "Canister", GLOB.gas_id_to_canister)
|
||||||
if(label && !..())
|
if(isnull(label))
|
||||||
|
return
|
||||||
|
if(!..())
|
||||||
var/newtype = GLOB.gas_id_to_canister[label]
|
var/newtype = GLOB.gas_id_to_canister[label]
|
||||||
if(newtype)
|
if(newtype)
|
||||||
var/obj/machinery/portable_atmospherics/canister/replacement = newtype
|
var/obj/machinery/portable_atmospherics/canister/replacement = newtype
|
||||||
@@ -684,7 +686,7 @@ GLOBAL_LIST_INIT(gas_id_to_canister, init_gas_id_to_canister())
|
|||||||
logmsg += "\n[name]: [gaseslog[name]] moles."
|
logmsg += "\n[name]: [gaseslog[name]] moles."
|
||||||
if(n <= 5) //the first five gases added
|
if(n <= 5) //the first five gases added
|
||||||
admin_msg += "\n[name]: [gaseslog[name]] moles."
|
admin_msg += "\n[name]: [gaseslog[name]] moles."
|
||||||
if(n == 5 && gaseslog.len > 5) //message added if more than 5 gases
|
if(n == 5 && length(gaseslog) > 5) //message added if more than 5 gases
|
||||||
admin_msg += "\nToo many gases to log. Check investigate log."
|
admin_msg += "\nToo many gases to log. Check investigate log."
|
||||||
if(danger) //sent to admin's chat if contains dangerous gases
|
if(danger) //sent to admin's chat if contains dangerous gases
|
||||||
message_admins(admin_msg)
|
message_admins(admin_msg)
|
||||||
|
|||||||
@@ -37,9 +37,12 @@
|
|||||||
/obj/machinery/artillerycontrol/Topic(href, href_list)
|
/obj/machinery/artillerycontrol/Topic(href, href_list)
|
||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
var/A
|
var/target_area = tgui_input_list(usr, "Area to bombard", "Open Fire", GLOB.teleportlocs)
|
||||||
A = input("Area to bombard", "Open Fire", A) in GLOB.teleportlocs
|
if(isnull(target_area))
|
||||||
var/area/thearea = GLOB.teleportlocs[A]
|
return
|
||||||
|
if(isnull(GLOB.teleportlocs[target_area]))
|
||||||
|
return
|
||||||
|
var/area/thearea = GLOB.teleportlocs[target_area]
|
||||||
if(usr.stat != CONSCIOUS || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED))
|
if(usr.stat != CONSCIOUS || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED))
|
||||||
return
|
return
|
||||||
if(reload < reload_cooldown)
|
if(reload < reload_cooldown)
|
||||||
@@ -47,9 +50,9 @@
|
|||||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr))
|
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr))
|
||||||
priority_announce("Bluespace artillery fire detected. Brace for impact.")
|
priority_announce("Bluespace artillery fire detected. Brace for impact.")
|
||||||
message_admins("[ADMIN_LOOKUPFLW(usr)] has launched an artillery strike.")
|
message_admins("[ADMIN_LOOKUPFLW(usr)] has launched an artillery strike.")
|
||||||
var/list/L = list()
|
var/list/possible_turfs = list()
|
||||||
for(var/turf/T in get_area_turfs(thearea.type))
|
for(var/turf/available_turf in get_area_turfs(thearea.type))
|
||||||
L+=T
|
possible_turfs += available_turf
|
||||||
var/loc = pick(L)
|
var/random_turf = pick(possible_turfs)
|
||||||
explosion(loc, explosiondev, explosionmed, explosionlight, explosion_cause = src)
|
explosion(random_turf, explosiondev, explosionmed, explosionlight, explosion_cause = src)
|
||||||
reload = 0
|
reload = 0
|
||||||
|
|||||||
@@ -45,14 +45,12 @@
|
|||||||
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/amount_to_remove = FLOOR(input(user, "How much do you want to withdraw? Current Amount: [money]", "Withdraw Funds", 5) as num|null, 1)
|
var/amount_to_remove = tgui_input_number(user, "How much do you want to withdraw? Current Amount: [money]", "Withdraw Funds", 5, money, 1)
|
||||||
|
if(isnull(amount_to_remove))
|
||||||
|
return
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return
|
return
|
||||||
|
if(amount_to_remove <= 0)
|
||||||
if(!amount_to_remove || amount_to_remove < 0)
|
|
||||||
return
|
|
||||||
if(amount_to_remove > money)
|
|
||||||
to_chat(user, span_warning("There is only [money] credits in [src]"))
|
|
||||||
return
|
return
|
||||||
|
|
||||||
var/obj/item/holochip/holochip = new (user.drop_location(), amount_to_remove)
|
var/obj/item/holochip/holochip = new (user.drop_location(), amount_to_remove)
|
||||||
|
|||||||
@@ -285,7 +285,7 @@
|
|||||||
return
|
return
|
||||||
var/list/expNames = list("Devastation", "Heavy Damage", "Light Damage", "Flame") //Explosions have a range of different types of damage
|
var/list/expNames = list("Devastation", "Heavy Damage", "Light Damage", "Flame") //Explosions have a range of different types of damage
|
||||||
var/list/boomInput = list()
|
var/list/boomInput = list()
|
||||||
for (var/i=1 to expNames.len) //Gather input from the user for the value of each type of damage
|
for (var/i=1 to length(expNames)) //Gather input from the user for the value of each type of damage
|
||||||
boomInput.Add(input("Enter the [expNames[i]] range of the explosion. WARNING: This ignores the bomb cap!", "[expNames[i]] Range", 0) as null|num)
|
boomInput.Add(input("Enter the [expNames[i]] range of the explosion. WARNING: This ignores the bomb cap!", "[expNames[i]] Range", 0) as null|num)
|
||||||
if (isnull(boomInput[i]))
|
if (isnull(boomInput[i]))
|
||||||
return
|
return
|
||||||
@@ -456,7 +456,7 @@
|
|||||||
continue
|
continue
|
||||||
var/sound/found = playing_sound
|
var/sound/found = playing_sound
|
||||||
if (found.file == tempSound.file)
|
if (found.file == tempSound.file)
|
||||||
soundLen = found.len
|
soundLen = length(found)
|
||||||
if (!soundLen)
|
if (!soundLen)
|
||||||
soundLen = input(holder, "Couldn't auto-determine sound file length. What is the exact length of the sound file, in seconds. This number will be used to line the sound up so that it finishes right as the pod lands!", "Pick a Sound File", 0.3) as null|num
|
soundLen = input(holder, "Couldn't auto-determine sound file length. What is the exact length of the sound file, in seconds. This number will be used to line the sound up so that it finishes right as the pod lands!", "Pick a Sound File", 0.3) as null|num
|
||||||
if (isnull(soundLen))
|
if (isnull(soundLen))
|
||||||
@@ -689,7 +689,7 @@
|
|||||||
acceptableTurfs = list()
|
acceptableTurfs = list()
|
||||||
for (var/t in orderedArea) //Go through the orderedArea list
|
for (var/t in orderedArea) //Go through the orderedArea list
|
||||||
var/turf/unchecked_turf = t
|
var/turf/unchecked_turf = t
|
||||||
if (iswallturf(unchecked_turf) || typecache_filter_list_reverse(unchecked_turf.contents, ignored_atoms).len != 0) //if there is something in this turf that isn't in the blacklist, we consider this turf "acceptable" and add it to the acceptableTurfs list
|
if (iswallturf(unchecked_turf) || length(typecache_filter_list_reverse(unchecked_turf.contents, ignored_atoms))) //if there is something in this turf that isn't in the blacklist, we consider this turf "acceptable" and add it to the acceptableTurfs list
|
||||||
acceptableTurfs.Add(unchecked_turf) //Because orderedArea was an ordered linear list, acceptableTurfs will be as well.
|
acceptableTurfs.Add(unchecked_turf) //Because orderedArea was an ordered linear list, acceptableTurfs will be as well.
|
||||||
numTurfs ++
|
numTurfs ++
|
||||||
|
|
||||||
@@ -703,7 +703,7 @@
|
|||||||
if (iswallturf(accepted_turf))
|
if (iswallturf(accepted_turf))
|
||||||
launchList += accepted_turf
|
launchList += accepted_turf
|
||||||
if(LAUNCH_ORDERED) //If we are launching one at a time
|
if(LAUNCH_ORDERED) //If we are launching one at a time
|
||||||
if (launchCounter > acceptableTurfs.len) //Check if the launchCounter, which acts as an index, is too high. If it is, reset it to 1
|
if (launchCounter > length(acceptableTurfs)) //Check if the launchCounter, which acts as an index, is too high. If it is, reset it to 1
|
||||||
launchCounter = 1 //Note that the launchCounter index is incremented in the launch() proc
|
launchCounter = 1 //Note that the launchCounter index is incremented in the launch() proc
|
||||||
var/turf/next_turf_in_line = acceptableTurfs[launchCounter]
|
var/turf/next_turf_in_line = acceptableTurfs[launchCounter]
|
||||||
launchList |= typecache_filter_list_reverse(next_turf_in_line.contents, ignored_atoms) //Filter the specicic turf chosen from acceptableTurfs, and add it to the launchList
|
launchList |= typecache_filter_list_reverse(next_turf_in_line.contents, ignored_atoms) //Filter the specicic turf chosen from acceptableTurfs, and add it to the launchList
|
||||||
@@ -774,7 +774,7 @@
|
|||||||
/datum/centcom_podlauncher/proc/updateSelector() //Ensures that the selector effect will showcase the next item if needed
|
/datum/centcom_podlauncher/proc/updateSelector() //Ensures that the selector effect will showcase the next item if needed
|
||||||
if (launchChoice == LAUNCH_ORDERED && length(acceptableTurfs) > 1 && !temp_pod.reversing && !temp_pod.effectMissile) //We only show the selector if we are taking items from the bay
|
if (launchChoice == LAUNCH_ORDERED && length(acceptableTurfs) > 1 && !temp_pod.reversing && !temp_pod.effectMissile) //We only show the selector if we are taking items from the bay
|
||||||
var/index = (launchCounter == 1 ? launchCounter : launchCounter + 1) //launchCounter acts as an index to the ordered acceptableTurfs list, so adding one will show the next item in the list. We don't want to do this for the very first item tho
|
var/index = (launchCounter == 1 ? launchCounter : launchCounter + 1) //launchCounter acts as an index to the ordered acceptableTurfs list, so adding one will show the next item in the list. We don't want to do this for the very first item tho
|
||||||
if (index > acceptableTurfs.len) //out of bounds check
|
if (index > length(acceptableTurfs)) //out of bounds check
|
||||||
index = 1
|
index = 1
|
||||||
selector.forceMove(acceptableTurfs[index]) //forceMove the selector to the next turf in the ordered acceptableTurfs list
|
selector.forceMove(acceptableTurfs[index]) //forceMove the selector to the next turf in the ordered acceptableTurfs list
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
|||||||
players[displayed_key] = displayed_key
|
players[displayed_key] = displayed_key
|
||||||
|
|
||||||
// Check if the list is empty
|
// Check if the list is empty
|
||||||
if(!players.len)
|
if(!length(players))
|
||||||
// Express that there are no players we can ignore in chat
|
// Express that there are no players we can ignore in chat
|
||||||
to_chat(src, "<span class='infoplain'>There are no other players you can ignore!</span>")
|
to_chat(src, "<span class='infoplain'>There are no other players you can ignore!</span>")
|
||||||
|
|
||||||
@@ -267,10 +267,10 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
|||||||
players = sort_list(players)
|
players = sort_list(players)
|
||||||
|
|
||||||
// Request the player to ignore
|
// Request the player to ignore
|
||||||
var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in players
|
var/selection = tgui_input_list(src, "Select a player", "Ignore", players)
|
||||||
|
|
||||||
// Stop running if we didn't receieve a valid selection
|
// Stop running if we didn't receieve a valid selection
|
||||||
if(!selection || !(selection in players))
|
if(isnull(selection) || !(selection in players))
|
||||||
return
|
return
|
||||||
|
|
||||||
// Store the selected player
|
// Store the selected player
|
||||||
@@ -300,7 +300,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
|||||||
set desc = "Stop ignoring a player's messages on the OOC channel"
|
set desc = "Stop ignoring a player's messages on the OOC channel"
|
||||||
|
|
||||||
// Check if we've ignored any players
|
// Check if we've ignored any players
|
||||||
if(!prefs.ignoring.len)
|
if(!length(prefs.ignoring))
|
||||||
// Express that we haven't ignored any players in chat
|
// Express that we haven't ignored any players in chat
|
||||||
to_chat(src, "<span class='infoplain'>You haven't ignored any players!</span>")
|
to_chat(src, "<span class='infoplain'>You haven't ignored any players!</span>")
|
||||||
|
|
||||||
@@ -308,10 +308,10 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
|||||||
return
|
return
|
||||||
|
|
||||||
// Request the player to unignore
|
// Request the player to unignore
|
||||||
var/selection = input("Please, select a player!", "Unignore", null, null) as null|anything in prefs.ignoring
|
var/selection = tgui_input_list(src, "Select a player", "Unignore", prefs.ignoring)
|
||||||
|
|
||||||
// Stop running if we didn't receive a selection
|
// Stop running if we didn't receive a selection
|
||||||
if(!selection)
|
if(isnull(selection))
|
||||||
return
|
return
|
||||||
|
|
||||||
// Check if the selected player is not on our ignore list
|
// Check if the selected player is not on our ignore list
|
||||||
|
|||||||
@@ -93,12 +93,14 @@
|
|||||||
/datum/action/chameleon_outfit/proc/select_outfit(mob/user)
|
/datum/action/chameleon_outfit/proc/select_outfit(mob/user)
|
||||||
if(!user || !IsAvailable())
|
if(!user || !IsAvailable())
|
||||||
return FALSE
|
return FALSE
|
||||||
var/selected = input("Select outfit to change into", "Chameleon Outfit") as null|anything in outfit_options
|
var/selected = tgui_input_list(user, "Select outfit to change into", "Chameleon Outfit", outfit_options)
|
||||||
|
if(isnull(selected))
|
||||||
|
return FALSE
|
||||||
if(!IsAvailable() || QDELETED(src) || QDELETED(user))
|
if(!IsAvailable() || QDELETED(src) || QDELETED(user))
|
||||||
return FALSE
|
return FALSE
|
||||||
var/outfit_type = outfit_options[selected]
|
if(isnull(outfit_options[selected]))
|
||||||
if(!outfit_type)
|
|
||||||
return FALSE
|
return FALSE
|
||||||
|
var/outfit_type = outfit_options[selected]
|
||||||
var/datum/outfit/job/O = new outfit_type()
|
var/datum/outfit/job/O = new outfit_type()
|
||||||
var/list/outfit_types = O.get_chameleon_disguise_info()
|
var/list/outfit_types = O.get_chameleon_disguise_info()
|
||||||
var/datum/job/job_datum = SSjob.GetJobType(O.jobtype)
|
var/datum/job/job_datum = SSjob.GetJobType(O.jobtype)
|
||||||
@@ -177,13 +179,12 @@
|
|||||||
|
|
||||||
/datum/action/item_action/chameleon/change/proc/select_look(mob/user)
|
/datum/action/item_action/chameleon/change/proc/select_look(mob/user)
|
||||||
var/obj/item/picked_item
|
var/obj/item/picked_item
|
||||||
var/picked_name
|
var/picked_name = tgui_input_list(user, "Select [chameleon_name] to change into", "Chameleon Settings", sort_list(chameleon_list, /proc/cmp_typepaths_asc))
|
||||||
picked_name = input("Select [chameleon_name] to change into", "Chameleon [chameleon_name]", picked_name) as null|anything in sort_list(chameleon_list, /proc/cmp_typepaths_asc)
|
if(isnull(picked_name))
|
||||||
if(!picked_name)
|
return
|
||||||
|
if(isnull(chameleon_list[picked_name]))
|
||||||
return
|
return
|
||||||
picked_item = chameleon_list[picked_name]
|
picked_item = chameleon_list[picked_name]
|
||||||
if(!picked_item)
|
|
||||||
return
|
|
||||||
update_look(user, picked_item)
|
update_look(user, picked_item)
|
||||||
|
|
||||||
/datum/action/item_action/chameleon/change/proc/random_look(mob/user)
|
/datum/action/item_action/chameleon/change/proc/random_look(mob/user)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
hair_overlay.overlays += emissive_blocker(hair_overlay.icon, hair_overlay.icon_state, alpha = hair_overlay.alpha)
|
hair_overlay.overlays += emissive_blocker(hair_overlay.icon, hair_overlay.icon_state, alpha = hair_overlay.alpha)
|
||||||
|
|
||||||
/obj/item/clothing/head/wig/attack_self(mob/user)
|
/obj/item/clothing/head/wig/attack_self(mob/user)
|
||||||
var/new_style = input(user, "Select a hairstyle", "Wig Styling") as null|anything in (GLOB.hairstyles_list - "Bald")
|
var/new_style = tgui_input_list(user, "Select a hairstyle", "Wig Styling", GLOB.hairstyles_list - "Bald")
|
||||||
var/newcolor = adjustablecolor ? input(usr,"","Choose Color",color) as color|null : null
|
var/newcolor = adjustablecolor ? input(usr,"","Choose Color",color) as color|null : null
|
||||||
if(!user.canUseTopic(src, BE_CLOSE))
|
if(!user.canUseTopic(src, BE_CLOSE))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -251,7 +251,9 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/list/modes = list("Off", "Binary vitals", "Exact vitals", "Tracking beacon")
|
var/list/modes = list("Off", "Binary vitals", "Exact vitals", "Tracking beacon")
|
||||||
var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes
|
var/switchMode = tgui_input_list(M, "Select a sensor mode", "Suit Sensors", modes, modes[sensor_mode + 1])
|
||||||
|
if(isnull(switchMode))
|
||||||
|
return
|
||||||
if(get_dist(usr, src) > 1)
|
if(get_dist(usr, src) > 1)
|
||||||
to_chat(usr, span_warning("You have moved too far away!"))
|
to_chat(usr, span_warning("You have moved too far away!"))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -27,10 +27,10 @@
|
|||||||
name = rename_msg
|
name = rename_msg
|
||||||
return
|
return
|
||||||
else if(choice == "Set the fee")
|
else if(choice == "Set the fee")
|
||||||
var/force_fee_input = input(user,"Set the fee!","Set a fee!",0) as num|null
|
var/force_fee_input = tgui_input_number(user, "Set the fee", "Fee", max_value = 10000)
|
||||||
if(isnull(force_fee_input) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
if(isnull(force_fee_input) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||||
return
|
return
|
||||||
force_fee = force_fee_input
|
force_fee = round(force_fee_input)
|
||||||
return
|
return
|
||||||
locked = !locked
|
locked = !locked
|
||||||
to_chat(user, span_notice("You [src.locked ? "lock" : "unlock"] the paystand, protecting the bolts from [anchored ? "loosening" : "tightening"]."))
|
to_chat(user, span_notice("You [src.locked ? "lock" : "unlock"] the paystand, protecting the bolts from [anchored ? "loosening" : "tightening"]."))
|
||||||
|
|||||||
@@ -150,12 +150,12 @@
|
|||||||
update_appearance()
|
update_appearance()
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
bomb_timer = input(user, "Set the [bomb] timer from [bomb_timer_min] to [bomb_timer_max].", bomb, bomb_timer) as num|null
|
bomb_timer = tgui_input_number(user, "Set the timer for [bomb].", "Pizza Bomb", bomb_timer, bomb_timer_max, bomb_timer_min)
|
||||||
|
|
||||||
if (isnull(bomb_timer))
|
if (isnull(bomb_timer))
|
||||||
return
|
return
|
||||||
|
|
||||||
bomb_timer = clamp(CEILING(bomb_timer, 1), bomb_timer_min, bomb_timer_max)
|
bomb_timer = round(bomb_timer)
|
||||||
bomb_defused = FALSE
|
bomb_defused = FALSE
|
||||||
|
|
||||||
log_bomber(user, "has trapped a", src, "with [bomb] set to [bomb_timer] seconds")
|
log_bomber(user, "has trapped a", src, "with [bomb] set to [bomb_timer] seconds")
|
||||||
|
|||||||
@@ -737,8 +737,8 @@
|
|||||||
if(!(gene.mutability_flags & PLANT_GENE_REMOVABLE))
|
if(!(gene.mutability_flags & PLANT_GENE_REMOVABLE))
|
||||||
continue // Don't show genes that can't be removed.
|
continue // Don't show genes that can't be removed.
|
||||||
current_traits[gene.name] = gene
|
current_traits[gene.name] = gene
|
||||||
var/removed_trait = (input(user, "Select a trait to remove from the [myseed.plantname].", "Plant Trait Removal") as null|anything in sort_list(current_traits))
|
var/removed_trait = tgui_input_list(user, "Trait to remove from the [myseed.plantname]", "Plant Trait Removal", sort_list(current_traits))
|
||||||
if(removed_trait == null)
|
if(isnull(removed_trait))
|
||||||
return
|
return
|
||||||
if(!user.canUseTopic(src, BE_CLOSE))
|
if(!user.canUseTopic(src, BE_CLOSE))
|
||||||
return
|
return
|
||||||
@@ -818,8 +818,12 @@
|
|||||||
for(var/muties in myseed.mutatelist)
|
for(var/muties in myseed.mutatelist)
|
||||||
var/obj/item/seeds/another_mut = new muties
|
var/obj/item/seeds/another_mut = new muties
|
||||||
fresh_mut_list[another_mut.plantname] = muties
|
fresh_mut_list[another_mut.plantname] = muties
|
||||||
var/locked_mutation = (input(user, "Select a mutation to lock.", "Plant Mutation Locks") as null|anything in sort_list(fresh_mut_list))
|
var/locked_mutation = tgui_input_list(user, "Mutation to lock", "Plant Mutation Locks", sort_list(fresh_mut_list))
|
||||||
if(!user.canUseTopic(src, BE_CLOSE) || !locked_mutation)
|
if(isnull(locked_mutation))
|
||||||
|
return
|
||||||
|
if(isnull(fresh_mut_list[locked_mutation]))
|
||||||
|
return
|
||||||
|
if(!user.canUseTopic(src, BE_CLOSE))
|
||||||
return
|
return
|
||||||
myseed.mutatelist = list(fresh_mut_list[locked_mutation])
|
myseed.mutatelist = list(fresh_mut_list[locked_mutation])
|
||||||
myseed.set_endurance(myseed.endurance/2)
|
myseed.set_endurance(myseed.endurance/2)
|
||||||
|
|||||||
@@ -135,8 +135,8 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(length_char(t) >= MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
|
if(length_char(t) >= MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
|
||||||
var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
|
var/cont = tgui_alert(usr, "Your message is too long! Would you like to continue editing it?", "Warning", list("Yes", "No"))
|
||||||
if(cont == "no")
|
if(cont != "Yes")
|
||||||
break
|
break
|
||||||
while(length_char(t) > MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
|
while(length_char(t) > MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
|
||||||
ParseSong(t)
|
ParseSong(t)
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
INVOKE_ASYNC(src, .proc/start_playing, usr)
|
INVOKE_ASYNC(src, .proc/start_playing, usr)
|
||||||
|
|
||||||
else if(href_list["newline"])
|
else if(href_list["newline"])
|
||||||
var/newline = html_encode(input("Enter your line: ", parent.name) as text|null)
|
var/newline = tgui_input_text(usr, "Enter your line ", parent.name)
|
||||||
if(!newline || !in_range(parent, usr))
|
if(!newline || !in_range(parent, usr))
|
||||||
return
|
return
|
||||||
if(lines.len > MUSIC_MAXLINES)
|
if(lines.len > MUSIC_MAXLINES)
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
|
|
||||||
else if(href_list["modifyline"])
|
else if(href_list["modifyline"])
|
||||||
var/num = round(text2num(href_list["modifyline"]),1)
|
var/num = round(text2num(href_list["modifyline"]),1)
|
||||||
var/content = stripped_input(usr, "Enter your line: ", parent.name, lines[num], MUSIC_MAXLINECHARS)
|
var/content = tgui_input_text(usr, "Enter your line ", parent.name, lines[num], MUSIC_MAXLINECHARS)
|
||||||
if(!content || !in_range(parent, usr))
|
if(!content || !in_range(parent, usr))
|
||||||
return
|
return
|
||||||
if(num > lines.len || num < 1)
|
if(num > lines.len || num < 1)
|
||||||
@@ -185,22 +185,22 @@
|
|||||||
stop_playing()
|
stop_playing()
|
||||||
|
|
||||||
else if(href_list["setlinearfalloff"])
|
else if(href_list["setlinearfalloff"])
|
||||||
var/amount = input(usr, "Set linear sustain duration in seconds", "Linear Sustain Duration") as null|num
|
var/amount = tgui_input_number(usr, "Set linear sustain duration in seconds", "Linear Sustain Duration")
|
||||||
if(!isnull(amount))
|
if(!isnull(amount))
|
||||||
set_linear_falloff_duration(amount)
|
set_linear_falloff_duration(amount)
|
||||||
|
|
||||||
else if(href_list["setexpfalloff"])
|
else if(href_list["setexpfalloff"])
|
||||||
var/amount = input(usr, "Set exponential sustain factor", "Exponential sustain factor") as null|num
|
var/amount = tgui_input_number(usr, "Set exponential sustain factor", "Exponential sustain factor")
|
||||||
if(!isnull(amount))
|
if(!isnull(amount))
|
||||||
set_exponential_drop_rate(amount)
|
set_exponential_drop_rate(amount)
|
||||||
|
|
||||||
else if(href_list["setvolume"])
|
else if(href_list["setvolume"])
|
||||||
var/amount = input(usr, "Set volume", "Volume") as null|num
|
var/amount = tgui_input_number(usr, "Set volume", "Volume")
|
||||||
if(!isnull(amount))
|
if(!isnull(amount))
|
||||||
set_volume(amount)
|
set_volume(amount)
|
||||||
|
|
||||||
else if(href_list["setdropoffvolume"])
|
else if(href_list["setdropoffvolume"])
|
||||||
var/amount = input(usr, "Set dropoff threshold", "Dropoff Threshold Volume") as null|num
|
var/amount = tgui_input_number(usr, "Set dropoff threshold", "Dropoff Threshold Volume")
|
||||||
if(!isnull(amount))
|
if(!isnull(amount))
|
||||||
set_dropoff_volume(amount)
|
set_dropoff_volume(amount)
|
||||||
|
|
||||||
@@ -215,12 +215,14 @@
|
|||||||
var/datum/instrument/I = SSinstruments.get_instrument(i)
|
var/datum/instrument/I = SSinstruments.get_instrument(i)
|
||||||
if(I)
|
if(I)
|
||||||
LAZYSET(categories[I.category || "ERROR CATEGORY"], I.name, I.id)
|
LAZYSET(categories[I.category || "ERROR CATEGORY"], I.name, I.id)
|
||||||
var/cat = input(usr, "Select Category", "Instrument Category") as null|anything in categories
|
var/cat = tgui_input_list(usr, "Select Category", "Instrument Category", categories)
|
||||||
if(!cat)
|
if(isnull(cat))
|
||||||
return
|
return
|
||||||
var/list/instruments = categories[cat]
|
var/list/instruments = categories[cat]
|
||||||
var/choice = input(usr, "Select Instrument", "Instrument Selection") as null|anything in instruments
|
var/choice = tgui_input_list(usr, "Select Instrument", "Instrument Selection", instruments)
|
||||||
if(!choice)
|
if(isnull(choice))
|
||||||
|
return
|
||||||
|
if(isnull(instruments[choice]))
|
||||||
return
|
return
|
||||||
choice = instruments[choice] //get id
|
choice = instruments[choice] //get id
|
||||||
if(choice)
|
if(choice)
|
||||||
@@ -232,7 +234,7 @@
|
|||||||
note_shift = clamp(amount, note_shift_min, note_shift_max)
|
note_shift = clamp(amount, note_shift_min, note_shift_max)
|
||||||
|
|
||||||
else if(href_list["setsustainmode"])
|
else if(href_list["setsustainmode"])
|
||||||
var/choice = input(usr, "Choose a sustain mode", "Sustain Mode") as null|anything in SSinstruments.note_sustain_modes
|
var/choice = tgui_input_list(usr, "Choose a sustain mode", "Sustain Mode", SSinstruments.note_sustain_modes)
|
||||||
if(choice)
|
if(choice)
|
||||||
sustain_mode = SSinstruments.note_sustain_modes[choice]
|
sustain_mode = SSinstruments.note_sustain_modes[choice]
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,9 @@
|
|||||||
if("grant_language")
|
if("grant_language")
|
||||||
if((is_admin || isobserver(AM)) && language_datum)
|
if((is_admin || isobserver(AM)) && language_datum)
|
||||||
var/list/choices = list("Only Spoken", "Only Understood", "Both")
|
var/list/choices = list("Only Spoken", "Only Understood", "Both")
|
||||||
var/choice = input(user,"How do you want to add this language?","[language_datum]",null) as null|anything in choices
|
var/choice = tgui_input_list(user, "How do you want to add this language?", "[language_datum]", choices)
|
||||||
|
if(isnull(choice))
|
||||||
|
return
|
||||||
var/spoken = FALSE
|
var/spoken = FALSE
|
||||||
var/understood = FALSE
|
var/understood = FALSE
|
||||||
switch(choice)
|
switch(choice)
|
||||||
@@ -108,7 +110,9 @@
|
|||||||
if("remove_language")
|
if("remove_language")
|
||||||
if((is_admin || isobserver(AM)) && language_datum)
|
if((is_admin || isobserver(AM)) && language_datum)
|
||||||
var/list/choices = list("Only Spoken", "Only Understood", "Both")
|
var/list/choices = list("Only Spoken", "Only Understood", "Both")
|
||||||
var/choice = input(user,"Which part do you wish to remove?","[language_datum]",null) as null|anything in choices
|
var/choice = tgui_input_list(user, "Which part do you wish to remove?", "[language_datum]", choices)
|
||||||
|
if(isnull(choice))
|
||||||
|
return
|
||||||
var/spoken = FALSE
|
var/spoken = FALSE
|
||||||
var/understood = FALSE
|
var/understood = FALSE
|
||||||
switch(choice)
|
switch(choice)
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
if(!user.is_literate())
|
if(!user.is_literate())
|
||||||
to_chat(user, span_notice("You scribble illegibly on the side of [src]!"))
|
to_chat(user, span_notice("You scribble illegibly on the side of [src]!"))
|
||||||
return
|
return
|
||||||
var/newname = stripped_input(user, "What would you like to title this bookshelf?")
|
var/newname = tgui_input_text(user, "What would you like to title this bookshelf?", "Bookshelf Renaming", max_length = MAX_NAME_LEN)
|
||||||
if(!user.canUseTopic(src, BE_CLOSE))
|
if(!user.canUseTopic(src, BE_CLOSE))
|
||||||
return
|
return
|
||||||
if(!newname)
|
if(!newname)
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
else
|
else
|
||||||
name = "bookcase ([sanitize(newname)])"
|
name = "bookcase ([sanitize(newname)])"
|
||||||
else if(I.tool_behaviour == TOOL_CROWBAR)
|
else if(I.tool_behaviour == TOOL_CROWBAR)
|
||||||
if(contents.len)
|
if(length(contents))
|
||||||
to_chat(user, span_warning("You need to remove the books first!"))
|
to_chat(user, span_warning("You need to remove the books first!"))
|
||||||
else
|
else
|
||||||
I.play_tool_sound(src, 100)
|
I.play_tool_sound(src, 100)
|
||||||
@@ -142,17 +142,19 @@
|
|||||||
if(load_random_books)
|
if(load_random_books)
|
||||||
create_random_books(books_to_load, src, FALSE, random_category)
|
create_random_books(books_to_load, src, FALSE, random_category)
|
||||||
load_random_books = FALSE
|
load_random_books = FALSE
|
||||||
if(contents.len)
|
if(!length(contents))
|
||||||
var/obj/item/book/choice = input(user, "Which book would you like to remove from the shelf?") as null|obj in sort_names(contents.Copy())
|
return
|
||||||
if(choice)
|
var/obj/item/book/choice = tgui_input_list(user, "Book to remove from the shelf", "Remove Book", sort_names(contents.Copy()))
|
||||||
if(!(user.mobility_flags & MOBILITY_USE) || user.stat != CONSCIOUS || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !in_range(loc, user))
|
if(isnull(choice))
|
||||||
return
|
return
|
||||||
if(ishuman(user))
|
if(!(user.mobility_flags & MOBILITY_USE) || user.stat != CONSCIOUS || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !in_range(loc, user))
|
||||||
if(!user.get_active_held_item())
|
return
|
||||||
user.put_in_hands(choice)
|
if(ishuman(user))
|
||||||
else
|
if(!user.get_active_held_item())
|
||||||
choice.forceMove(drop_location())
|
user.put_in_hands(choice)
|
||||||
update_appearance()
|
else
|
||||||
|
choice.forceMove(drop_location())
|
||||||
|
update_appearance()
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/bookcase/deconstruct(disassembled = TRUE)
|
/obj/structure/bookcase/deconstruct(disassembled = TRUE)
|
||||||
@@ -169,7 +171,7 @@
|
|||||||
if(state == BOOKCASE_UNANCHORED || state == BOOKCASE_ANCHORED)
|
if(state == BOOKCASE_UNANCHORED || state == BOOKCASE_ANCHORED)
|
||||||
icon_state = "bookempty"
|
icon_state = "bookempty"
|
||||||
return ..()
|
return ..()
|
||||||
var/amount = contents.len
|
var/amount = length(contents)
|
||||||
if(load_random_books)
|
if(load_random_books)
|
||||||
amount += books_to_load
|
amount += books_to_load
|
||||||
icon_state = "book-[clamp(amount, 0, 5)]"
|
icon_state = "book-[clamp(amount, 0, 5)]"
|
||||||
@@ -249,12 +251,14 @@
|
|||||||
if(!literate)
|
if(!literate)
|
||||||
to_chat(user, span_notice("You scribble illegibly on the cover of [src]!"))
|
to_chat(user, span_notice("You scribble illegibly on the cover of [src]!"))
|
||||||
return
|
return
|
||||||
var/choice = tgui_input_list(usr, "What would you like to change?",,list("Title", "Contents", "Author", "Cancel"))
|
var/choice = tgui_input_list(usr, "What would you like to change?", "Book Alteration", list("Title", "Contents", "Author", "Cancel"))
|
||||||
|
if(isnull(choice))
|
||||||
|
return
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, literate))
|
if(!user.canUseTopic(src, BE_CLOSE, literate))
|
||||||
return
|
return
|
||||||
switch(choice)
|
switch(choice)
|
||||||
if("Title")
|
if("Title")
|
||||||
var/newtitle = reject_bad_text(stripped_input(user, "Write a new title:"))
|
var/newtitle = reject_bad_text(tgui_input_text(user, "Write a new title", "Book Title", max_length = 30))
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, literate))
|
if(!user.canUseTopic(src, BE_CLOSE, literate))
|
||||||
return
|
return
|
||||||
if (length_char(newtitle) > 30)
|
if (length_char(newtitle) > 30)
|
||||||
@@ -267,7 +271,7 @@
|
|||||||
name = newtitle
|
name = newtitle
|
||||||
title = newtitle
|
title = newtitle
|
||||||
if("Contents")
|
if("Contents")
|
||||||
var/content = stripped_input(user, "Write your book's contents (HTML NOT allowed):","","",8192)
|
var/content = tgui_input_text(user, "Write your book's contents (HTML NOT allowed)", "Book Contents", max_length = 8192, multiline = TRUE)
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, literate))
|
if(!user.canUseTopic(src, BE_CLOSE, literate))
|
||||||
return
|
return
|
||||||
if(!content)
|
if(!content)
|
||||||
@@ -276,7 +280,7 @@
|
|||||||
else
|
else
|
||||||
dat += content
|
dat += content
|
||||||
if("Author")
|
if("Author")
|
||||||
var/newauthor = stripped_input(user, "Write the author's name:")
|
var/newauthor = tgui_input_text(user, "Write the author's name", "Author Name", max_length = MAX_NAME_LEN)
|
||||||
if(!user.canUseTopic(src, BE_CLOSE, literate))
|
if(!user.canUseTopic(src, BE_CLOSE, literate))
|
||||||
return
|
return
|
||||||
if(!newauthor)
|
if(!newauthor)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user