mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-22 15:33:12 +09:00
.
This commit is contained in:
1 parent
2e46b6339a
commit
4018633f92
1 file changed
+10
-6
@@ -168,8 +168,12 @@ function Elements.stats_table.calculate_display_data(s_index)
|
|||||||
local sustained = limit_sustained / max(statistics.energy_total_production, 1)
|
local sustained = limit_sustained / max(statistics.energy_total_production, 1)
|
||||||
local capacity = statistics.energy_storage / max(statistics.energy_capacity, 1)
|
local capacity = statistics.energy_storage / max(statistics.energy_capacity, 1)
|
||||||
local surface_area = statistics.remaining_surface_area / max(statistics.total_surface_area, 1)
|
local surface_area = statistics.remaining_surface_area / max(statistics.total_surface_area, 1)
|
||||||
local solar = allocated["solar-panel"] / max(items["solar-panel"], 1)
|
local allocated_solar = allocated["solar-panel"] and allocated["solar-panel"][0] or 0
|
||||||
local accu = allocated["accumulator"] / max(items["accumulator"], 1)
|
local items_solar = items["solar-panel"] and items["solar-panel"][0] or 0
|
||||||
|
local allocated_accu = allocated["accumulator"] and allocated["accumulator"][0] or 0
|
||||||
|
local items_accu = items["accumulator"] and items["accumulator"][0] or 0
|
||||||
|
local solar = allocated_solar / max(items_solar, 1)
|
||||||
|
local accu = allocated_accu / max(items_accu, 1)
|
||||||
return {
|
return {
|
||||||
production = {
|
production = {
|
||||||
value = production,
|
value = production,
|
||||||
@@ -236,8 +240,8 @@ function Elements.stats_table.calculate_display_data(s_index)
|
|||||||
value = solar,
|
value = solar,
|
||||||
caption = format_string(
|
caption = format_string(
|
||||||
"%s / %s",
|
"%s / %s",
|
||||||
format_number(allocated["solar-panel"], false),
|
format_number(allocated_solar, false),
|
||||||
format_number(items["solar-panel"], false)
|
format_number(items_solar, false)
|
||||||
),
|
),
|
||||||
tooltip = format_string(
|
tooltip = format_string(
|
||||||
"%.1f %%",
|
"%.1f %%",
|
||||||
@@ -248,8 +252,8 @@ function Elements.stats_table.calculate_display_data(s_index)
|
|||||||
value = accu,
|
value = accu,
|
||||||
caption = format_string(
|
caption = format_string(
|
||||||
"%s / %s",
|
"%s / %s",
|
||||||
format_number(allocated["accumulator"], false),
|
format_number(allocated_accu, false),
|
||||||
format_number(items["accumulator"], false)
|
format_number(items_accu, false)
|
||||||
),
|
),
|
||||||
tooltip = format_string(
|
tooltip = format_string(
|
||||||
"%.1f %%",
|
"%.1f %%",
|
||||||
|
|||||||
Reference in new issue
Block a user