mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-22 03:38:48 +02:00
translations
This commit is contained in:
parent
efebf9c003
commit
82d541f9b4
14
locale/en/locale.cfg
Normal file
14
locale/en/locale.cfg
Normal file
@ -0,0 +1,14 @@
|
||||
[biter_battles]
|
||||
map_info= - - B I T E R B A T T L E S - -\n\n Your objective is to defend your team's rocket silo and defeat the other team.\n Feed the opponent's biters with science packs to increase their strength.\n High tier science juice will yield stronger results.\n\n There is no major direct pvp combat.\n The horizontal border river is landfill proof.\n Construction robots can not build on the other teams's side.\n The random map layout is mirrored to provide a fair competition.\n\n West and East directions contain no biter nests,\n leaving room for factory expansion and outpost building.\n North and South directions are biter territory.\n\n There is no biter evolution from pollution, or destruction.\n ONLY feeding increases their power and will lead to your teams victory.\n\n The gui yields two different main stats for each team's biters.\n\n - EVO -\n The evolution of the biters, which increases when they get fed.\n It can go above 100% which unlocks endgame modifiers,\n granting them increased damage and evasion.\n\n - THREAT -\n Causes biters to attack and reduces when biters are slain.\n Feeding gives permanent "threat-income", as well as creating instant threat.\n A high threat value causes big attacks.\n Values of zero or below will cause no attacks.
|
||||
|
||||
[mountain_fortress]
|
||||
map_info_main_caption=M O U N T A I N F O R T R E S S
|
||||
map_info_sub_caption= ..diggy diggy choo choo..
|
||||
map_info_text=The biters have catched the scent of fish in the cargo wagon.\nGuide the choo into the mountain and protect it as long as possible!\nThis however will not be an easy task,\nsince their strength and numbers increase over time.\n\nIn additon, the southern grounds collapse over time.\nStone bricks, concrete or other solid tiles, might improve the stability of the floor.\n\nDelve deep for greater treasures, but also face increased dangers.\nMining productivity research, will overhaul your mining equipment,\nreinforcing your pickaxe as well as increasing the size of your backpack.\n\nAs you dig, you will encounter impassable dark chasms or rivers.\nSome explosives may cause parts of the ceiling to crumble, filling the void, creating new ways.\nAll they need is a container and a well aimed shot.\n\nYou may find some supply goods, if you enter the wagon.\nGood luck on your journey!
|
||||
|
||||
[wave_defense]
|
||||
gui_1=First wave in
|
||||
gui_2=Wave:
|
||||
gui_3=Threat:
|
||||
tooltip_1=high threat may empower biters
|
||||
tooltip_2=gain / minute
|
@ -4,14 +4,14 @@ local math_random = math.random
|
||||
local ai = {}
|
||||
|
||||
local threat_values = {
|
||||
["small-spitter"] = 2,
|
||||
["small-biter"] = 2,
|
||||
["small-spitter"] = 1.5,
|
||||
["small-biter"] = 1.5,
|
||||
["medium-spitter"] = 4,
|
||||
["medium-biter"] = 4,
|
||||
["big-spitter"] = 8,
|
||||
["big-biter"] = 8,
|
||||
["behemoth-spitter"] = 24,
|
||||
["behemoth-biter"] = 24,
|
||||
["big-spitter"] = 12,
|
||||
["big-biter"] = 12,
|
||||
["behemoth-spitter"] = 32,
|
||||
["behemoth-biter"] = 32,
|
||||
["small-worm-turret"] = 8,
|
||||
["medium-worm-turret"] = 12,
|
||||
["big-worm-turret"] = 16,
|
||||
|
@ -1,37 +1,5 @@
|
||||
local event = require 'utils.event'
|
||||
|
||||
local info = [[
|
||||
- - B I T E R B A T T L E S - -
|
||||
|
||||
Your objective is to defend your team's rocket silo and defeat the other team.
|
||||
Feed the opponent's biters with science packs to increase their strength.
|
||||
High tier science juice will yield stronger results.
|
||||
|
||||
There is no major direct pvp combat.
|
||||
The horizontal border river is landfill proof.
|
||||
Construction robots can not build on the other teams's side.
|
||||
The random map layout is mirrored to provide a fair competition.
|
||||
|
||||
West and East directions contain no biter nests,
|
||||
leaving room for factory expansion and outpost building.
|
||||
North and South directions are biter territory.
|
||||
|
||||
There is no biter evolution from pollution, or destruction.
|
||||
ONLY feeding increases their power and will lead to your teams victory.
|
||||
The gui yields two different main stats for each team's biters.
|
||||
|
||||
- EVO -
|
||||
The evolution of the biters, which increases when they get fed.
|
||||
It can go above 100% which unlocks endgame modifiers,
|
||||
granting them increased damage and evasion.
|
||||
|
||||
- THREAT -
|
||||
Causes biters to attack and reduces when biters are slain.
|
||||
Feeding gives permanent "threat-income", as well as creating instant threat.
|
||||
A high threat value causes big attacks.
|
||||
Values of zero or below will cause no attacks.
|
||||
]]
|
||||
|
||||
local function create_map_intro_button(player)
|
||||
if player.gui.top["map_intro_button"] then return end
|
||||
local b = player.gui.top.add({type = "sprite-button", caption = "?", name = "map_intro_button", tooltip = "Map Info"})
|
||||
@ -49,7 +17,7 @@ local function create_map_intro(player)
|
||||
if player.gui.center["map_intro_frame"] then player.gui.center["map_intro_frame"].destroy() end
|
||||
local frame = player.gui.center.add {type = "frame", name = "map_intro_frame", direction = "vertical"}
|
||||
local frame = frame.add {type = "frame"}
|
||||
local l = frame.add {type = "label", caption = info, name = "map_intro_text"}
|
||||
local l = frame.add {type = "label", caption = {"biter_battles.map_info"}, name = "biter_battles_map_intro"}
|
||||
l.style.single_line = false
|
||||
l.style.font = "heading-2"
|
||||
l.style.font_color = {r=0.7, g=0.6, b=0.99}
|
||||
@ -69,7 +37,7 @@ local function on_gui_click(event)
|
||||
if not event.element.valid then return end
|
||||
local player = game.players[event.element.player_index]
|
||||
if event.element.name == "close_map_intro_frame" then player.gui.center["map_intro_frame"].destroy() return end
|
||||
if event.element.name == "map_intro_text" then player.gui.center["map_intro_frame"].destroy() return end
|
||||
if event.element.name == "biter_battles_map_intro" then player.gui.center["map_intro_frame"].destroy() return end
|
||||
if event.element.name == "map_intro_button" then
|
||||
if player.gui.center["map_intro_frame"] then
|
||||
player.gui.center["map_intro_frame"].destroy()
|
||||
|
@ -357,29 +357,7 @@ end
|
||||
|
||||
local function on_init()
|
||||
local T = Map.Pop_info()
|
||||
T.main_caption = "M O U N T A I N F O R T R E S S"
|
||||
T.sub_caption = " ..diggy diggy choo choo.."
|
||||
T.text = table.concat({
|
||||
"The biters have catched the scent of fish in the cargo wagon.\n",
|
||||
"Guide the choo into the mountain and protect it as long as possible!\n",
|
||||
"This however will not be an easy task,\n",
|
||||
"since their strength and numbers increase over time.\n",
|
||||
"\n",
|
||||
"In additon, the southern grounds collapse over time.\n",
|
||||
"Stone bricks, concrete or other solid tiles, might improve the stability of the floor.\n",
|
||||
"\n",
|
||||
"Delve deep for greater treasures, but also face increased dangers.\n",
|
||||
"Mining productivity research, will overhaul your mining equipment,\n",
|
||||
"reinforcing your pickaxe as well as increasing the size of your backpack.\n",
|
||||
"\n",
|
||||
"As you dig, you will encounter impassable dark chasms or rivers.\n",
|
||||
"Some explosives may cause parts of the ceiling to crumble, filling the void, creating new ways.\n",
|
||||
"All they need is a container and a well aimed shot.\n",
|
||||
"\n",
|
||||
"You may find some supply goods, if you enter the wagon.",
|
||||
"\n",
|
||||
"Good luck on your journey!",
|
||||
})
|
||||
T.localised_category = "mountain_fortress"
|
||||
T.main_caption_color = {r = 150, g = 150, b = 0}
|
||||
T.sub_caption_color = {r = 0, g = 150, b = 0}
|
||||
global.rocks_yield_ore_maximum_amount = 999
|
||||
|
@ -2,6 +2,7 @@ local Global = require 'utils.global'
|
||||
local Tabs = require 'comfy_panel.main'
|
||||
|
||||
local map_info = {
|
||||
localised_category = false,
|
||||
main_caption = "Insert Main Caption",
|
||||
main_caption_color = {r=0.6, g=0.3, b=0.99},
|
||||
sub_caption = "Insert Sub Caption",
|
||||
@ -35,14 +36,25 @@ local create_map_intro = (function (player, frame)
|
||||
line.style.top_margin = 4
|
||||
line.style.bottom_margin = 4
|
||||
|
||||
local l = t.add {type = "label", caption = map_info.main_caption}
|
||||
local caption
|
||||
if map_info.localised_category then
|
||||
caption = {map_info.localised_category .. ".map_info_main_caption"}
|
||||
else
|
||||
caption = map_info.main_caption
|
||||
end
|
||||
local l = t.add {type = "label", caption = caption}
|
||||
l.style.font = "heading-1"
|
||||
l.style.font_color = map_info.main_caption_color
|
||||
l.style.minimal_width = 780
|
||||
l.style.horizontal_align = "center"
|
||||
l.style.vertical_align = "center"
|
||||
|
||||
local l_2 = t.add {type = "label", caption = map_info.sub_caption}
|
||||
if map_info.localised_category then
|
||||
caption = {map_info.localised_category .. ".map_info_sub_caption"}
|
||||
else
|
||||
caption = map_info.sub_caption
|
||||
end
|
||||
local l_2 = t.add {type = "label", caption = caption}
|
||||
l_2.style.font = "heading-2"
|
||||
l_2.style.font_color = map_info.sub_caption_color
|
||||
l_2.style.minimal_width = 780
|
||||
@ -57,7 +69,12 @@ local create_map_intro = (function (player, frame)
|
||||
scroll_pane.style.maximal_height = 320
|
||||
scroll_pane.style.minimal_height = 320
|
||||
|
||||
local l_3 = scroll_pane.add {type = "label", caption = map_info.text}
|
||||
if map_info.localised_category then
|
||||
caption = {map_info.localised_category .. ".map_info_text"}
|
||||
else
|
||||
caption = map_info.text
|
||||
end
|
||||
local l_3 = scroll_pane.add {type = "label", caption = caption}
|
||||
l_3.style.font = "heading-2"
|
||||
l_3.style.single_line = false
|
||||
l_3.style.font_color = {r=0.85, g=0.85, b=0.88}
|
||||
|
@ -7,9 +7,12 @@ local function create_gui(player)
|
||||
local label = frame.add({ type = "label", caption = " ", name = "label"})
|
||||
label.style.font_color = {r=0.88, g=0.88, b=0.88}
|
||||
label.style.font = "default-bold"
|
||||
label.style.left_padding = 4
|
||||
label.style.font_color = {r=0.33, g=0.66, b=0.9}
|
||||
|
||||
local label = frame.add({ type = "label", caption = " ", name = "wave_number"})
|
||||
label.style.font_color = {r=0.88, g=0.88, b=0.88}
|
||||
label.style.font = "default-bold"
|
||||
label.style.right_padding = 4
|
||||
label.style.minimal_width = 68
|
||||
label.style.font_color = {r=0.33, g=0.66, b=0.9}
|
||||
|
||||
local progressbar = frame.add({ type = "progressbar", name = "progressbar", value = 0})
|
||||
@ -21,14 +24,18 @@ local function create_gui(player)
|
||||
line.style.left_padding = 4
|
||||
line.style.right_padding = 4
|
||||
|
||||
local label = frame.add({ type = "label", caption = " ", name = "threat", tooltip = "high threat may empower biters"})
|
||||
local label = frame.add({ type = "label", caption = " ", name = "threat", tooltip = {"wave_defense.tooltip_1"}})
|
||||
label.style.font = "default-bold"
|
||||
label.style.left_padding = 4
|
||||
label.style.font_color = {r = 150, g = 0, b = 255}
|
||||
|
||||
local label = frame.add({ type = "label", caption = " ", name = "threat_value", tooltip = {"wave_defense.tooltip_1"}})
|
||||
label.style.font = "default-bold"
|
||||
label.style.right_padding = 1
|
||||
label.style.minimal_width = 10
|
||||
label.style.font_color = {r = 150, g = 0, b = 255}
|
||||
|
||||
local label = frame.add({ type = "label", caption = " ", name = "threat_gains", tooltip = "gain / minute"})
|
||||
local label = frame.add({ type = "label", caption = " ", name = "threat_gains", tooltip = {"wave_defense.tooltip_2"}})
|
||||
label.style.font = "default"
|
||||
label.style.left_padding = 1
|
||||
label.style.right_padding = 1
|
||||
@ -46,15 +53,22 @@ end
|
||||
local function update_gui(player)
|
||||
local wave_defense_table = WD.get_table()
|
||||
if not player.gui.top.wave_defense then create_gui(player) end
|
||||
player.gui.top.wave_defense.label.caption = "Wave: " .. wave_defense_table.wave_number
|
||||
if wave_defense_table.wave_number == 0 then player.gui.top.wave_defense.label.caption = "First wave in " .. math.floor((wave_defense_table.next_wave - game.tick) / 60) + 1 end
|
||||
local interval = wave_defense_table.next_wave - wave_defense_table.last_wave
|
||||
player.gui.top.wave_defense.progressbar.value = 1 - (wave_defense_table.next_wave - game.tick) / interval
|
||||
local gui = player.gui.top.wave_defense
|
||||
|
||||
player.gui.top.wave_defense.threat.caption = "Threat: " .. math.floor(wave_defense_table.threat)
|
||||
gui.label.caption = {"wave_defense.gui_2"}
|
||||
gui.wave_number.caption = wave_defense_table.wave_number
|
||||
if wave_defense_table.wave_number == 0 then
|
||||
gui.label.caption = {"wave_defense.gui_1"}
|
||||
gui.wave_number.caption = math.floor((wave_defense_table.next_wave - game.tick) / 60) + 1
|
||||
end
|
||||
local interval = wave_defense_table.next_wave - wave_defense_table.last_wave
|
||||
gui.progressbar.value = 1 - (wave_defense_table.next_wave - game.tick) / interval
|
||||
|
||||
gui.threat.caption = {"wave_defense.gui_3"}
|
||||
gui.threat_value.caption = math.floor(wave_defense_table.threat)
|
||||
|
||||
if wave_defense_table.wave_number == 0 then
|
||||
player.gui.top.wave_defense.threat_gains.caption = ""
|
||||
gui.threat_gains.caption = ""
|
||||
return
|
||||
end
|
||||
|
||||
@ -62,15 +76,15 @@ local function update_gui(player)
|
||||
local d = wave_defense_table.wave_number / 75
|
||||
|
||||
if gain >= 0 then
|
||||
player.gui.top.wave_defense.threat_gains.caption = " (+" .. gain .. ")"
|
||||
gui.threat_gains.caption = " (+" .. gain .. ")"
|
||||
local g = 255 - math.floor(gain / d)
|
||||
if g < 0 then g = 0 end
|
||||
player.gui.top.wave_defense.threat_gains.style.font_color = {255, g, 0}
|
||||
gui.threat_gains.style.font_color = {255, g, 0}
|
||||
else
|
||||
player.gui.top.wave_defense.threat_gains.caption = " (" .. gain .. ")"
|
||||
gui.threat_gains.caption = " (" .. gain .. ")"
|
||||
local r = 255 - math.floor(math.abs(gain) / d)
|
||||
if r < 0 then r = 0 end
|
||||
player.gui.top.wave_defense.threat_gains.style.font_color = {r, 255, 0}
|
||||
gui.threat_gains.style.font_color = {r, 255, 0}
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user