mirror of
https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git
synced 2024-12-04 09:43:00 +02:00
More GUI work and added a custom sprite. Fixed some regrowth issues with chunk tracking. Added regrowth interval mod setting. Removed redundant message. Better support for runtime mod setting changes.
This commit is contained in:
parent
3ca0b3c78f
commit
9c44bb2eb7
@ -87,7 +87,7 @@ end)
|
||||
-- end)
|
||||
|
||||
script.on_event(defines.events.on_runtime_mod_setting_changed, function(event)
|
||||
if (not StringStarsWith(event.setting, "oarc-mod")) then return end
|
||||
if (not StringStartsWith(event.setting, "oarc-mod")) then return end
|
||||
RuntimeModSettingChanged(event)
|
||||
end)
|
||||
|
||||
|
9
data.lua
Normal file
9
data.lua
Normal file
@ -0,0 +1,9 @@
|
||||
data:extend({
|
||||
{
|
||||
type = "sprite",
|
||||
name = "oarc-mod-sprite-40",
|
||||
filename = "__oarc-mod__/icon_40x40.png",
|
||||
width = 40,
|
||||
height = 40
|
||||
}
|
||||
})
|
43
devplan.txt
43
devplan.txt
@ -1,24 +1,23 @@
|
||||
|
||||
ACTIVE ITEMS:
|
||||
|
||||
- Change regrowth to be list of surfaces indexed by surface name?
|
||||
|
||||
- Ensure updates to regrowth surfaces don't cause errors (update indexes)
|
||||
- Make disable main team setting work (hide radio button)
|
||||
|
||||
|
||||
10. Tooltips for GUI elements in spawn menu options!
|
||||
13. Add regrowth settings GUI tab? Not sure how the other settings fit in with a dedicated regrowth tab? Need to be able to enable/disable other surfaces during runtime?
|
||||
14. Check all settings to see which CAN'T be changed during runtime. Possibly move these to startup.
|
||||
16.
|
||||
17. Support run time toggling of enable_shared_team_vision
|
||||
18. Support run time toggling of enable_friendly_fire
|
||||
19. Support run time toggling of main_force_name
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
BACKLOG:
|
||||
|
||||
|
||||
|
||||
27. Figure out how to reset player inventory on player reset to avoid extra items? (save and load items?)
|
||||
28.
|
||||
29.
|
||||
30.
|
||||
|
||||
31. Ensure updates to regrowth surfaces don't cause errors (update indexes)
|
||||
|
||||
33. Lots of localizations!
|
||||
|
||||
19. Support run time toggling of main_force_name OR change to a startup setting?
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Other Ideas, Not Committed:
|
||||
- Add option to spawn on existing chunks (look for chunks with any entities in them, or use regrowth logic)
|
||||
@ -33,6 +32,10 @@ Other Ideas, Not Committed:
|
||||
- Change enable_friendly_fire to be per team?
|
||||
- Allow players to spawn "near" an existing player (by request)
|
||||
- Change enable_spawning_on_other_surfaces to a start up setting?
|
||||
- Allow players to restart at anytime via GUI button (configurable setting by admin)
|
||||
- Change regrowth to be list of surfaces indexed by surface name?
|
||||
- Add regrowth settings GUI tab? Not sure how the other settings fit in with a dedicated regrowth tab? Need to be able to enable/disable other surfaces during runtime?
|
||||
- Add a show current respawn location button/feature
|
||||
|
||||
------------------------------------------------------SPACE AGE---------------------------------------------------------
|
||||
|
||||
@ -41,6 +44,7 @@ Other Ideas, Not Committed:
|
||||
- Enemy changes?
|
||||
- Rocket silo locations per player? (Only allowed to build 1)?
|
||||
- Surface names for space ships?
|
||||
- Spawner health tied to evolution?
|
||||
|
||||
--------------------------------------------------------DONE------------------------------------------------------------
|
||||
|
||||
@ -66,4 +70,13 @@ Other Ideas, Not Committed:
|
||||
15. Redo FindUngeneratedCoordinates to pick a random direction, and use the distance to get a starting point, instead of multiple tries.
|
||||
26. Fix all GUI styling (buttons outside of content)
|
||||
20. Force enable_world_eater to require enable_regrowth
|
||||
- Add warning for modifying surface settings after gameplay has started
|
||||
- Add warning for modifying surface settings after gameplay has started
|
||||
10. Tooltips for GUI elements in spawn menu options!
|
||||
14. Check all settings to see which CAN'T be changed during runtime. Possibly move these to startup.
|
||||
FIGURE OUT CHUNK NOT IN MAP REGROWTH ISSUE!
|
||||
28. Add validation for default starting surface name
|
||||
29. Make server info headings consistent / Add heading for spawn controls (change button?)
|
||||
30. Confirm regrowth should add new chunks when found (not only on chunk generate?)
|
||||
32. Make disable main team setting work (hide radio button)
|
||||
17. Support run time toggling of enable_shared_team_vision
|
||||
18. Support run time toggling of enable_friendly_fire
|
BIN
icon_40x40.png
Normal file
BIN
icon_40x40.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -170,9 +170,8 @@ OCFG = {
|
||||
-- Server Info - This stuff is shown in the welcome GUI and Info panel.
|
||||
---@type OarcConfigServerInfo
|
||||
server_info = {
|
||||
server_msg = "YOUR SERVER MSG HERE",
|
||||
welcome_msg_title = "YOUR SERVER TITLE HERE",
|
||||
welcome_msg = "YOUR WELCOME MSG HERE", -- Printed to player on join as well.
|
||||
welcome_msg = "YOUR WELCOME MSG HERE",
|
||||
discord_invite = "YOUR DISCORD INVITE HERE"
|
||||
},
|
||||
|
||||
@ -279,6 +278,9 @@ OCFG = {
|
||||
-- TODO: verify if this requires regrowth to be enabled!
|
||||
enable_abandoned_base_cleanup = true,
|
||||
|
||||
-- This is the interval in minutes that the regrowth cleanup will run.
|
||||
cleanup_interval = 60,
|
||||
|
||||
surface_blacklist = {"oarc_holding_pen"},
|
||||
},
|
||||
|
||||
@ -333,7 +335,6 @@ OCFG = {
|
||||
---@class OarcConfigServerInfo
|
||||
---@field welcome_msg_title string Title of welcome GUI window.
|
||||
---@field welcome_msg string Main welcome message. (Should provide mod info.)
|
||||
---@field server_msg string Server specific message. (Rules, etc.)
|
||||
---@field discord_invite string Discord invite for easy copy paste.
|
||||
|
||||
---@class OarcConfigGameplaySettings
|
||||
@ -364,6 +365,7 @@ OCFG = {
|
||||
---@field enable_regrowth boolean Cleans up unused chunks periodically. Helps keep map size down.
|
||||
---@field enable_world_eater boolean Checks inactive chunks to see if they are empty of entities and deletes them periodically.
|
||||
---@field enable_abandoned_base_cleanup boolean Removes player bases when they leave shortly after joining.
|
||||
---@field cleanup_interval number This is the interval in minutes that the regrowth cleanup will run.
|
||||
---@field surface_blacklist table<string> List of surfaces to ignore automatically.
|
||||
|
||||
---@class OarcConfigSurface
|
||||
|
@ -8,7 +8,6 @@ OCFG_KEYS =
|
||||
{
|
||||
["Server Info"] = {mod_key = "" , ocfg_keys = {""}, type = "header"},
|
||||
["server_info.welcome_msg_title"] = {mod_key = "oarc-mod-welcome-msg-title" , ocfg_keys = {"server_info", "welcome_msg_title"}, type = "string"},
|
||||
["server_info.server_msg"] = {mod_key = "oarc-mod-server-msg" , ocfg_keys = {"server_info", "server_msg"}, type = "string"},
|
||||
["server_info.welcome_msg"] = {mod_key = "oarc-mod-welcome-msg" , ocfg_keys = {"server_info", "welcome_msg"}, type = "string"},
|
||||
["server_info.discord_invite"] = {mod_key = "oarc-mod-discord-invite" , ocfg_keys = {"server_info", "discord_invite"}, type = "string"},
|
||||
|
||||
@ -43,6 +42,7 @@ OCFG_KEYS =
|
||||
["regrowth.enable_regrowth"] = {mod_key = "oarc-mod-enable-regrowth" , ocfg_keys = {"regrowth", "enable_regrowth"}, type = "boolean"},
|
||||
["regrowth.enable_world_eater"] = {mod_key = "oarc-mod-enable-world-eater" , ocfg_keys = {"regrowth", "enable_world_eater"}, type = "boolean"},
|
||||
["regrowth.enable_abandoned_base_cleanup"] = {mod_key = "oarc-mod-enable-abandoned-base-cleanup" , ocfg_keys = {"regrowth", "enable_abandoned_base_cleanup"}, type = "boolean"},
|
||||
["regrowth.cleanup_interval"] = {mod_key = "oarc-mod-regrowth-cleanup-interval-min" , ocfg_keys = {"regrowth", "cleanup_interval"}, type = "integer"},
|
||||
}
|
||||
|
||||
---Easy reverse lookup for mod settings keys.
|
||||
@ -50,7 +50,6 @@ OCFG_KEYS =
|
||||
OCFG_MOD_KEYS =
|
||||
{
|
||||
["oarc-mod-welcome-msg-title"] = "server_info.welcome_msg_title",
|
||||
["oarc-mod-server-msg"] = "server_info.server_msg",
|
||||
["oarc-mod-welcome-msg"] = "server_info.welcome_msg",
|
||||
["oarc-mod-discord-invite"] = "server_info.discord_invite",
|
||||
|
||||
@ -83,6 +82,7 @@ OCFG_MOD_KEYS =
|
||||
["oarc-mod-enable-regrowth"] = "regrowth.enable_regrowth",
|
||||
["oarc-mod-enable-world-eater"] = "regrowth.enable_world_eater",
|
||||
["oarc-mod-enable-abandoned-base-cleanup"] = "regrowth.enable_abandoned_base_cleanup",
|
||||
["oarc-mod-regrowth-cleanup-interval-min"] = "regrowth.cleanup_interval",
|
||||
}
|
||||
|
||||
|
||||
@ -110,6 +110,8 @@ function ValidateAndLoadConfig()
|
||||
GetScenarioOverrideSettings()
|
||||
|
||||
ValidateSettings()
|
||||
|
||||
global.ocfg.previous_main_force_name = global.ocfg.gameplay.main_force_name
|
||||
end
|
||||
|
||||
function ValidateSettings()
|
||||
@ -138,6 +140,14 @@ function ValidateSettings()
|
||||
settings.global["oarc-mod-enable-world-eater"] = { value = false }
|
||||
SendBroadcastMsg("Invalid setting! World eater is enabled but regrowth is not! Disabling world eater.")
|
||||
end
|
||||
|
||||
-- Validate that default surface exists.
|
||||
if (game.surfaces[global.ocfg.gameplay.default_surface] == nil) then
|
||||
log("Default surface does not exist! Please check your mod settings or config!")
|
||||
global.ocfg.gameplay.default_surface = "nauvis"
|
||||
settings.global["oarc-mod-default-surface"] = { value = "nauvis" }
|
||||
SendBroadcastMsg("Invalid setting! Default surface does not exist! Setting to nauvis.")
|
||||
end
|
||||
end
|
||||
|
||||
-- Read in the mod settings and copy them to the OARC_CFG table, overwriting the defaults in config.lua.
|
||||
@ -193,9 +203,10 @@ function RuntimeModSettingChanged(event)
|
||||
|
||||
if (not found_setting) then
|
||||
error("Unknown oarc-mod setting changed: " .. event.setting)
|
||||
else
|
||||
ValidateSettings()
|
||||
ApplyRuntimeChanges(OCFG_MOD_KEYS[event.setting])
|
||||
end
|
||||
|
||||
ValidateSettings()
|
||||
end
|
||||
|
||||
---A probably quit stupid function to let me lookup and set the global.ocfg entries using a key table.
|
||||
@ -230,4 +241,28 @@ function GetGlobalOarcConfigUsingKeyTable(key_table)
|
||||
else
|
||||
error("Invalid key_table length: " .. number_of_keys .. "\n" .. serpent.block(key_table))
|
||||
end
|
||||
end
|
||||
|
||||
---Handles any runtime changes that need more than just the setting change.
|
||||
---@param oarc_setting_index string
|
||||
---@return nil
|
||||
function ApplyRuntimeChanges(oarc_setting_index)
|
||||
|
||||
---Handle changing enable_shared_team_vision
|
||||
if (oarc_setting_index == "gameplay.enable_shared_team_vision") then
|
||||
for _,force in pairs(game.forces) do
|
||||
if (force.name ~= "neutral") and (force.name ~= "enemy") then
|
||||
force.share_chart = global.ocfg.gameplay.enable_shared_team_vision
|
||||
end
|
||||
end
|
||||
|
||||
---Handle changing enable_friendly_fire
|
||||
elseif (oarc_setting_index == "gameplay.enable_friendly_fire") then
|
||||
for _,force in pairs(game.forces) do
|
||||
if (force.name ~= "neutral") and (force.name ~= "enemy") then
|
||||
force.friendly_fire = global.ocfg.gameplay.enable_friendly_fire
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
@ -1,83 +1,19 @@
|
||||
---Display current game options and server info, maybe have some admin controls here
|
||||
|
||||
---Server info gui click event handler
|
||||
---@param event EventData.on_gui_click
|
||||
---@return nil
|
||||
function ServerInfoGuiClick(event)
|
||||
if not event.element.valid then return end
|
||||
local player = game.players[event.player_index]
|
||||
local tags = event.element.tags
|
||||
|
||||
if (tags.action ~= "oarc_server_info_tab") then
|
||||
return
|
||||
end
|
||||
|
||||
local player_dropdown = event.element.parent.ban_players_dropdown
|
||||
|
||||
if (tags.setting == "ban_player") then
|
||||
local pIndex = player_dropdown.selected_index
|
||||
|
||||
if (pIndex ~= 0) then
|
||||
local banPlayer = player_dropdown.get_item(pIndex)
|
||||
if (game.players[banPlayer]) then
|
||||
game.ban_player(banPlayer --[[@as string]], "Banned from admin panel.")
|
||||
log("Banning " .. banPlayer)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (tags.setting == "restart_player") then
|
||||
local pIndex = player_dropdown.selected_index
|
||||
|
||||
if (pIndex ~= 0) then
|
||||
local resetPlayer = player_dropdown.get_item(pIndex)
|
||||
|
||||
if not game.players[resetPlayer] or not game.players[resetPlayer].connected then
|
||||
SendMsg(player.name, "Player " .. resetPlayer .. " is not found?")
|
||||
return
|
||||
end
|
||||
|
||||
if PlayerHasDelayedSpawn(resetPlayer--[[@as string]]) then
|
||||
SendMsg(player.name, "Player " .. resetPlayer .. " is about to spawn, try again later.")
|
||||
return
|
||||
end
|
||||
|
||||
log("Resetting " .. resetPlayer)
|
||||
RemoveOrResetPlayer(game.players[resetPlayer], false, true, true, true)
|
||||
SeparateSpawnsInitPlayer(resetPlayer --[[@as string]])
|
||||
else
|
||||
SendMsg(player.name, "No player selected!")
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---Creates the content for the game settings used by AddOarcGuiTab
|
||||
---@param tab_container LuaGuiElement
|
||||
---@param player LuaPlayer
|
||||
---@return nil
|
||||
function CreateServerInfoTab(tab_container, player)
|
||||
|
||||
|
||||
-- if global.oarc_announcements ~= nil then
|
||||
-- AddLabel(tab_container, "announcement_info_label", "Server announcements:", my_label_header_style)
|
||||
-- AddLabel(tab_container, "announcement_info_txt", "global.oarc_announcements", my_longer_label_style)
|
||||
-- AddSpacerLine(tab_container)
|
||||
-- end
|
||||
|
||||
-- General Server Info:
|
||||
if (global.ocfg.server_info.welcome_msg ~= "") then
|
||||
if (global.ocfg.server_info.welcome_msg ~= " ") then
|
||||
AddLabel(tab_container, nil, "Welcome Message", "caption_label")
|
||||
AddLabel(tab_container, nil, global.ocfg.server_info.welcome_msg, my_longer_label_style)
|
||||
AddSpacerLine(tab_container)
|
||||
end
|
||||
if (global.ocfg.server_info.server_msg ~= "") then
|
||||
AddLabel(tab_container, nil, "Server Message", "caption_label")
|
||||
AddLabel(tab_container, nil, global.ocfg.server_info.server_msg, my_longer_label_style)
|
||||
AddSpacerLine(tab_container)
|
||||
end
|
||||
|
||||
if (global.ocfg.server_info.discord_invite ~= "") then
|
||||
if (global.ocfg.server_info.discord_invite ~= " ") then
|
||||
local horizontal_flow = tab_container.add{
|
||||
type="flow", direction="horizontal"
|
||||
}
|
||||
@ -101,7 +37,7 @@ function CreateServerInfoTab(tab_container, player)
|
||||
-- game.map_settings.enemy_evolution.destroy_factor .. "\n" ..
|
||||
"Enemy expansion is " .. enemy_expansion_txt
|
||||
|
||||
AddLabel(tab_container, nil, "Map Info", my_label_header2_style)
|
||||
AddLabel(tab_container, nil, "Map Info", "caption_label")
|
||||
AddLabel(tab_container, "enemy_info", enemy_text, my_longer_label_style)
|
||||
-- AddSpacerLine(tab_container)
|
||||
|
||||
@ -162,7 +98,7 @@ function CreateServerInfoTab(tab_container, player)
|
||||
table.insert(player_list, player.name)
|
||||
end
|
||||
|
||||
AddLabel(tab_container, nil, "Admin Controls", my_label_header2_style)
|
||||
AddLabel(tab_container, nil, "Admin Controls", "caption_label")
|
||||
|
||||
local horizontal_flow = tab_container.add{
|
||||
type="flow", direction="horizontal"
|
||||
@ -198,4 +134,57 @@ function CreateServerInfoTab(tab_container, player)
|
||||
style = "red_button"
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
---Server info gui click event handler
|
||||
---@param event EventData.on_gui_click
|
||||
---@return nil
|
||||
function ServerInfoGuiClick(event)
|
||||
if not event.element.valid then return end
|
||||
local player = game.players[event.player_index]
|
||||
local tags = event.element.tags
|
||||
|
||||
if (tags.action ~= "oarc_server_info_tab") then
|
||||
return
|
||||
end
|
||||
|
||||
local player_dropdown = event.element.parent.ban_players_dropdown
|
||||
|
||||
if (tags.setting == "ban_player") then
|
||||
local pIndex = player_dropdown.selected_index
|
||||
|
||||
if (pIndex ~= 0) then
|
||||
local banPlayer = player_dropdown.get_item(pIndex)
|
||||
if (game.players[banPlayer]) then
|
||||
game.ban_player(banPlayer --[[@as string]], "Banned from admin panel.")
|
||||
log("Banning " .. banPlayer)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (tags.setting == "restart_player") then
|
||||
local pIndex = player_dropdown.selected_index
|
||||
|
||||
if (pIndex ~= 0) then
|
||||
local resetPlayer = player_dropdown.get_item(pIndex)
|
||||
|
||||
if not game.players[resetPlayer] or not game.players[resetPlayer].connected then
|
||||
SendMsg(player.name, "Player " .. resetPlayer .. " is not found?")
|
||||
return
|
||||
end
|
||||
|
||||
if PlayerHasDelayedSpawn(resetPlayer--[[@as string]]) then
|
||||
SendMsg(player.name, "Player " .. resetPlayer .. " is about to spawn, try again later.")
|
||||
return
|
||||
end
|
||||
|
||||
log("Resetting " .. resetPlayer)
|
||||
RemoveOrResetPlayer(game.players[resetPlayer], false, true, true, true)
|
||||
SeparateSpawnsInitPlayer(resetPlayer --[[@as string]])
|
||||
else
|
||||
SendMsg(player.name, "No player selected!")
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
@ -7,14 +7,14 @@ function CreateSettingsControlsTab(tab_container, player)
|
||||
|
||||
if (player.admin) then
|
||||
local label = AddLabel(tab_container, nil, { "oarc-settings-tab-admin-warning" }, my_warning_style)
|
||||
label.style.padding = 5
|
||||
|
||||
else
|
||||
local label = AddLabel(tab_container, nil, { "oarc-settings-tab-player-warning" }, my_warning_style)
|
||||
label.style.padding = 5
|
||||
|
||||
end
|
||||
|
||||
local label = AddLabel(tab_container, nil, { "oarc-settings-tab-description" }, my_label_style)
|
||||
label.style.padding = 5
|
||||
label.style.bottom_padding = 5
|
||||
|
||||
local flow = tab_container.add { type = "flow", direction = "horizontal", }
|
||||
|
||||
@ -309,7 +309,8 @@ function AddSurfaceCheckboxSetting(parent, surface_name, setting_name, state, ad
|
||||
type = "checkbox",
|
||||
state = state,
|
||||
tags = { action = "oarc_settings_tab_surfaces", setting = setting_name, surface = surface_name },
|
||||
enabled = admin
|
||||
enabled = admin,
|
||||
tooltip = { "oarc-settings-tab-surface-checkbox-tooltip" },
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -26,49 +26,79 @@ function CreateSpawnControlsTab(tab_container, player)
|
||||
spwnCtrls.style.maximal_height = 1000
|
||||
spwnCtrls.horizontal_scroll_policy = "never"
|
||||
|
||||
CreateSetRespawnLocationButton(player, spwnCtrls)
|
||||
CreateSharedSpawnControls(player, spwnCtrls)
|
||||
CreateJoinQueueControls(player, spwnCtrls)
|
||||
end
|
||||
|
||||
---Display the shared spawn controls
|
||||
---@param player LuaPlayer
|
||||
---@param container LuaGuiElement
|
||||
---@return nil
|
||||
function CreateSharedSpawnControls(player, container)
|
||||
if global.ocfg.gameplay.enable_shared_spawns then
|
||||
if (global.ocore.uniqueSpawns[player.name] ~= nil) then
|
||||
|
||||
AddLabel(container, nil, { "oarc-shared-spawn-controls" }, "caption_label")
|
||||
|
||||
-- This checkbox allows people to join your base when they first start the game.
|
||||
local toggle = spwnCtrls.add {
|
||||
local toggle = container.add {
|
||||
type = "checkbox",
|
||||
name = "accessToggle",
|
||||
tags = { action = "oarc_spawn_ctrl_tab", setting = "shared_access_toggle" },
|
||||
caption = { "oarc-spawn-allow-joiners" },
|
||||
caption = { "oarc-shared-spawn-allow-joiners" },
|
||||
state = IsSharedSpawnActive(player)
|
||||
}
|
||||
ApplyStyle(toggle, my_fixed_width_style)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---Display the set respawn location button in the spawn control tab.
|
||||
---@param player LuaPlayer
|
||||
---@param container LuaGuiElement
|
||||
---@return nil
|
||||
function CreateSetRespawnLocationButton(player, container)
|
||||
AddLabel(container, nil, { "oarc-set-respawn-loc-header" }, "caption_label")
|
||||
|
||||
-- TODO: Figure out why this case could be hit... Fix for error report in github.
|
||||
if (global.ocore.playerCooldowns[player.name] == nil) then
|
||||
log("ERROR! playerCooldowns[player.name] is nil!")
|
||||
error("ERROR! playerCooldowns[player.name] is nil!")
|
||||
global.ocore.playerCooldowns[player.name] = { setRespawn = game.tick }
|
||||
end
|
||||
|
||||
-- Sets the player's custom spawn point to their current location
|
||||
if ((game.tick - global.ocore.playerCooldowns[player.name].setRespawn) >
|
||||
(global.ocfg.gameplay.respawn_cooldown_min * TICKS_PER_MINUTE)) then
|
||||
local change_respawn_button = spwnCtrls.add {
|
||||
local change_respawn_button = container.add {
|
||||
type = "button",
|
||||
tags = { action = "oarc_spawn_ctrl_tab", setting = "set_respawn_location" },
|
||||
name = "setRespawnLocation",
|
||||
caption = { "oarc-set-respawn-loc" }
|
||||
caption = { "oarc-set-respawn-loc" },
|
||||
tooltip = { "oarc-set-respawn-loc-tooltip" },
|
||||
style = "red_button"
|
||||
}
|
||||
change_respawn_button.style.font = "default-small-semibold"
|
||||
else
|
||||
AddLabel(spwnCtrls, nil,
|
||||
AddLabel(container, nil,
|
||||
{ "oarc-set-respawn-loc-cooldown", FormatTime((global.ocfg.gameplay.respawn_cooldown_min * TICKS_PER_MINUTE) -
|
||||
(game.tick - global.ocore.playerCooldowns[player.name].setRespawn)) }, my_note_style)
|
||||
end
|
||||
AddLabel(spwnCtrls, nil, { "oarc-set-respawn-note" }, my_note_style)
|
||||
AddLabel(container, nil, { "oarc-set-respawn-note" }, my_note_style)
|
||||
AddSpacerLine(container)
|
||||
end
|
||||
|
||||
-- Display a list of people in the join queue for your base.
|
||||
---Display a list of people in the join queue for a shared spawn.
|
||||
---@param player LuaPlayer
|
||||
---@param container LuaGuiElement
|
||||
---@return nil
|
||||
function CreateJoinQueueControls(player, container)
|
||||
if (global.ocfg.gameplay.enable_shared_spawns and IsSharedSpawnActive(player)) then
|
||||
if (TableLength(global.ocore.sharedSpawns[player.name].joinQueue) > 0) then
|
||||
AddLabel(spwnCtrls, "drop_down_msg_lbl1", { "oarc-select-player-join-queue" }, my_label_style)
|
||||
AddLabel(container, nil, { "oarc-join-queue-header" }, "caption_label")
|
||||
AddLabel(container, "drop_down_msg_lbl1", { "oarc-select-player-join-queue" }, my_label_style)
|
||||
|
||||
local horizontal_flow = spwnCtrls.add { type = "flow", direction = "horizontal" }
|
||||
local horizontal_flow = container.add { type = "flow", direction = "horizontal" }
|
||||
horizontal_flow.style.horizontally_stretchable = true
|
||||
|
||||
horizontal_flow.add {
|
||||
@ -98,11 +128,12 @@ function CreateSpawnControlsTab(tab_container, player)
|
||||
caption = { "oarc-reject" }
|
||||
}
|
||||
else
|
||||
AddLabel(spwnCtrls, "empty_join_queue_note1", { "oarc-no-player-join-reqs" }, my_note_style)
|
||||
AddLabel(container, "empty_join_queue_note1", { "oarc-no-player-join-reqs" }, my_note_style)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
---Handle the gui checkboxes & radio buttons of the spawn control tab in the Oarc GUI.
|
||||
---@param event EventData.on_gui_checked_state_changed
|
||||
---@return nil
|
||||
|
@ -127,8 +127,10 @@ function ClickOarcGuiButton(event)
|
||||
|
||||
if (event.element.caption ~= "") then
|
||||
event.element.caption = ""
|
||||
event.element.style.width = 20
|
||||
event.element.sprite="utility/expand_dots"
|
||||
-- event.element.style.width = 20
|
||||
-- event.element.sprite="utility/expand_dots"
|
||||
event.element.sprite = "oarc-mod-sprite-40"
|
||||
event.element.style.padding = 0
|
||||
end
|
||||
|
||||
if (not DoesOarcGuiExist(player)) then
|
||||
|
@ -151,7 +151,7 @@ end
|
||||
---Checks if a string starts with another string
|
||||
---@param string string The string to check
|
||||
---@param start string The starting string to look for
|
||||
function StringStarsWith(string, start)
|
||||
function StringStartsWith(string, start)
|
||||
return string:sub(1, #start) == start
|
||||
end
|
||||
|
||||
|
@ -9,9 +9,6 @@
|
||||
-- the on_sector_scanned event.
|
||||
-- 5. Chunks timeout after 1 hour-ish, configurable
|
||||
|
||||
-- TODO: Make this a mod startup setting?
|
||||
REGROWTH_TIMEOUT_TICKS = TICKS_PER_HOUR -- TICKS_PER_HOUR TICKS_PER_MINUTE
|
||||
|
||||
--- If a chunk is marked "active", then it will only be checked by the "world eater" system if that is enabled.
|
||||
--- World eater does more extensive checks to see if a chunk might be safe to delete. For example, if a player builds
|
||||
--- stuff in a chunk it will be marked as "active" and won't be checked by the regrowth system.
|
||||
@ -21,6 +18,9 @@ REGROWTH_FLAG_ACTIVE = -1
|
||||
--- cases. Like when a player leaves the game early and their spawn is deleted.
|
||||
REGROWTH_FLAG_PERMANENT = -2
|
||||
|
||||
--- These chunks are marked for removal. They will be deleted by the regrowth system.
|
||||
REGROWTH_FLAG_REMOVAL = -3
|
||||
|
||||
--- Radius in chunks around a player to mark as safe.
|
||||
REGROWTH_ACTIVE_AREA_AROUND_PLAYER = 4
|
||||
|
||||
@ -35,7 +35,6 @@ function RegrowthInit()
|
||||
global.rg.player_refresh_index = nil
|
||||
|
||||
global.rg.force_removal_flag = -2000 -- Set to a negative number to disable it by default
|
||||
global.rg.timeout_ticks = REGROWTH_TIMEOUT_TICKS
|
||||
|
||||
global.rg.current_surface = nil -- The current surface we are iterating through
|
||||
global.rg.current_surface_index = 1
|
||||
@ -178,6 +177,7 @@ function RegrowthChunkGenerate(event)
|
||||
-- Only update it if it isn't already set!
|
||||
if (global.rg[surface_name].map[c_pos.x][c_pos.y] == nil) then
|
||||
global.rg[surface_name].map[c_pos.x][c_pos.y] = game.tick
|
||||
-- log("RegrowthChunkGenerate: " .. c_pos.x .. "," .. c_pos.y .. " on surface: " .. surface_name)
|
||||
end
|
||||
end
|
||||
|
||||
@ -194,16 +194,16 @@ function RegrowthMarkAreaForRemoval(surface_name, pos, chunk_radius)
|
||||
local y = c_pos.y + k
|
||||
|
||||
if (global.rg[surface_name].map[x] ~= nil) then
|
||||
global.rg[surface_name].map[x][y] = nil
|
||||
global.rg[surface_name].map[x][y] = REGROWTH_FLAG_REMOVAL
|
||||
end
|
||||
|
||||
---@type RemovalListEntry
|
||||
local removal_entry = { pos = { x = x, y = y }, force = true, surface = surface_name }
|
||||
table.insert(global.rg.removal_list, removal_entry)
|
||||
end
|
||||
if (table_size(global.rg[surface_name].map[x]) == 0) then
|
||||
global.rg[surface_name].map[x] = nil
|
||||
end
|
||||
-- if (table_size(global.rg[surface_name].map[x]) == 0) then
|
||||
-- global.rg[surface_name].map[x] = nil
|
||||
-- end
|
||||
end
|
||||
end
|
||||
|
||||
@ -374,7 +374,6 @@ function RegrowthSingleStepArray()
|
||||
if (not next_chunk) then
|
||||
|
||||
-- Switch to the next active surface
|
||||
-- TODO: Validate this
|
||||
local next_surface_info = GetNextActiveSurface(global.rg.current_surface_index)
|
||||
global.rg.current_surface = next_surface_info.surface
|
||||
global.rg.current_surface_index = next_surface_info.index
|
||||
@ -391,21 +390,30 @@ function RegrowthSingleStepArray()
|
||||
end
|
||||
end
|
||||
|
||||
-- Do we have it in our map?
|
||||
if (not global.rg[current_surface].map[next_chunk.x] or not global.rg[current_surface].map[next_chunk.x][next_chunk.y]) then
|
||||
--TODO: Confirm this is the right thing to do? What chunk should not be in our map at all?
|
||||
return -- Chunk isn't in our map so we don't care?
|
||||
-- It's possible that if regrowth is disabled/enabled during runtime we might miss on_chunk_generated.
|
||||
-- This will catch that case and add the chunk to the map.
|
||||
if (global.rg[current_surface].map[next_chunk.x] == nil) then
|
||||
global.rg[current_surface].map[next_chunk.x] = {}
|
||||
end
|
||||
if (global.rg[current_surface].map[next_chunk.x][next_chunk.y] == nil and game.surfaces[current_surface].is_chunk_generated(next_chunk)) then
|
||||
log("RegrowthSingleStepArray: Chunk not in map: " .. next_chunk.x .. "," .. next_chunk.y .. " on surface: " .. current_surface)
|
||||
global.rg[current_surface].map[next_chunk.x][next_chunk.y] = game.tick
|
||||
return
|
||||
end
|
||||
|
||||
-- If the chunk has timed out, add it to the removal list
|
||||
local c_timer = global.rg[current_surface].map[next_chunk.x][next_chunk.y]
|
||||
if ((c_timer ~= nil) and (c_timer >= 0) and ((c_timer + global.rg.timeout_ticks) < game.tick)) then
|
||||
local interval_ticks = global.ocfg.regrowth.cleanup_interval * TICKS_PER_MINUTE
|
||||
if ((c_timer ~= nil) and (c_timer >= 0) and ((c_timer + interval_ticks) < game.tick)) then
|
||||
-- Check chunk actually exists
|
||||
if (game.surfaces[current_surface].is_chunk_generated({ x = next_chunk.x, y = next_chunk.y })) then
|
||||
|
||||
---@type RemovalListEntry
|
||||
local removal_entry = {pos = {x = next_chunk.x, y = next_chunk.y }, force = false, surface = current_surface}
|
||||
table.insert(global.rg.removal_list, removal_entry)
|
||||
global.rg[current_surface].map[next_chunk.x][next_chunk.y] = REGROWTH_FLAG_REMOVAL
|
||||
else
|
||||
log("WARN - RegrowthSingleStepArray: Chunk not generated?: " .. next_chunk.x .. "," .. next_chunk.y .. " on surface: " .. current_surface)
|
||||
global.rg[current_surface].map[next_chunk.x][next_chunk.y] = nil
|
||||
end
|
||||
end
|
||||
@ -431,6 +439,7 @@ function OarcRegrowthRemoveAllChunks()
|
||||
-- Else delete the chunk
|
||||
else
|
||||
game.surfaces[surface_name].delete_chunk(c_pos)
|
||||
global.rg[surface_name].map[c_pos.x][c_pos.y] = nil
|
||||
end
|
||||
end
|
||||
|
||||
@ -465,7 +474,7 @@ function RegrowthOnTick()
|
||||
end
|
||||
|
||||
-- Allow enable/disable of auto cleanup, can change during runtime.
|
||||
local interval_ticks = global.rg.timeout_ticks
|
||||
local interval_ticks = global.ocfg.regrowth.cleanup_interval * TICKS_PER_MINUTE
|
||||
-- Send a broadcast warning before it happens.
|
||||
if ((game.tick % interval_ticks) == interval_ticks - (60 * 30 + 1)) then
|
||||
if (#global.rg.removal_list > 100) then
|
||||
@ -550,9 +559,9 @@ function WorldEaterSingleStep()
|
||||
|
||||
local c_timer = global.rg[current_surface].map[next_chunk.x][next_chunk.y]
|
||||
|
||||
-- Only check chunnks that are flagged as "safe".
|
||||
-- Only check chunnks that are flagged as "active".
|
||||
-- Others are either permanent or will be handled by the default regrowth checks.
|
||||
if (c_timer == -1) then
|
||||
if (c_timer == REGROWTH_FLAG_ACTIVE) then
|
||||
local area = {
|
||||
left_top = { next_chunk.area.left_top.x - 8, next_chunk.area.left_top.y - 8 },
|
||||
right_bottom = { next_chunk.area.right_bottom.x + 8, next_chunk.area.right_bottom.y + 8 }
|
||||
|
@ -153,6 +153,12 @@ function SeparateSpawnsSurfaceCreated(event)
|
||||
|
||||
-- Add the surface to the list of surfaces that allow spawns with value from config.
|
||||
global.ocore.surfaces[surface.name] = global.ocfg.gameplay.enable_spawning_on_other_surfaces
|
||||
|
||||
-- Make sure it has a surface configuration entry
|
||||
if (global.ocfg.surfaces_config[surface.name] == nil) then
|
||||
log("Surface does NOT have a config entry, defaulting to nauvis entry for new surface: " .. surface.name)
|
||||
global.ocfg.surfaces_config[surface.name] = global.ocfg.surfaces_config["nauvis"]
|
||||
end
|
||||
end
|
||||
|
||||
---Detects when surfaces are deleted and removes them from the list of surfaces that allow spawns.
|
||||
|
@ -40,15 +40,8 @@ function DisplayWelcomeTextGui(player)
|
||||
direction = "vertical"
|
||||
}
|
||||
|
||||
-- Start with server message.
|
||||
if (global.ocfg.server_info.server_msg ~= "") then
|
||||
AddLabel(welcome_gui_if, nil, global.ocfg.server_info.server_msg, my_label_style)
|
||||
-- AddLabel(wGui, "contact_info_msg_lbl1", global.ocfg.server_contact, my_label_style)
|
||||
AddSpacer(welcome_gui_if)
|
||||
end
|
||||
|
||||
-- Informational message about the scenario
|
||||
if (global.ocfg.server_info.welcome_msg ~= "") then
|
||||
if (global.ocfg.server_info.welcome_msg ~= " ") then
|
||||
AddLabel(welcome_gui_if, nil, global.ocfg.server_info.welcome_msg, my_label_style)
|
||||
AddSpacer(welcome_gui_if)
|
||||
end
|
||||
@ -150,7 +143,8 @@ function CreateSurfaceSelectDropdown(parent_flow)
|
||||
tags = { action = "oarc_spawn_options", setting = "surface_select" },
|
||||
type = "drop-down",
|
||||
items = surface_list,
|
||||
selected_index = 1
|
||||
selected_index = 1,
|
||||
tooltip = { "oarc-surface-select-tooltip" }
|
||||
}
|
||||
end
|
||||
|
||||
@ -161,33 +155,31 @@ end
|
||||
---@return nil
|
||||
function DisplayTeamSelectRadioButtons(parent_flow, enable_main_team, enable_separate_teams)
|
||||
if enable_main_team then
|
||||
local main_team_radio = parent_flow.add {
|
||||
parent_flow.add {
|
||||
name = "isolated_spawn_main_team_radio",
|
||||
tags = { action = "oarc_spawn_options", setting = "team_select", value = SPAWN_TEAM_CHOICE.join_main_team },
|
||||
type = "radiobutton",
|
||||
caption = { "oarc-join-main-team-radio" },
|
||||
state = true
|
||||
}
|
||||
if not enable_separate_teams then
|
||||
tooltip = { "oarc-join-main-team-tooltip" },
|
||||
-- If separate teams are not enabled, default to joining the main team, and disable the radio buttons.
|
||||
main_team_radio.ignored_by_interaction = true
|
||||
main_team_radio.enabled = false
|
||||
end
|
||||
state = true,
|
||||
-- ignored_by_interaction = not enable_separate_teams,
|
||||
-- enabled = enable_separate_teams
|
||||
}
|
||||
end
|
||||
|
||||
if (enable_separate_teams) then
|
||||
local separate_teams_radio = parent_flow.add {
|
||||
parent_flow.add {
|
||||
name = "isolated_spawn_new_team_radio",
|
||||
tags = { action = "oarc_spawn_options", setting = "team_select", value = SPAWN_TEAM_CHOICE.join_own_team },
|
||||
type = "radiobutton",
|
||||
caption = { "oarc-create-own-team-radio" },
|
||||
state = false
|
||||
}
|
||||
if not enable_main_team then
|
||||
tooltip = { "oarc-create-own-team-tooltip" },
|
||||
-- If main team is not enabled, default to joining the a separate team, and disable the radio buttons.
|
||||
separate_teams_radio.ignored_by_interaction = true
|
||||
separate_teams_radio.enabled = false
|
||||
end
|
||||
state = not enable_main_team,
|
||||
-- ignored_by_interaction = not enable_main_team,
|
||||
-- enabled = enable_main_team
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@ -397,7 +389,8 @@ function CreateSharedSpawnFrame(parent_flow, enable_shared_spawns)
|
||||
tags = { action = "oarc_spawn_options", setting = "shared_spawn_select" },
|
||||
type = "drop-down",
|
||||
items = avail_hosts,
|
||||
selected_index = previous_index
|
||||
selected_index = previous_index,
|
||||
tooltip = { "oarc-join-someone-dropdown-tooltip" }
|
||||
}
|
||||
dropdown.style.horizontal_align = "left"
|
||||
|
||||
@ -413,7 +406,8 @@ function CreateSharedSpawnFrame(parent_flow, enable_shared_spawns)
|
||||
tags = { action = "oarc_spawn_options", setting = "join_other_spawn" },
|
||||
type = "button",
|
||||
caption = { "oarc-join-someone-avail", num_avail_spawns },
|
||||
style = "green_button"
|
||||
style = "green_button",
|
||||
tooltip = { "oarc-join-someone-avail-tooltip", num_avail_spawns }
|
||||
}
|
||||
button.style.horizontal_align = "right"
|
||||
|
||||
@ -491,7 +485,8 @@ function CreateBuddySpawnFrame(parent_flow, player, enable_buddy_spawn, enable_s
|
||||
tags = { action = "oarc_spawn_options", setting = "buddy_team_select" },
|
||||
type = "checkbox",
|
||||
caption = { "oarc-create-buddy-team" },
|
||||
state = false
|
||||
state = false,
|
||||
tooltip = { "oarc-create-buddy-team-tooltip" }
|
||||
}
|
||||
end
|
||||
|
||||
@ -525,7 +520,8 @@ function CreateBuddySpawnFrame(parent_flow, player, enable_buddy_spawn, enable_s
|
||||
tags = { action = "oarc_spawn_options", setting = "buddy_select" },
|
||||
type = "drop-down",
|
||||
items = avail_buddies,
|
||||
selected_index = previous_index
|
||||
selected_index = previous_index,
|
||||
tooltip = { "oarc-buddy-select-tooltip" }
|
||||
}
|
||||
buddy_dropdown.style.horizontal_align = "left"
|
||||
|
||||
@ -540,7 +536,8 @@ function CreateBuddySpawnFrame(parent_flow, player, enable_buddy_spawn, enable_s
|
||||
tags = { action = "oarc_spawn_options", setting = "buddy_spawn_request" },
|
||||
type = "button",
|
||||
caption = { "oarc-buddy-spawn" },
|
||||
style = "green_button"
|
||||
style = "green_button",
|
||||
tooltip = { "oarc-buddy-spawn-tooltip" }
|
||||
}
|
||||
button.style.horizontal_align = "right"
|
||||
end
|
||||
@ -576,10 +573,14 @@ function DisplaySpawnOptions(player)
|
||||
local sGui = CreateSpawnMenuGuiFrame(player)
|
||||
|
||||
-- Create the default settings entry for the OarcSpawnChoices table
|
||||
local default_team = SPAWN_TEAM_CHOICE.join_main_team
|
||||
if (not gameplay.enable_main_team and gameplay.enable_separate_teams) then
|
||||
default_team = SPAWN_TEAM_CHOICE.join_own_team
|
||||
end
|
||||
---@type OarcSpawnChoices
|
||||
local spawn_choices_entry = {
|
||||
surface = global.ocfg.gameplay.default_surface,
|
||||
team = SPAWN_TEAM_CHOICE.join_main_team,
|
||||
team = default_team,
|
||||
moat = false,
|
||||
buddy = nil,
|
||||
distance = global.ocfg.gameplay.near_spawn_distance,
|
||||
@ -616,17 +617,8 @@ function SpawnOptsRadioSelect(event)
|
||||
if (event.element.parent.isolated_spawn_new_team_radio ~= nil) then
|
||||
event.element.parent.isolated_spawn_new_team_radio.state = false
|
||||
end
|
||||
-- if (event.element.parent.isolated_spawn_buddy_team_radio ~= nil) then
|
||||
-- event.element.parent.isolated_spawn_buddy_team_radio.state = false
|
||||
-- end
|
||||
elseif (elemName == "isolated_spawn_new_team_radio") then
|
||||
event.element.parent.isolated_spawn_main_team_radio.state = false
|
||||
-- if (event.element.parent.isolated_spawn_buddy_team_radio ~= nil) then
|
||||
-- event.element.parent.isolated_spawn_buddy_team_radio.state = false
|
||||
-- end
|
||||
-- elseif (elemName == "isolated_spawn_buddy_team_radio") then
|
||||
-- event.element.parent.isolated_spawn_main_team_radio.state = false
|
||||
-- event.element.parent.isolated_spawn_new_team_radio.state = false
|
||||
end
|
||||
|
||||
elseif (tags.setting == "buddy_team_select") then
|
||||
@ -683,6 +675,8 @@ function RequestBuddySpawn(player)
|
||||
if (buddy_choice == nil) then player.print({ "oarc-invalid-buddy" }) return end
|
||||
local buddy = game.players[buddy_choice]
|
||||
if (buddy == nil) then player.print({ "oarc-invalid-buddy" }) return end
|
||||
-- Confirm the buddy is still in the spawn menu!
|
||||
if (buddy.gui.screen.spawn_opts == nil) then player.print({ "oarc-invalid-buddy", buddy.name }) return end
|
||||
|
||||
DisplayBuddySpawnWaitMenu(player)
|
||||
DisplayBuddySpawnRequestMenu(buddy, player.name)
|
||||
@ -861,10 +855,6 @@ function SpawnRequest(player)
|
||||
-- Unlock spawn control gui tab
|
||||
SetOarcGuiTabEnabled(player, OARC_SPAWN_CTRL_TAB_NAME, true)
|
||||
|
||||
-- player.print({ "oarc-please-wait" })
|
||||
-- player.print({ "", { "oarc-please-wait" }, "!" })
|
||||
-- player.print({ "", { "oarc-please-wait" }, "!!" })
|
||||
|
||||
-- Destroy the spawn options gui
|
||||
if (player.gui.screen.spawn_opts ~= nil) then
|
||||
player.gui.screen.spawn_opts.destroy()
|
||||
@ -1177,13 +1167,6 @@ function AcceptBuddyRequest(player, requesting_buddy_name)
|
||||
SetOarcGuiTabEnabled(player, OARC_SPAWN_CTRL_TAB_NAME, true)
|
||||
SetOarcGuiTabEnabled(requesting_buddy, OARC_SPAWN_CTRL_TAB_NAME, true)
|
||||
|
||||
-- player.print({ "oarc-please-wait" })
|
||||
-- player.print({ "", { "oarc-please-wait" }, "!" })
|
||||
-- player.print({ "", { "oarc-please-wait" }, "!!" })
|
||||
-- requesting_buddy.print({ "oarc-please-wait" })
|
||||
-- requesting_buddy.print({ "", { "oarc-please-wait" }, "!" })
|
||||
-- requesting_buddy.print({ "", { "oarc-please-wait" }, "!!" })
|
||||
|
||||
global.ocore.buddyPairs[player.name] = requesting_buddy_name
|
||||
global.ocore.buddyPairs[requesting_buddy_name] = player.name
|
||||
end
|
||||
|
@ -51,8 +51,8 @@ oarc-you-will-spawn-once-host=Du wirst spawnen, sobald der Host ja gewählt hat.
|
||||
oarc-player-cancel-join-request=__1__ hat die Anfrage zum Beitritt zu deinem Spawn abgebrochen.
|
||||
|
||||
oarc-spawn-ctrl=Spawn-Einst.
|
||||
oarc-spawn-controls=Spawn Einstellungen:
|
||||
oarc-spawn-allow-joiners=Erlaube anderen, deiner Basis beizutreten.
|
||||
oarc-shared-spawn-controls=Spawn Einstellungen:
|
||||
oarc-shared-spawn-allow-joiners=Erlaube anderen, deiner Basis beizutreten.
|
||||
|
||||
oarc-set-respawn-loc=Setze neuen Spawn-Punkt (1 Stunde Abklingzeit)
|
||||
oarc-set-respawn-loc-cooldown=Set Respawn Cooldown Remaining: __1__
|
||||
|
@ -1,10 +1,9 @@
|
||||
[mod-description]
|
||||
oarc-mod=This is a multiplayer mod that allows every player to create their own spawn point when they join the game. There are a lot of helpful features to ensure that new players can join at anytime in the game or even join other player's spawn areas.\n\n[color=red][font=default-bold]Please check out the github page and discord for more information and support.[/font][/color]\n\n[font=italic]This USED to be available as a scenario, but now is only provided as a mod. The scenario included in this mod only provides a way to overwrite the default freeplay scenario. It also provides a way for experienced server hosts to configure settings from a file instead of through the usual mod settings. Please read the control.lua file inside the scenario for notes.[/font]
|
||||
oarc-mod=This is a multiplayer mod that allows every player to create their own spawn point when they join the game. There are a lot of helpful features to ensure that new players can join at anytime in the game or even join other player's spawn areas.\n\n[color=red][font=default-bold]Please check out the github page and discord for more information and support.[/font][/color]\n\n[font=default-small]This USED to be available as a scenario, but now is only provided as a mod. To start a new game with this mod, just use the default freeplay scenario. The scenario included in this mod only provides a template to overwrite the default freeplay scenario. It also provides a way for experienced server hosts to configure settings from a file instead of through the usual mod settings. Please read the control.lua file inside the scenario for notes.[/font]
|
||||
|
||||
[mod-setting-name]
|
||||
oarc-mod-welcome-msg-title=Welcome Message Title
|
||||
oarc-mod-welcome-msg=Game Welcome Message
|
||||
oarc-mod-server-msg=Server Welcome Message
|
||||
oarc-mod-welcome-msg-title=Welcome message title
|
||||
oarc-mod-welcome-msg=Welcome message
|
||||
oarc-mod-discord-invite=Discord Invite
|
||||
|
||||
oarc-mod-enable-main-team=Enable main team
|
||||
@ -35,16 +34,16 @@ oarc-mod-respawn-cooldown-min=Reset respawn point cooldown
|
||||
oarc-mod-enable-regrowth=Regrowth (map cleanup)
|
||||
oarc-mod-enable-world-eater=World eater (map cleanup - additional)
|
||||
oarc-mod-enable-abandoned-base-cleanup=Cleanup abandoned bases
|
||||
oarc-mod-regrowth-cleanup-interval-min=Regrowth cleanup interval
|
||||
|
||||
|
||||
[mod-setting-description]
|
||||
oarc-mod-welcome-msg-title=This is the title of the welcome message that will be displayed to players when they join the game.
|
||||
oarc-mod-welcome-msg=This is the welcome message that will be displayed to players when they join the game.
|
||||
oarc-mod-server-msg=This is an additional message that will be displayed to players when they join the game.
|
||||
oarc-mod-discord-invite=Place your discord invite here so players can easily copy it from the in game info panel. Leave empty to disable.
|
||||
oarc-mod-welcome-msg=This is the welcome message that will be displayed to players when they join the game and in the info panel. [color=red]Leave a single space to disable.[/color]
|
||||
oarc-mod-discord-invite=Place your discord invite here so players can easily copy it from the in game info panel. [color=red]Leave a single space to disable.[/color]
|
||||
|
||||
oarc-mod-enable-main-team=Allow players to join the main team. This is the default team that is created when the game starts.
|
||||
oarc-mod-enable-separate-teams=Allow players to start their own teams (CO-OP only, No PVP).\n[color=red][font=default-bold]You must enable one or both of the main team and separate team options. Otherwise it will default to main team allowed only.[/font][/color]
|
||||
oarc-mod-enable-main-team=Allow players to join the main team. This is the default team that is created when the game starts. This lets players share research progress.\n[color=red][font=default-bold]You must enable one or both of the main team and separate team options. Otherwise it will default to main team allowed only.[/font][/color]
|
||||
oarc-mod-enable-separate-teams=Allow players to start their own teams (CO-OP only, No PVP). This lets players have their own research progress.\n[color=red][font=default-bold]You must enable one or both of the main team and separate team options. Otherwise it will default to main team allowed only.[/font][/color]
|
||||
# oarc-mod-enable-spawning-on-other-surfaces=Allow spawning on other surfaces. If enabled, by default all other surfaces will be available for players to spawn on. You can configure individual surfaces using the in game settings menu as well.
|
||||
|
||||
oarc-mod-allow-moats-around-spawns=Allow players to choose spawns with a moat around them.
|
||||
@ -59,7 +58,7 @@ oarc-mod-enable-shared-team-vision=Makes sure all teams can see each other's map
|
||||
oarc-mod-enable-shared-team-chat=All teams can see each other's chat messages.
|
||||
oarc-mod-enable-shared-spawns=Allow players to share their spawn areas for other players to join.
|
||||
oarc-mod-number-of-players-per-shared-spawn=Number of players that can join a shared spawn, including the original player.
|
||||
oarc-mod-enable-friendly-fire=Enables friendly fire. So you can shoot your chests (or run over your friends with a train).
|
||||
oarc-mod-enable-friendly-fire=Enables friendly fire. So you can shoot your chests (or run over your friends with a train). This lets you damage your OWN team.
|
||||
|
||||
oarc-mod-main-force-name=The name of the main force. This is the default team that is created when the game starts.
|
||||
oarc-mod-default-surface=The default surface that players will spawn on if they join the main team or if spawning on other surfaces is not enabled.
|
||||
@ -70,4 +69,5 @@ oarc-mod-respawn-cooldown-min=The minimum time a player must wait before they ca
|
||||
|
||||
oarc-mod-enable-regrowth=Enables regrowth. This slowly removes inactive chunks over time. Any chunk with player structures will not be removed. This helps to keep the map (and file size) smaller over time.
|
||||
oarc-mod-enable-world-eater=Enables world eater. This requires regrowth. This slowly checks all chunks for a lack of player structures and entities and marks them for removal. This helps to keep the map (and file size) smaller over time. This is more of an experimental feature, use at your own risk.
|
||||
oarc-mod-enable-abandoned-base-cleanup=Abandoned bases will be cleaned up if players leave within a short time of joining.
|
||||
oarc-mod-enable-abandoned-base-cleanup=Abandoned bases will be cleaned up if players leave within a short time of joining. This does NOT require regrowth to be enabled.
|
||||
oarc-mod-regrowth-cleanup-interval-min=This is the interval in minutes that the regrowth cleanup will run. Whenever a map cleanup happens, the game freezes for a second, so you don't want to run this too often! Abandoned base cleanup happens immediately when a player leaves and is not affected by this setting.
|
||||
|
@ -12,8 +12,13 @@ oarc-click-info-btn-help=Click the INFO button in the top left to learn more abo
|
||||
oarc-vanilla-spawn=Vanilla Spawn
|
||||
oarc-default-spawn-behavior=This is the default spawn behavior of a vanilla game. You join the default team in the center of the map.
|
||||
|
||||
oarc-surface-select-tooltip=Select the surface you would like to spawn on.
|
||||
|
||||
oarc-join-main-team-radio=Join Main Team (shared research)
|
||||
oarc-join-main-team-tooltip=You will share research progress with other players on the main team.
|
||||
|
||||
oarc-create-own-team-radio=Create Your Own Team (own research tree)
|
||||
oarc-create-own-team-tooltip=You will have your own research tree and will not share research with players on the main team.
|
||||
|
||||
oarc-moat-option=Surround your spawn with a moat
|
||||
oarc-moat-option-tooltip=If you spawn near land, a ring of water will be generated around your spawn area. Depending on the mod options, there may be a small land bridge created as well. If you spawn in water already, this option has no effect.
|
||||
@ -35,7 +40,9 @@ oarc-spawn-distance-slider-tooltip=This is the minimum distance from the center
|
||||
|
||||
oarc-starting-area-normal=You are spawned in a new area, with pre-set starting resources.
|
||||
oarc-join-someone-dropdown-label=Select Shared Spawn:
|
||||
oarc-join-someone-dropdown-tooltip=Select a player to REQUEST to join their shared spawn area.
|
||||
oarc-join-someone-avail=Join Someone (__1__ available)
|
||||
oarc-join-someone-avail-tooltip=This will send a request to join another player's shared spawn area. You can cancel the request if you change your mind.
|
||||
oarc-join-someone-info=You can request to join someone else's starting area. This requires at least 1 person to have allowed access to their base.
|
||||
|
||||
oarc-no-shared-avail=There are currently no shared bases availble to spawn at.
|
||||
@ -45,6 +52,7 @@ oarc-no-shared-spawn-selected=You have not selected a valid player to join. Plea
|
||||
oarc-invalid-host-shared-spawn=Selected player is no longer available! Please try again.
|
||||
|
||||
oarc-buddy-spawn=Request Buddy Spawn
|
||||
oarc-buddy-spawn-tooltip=This will send the request to your selected buddy. They may choose to accept or deny the request. You may also cancel the request if you change your mind.
|
||||
oarc-buddy-spawn-disabled=Buddy spawns are disabled in this mode.
|
||||
oarc-buddy-spawn-info=The buddy system requires 2 players in this menu at the same time, you spawn beside each other, each with your own resources.
|
||||
|
||||
@ -70,13 +78,16 @@ oarc-you-will-spawn-once-host=You will spawn once the host selects yes...
|
||||
oarc-player-cancel-join-request=__1__ cancelled their request to join your spawn.
|
||||
|
||||
oarc-spawn-ctrl=Spawn Ctrl
|
||||
oarc-spawn-controls=Spawn Controls:
|
||||
oarc-spawn-allow-joiners=Allow others to join your base.
|
||||
oarc-shared-spawn-controls=Shared Spawn Controls
|
||||
oarc-shared-spawn-allow-joiners=Allow others to join your base.
|
||||
|
||||
oarc-set-respawn-loc=Set New Respawn Location (has a cooldown)
|
||||
oarc-set-respawn-loc-header=Respawn Location
|
||||
oarc-set-respawn-loc=Set Respawn Location
|
||||
oarc-set-respawn-loc-tooltip=This will set your respawn point to your current location. There is a cooldown before you can change it again.
|
||||
oarc-set-respawn-loc-cooldown=Set Respawn Cooldown Remaining: __1__
|
||||
oarc-set-respawn-note=This will set your respawn point to your current location.
|
||||
oarc-set-respawn-note=This will set your respawn point to your current location. Change tabs to update the timer.
|
||||
|
||||
oarc-join-queue-header=Shared Spawn Queue
|
||||
oarc-select-player-join-queue=Select a player from the join queue:
|
||||
|
||||
oarc-accept=Accept
|
||||
@ -96,6 +107,7 @@ oarc-your-request-rejected=Your request to join was rejected.
|
||||
oarc-player-joining-base=__1__ is joining __2__'s base!
|
||||
|
||||
oarc-buddy-select-label=Select Buddy:
|
||||
oarc-buddy-select-tooltip=Select a buddy from the list to request a buddy spawn.
|
||||
oarc-buddy-spawn-options=Buddy Spawn Options
|
||||
oarc-buddy-spawn-instructions=You and your buddy must be in this menu at the same time. Only one of you can send the request. Select your your spawn options first, then select your buddy from the list. Click Request Buddy Spawn. The other buddy can then accept (or deny) the request. This will allow you both to spawn next to each other, each with your own spawn area.
|
||||
|
||||
@ -105,6 +117,7 @@ oarc-buddy-spawn-request-header=Buddy Request!
|
||||
|
||||
oarc-buddy-refresh=Refresh Buddy List
|
||||
oarc-create-buddy-team=Create Your Own Buddy Team (buddy and you share research)
|
||||
oarc-create-buddy-team-tooltip=If this is enabled, you and your buddy will share research progress.
|
||||
|
||||
oarc-buddy-spawn-near=Request Buddy Spawn (Near)
|
||||
oarc-buddy-spawn-far=Request Buddy Spawn (Far)
|
||||
@ -138,10 +151,11 @@ oarc-wait-text=Your spawn is being created now.\nYou will be teleported there in
|
||||
oarc-settings-tab-title=Mod Settings
|
||||
oarc-settings-tab-admin-warning=You are an admin. Changing these settings late in the game may cause issues! BE CAREFUL!
|
||||
oarc-settings-tab-player-warning=You are not an admin. These settings are read-only for you.
|
||||
oarc-settings-tab-description=This tab contains additional settings that are not available in the mod settings menu.
|
||||
oarc-settings-tab-description=This tab contains the same mod settings in the mod settings menu AND some additional settings that can only be changed in game.
|
||||
oarc-settings-tab-text-field-enter-tooltip=[color=red]You must press ENTER after typing in a text field to save the value![/color]
|
||||
|
||||
oarc-settings-tab-title-surface=Surface Settings
|
||||
oarc-settings-tab-surface-checkbox-tooltip=Enabling this will allow new players to select this surface when they spawn.
|
||||
|
||||
|
||||
oarc-mod-faq-what-is-this-mod=What is this mod?
|
||||
|
@ -51,8 +51,8 @@ oarc-you-will-spawn-once-host=Vous apparaîtrez une fois que l'hôte aura choisi
|
||||
oarc-player-cancel-join-request=__1__ a annulé sa demande pour rejoindre votre base.
|
||||
|
||||
oarc-spawn-ctrl=Spawn Ctrl
|
||||
oarc-spawn-controls=Contrôle d'apparition':
|
||||
oarc-spawn-allow-joiners=Autoriser les autres à rejoindre votre base.
|
||||
oarc-shared-spawn-controls=Contrôle d'apparition':
|
||||
oarc-shared-spawn-allow-joiners=Autoriser les autres à rejoindre votre base.
|
||||
|
||||
oarc-set-respawn-loc=Définir le nouvel emplacement de réapparition (il y a une heure d'attente pour réutiliser ce boutton)
|
||||
oarc-set-respawn-loc-cooldown=Définir le temps d'attente pour réapparaître restant: __1__
|
||||
|
@ -51,8 +51,8 @@ oarc-you-will-spawn-once-host=You will spawn once the host selects yes...
|
||||
oarc-player-cancel-join-request=__1__ cancelled their request to join your spawn.
|
||||
|
||||
oarc-spawn-ctrl=Spawn Ctrl
|
||||
oarc-spawn-controls=Spawn Controls:
|
||||
oarc-spawn-allow-joiners=Allow others to join your base.
|
||||
oarc-shared-spawn-controls=Spawn Controls:
|
||||
oarc-shared-spawn-allow-joiners=Allow others to join your base.
|
||||
|
||||
oarc-set-respawn-loc=Set New Respawn Location (has a cooldown)
|
||||
oarc-set-respawn-loc-cooldown=Set Respawn Cooldown Remaining: __1__
|
||||
|
@ -51,8 +51,8 @@ oarc-you-will-spawn-once-host=一旦对方大佬选择是,你便会加入...
|
||||
oarc-player-cancel-join-request=__1__ 取消了他加入你基地的请求。
|
||||
|
||||
oarc-spawn-ctrl=生成控制
|
||||
oarc-spawn-controls=生成控制选项:
|
||||
oarc-spawn-allow-joiners=允许其他人加入你的基地。
|
||||
oarc-shared-spawn-controls=生成控制选项:
|
||||
oarc-shared-spawn-allow-joiners=允许其他人加入你的基地。
|
||||
|
||||
oarc-set-respawn-loc=设置新的重生点(有冷却时间)
|
||||
oarc-set-respawn-loc-cooldown=重生点冷却剩余时间:__1__
|
||||
|
@ -1,3 +1,3 @@
|
||||
scenario-name=OARC Scenario
|
||||
|
||||
description=This is an EMPTY scenario! It is provided as a way to override the default freeplay scenario if you want to. Additionally, experienced server hosts can configure all settings from a file instead of through the mod settings. Please read the control.lua file inside the scenario for notes.
|
||||
description=This is an EMPTY template scenario! It is provided as a way to override the default freeplay scenario if you want to. Additionally, experienced server hosts can configure all settings from a file instead of through the mod settings. Please read the control.lua file inside the scenario for notes.
|
||||
|
16
settings.lua
16
settings.lua
@ -13,13 +13,6 @@ data:extend({
|
||||
default_value = "Insert Server Welcome Message Here!",
|
||||
order = "a2"
|
||||
},
|
||||
{
|
||||
type = "string-setting",
|
||||
name = "oarc-mod-server-msg",
|
||||
setting_type = "runtime-global",
|
||||
default_value = "Insert Server Info Message Here!",
|
||||
order = "a3"
|
||||
},
|
||||
{
|
||||
type = "string-setting",
|
||||
name = "oarc-mod-discord-invite",
|
||||
@ -215,6 +208,15 @@ data:extend({
|
||||
default_value = true,
|
||||
order = "g3"
|
||||
},
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "oarc-mod-regrowth-cleanup-interval-min",
|
||||
setting_type = "runtime-global",
|
||||
default_value = 60,
|
||||
minimum_value = 15,
|
||||
maximum_value = 180,
|
||||
order = "g4"
|
||||
},
|
||||
|
||||
|
||||
-- Vanilla spawn point are not implemented yet.
|
||||
|
Loading…
Reference in New Issue
Block a user