mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-16 18:45:22 +01:00
Prettifies RND techweb, adds some more info to designs (#96334)
## About The Pull Request Replaces normal ``<Button>``s with ``<ImageButton>``s and adds information on where a design can be printed and how much it costs to print to the RND techweb menu <img width="640" height="735" alt="image" src="https://github.com/user-attachments/assets/823d0f9b-2662-4a7e-89ee-328389b69d4e" /> (Ignore it being called autolathe and not protolathe, I fixed the label for ancient lathes already) ## Why It's Good For The Game Looks better, provides more info to new players who don't know what designs can be printed where yet. ## Changelog 🆑 qol: RND Techweb now displays where a design can be printed and how much it'd cost to print /🆑
This commit is contained in:
@@ -39,7 +39,8 @@
|
||||
|
||||
/datum/computer_file/program/science/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/spritesheet_batched/research_designs)
|
||||
get_asset_datum(/datum/asset/spritesheet_batched/sheetmaterials),
|
||||
get_asset_datum(/datum/asset/spritesheet_batched/research_designs),
|
||||
)
|
||||
|
||||
// heavy data from this proc should be moved to static data when possible
|
||||
@@ -168,8 +169,17 @@
|
||||
var/datum/design/design = SSresearch.techweb_designs[design_id] || SSresearch.error_design
|
||||
var/compressed_id = "[compress_id(design.id)]"
|
||||
var/size = spritesheet.icon_size_id(design.id)
|
||||
|
||||
var/cost = list()
|
||||
var/list/materials = design.materials
|
||||
for(var/datum/material/mat in materials)
|
||||
cost[mat.name] = OPTIMAL_COST(materials[mat])
|
||||
|
||||
design_cache[compressed_id] = list(
|
||||
design.name,
|
||||
cost,
|
||||
design.build_type,
|
||||
design.departmental_flags,
|
||||
"[size == size32x32 ? "" : "[size] "][design.id]"
|
||||
)
|
||||
|
||||
@@ -178,10 +188,23 @@
|
||||
for (var/id in id_cache)
|
||||
flat_id_cache += id
|
||||
|
||||
var/list/department_flags = list()
|
||||
for (var/datum/job_department/department as anything in subtypesof(/datum/job_department))
|
||||
if (department::department_bitflags)
|
||||
department_flags["[department::department_bitflags]"] = department::department_name
|
||||
|
||||
// Don't pass away flags as those are irrelevant to the station
|
||||
var/list/build_types = GLOB.build_types_to_string.Copy()
|
||||
build_types -= "[AWAY_IMPRINTER]"
|
||||
build_types -= "[AWAY_LATHE]"
|
||||
|
||||
.["static_data"] = list(
|
||||
"node_cache" = node_cache,
|
||||
"design_cache" = design_cache,
|
||||
"id_cache" = flat_id_cache
|
||||
"id_cache" = flat_id_cache,
|
||||
"SHEET_MATERIAL_AMOUNT" = SHEET_MATERIAL_AMOUNT,
|
||||
"build_types" = build_types,
|
||||
"department_flags" = department_flags,
|
||||
)
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user