Files
Bubberstation/code/modules/lootpanel/ss_looting.dm
SkyratBot 5fe7c1068a [MIRROR] [no gbp] Loot panel subsystem initializes now (#27345)
[no gbp] Loot panel subsystem initializes now (#82680)

## About The Pull Request
Confusing error message at loading screen


![image](https://github.com/tgstation/tgstation/assets/42397676/850e5f97-f319-4f4d-b49a-ff90bb527aa8)
## Why It's Good For The Game
Less confusing
## Changelog
🆑
fix: CentCom dispatched a team of interns to fix the loot panel's
loading message. It should now load properly. It did before too, but now
the message is fixed.
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-29 22:53:17 +02:00

41 lines
912 B
Plaintext

/// Queues image generation for search objects without icons
SUBSYSTEM_DEF(looting)
name = "Loot Icon Generation"
flags = SS_NO_INIT
priority = FIRE_PRIORITY_PROCESS
runlevels = RUNLEVEL_LOBBY|RUNLEVELS_DEFAULT
wait = 0.5 SECONDS
/// Backlog of items. Gets put into processing
var/list/datum/lootpanel/backlog = list()
/// Actively processing items
var/list/datum/lootpanel/processing = list()
/datum/controller/subsystem/looting/stat_entry(msg)
msg = "P:[length(backlog)]"
return ..()
/datum/controller/subsystem/looting/fire(resumed)
if(!length(backlog))
return
if(!resumed)
processing = backlog
backlog = list()
while(length(processing))
var/datum/lootpanel/panel = processing[length(processing)]
if(QDELETED(panel) || !length(panel.to_image))
processing.len--
continue
if(!panel.process_images())
backlog += panel
if(MC_TICK_CHECK)
return
processing.len--