[MIRROR] Fix Alt Clicking opening up a window and Add back some object verbs to the browser stat panel (#630)

* Fix Alt Clicking opening up a window and add back some object verbs to the browser stat panel (#53369)

Fixes some more issues with browser stat panel

- Alt clicking items in the listed turf tab doesn't open up a popup
- Toggle suit sensors button missing

* Fix Alt Clicking opening up a window and Add back some object verbs to the browser stat panel

Co-authored-by: Couls <coul422@gmail.com>
This commit is contained in:
SkyratBot
2020-09-04 00:11:50 +01:00
committed by GitHub
co-authored by Couls
parent 6fe43c533f
commit df7b65aca2
4 changed files with 104 additions and 26 deletions
+2 -8
View File
@@ -94,10 +94,7 @@ SUBSYSTEM_DEF(statpanels)
if(!target_image.loc || target_image.loc.loc != target_mob.listed_turf || !target_image.override)
continue
overrides += target_image.loc
if(!(REF(target_mob.listed_turf) in cached_images))
target << browse_rsc(getFlatIcon(target_mob.listed_turf, no_anim = TRUE), "[REF(target_mob.listed_turf)].png")
cached_images += REF(target_mob.listed_turf)
turfitems[++turfitems.len] = list("[target_mob.listed_turf]", REF(target_mob.listed_turf), "[REF(target_mob.listed_turf)].png")
turfitems[++turfitems.len] = list("[target_mob.listed_turf]", REF(target_mob.listed_turf), costly_icon2html(target_mob.listed_turf, target, sourceonly=TRUE))
for(var/tc in target_mob.listed_turf)
var/atom/movable/turf_content = tc
if(turf_content.mouse_opacity == MOUSE_OPACITY_TRANSPARENT)
@@ -109,10 +106,7 @@ SUBSYSTEM_DEF(statpanels)
if(turf_content.IsObscured())
continue
if(length(turfitems) < 30) // only create images for the first 30 items on the turf, for performance reasons
if(!(REF(turf_content) in cached_images))
target << browse_rsc(getFlatIcon(turf_content, no_anim = TRUE), "[REF(turf_content)].png")
cached_images += REF(turf_content)
turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content), "[REF(turf_content)].png")
turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content), costly_icon2html(turf_content, target, sourceonly=TRUE))
else
turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content))
turfitems = url_encode(json_encode(turfitems))