1
0
mirror of https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git synced 2025-01-22 03:08:49 +02:00

add more locale gui (#245)

* add mod setting string locale

* add more locale gui

* add more locale
This commit is contained in:
plex 2024-11-06 23:53:52 +08:00 committed by GitHub
parent 0ff6c324a2
commit 9583ede059
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 73 additions and 22 deletions

View File

@ -81,12 +81,13 @@ OCFG_KEYS =
["resource_placement.linear_spacing"] = {mod_key = "oarc-mod-resource-placement-linear-spacing" , ocfg_keys = {"resource_placement", "linear_spacing"}, type = "integer"},
-- These are settings that aren't included in the games mod settings but are still nice to have easy access to.
["non_mod_settings_HEADER"] = {mod_key = "" , ocfg_keys = {""}, type = "header", text = "Additional Settings (Not available in the mod settings menu.)"},
["coin_generation_SUBHEADER"] = {mod_key = "" , ocfg_keys = {""}, type = "subheader", text = "Coin Generation"},
["coin_generation.enabled"] = {mod_key = "" , ocfg_keys = {"coin_generation", "enabled"}, type = "boolean", caption = "Coin Generation", tooltip = "Enemies drop coins when killed."},
["coin_generation.auto_decon_coins"] = {mod_key = "" , ocfg_keys = {"coin_generation", "auto_decon_coins"}, type = "boolean", caption = "Auto Decon Coins", tooltip = "Automatically marks coins dropped by enemies for deconstruction so robots will pick them up."},
["gameplay.enable_player_self_reset"] = {mod_key = "" , ocfg_keys = {"gameplay", "enable_player_self_reset"}, type = "boolean", caption = "Player Self Reset", tooltip = "Allow players to reset themselves in the spawn controls."},
["gameplay.scale_spawner_damage"] = {mod_key = "" , ocfg_keys = {"gameplay", "scale_spawner_damage"}, type = "boolean", caption = "Scale Spawner Damage", tooltip = "Scales damage done to spawners with evolution factor and distance to cloest spawn point. This helps compensate for spawner health scaling at a high evolution factor."}
["non_mod_settings_HEADER"] = {mod_key = "" , ocfg_keys = {""}, type = "header", text = {"oarc-non-mod-settings-header"}},
["coin_generation_SUBHEADER"] = {mod_key = "" , ocfg_keys = {""}, type = "subheader", text = {"oarc-coin-generation-subheader"}},
["coin_generation.enabled"] = {mod_key = "" , ocfg_keys = {"coin_generation", "enabled"}, type = "boolean", caption = {"oarc-coin-generation-caption"}, tooltip = {"oarc-coin-generation-tooltip"}},
["coin_generation.auto_decon_coins"] = {mod_key = "" , ocfg_keys = {"coin_generation", "auto_decon_coins"}, type = "boolean", caption = {"oarc-auto-decon-coins-caption"}, tooltip = {"oarc-auto-decon-coins-tooltip"}},
["gameplay.enable_player_self_reset"] = {mod_key = "" , ocfg_keys = {"gameplay", "enable_player_self_reset"}, type = "boolean", caption = {"oarc-player-self-reset-caption"}, tooltip = {"oarc-player-self-reset-tooltip"}},
["gameplay.scale_spawner_damage"] = {mod_key = "" , ocfg_keys = {"gameplay", "scale_spawner_damage"}, type = "boolean", caption = {"oarc-scale-spawner-damage-caption"}, tooltip = {"oarc-scale-spawner-damage-tooltip"}}
}
---Easy reverse lookup for mod settings keys.
@ -205,7 +206,7 @@ function ValidateSettings()
log("Both main force and separate teams are disabled! Enabling main force. Please check your mod settings or config!")
storage.ocfg.gameplay.enable_main_team = true
settings.global["oarc-mod-enable-main-team"] = { value = true }
SendBroadcastMsg("Invalid setting! Both main force and separate teams are disabled! Enabling main force.")
SendBroadcastMsg({"oarc-teams-both-disabled-msg"})
end
-- Validate minimum is less than maximums
@ -213,7 +214,7 @@ function ValidateSettings()
log("Near spawn min distance is greater than or equal to near spawn max distance! Please check your mod settings or config!")
storage.ocfg.gameplay.far_spawn_distance = storage.ocfg.gameplay.near_spawn_distance + 1
settings.global["oarc-mod-far-spawn-distance"] = { value = storage.ocfg.gameplay.far_spawn_distance }
SendBroadcastMsg("Invalid setting! Near spawn min distance is greater than or equal to near spawn max distance!")
SendBroadcastMsg({"oarc-spawn-distance-invalid-msg"})
end
-- Validate that regrowth is enabled if world eater is enabled.
@ -221,7 +222,7 @@ function ValidateSettings()
log("World eater is enabled but regrowth is not! Disabling world eater. Please check your mod settings or config!")
storage.ocfg.regrowth.enable_world_eater = false
settings.global["oarc-mod-enable-world-eater"] = { value = false }
SendBroadcastMsg("Invalid setting! World eater is enabled but regrowth is not! Disabling world eater.")
SendBroadcastMsg({"oarc-world-eater-invalid-msg"})
end
-- Validate that default surface exists.
@ -229,7 +230,7 @@ function ValidateSettings()
log("Default surface does not exist! Please check your mod settings or config!")
storage.ocfg.gameplay.default_surface = "nauvis"
settings.global["oarc-mod-default-surface"] = { value = "nauvis" }
SendBroadcastMsg("Invalid setting! Default surface does not exist! Setting to nauvis.")
SendBroadcastMsg({"oarc-default-surface-invalid-msg"})
end
-- Validate that a "nauvis" surface config exists (nauvis is the default config fallback)

