mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
Adds UIs to magma crucibles and smart hoppers (#29941)
* Add UI to magma crucible and smart hopper * Use multitile component in magma_crucible * Move magma crucible in lavaland * Increase smart hopper scanning range * Build /tg/ui (#40) Co-authored-by: /tg/ui Builder <41898282+github-actions[bot]@users.noreply.github.com> * Remove identical variable * Build /tg/ui (#42) Co-authored-by: /tg/ui Builder <41898282+github-actions[bot]@users.noreply.github.com> --------- Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> Co-authored-by: Arthri <41360489+a@users.noreply.github.com> Co-authored-by: paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Co-authored-by: Toastical <20125180+Toastical@users.noreply.github.com> Co-authored-by: Ahzpy <88119260+Ahzpy@users.noreply.github.com> Co-authored-by: Alan <alfalfascout@users.noreply.github.com> Co-authored-by: Charlie Nolan <funnyman3595@gmail.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Co-authored-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> Co-authored-by: kyunkyunkyun <120701975+kyunkyunkyun@users.noreply.github.com> Co-authored-by: Aleksandr Sakrukin <99011379+JustSanyK@users.noreply.github.com>
This commit is contained in:
co-authored by
/tg/ui Builder <41898282+github-actions[bot]@users.noreply.github.com>
/tg/ui Builder <41898282+github-actions[bot]@users.noreply.github.com>
Arthri
paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com>
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Qwertytoforty
Toastical
Ahzpy
Alan
Charlie Nolan
Burzah
warriorstar-orion
CRUNCH
Contrabang
PollardTheDragon
Kyani
kyunkyunkyun
Aleksandr Sakrukin
parent
66879bc883
commit
0634be6107
@@ -328,6 +328,41 @@
|
||||
material_amount += I.materials[MAT]
|
||||
return material_amount
|
||||
|
||||
/datum/component/material_container/proc/get_ui_data(mob/user)
|
||||
. = list()
|
||||
|
||||
var/list/data_materials = list()
|
||||
for(var/key in materials)
|
||||
var/datum/material/material = materials[key]
|
||||
if(!material)
|
||||
continue
|
||||
data_materials += list(list(
|
||||
"id" = key,
|
||||
"amount" = material.amount / MINERAL_MATERIAL_AMOUNT,
|
||||
))
|
||||
.["materials"] = data_materials
|
||||
|
||||
/datum/component/material_container/proc/get_ui_static_data(mob/user, show_points = FALSE, points_multiplier=1)
|
||||
. = list()
|
||||
|
||||
.["icon"] = 'icons/obj/stacks/minerals.dmi'
|
||||
.["showPoints"] = show_points
|
||||
|
||||
var/list/static_materials = list()
|
||||
for(var/key in materials)
|
||||
var/datum/material/material = materials[key]
|
||||
var/list/static_material = list()
|
||||
static_material["name"] = material.name
|
||||
if(show_points && material.ore_type)
|
||||
var/obj/item/stack/ore/ore = material.ore_type
|
||||
static_material["points"] = ore.points * points_multiplier
|
||||
if(material.sheet_type)
|
||||
var/obj/item/stack/sheet/sheet = material.sheet_type
|
||||
static_material["iconState"] = sheet.icon_state
|
||||
static_materials[material.id] = static_material
|
||||
.["staticMaterials"] = static_materials
|
||||
|
||||
|
||||
|
||||
/datum/material
|
||||
var/name
|
||||
|
||||
Reference in New Issue
Block a user