diff --git a/code/modules/admin/verbs/selectequipment.dm b/code/modules/admin/verbs/selectequipment.dm
index eb75df9ac1..be245cb485 100644
--- a/code/modules/admin/verbs/selectequipment.dm
+++ b/code/modules/admin/verbs/selectequipment.dm
@@ -125,6 +125,7 @@
custom += make_custom_outfit_entries(GLOB.custom_outfits)
data["custom_outfits"] = custom
data["current_outfit"] = selected_identifier
+ data["is_observer"] = isobserver(target_mob)
return data
@@ -179,7 +180,7 @@
new_outfit = new new_outfit
if(!istype(new_outfit))
return
- user.admin_apply_outfit(target_mob, new_outfit)
+ user.admin_apply_outfit(target_mob, new_outfit, params["delete_pocket"], params["spawn_method"], params["random_char"], params["give_return"])
if("customoutfit")
user.outfit_manager()
@@ -195,7 +196,7 @@
user.prefs.favorite_outfits += outfit_path
user.prefs.save_preferences()
-/client/proc/admin_apply_outfit(mob/target, dresscode)
+/client/proc/admin_apply_outfit(mob/target, dresscode, delete_pocket, spawn_method, random_char, give_return)
if(!ishuman(target) && !isobserver(target))
alert("Invalid mob")
return
@@ -203,15 +204,19 @@
if(!dresscode)
return
- var/delete_pocket
+ var/was_observer = FALSE
+ var/turf/current_turf
var/mob/living/carbon/human/human_target
if(isobserver(target))
- human_target = target.change_mob_type(/mob/living/carbon/human, delete_old_mob = TRUE)
+ was_observer = TRUE
+ current_turf = get_turf(target)
+ human_target = target.change_mob_type(/mob/living/carbon/human, null, delete_old_mob = TRUE)
+ if(random_char)
+ randomize_human(human_target)
+ if(give_return)
+ human_target.mind.AddSpell(new /obj/effect/proc_holder/spell/self/return_back, FALSE)
else
human_target = target
- if(human_target.l_store || human_target.r_store || human_target.s_store) //saves a lot of time for admins and coders alike
- if(alert("Drop Items in Pockets? No will delete them.", "Robust quick dress shop", "Yes", "No") == "No")
- delete_pocket = TRUE
SSblackbox.record_feedback("tally", "admin_verb", 1, "Select Equipment") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for(var/obj/item/item in human_target.get_equipped_items(delete_pocket))
@@ -221,7 +226,28 @@
human_target.regenerate_icons()
- log_admin("[key_name(usr)] changed the equipment of [key_name(human_target)] to [dresscode].")
- message_admins("[key_name_admin(usr)] changed the equipment of [ADMIN_LOOKUPFLW(human_target)] to [dresscode].")
+ if(was_observer)
+ switch(spawn_method)
+ if("Teleport")
+ human_target.forceMove(current_turf)
+
+ var/datum/effect_system/spark_spread/quantum/sparks = new
+ sparks.set_up(10, 1, human_target)
+ sparks.attach(get_turf(human_target))
+ sparks.start()
+ if("Pod")
+ var/obj/structure/closet/supplypod/empty_pod = new()
+
+ empty_pod.style = STYLE_BLUESPACE
+ empty_pod.bluespace = TRUE
+ empty_pod.explosionSize = list(0,0,0,0)
+ empty_pod.desc = "A sleek, and slightly worn bluespace pod - its probably seen many deliveries..."
+
+ human_target.forceMove(empty_pod)
+
+ new /obj/effect/pod_landingzone(current_turf, empty_pod)
+
+ log_admin("[key_name(usr)] changed the equipment of [key_name(human_target)] to [dresscode][was_observer ? ", spawning them" : ""].")
+ message_admins(span_adminnotice("[key_name_admin(usr)] changed the equipment of [ADMIN_LOOKUPFLW(human_target)] to [dresscode][was_observer ? ", spawning them" : ""]."))
return dresscode
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index adae2c8a1b..7a414ce482 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -138,11 +138,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
show_data_huds()
data_huds_on = 1
- // Skyrat change START
- RegisterSignal(src, COMSIG_CLICK_CTRL_SHIFT, .proc/on_click_ctrl_shift)
- RegisterSignal(src, COMSIG_CLICK_CTRL, .proc/on_click_ctrl)
- // Skyrat change END
-
/mob/dead/observer/get_photo_description(obj/item/camera/camera)
if(!invisibility || camera.see_ghosts)
return "You can also see a g-g-g-g-ghooooost!"
@@ -935,12 +930,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
game = create_mafia_game("mafia")
game.ui_interact(usr)
-// Skyrat change - moved to modular/signals.
-/*
/mob/dead/observer/CtrlShiftClick(mob/user)
if(isobserver(user) && check_rights(R_SPAWN))
change_mob_type( /mob/living/carbon/human , null, null, TRUE) //always delmob, ghosts shouldn't be left lingering
-*/
+ else
+ return ..()
/mob/dead/observer/examine(mob/user)
. = ..()
diff --git a/modular_sand/code/modules/mob/dead/observer/observer.dm b/modular_sand/code/modules/mob/dead/observer/observer.dm
index af9c00938a..87766eae33 100644
--- a/modular_sand/code/modules/mob/dead/observer/observer.dm
+++ b/modular_sand/code/modules/mob/dead/observer/observer.dm
@@ -1,85 +1,9 @@
-/mob/dead/observer/proc/on_click_ctrl_shift(mob/user)
+/mob/dead/observer/CtrlClick(mob/user)
if(isobserver(user) && check_rights(R_SPAWN))
- change_mob_type( /mob/living/carbon/human , null, null, TRUE) //always delmob, ghosts shouldn't be left lingering
-
-/mob/dead/observer/proc/on_click_ctrl(mob/user)
- quickicspawn(user)
-
-/mob/dead/observer/proc/quickicspawn(mob/user)
- if(isobserver(user) && check_rights(R_SPAWN))
- var/list/outfits = list()
- outfits["Bluespace Tech"] = /datum/outfit/debug/bst
- outfits["Bluespace Tech (Hardsuit)"] = /datum/outfit/debug/bsthardsuit
- outfits["Show All"] = "Show All"
-
- var/dresscode
- var/teleport_option = tgui_alert(user, "How would you like to be spawned in?","IC Quick Spawn",list("Bluespace","Pod", "Cancel"))
- if (teleport_option == "Cancel")
- return
- var/character_option = tgui_alert(user, "Which character?","IC Quick Spawn",list("Selected Character","Randomly Created", "Cancel"))
- if (character_option == "Cancel")
- return
- var/initial_outfits = input("Select outfit", "Quick Dress") as null|anything in outfits
- if (!initial_outfits || initial_outfits == "" || initial_outfits == "Cancel")
- return
-
- if (initial_outfits == "Show All")
- dresscode = client.robust_dress_shop()
- if (!dresscode)
- return
- else
- dresscode = outfits[initial_outfits]
-
- var/grant_spell = tgui_alert(user, "Do you want to give them the power to return? Not recommended for non-admins.","Give power?",list("Yes","No", "Cancel"))
- if(grant_spell == "Cancel")
- return
-
- var/turf/current_turf = get_turf(src)
- var/mob/living/carbon/human/spawned_player = new(src)
-
- if (character_option == "Selected Character")
- spawned_player.name = src.name
- spawned_player.real_name = src.real_name
-
- var/mob/living/carbon/human/H = spawned_player
- client?.prefs.copy_to(H)
- H.dna.update_dna_identity()
-
- QDEL_IN(src, 1)
-
- if (teleport_option == "Bluespace")
- playsound(spawned_player, 'sound/magic/Disable_Tech.ogg', 100, 1)
-
- if(mind && isliving(spawned_player))
- mind.transfer_to(spawned_player, 1) // second argument to force key move to new mob
- else
- transfer_ckey(spawned_player)
-
- if(grant_spell != "No")
- spawned_player.mind.AddSpell(new /obj/effect/proc_holder/spell/self/return_back, FALSE)
-
- if(dresscode != "Naked")
- spawned_player.equipOutfit(dresscode)
-
- switch(teleport_option)
- if("Bluespace")
- spawned_player.forceMove(current_turf)
-
- var/datum/effect_system/spark_spread/quantum/sparks = new
- sparks.set_up(10, 1, spawned_player)
- sparks.attach(get_turf(spawned_player))
- sparks.start()
- if("Pod")
- var/obj/structure/closet/supplypod/empty_pod = new()
-
- empty_pod.style = STYLE_BLUESPACE
- empty_pod.bluespace = TRUE
- empty_pod.explosionSize = list(0,0,0,0)
- empty_pod.desc = "A sleek, and slightly worn bluespace pod - its probably seen many deliveries..."
-
- spawned_player.forceMove(empty_pod)
-
- new /obj/effect/pod_landingzone(current_turf, empty_pod)
+ var/datum/select_equipment/ui = new(user, src)
+ ui.ui_interact(user)
+ else
+ return ..()
//This is more of a hacky fix for performance due to rune-chat
/mob/dead/observer/proc/HearNoPopup(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
diff --git a/tgui/packages/tgui/interfaces/SelectEquipment.js b/tgui/packages/tgui/interfaces/SelectEquipment.js
index 6f2f9e3746..274f3efce4 100644
--- a/tgui/packages/tgui/interfaces/SelectEquipment.js
+++ b/tgui/packages/tgui/interfaces/SelectEquipment.js
@@ -2,7 +2,8 @@ import { filter, map, sortBy, uniq } from 'common/collections';
import { flow } from 'common/fp';
import { createSearch } from 'common/string';
import { useBackend, useLocalState } from '../backend';
-import { Box, Button, Icon, Input, Section, Stack, Tabs } from '../components';
+import { Box, Button, Dropdown, Icon, Input, Section, Stack, Tabs } from '../components';
+import { ButtonCheckbox } from '../components/Button';
import { Window } from '../layouts';
// here's an important mental define:
@@ -173,8 +174,16 @@ const OutfitDisplay = (props, context) => {
const CurrentlySelectedDisplay = (props, context) => {
const { act, data } = useBackend(context);
- const { current_outfit } = data;
+ const { current_outfit, is_observer = true } = data;
const { entry } = props;
+ const [delPockets, setPocketDel] = useLocalState(
+ context, 'delPockets', false);
+ const [deployMethod, setDeployMethod] = useLocalState(
+ context, 'deployMethod', "Instant");
+ const [giveReturn, setGiveReturn] = useLocalState(
+ context, 'giveReturn', false);
+ const [randomChar, setRandomChar] = useLocalState(
+ context, 'randomChar', false);
return (
{entry?.path && (
@@ -204,15 +213,57 @@ const CurrentlySelectedDisplay = (props, context) => {
-
+
+
+ {is_observer ? (
+ <>
+ setDeployMethod(selected)} />
+ setGiveReturn(!giveReturn)}>
+ Return
+
+ setRandomChar(!randomChar)}>
+ Random
+
+ >
+ ) : (
+ setPocketDel(!delPockets)}>
+ Pockets
+
+ )}
+
+
+
+
+
);