mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
## About The Pull Request Revival of #72881 A new alt click window with a tarkov-y loading spinner. Replaces the object item window in stat panel. ## Videos <details> <summary>vids</summary> toggleable grouping:  now lists the floor as first obj:  in action:  </details> ## features: - search by name - 515 image generator is much faster than alt click menu - opening a gargantuan amount of items shouldnt freeze your screen - groups similar items together in stacks by default, toggleable - shows tile as first item - <kbd>Shift</kbd> and <kbd>Ctrl</kbd> compatible with LMB 🖱️ - RMB points points at items (sry i could not get MMB working) - key <kbd>Esc</kbd> to exit the window. For devs: - A new image generation tech. - An error refetch mechanic to the Image component - It does not "smart track" the items being added to the pile, just reopen or refresh. This was a design decision. ## Why It's Good For The Game Honestly I just dislike the stat panel Fixes #53824 Fixes  ## Changelog 🆑 add: Added a loot window for alt-clicking tiles. del: Removed the item browser from the stat panel. /🆑 --------- Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Co-authored-by: AnturK <AnturK@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
49 lines
1.3 KiB
Plaintext
49 lines
1.3 KiB
Plaintext
/// Helper to open the panel
|
|
/datum/lootpanel/proc/open(turf/tile)
|
|
source_turf = tile
|
|
|
|
#if !defined(OPENDREAM) && !defined(UNIT_TESTS)
|
|
if(!notified)
|
|
var/build = owner.byond_build
|
|
var/version = owner.byond_version
|
|
if(build < 515 || (build == 515 && version < 1635))
|
|
to_chat(owner.mob, examine_block(span_info("\
|
|
<span class='bolddanger'>Your version of Byond doesn't support fast image loading.</span>\n\
|
|
Detected: [version].[build]\n\
|
|
Required version for this feature: <b>515.1635</b> or later.\n\
|
|
Visit <a href=\"https://secure.byond.com/download\">BYOND's website</a> to get the latest version of BYOND.\n\
|
|
")))
|
|
|
|
notified = TRUE
|
|
#endif
|
|
|
|
populate_contents()
|
|
ui_interact(owner.mob)
|
|
|
|
|
|
/**
|
|
* Called by SSlooting whenever this datum is added to its backlog.
|
|
* Iterates over to_image list to create icons, then removes them.
|
|
* Returns boolean - whether this proc has finished the queue or not.
|
|
*/
|
|
/datum/lootpanel/proc/process_images()
|
|
for(var/datum/search_object/index as anything in to_image)
|
|
to_image -= index
|
|
|
|
if(QDELETED(index) || index.icon)
|
|
continue
|
|
|
|
index.generate_icon(owner)
|
|
|
|
if(TICK_CHECK)
|
|
break
|
|
|
|
var/datum/tgui/window = SStgui.get_open_ui(owner.mob, src)
|
|
if(isnull(window))
|
|
reset_contents()
|
|
return TRUE
|
|
|
|
window.send_update()
|
|
|
|
return !length(to_image)
|