mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-14 11:42:27 +00:00
## About The Pull Request ### Adds this TGUI spawn panel with a lot of stuff  ### Adds two useful admining hotkeys `Ctrl + Shift + LMB` on an atom opens the View Variables window `Ctrl + LMB` on a mob opens the Player Panel window This PR is an upgrade/continuation/upstreaming of the following PR by @Ez-Briz: https://github.com/ss220club/BandaStation/pull/1242 ## Why It's Good For The Game ### Icon and object previews! https://github.com/user-attachments/assets/894c4383-0455-4ba8-9cc1-7fb0d8dff6c7 ### Introducing Fuzzy Search!  ### Easier datum marking and recalling! https://github.com/user-attachments/assets/4934ecca-18aa-45ce-83af-1fe90263b534 ### Targeted spawn and quick targeted droppods (Build Mode Lite™️) (RMB to disengage)! https://github.com/user-attachments/assets/38eb6e08-74bf-471c-8bd5-61e1b219086b ### Weaponize your tiders with a hover of a mouse! https://github.com/user-attachments/assets/9840d0ed-d20d-4d48-91e0-2dc1eaf17e36 The options are persistent between opens and even rounds, using local `storage`, which means you won't have to readjust your panel every time you close it! ...and it doesn't end there. ## WIP things: - [x] implement fuzzy search (requires https://github.com/tgstation/tgui-core/pull/166 to be merged); - [x] add a modal window to adjust description, icon file/state/size and badmin flags; - [x] clean the code up; ## Changelog 🆑 mcbalaam, Ez-Briz admin: Added a new TGUI spawn panel, removing it's ancestors - HTML "Create X" panels /🆑
52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
/datum/asset/json/spawnpanel
|
|
name = "spawnpanel_atom_data"
|
|
|
|
/datum/asset/json/spawnpanel/generate()
|
|
var/list/data = list()
|
|
|
|
var/static/list/mapping_objects = typecacheof(list(
|
|
/obj/effect/mapping_helpers,
|
|
/obj/effect/landmark,
|
|
/obj/effect/spawner,
|
|
/obj/effect/mob_spawn,
|
|
/obj/effect/holodeck_effect,
|
|
/obj/docking_port,
|
|
/obj/modular_map_connector,
|
|
/obj/modular_map_root,
|
|
/obj/pathfind_guy,
|
|
))
|
|
|
|
data["atoms"] = list()
|
|
|
|
for(var/obj/each_object as anything in typesof(/obj))
|
|
data["atoms"][each_object] = list(
|
|
"icon" = each_object?.icon_preview || each_object?.icon || "none",
|
|
"icon_state" = each_object?.icon_state_preview || each_object?.icon_state || "none",
|
|
"name" = each_object.name,
|
|
"description" = each_object.desc,
|
|
"mapping" = is_type_in_typecache(each_object, mapping_objects),
|
|
"type" = "Objects"
|
|
)
|
|
|
|
for(var/turf/each_turf as anything in typesof(/turf))
|
|
data["atoms"][each_turf] = list(
|
|
"icon" = each_turf?.icon || "noneturf",
|
|
"icon_state" = each_turf?.icon_state || "noneturf",
|
|
"name" = each_turf.name,
|
|
"description" = each_turf.desc,
|
|
"mapping" = is_type_in_typecache(each_turf, mapping_objects),
|
|
"type" = "Turfs"
|
|
)
|
|
|
|
for(var/mob/each_mob as anything in typesof(/mob))
|
|
data["atoms"][each_mob] = list(
|
|
"icon" = each_mob?.icon || "nonemob",
|
|
"icon_state" = each_mob?.icon_state || "nonemob",
|
|
"name" = each_mob.name,
|
|
"description" = each_mob.desc,
|
|
"mapping" = is_type_in_typecache(each_mob, mapping_objects),
|
|
"type" = "Mobs"
|
|
)
|
|
|
|
return data
|