View File

@ -252,7 +252,7 @@ function SeparateSpawnsPlayerChangedSurface(player, previous_surface_name, new_s
if (platform ~= nil) then
SendBroadcastMsg({ "oarc-player-on-platform", player.name, surface.platform.name })
else
SendBroadcastMsg({ "oarc-player-changed-surface", player.name, surface.name })
SendBroadcastMsg({ "oarc-player-changed-surface", player.name, surface.localised_name or { "space-location-name." .. surface.name } or surface.name})
end
-- Check if player has been init'd yet. If not, then ignore it.

View File

@ -126,3 +126,12 @@ oarc-mod-resource-placement-horizontal-offset=This is the horizontal offset (in
oarc-mod-resource-placement-linear-spacing=This is the linear spacing (in tiles) between resources. Only applicable for square shaped spawns.
oarc-mod-resource-placement-size-multiplier=This changes the size of the resource deposits. Default settings should provide close to a vanilla starting experience.
oarc-mod-resource-placement-amount-multiplier=This changes the richness of the resource deposits. Default settings should provide close to a vanilla starting experience.
;"circle" | "octagon" | "square"
[string-mod-setting]
oarc-mod-spawn-general-shape-circle=Circle
oarc-mod-spawn-general-shape-octagon=Octagon
oarc-mod-spawn-general-shape-square=Square
oarc-mod-spawn-general-enable-resources-circle-shape-circle=Circle
oarc-mod-spawn-general-enable-resources-circle-shape-square=Square

View File

@ -377,6 +377,21 @@ oarc-cleanup-30sec-warning=Map cleanup in 30 seconds... Unused and old map chunk
oarc-cleanup-force-30sec-warning=Map cleanup (forced) in 30 seconds... Unused and old map chunks will be deleted!
oarc-cleanup-complete=Map cleanup done, sorry for your loss.
oarc-non-mod-settings-header=Additional Settings (Not available in the mod settings menu.)
oarc-coin-generation-subheader=Coin Generation
oarc-coin-generation-caption=Coin Generation
oarc-coin-generation-tooltip=Enemies drop coins when killed.
oarc-auto-decon-coins-caption=Auto Decon Coins
oarc-auto-decon-coins-tooltip=Automatically marks coins dropped by enemies for deconstruction so robots will pick them up.
oarc-player-self-reset-caption=Player Self Reset
oarc-player-self-reset-tooltip=Allow players to reset themselves in the spawn controls.
oarc-scale-spawner-damage-caption=Scale Spawner Damage
oarc-scale-spawner-damage-tooltip=Scales damage done to spawners with evolution factor and distance to cloest spawn point. This helps compensate for spawner health scaling at a high evolution factor.
oarc-teams-both-disabled-msg=Invalid setting! Both main force and separate teams are disabled! Enabling main force.
oarc-spawn-distance-invalid-msg=Invalid setting! Near spawn min distance is greater than or equal to near spawn max distance!
oarc-world-eater-invalid-msg=Invalid setting! World eater is enabled but regrowth is not! Disabling world eater.
oarc-default-surface-invalid-msg=Invalid setting! Default surface does not exist! Setting to nauvis.
[entity-name]
oarc-linked-chest=OARC Linked Chest

View File

@ -115,3 +115,13 @@ oarc-mod-resource-placement-horizontal-offset=这是资源从基地左上角水
oarc-mod-resource-placement-linear-spacing=这是资源之间的线性间距(以格子为单位)。仅适用于方形的基地。
oarc-mod-resource-placement-size-multiplier=此参数调整资源矿床的大小。默认设置应提供接近原版的起始体验。
oarc-mod-resource-placement-amount-multiplier=此参数调整资源矿床的丰度。默认设置应提供接近原版的起始体验。
;"circle" | "octagon" | "square"
[string-mod-setting]
oarc-mod-spawn-general-shape-circle=圆圈
oarc-mod-spawn-general-shape-octagon=八角形
oarc-mod-spawn-general-shape-square=方形
oarc-mod-spawn-general-enable-resources-circle-shape-circle=圆圈
oarc-mod-spawn-general-enable-resources-circle-shape-square=方形

View File

@ -11,7 +11,7 @@ oarc-experimental-warning=[color=red][font=default-bold]Factorio 2.0 和 太空
oarc-i-understand=我明白
oarc-spawn-options=重生选项
oarc-click-info-btn-help=点击左上角的 OARC 按钮以了解更多关于此场景的信息!这是你唯一的选择重生选项的机会。请仔细选择...
oarc-click-info-btn-help=点击左上角的 OARC 按钮以了解更多关于此场景的信息!请慎重选择...
oarc-gui-tooltip=点击打开和关闭模组 GUI。这提供了模组的设置和信息。
oarc-vanilla-spawn=原版重生
@ -198,7 +198,7 @@ oarc-wait-text=你的基地正在创建中。\n你将在 __1__ 秒后被传送
oarc-gui-tab-header-label=场景信息和控件
oarc-server-info-tab-title=服务器信息
oarc-spawn-ctrls-tab-title=生成控件
oarc-spawn-ctrls-tab-title=基地设置
oarc-settings-tab-title=设置
oarc-mod-info-tab-title=模组信息
oarc-player-list-tab-title=玩家列表
@ -379,6 +379,22 @@ oarc-cleanup-30sec-warning=地图清理将在30秒后开始... 未使用和过
oarc-cleanup-force-30sec-warning=地图强制清理将在30秒后开始... 未使用和过期的地图区块将被删除!
oarc-cleanup-complete=地图清理完成,服务器性能提升了。
oarc-non-mod-settings-header=附加设置(在模组设置菜单中不可用。)
oarc-coin-generation-subheader=硬币生成
oarc-coin-generation-caption=硬币生成
oarc-coin-generation-tooltip=敌人被杀死时掉落硬币。
oarc-auto-decon-coins-caption=自动拆解硬币
oarc-auto-decon-coins-tooltip=自动标记敌人掉落的硬币以供机器人拾取。
oarc-player-self-reset-caption=玩家自我重置
oarc-player-self-reset-tooltip=允许玩家在出生点控制中重置自己。
oarc-scale-spawner-damage-caption=缩放刷怪点伤害
oarc-scale-spawner-damage-tooltip=根据进化因子和距离最近出生点的距离来缩放对刷怪点的伤害。这有助于在高进化因子时补偿刷怪点的生命值缩放。
oarc-teams-both-disabled-msg=设置无效!主队伍和独立队伍都被禁用!启用主队伍。
oarc-spawn-distance-invalid-msg=设置无效!近距离出生点的最小距离大于或等于最大距离!
oarc-world-eater-invalid-msg=设置无效!世界吞噬者已启用但重生功能未启用!禁用世界吞噬者。
oarc-default-surface-invalid-msg=设置无效!默认地表不存在!设置为 nauvis。
[entity-name]
oarc-linked-chest=OARC 链接箱子
oarc-linked-power=OARC 链接电力