mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-14 08:14:52 +09:00
.
This commit is contained in:
1 parent
8e9110f3dc
commit
72531c9b7a
4 files changed
+18
-17
No files matched your search
@@ -41,7 +41,7 @@ end
|
||||
--- Statistics shown as progress bars, in display order
|
||||
--- @type { name: string, caption: LocalisedString, tooltip: LocalisedString }[]
|
||||
local stats = {}
|
||||
for _, name in ipairs{ "production", "capacity", "sustained", "limit", "surface-area" } do
|
||||
for _, name in ipairs{ "production", "capacity", "sustained", "surface-area" } do
|
||||
stats[#stats + 1] = {
|
||||
name = name,
|
||||
caption = { "exp-gui_vlayer.caption-stat-" .. name },
|
||||
@@ -159,30 +159,37 @@ function Elements.stats_table.calculate_display_data(s_index)
|
||||
local sustained = ceil(statistics.energy_sustained) / max(statistics.energy_total_production, 1)
|
||||
local production = en_prod / max(ceil(statistics.energy_max), 1)
|
||||
local capacity = statistics.energy_storage / max(statistics.energy_capacity, 1)
|
||||
local limit_n = min(statistics.energy_input_limit, en_prod)
|
||||
local limit = limit_n / max(en_prod, 1)
|
||||
local limit = min(statistics.energy_input_limit, en_prod)
|
||||
local surface_area = statistics.remaining_surface_area / max(statistics.total_surface_area, 1)
|
||||
return {
|
||||
production = {
|
||||
value = production,
|
||||
caption = format_energy(statistics.energy_production, "W") .. " / " .. format_energy(statistics.energy_max, "W"),
|
||||
caption = format_string(
|
||||
"%.1f ~ %.1f / %.1f",
|
||||
format_energy(limit, "W"),
|
||||
format_energy(statistics.energy_production, "W"),
|
||||
format_energy(statistics.energy_max, "W")
|
||||
),
|
||||
tooltip = format_string("%.1f %%", production * 100),
|
||||
},
|
||||
capacity = {
|
||||
value = capacity,
|
||||
caption = format_energy(statistics.energy_storage, "J") .. " / " .. format_energy(statistics.energy_capacity, "J"),
|
||||
caption = format_string(
|
||||
"%.1f / %.1f",
|
||||
format_energy(statistics.energy_storage, "J"),
|
||||
format_energy(statistics.energy_capacity, "J")
|
||||
),
|
||||
tooltip = format_string("%.1f %%", capacity * 100),
|
||||
},
|
||||
sustained = {
|
||||
value = sustained,
|
||||
caption = format_energy(statistics.energy_sustained, "W") .. " / " .. format_energy(statistics.energy_total_production, "W"),
|
||||
caption = format_string(
|
||||
"%.1f / %.1f",
|
||||
format_energy(statistics.energy_sustained, "W"),
|
||||
format_energy(statistics.energy_total_production, "W")
|
||||
),
|
||||
tooltip = format_string("%.1f %%", sustained * 100),
|
||||
},
|
||||
limit = {
|
||||
value = limit,
|
||||
caption = format_energy(limit_n, "W") .. " / " .. format_energy(statistics.energy_production, "W"),
|
||||
tooltip = format_string("%.1f %%", limit * 100),
|
||||
},
|
||||
["surface-area"] = {
|
||||
value = min(max(surface_area / 0.1, 0), 1),
|
||||
caption = format_number(statistics.remaining_surface_area, false),
|
||||
|
||||
@@ -476,8 +476,6 @@ caption-stat-capacity=[virtual-signal=signal-E] Battery Charge
|
||||
tooltip-stat-capacity=Stored energy out of the accumulator capacity
|
||||
caption-stat-sustained=[virtual-signal=signal-S] Sustained Production
|
||||
tooltip-stat-sustained=Power production averaged over a day, out of what every stored solar panel could give
|
||||
caption-stat-limit=[virtual-signal=signal-I] Input limit
|
||||
tooltip-stat-limit=Energy limit the system can absorb
|
||||
caption-stat-surface-area=[virtual-signal=signal-R] Remaining Surface
|
||||
tooltip-stat-surface-area=Remaining surface area, insert landfill to increase it
|
||||
type-energy=Energy
|
||||
|
||||
@@ -495,8 +495,6 @@ caption-stat-capacity=[virtual-signal=signal-E] 電池電量
|
||||
tooltip-stat-capacity=現時電池電量 / 電池最大容量
|
||||
caption-stat-sustained=[virtual-signal=signal-S] 持續產能
|
||||
tooltip-stat-sustained=持續電力產能
|
||||
caption-stat-limit=[virtual-signal=signal-I] 輸入限制
|
||||
tooltip-stat-limit=系統可吸收的能量限制
|
||||
caption-stat-surface-area=[virtual-signal=signal-R] 餘下土地
|
||||
tooltip-stat-surface-area=餘下土地。 放入堆填來增加
|
||||
type-energy=電力
|
||||
|
||||
@@ -495,8 +495,6 @@ caption-stat-capacity=[virtual-signal=signal-E] 電池電量
|
||||
tooltip-stat-capacity=現時電池電量 / 電池最大容量
|
||||
caption-stat-sustained=[virtual-signal=signal-S] 持續產能
|
||||
tooltip-stat-sustained=持續電力產能
|
||||
caption-stat-limit=[virtual-signal=signal-I] 輸入限制
|
||||
tooltip-stat-limit=系統可吸收的能量限制
|
||||
caption-stat-surface-area=[virtual-signal=signal-R] 餘下土地
|
||||
tooltip-stat-surface-area=餘下土地。 放入堆填來增加
|
||||
type-energy=電力
|
||||
|
||||
Reference in new issue
Block a user