/
githubmirror
/
vgstation13
Обзор
Документация
Войти
/
githubmirror
/
vgstation13
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
Bleeding-Edge
code/modules/asset_cache/icon_ref_map.dm
28 строк
807 B
ShiftyRail
Byond 516 v2.0 (#37553)
12 май 2025, 08:50
Не верифицирован
12 май 2025, 08:50
d79c1fe
Код
Авторство
О чём код?
/// Maps icon names to ref values /datum/tg_asset/json/icon_ref_map name = "icon_ref_map" early = TRUE /datum/tg_asset/json/icon_ref_map/generate() var/list/data = list() //"icons/obj/drinks.dmi" => "[0xc000020]" //var/start = "0xc000000" var/value = 0 while(TRUE) value += 1 var/ref = "\[0xc[num2text(value,6,16)]\]" var/mystery_meat = locate(ref) if(isicon(mystery_meat)) if(!isfile(mystery_meat)) // Ignore the runtime icons for now continue var/path = get_icon_dmi_path(mystery_meat) //Try to get the icon path if(path) data[path] = ref else if(mystery_meat) continue; //Some other non-icon resource, ogg/json/whatever else //Out of resources end this, could also try to end this earlier as soon as runtime generated icons appear but eh break; return data