mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-13 16:13:49 +01:00
move the internal preview to canvas (#18930)
* move the internal preview to canvas * use a helper * basic readme prep * . * . * transform better * byond can't handle icon states of large files... * move fully to the rust version * fix typing * just wtf. NO * fix the legacy path * keep it all centralized * tiny oversight * unit test rewrite * rename * fix bad layering * fixes a bunch of layering issues * artifact * move crash to log_runtime * missing overlay warning * why not
This commit is contained in:
@@ -440,7 +440,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
|
||||
/datum/asset/spritesheet/proc/queuedInsert(sprite_name, icon/I, icon_state="", dir=SOUTH, frame=1, moving=FALSE)
|
||||
I = icon(I, icon_state=icon_state, dir=dir, frame=frame, moving=moving)
|
||||
if(!I || !length(cached_icon_states(I))) // that direction or state doesn't exist
|
||||
if(!I || !length(icon_states_fast(I))) // that direction or state doesn't exist
|
||||
return
|
||||
var/size_id = "[I.Width()]x[I.Height()]"
|
||||
var/size = sizes[size_id]
|
||||
@@ -476,7 +476,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
if(!directions)
|
||||
directions = list(SOUTH)
|
||||
|
||||
for(var/icon_state_name in cached_icon_states(I))
|
||||
for(var/icon_state_name in icon_states_fast(I))
|
||||
for(var/direction in directions)
|
||||
var/prefix2 = (directions.len > 1) ? "[dir2text(direction)]-" : ""
|
||||
Insert("[prefix][prefix2][icon_state_name]", I, icon_state=icon_state_name, dir=direction)
|
||||
@@ -558,7 +558,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
var/generic_icon_names = FALSE //generate icon filenames using generate_asset_name() instead the above format
|
||||
|
||||
/datum/asset/simple/icon_states/register(_icon = icon)
|
||||
for(var/icon_state_name in icon_states(_icon))
|
||||
for(var/icon_state_name in icon_states_fast(_icon))
|
||||
for(var/direction in directions)
|
||||
var/asset = icon(_icon, icon_state_name, direction, frame, movement_states)
|
||||
if(!asset)
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/datum/overlay_previews
|
||||
var/old_precolored = 'icons/mob/vore_fullscreens/ui_lists/screen_full_vore.dmi'
|
||||
var/base = 'icons/mob/vore_fullscreens/ui_lists/screen_full_vore_list_base.dmi'
|
||||
var/layer1 = 'icons/mob/vore_fullscreens/ui_lists/screen_full_vore_list_layer1.dmi'
|
||||
var/layer2 = 'icons/mob/vore_fullscreens/ui_lists/screen_full_vore_list_layer2.dmi'
|
||||
var/layer3 = 'icons/mob/vore_fullscreens/ui_lists/screen_full_vore_list_layer3.dmi'
|
||||
|
||||
/datum/belly_overlays
|
||||
var/belly_icon
|
||||
/*
|
||||
@@ -273,13 +280,3 @@
|
||||
|
||||
/datum/belly_overlays/synth_flesh_mono_hole
|
||||
belly_icon = 'icons/mob/vore_fullscreens/synth_flesh_mono_hole.dmi'
|
||||
|
||||
/datum/belly_overlays/yet_another_tumby
|
||||
belly_icon = 'icons/mob/vore_fullscreens/yet_another_tumby.dmi'
|
||||
|
||||
//Compatibility assets due to renames...
|
||||
/datum/belly_overlays/anim_belly
|
||||
belly_icon = 'icons/mob/vore_fullscreens/VBOanim_belly1.dmi'
|
||||
|
||||
/datum/belly_overlays/a_anim_belly
|
||||
belly_icon = 'icons/mob/vore_fullscreens/VBOanim_belly1.dmi'
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
var/obj/machinery/computer/C = item
|
||||
var/screen = initial(C.icon_screen)
|
||||
var/keyboard = initial(C.icon_keyboard)
|
||||
var/all_states = cached_icon_states(icon_file)
|
||||
var/all_states = icon_states_fast(icon_file)
|
||||
if (screen && (screen in all_states))
|
||||
transform.blend_icon(uni_icon(icon_file, screen), ICON_OVERLAY)
|
||||
if (keyboard && (keyboard in all_states))
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
var/datum/universal_icon/I
|
||||
|
||||
var/icon_states_list = cached_icon_states(icon_file)
|
||||
var/icon_states_list = icon_states_fast(icon_file)
|
||||
if(icon_state in icon_states_list)
|
||||
I = uni_icon(icon_file, icon_state, SOUTH)
|
||||
var/c = initial(item.color)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
/datum/asset/spritesheet/vore
|
||||
name = "vore"
|
||||
|
||||
/datum/asset/spritesheet/vore/create_spritesheets()
|
||||
var/icon/downscaled = icon('icons/mob/screen_full_vore_list.dmi') // preserving save data
|
||||
downscaled.Scale(240, 240)
|
||||
InsertAll("", downscaled)
|
||||
|
||||
/datum/asset/spritesheet/vore_fixed //This should be getting loaded in the TGUI vore panel but the game refuses to do so, for some reason. It only loads the vore spritesheet.
|
||||
name = "fixedvore"
|
||||
|
||||
/datum/asset/spritesheet/vore_fixed/create_spritesheets() // preserving save data
|
||||
var/icon/downscaledVF = icon('icons/mob/screen_full_vore.dmi')
|
||||
downscaledVF.Scale(240, 240)
|
||||
InsertAll("", downscaledVF)
|
||||
@@ -158,7 +158,7 @@
|
||||
if (!directions)
|
||||
directions = list(SOUTH)
|
||||
|
||||
for (var/icon_state_name in icon_states(I))
|
||||
for (var/icon_state_name in icon_states_fast(I))
|
||||
for (var/direction in directions)
|
||||
var/prefix2 = (directions.len > 1 && prefix_with_dirs) ? "[dir2text(direction)]-" : ""
|
||||
insert_icon("[prefix][prefix2][icon_state_name]", uni_icon(I, icon_state_name, direction))
|
||||
|
||||
@@ -487,7 +487,7 @@
|
||||
var/dir_count = state_data["dirs"]
|
||||
if(dir_count == 1)
|
||||
base_icon_dir = SOUTH
|
||||
else if(!length(icon_states(icon(curicon, curstate, NORTH))))
|
||||
else if(!length(icon_states_fast(icon(curicon, curstate, NORTH))))
|
||||
base_icon_dir = SOUTH
|
||||
|
||||
var/list/icon_dimensions = get_icon_dimensions(curicon)
|
||||
|
||||
Reference in New Issue
Block a user