mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 19:45:22 +09:00
Added text colour to confix
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
-- config file for the science info gui
|
||||
return { -- list of all science packs to be shown in the gui
|
||||
show_eta=true, -- when true the eta for research completion will be shown
|
||||
required_for_green=5, -- the amount required for the text to show as green
|
||||
required_for_red=-5, -- the amount required for the text to show as red
|
||||
'automation-science-pack',
|
||||
'logistic-science-pack',
|
||||
'military-science-pack',
|
||||
|
||||
@@ -37,9 +37,9 @@ end
|
||||
|
||||
--- Gets the font colour for a certain level of production
|
||||
local function get_font_colour(value,secondary)
|
||||
if value > 5 then
|
||||
if value > config.required_for_green then
|
||||
return Colors.light_green
|
||||
elseif value < -5 then
|
||||
elseif value < config.required_for_red then
|
||||
return Colors.indian_red
|
||||
elseif secondary and secondary > 0 or not secondary and value ~= 0 then
|
||||
return Colors.orange
|
||||
@@ -228,9 +228,9 @@ local function generate_science_pack(player,element,science_pack)
|
||||
element.parent.non_made.visible = false
|
||||
|
||||
local icon_style = 'quick_bar_slot_button'
|
||||
if stats.minute_net > 1 then
|
||||
if stats.minute_net > config.required_for_green then
|
||||
icon_style = 'green_slot_button'
|
||||
elseif stats.minute_net < -1 then
|
||||
elseif stats.minute_net < config.required_for_red then
|
||||
icon_style = 'red_slot_button'
|
||||
elseif stats.minute_made > 0 then
|
||||
icon_style = 'selected_slot_button'
|
||||
|
||||
Reference in New Issue
Block a user