mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Fix start, join, formatting, and locale issues
This commit is contained in:
@@ -28,7 +28,6 @@ return {
|
||||
"modules.addons.nukeprotect",
|
||||
"modules.addons.inserter",
|
||||
"modules.addons.miner",
|
||||
"modules.addons.lawnmower",
|
||||
"modules.addons.logging",
|
||||
|
||||
-- Control
|
||||
|
||||
@@ -22,6 +22,7 @@ end)
|
||||
Roles.new_role("System", "SYS")
|
||||
:set_permission_group("Default", true)
|
||||
:set_flag("is_admin")
|
||||
:set_flag("is_system")
|
||||
:set_flag("is_spectator")
|
||||
:set_flag("report-immune")
|
||||
:set_flag("instant-respawn")
|
||||
@@ -31,14 +32,15 @@ Roles.new_role("Senior Administrator", "SAdmin")
|
||||
:set_permission_group("Admin")
|
||||
:set_custom_color{ r = 233, g = 63, b = 233 }
|
||||
:set_flag("is_admin")
|
||||
:set_flag("is_system")
|
||||
:set_flag("is_spectator")
|
||||
:set_flag("report-immune")
|
||||
:set_flag("instant-respawn")
|
||||
:set_parent("Administrator")
|
||||
:allow{
|
||||
"command/interface",
|
||||
"command/_rcon",
|
||||
"command/debug",
|
||||
"command/toggle-cheat-mode",
|
||||
"command/set-cheat-mode",
|
||||
"command/research-all",
|
||||
}
|
||||
|
||||
@@ -54,7 +56,6 @@ Roles.new_role("Administrator", "Admin")
|
||||
"gui/warp-list/bypass-proximity",
|
||||
"gui/warp-list/bypass-cooldown",
|
||||
"command/connect-all",
|
||||
"command/collectdata",
|
||||
}
|
||||
|
||||
Roles.new_role("Moderator", "Mod")
|
||||
@@ -71,21 +72,29 @@ Roles.new_role("Moderator", "Mod")
|
||||
"command/repair",
|
||||
"command/kill/always",
|
||||
"command/clear-tag/always",
|
||||
"command/go-to-spawn/always",
|
||||
"command/spawn/always",
|
||||
"command/clear-reports",
|
||||
"command/clear-warnings",
|
||||
"command/clear-script-warnings",
|
||||
"command/clear-last-warnings",
|
||||
"command/clear-inventory",
|
||||
-- 'command/bonus',
|
||||
"gui/bonus",
|
||||
"command/kill-enemies",
|
||||
"command/remove-enemies",
|
||||
--'command/bonus',
|
||||
"command/home",
|
||||
"command/home-set",
|
||||
"command/home-get",
|
||||
"command/set-home",
|
||||
"command/get-home",
|
||||
"command/return",
|
||||
"command/connect-player",
|
||||
"command/set-bot-queue",
|
||||
"command/set-game-speed",
|
||||
"command/set-friendly-fire",
|
||||
"command/set-always-day",
|
||||
"command/set-pollution-enabled",
|
||||
"command/clear-pollution",
|
||||
"gui/rocket-info/toggle-active",
|
||||
"gui/rocket-info/remote_launch",
|
||||
"command/toggle-friendly-fire",
|
||||
"command/toggle-always-day",
|
||||
"gui/bonus",
|
||||
"fast-tree-decon",
|
||||
}
|
||||
|
||||
@@ -98,15 +107,15 @@ Roles.new_role("Trainee", "TrMod")
|
||||
:set_parent("Veteran")
|
||||
:allow{
|
||||
"command/admin-chat",
|
||||
"command/admin-marker",
|
||||
"command/goto",
|
||||
"command/teleport",
|
||||
"command/bring",
|
||||
"command/give-warning",
|
||||
"command/create-warning",
|
||||
"command/get-warnings",
|
||||
"command/get-reports",
|
||||
"command/protect-entity",
|
||||
"command/protect-area",
|
||||
"command/protect-tag",
|
||||
"command/jail",
|
||||
"command/unjail",
|
||||
"command/kick",
|
||||
@@ -114,17 +123,10 @@ Roles.new_role("Trainee", "TrMod")
|
||||
"command/spectate",
|
||||
"command/follow",
|
||||
"command/search",
|
||||
"command/search-online",
|
||||
"command/search-amount",
|
||||
"command/search-recent",
|
||||
"command/search-online",
|
||||
"command/personal-battery-recharge",
|
||||
"command/pollution-off",
|
||||
"command/pollution-clear",
|
||||
"command/bot-queue-get",
|
||||
"command/bot-queue-set",
|
||||
"command/game-speed",
|
||||
"command/kill-biters",
|
||||
"command/remove-biters",
|
||||
"command/clear-blueprints",
|
||||
"gui/playerdata",
|
||||
}
|
||||
|
||||
@@ -164,11 +166,11 @@ Roles.new_role("Sponsor", "Spon")
|
||||
:allow{
|
||||
"gui/rocket-info/toggle-active",
|
||||
"gui/rocket-info/remote_launch",
|
||||
-- 'command/bonus',
|
||||
"gui/bonus",
|
||||
--"command/bonus",
|
||||
"command/home",
|
||||
"command/home-set",
|
||||
"command/home-get",
|
||||
"command/set-home",
|
||||
"command/get-home",
|
||||
"command/return",
|
||||
"fast-tree-decon",
|
||||
}
|
||||
@@ -182,8 +184,8 @@ Roles.new_role("Supporter", "Sup")
|
||||
"command/tag-color",
|
||||
"command/jail",
|
||||
"command/unjail",
|
||||
"command/join-message",
|
||||
"command/join-message-clear",
|
||||
"command/set-join-message",
|
||||
"command/remove-join-message",
|
||||
}
|
||||
|
||||
Roles.new_role("Partner", "Part")
|
||||
@@ -203,7 +205,10 @@ Roles.new_role("Veteran", "Vet")
|
||||
:set_parent("Member")
|
||||
:allow{
|
||||
"command/chat-bot",
|
||||
"command/last-location",
|
||||
"command/clear-ground-items",
|
||||
"command/clear-blueprints-radius",
|
||||
"command/set-trains-to-automatic",
|
||||
"command/set-auto-research",
|
||||
}
|
||||
:set_auto_assign_condition(function(player)
|
||||
if player.online_time >= hours10 then
|
||||
@@ -226,18 +231,14 @@ Roles.new_role("Member", "Mem")
|
||||
"gui/task-list/edit",
|
||||
"gui/warp-list/add",
|
||||
"gui/warp-list/edit",
|
||||
"command/save-quickbar",
|
||||
"gui/surveillance",
|
||||
"gui/vlayer-edit",
|
||||
"command/save-quickbar",
|
||||
"command/vlayer-info",
|
||||
"command/personal-logistic",
|
||||
"command/auto-research",
|
||||
"command/set-trains-to-automatic",
|
||||
"command/lawnmower",
|
||||
"command/waterfill",
|
||||
"command/artillery-target-remote",
|
||||
"command/clear-item-on-ground",
|
||||
"command/clear-blueprint",
|
||||
"gui/surveillance",
|
||||
"command/artillery",
|
||||
}
|
||||
|
||||
local hours3, hours15 = 3 * 216000, 15 * 60
|
||||
@@ -248,7 +249,7 @@ Roles.new_role("Regular", "Reg")
|
||||
:allow{
|
||||
"command/kill",
|
||||
"command/rainbow",
|
||||
"command/go-to-spawn",
|
||||
"command/spawn",
|
||||
"command/me",
|
||||
"standard-decon",
|
||||
"bypass-entity-protection",
|
||||
@@ -271,15 +272,14 @@ local default = Roles.new_role("Guest", "")
|
||||
:allow{
|
||||
"command/tag",
|
||||
"command/tag-clear",
|
||||
"command/search-help",
|
||||
"command/list-roles",
|
||||
"command/find-on-map",
|
||||
"command/report",
|
||||
"command/commands",
|
||||
"command/get-role",
|
||||
"command/locate",
|
||||
"command/create-report",
|
||||
"command/ratio",
|
||||
"command/server-ups",
|
||||
"command/save-data",
|
||||
"command/preference",
|
||||
"command/set-preference",
|
||||
"command/data-preference",
|
||||
"command/connect",
|
||||
"gui/player-list",
|
||||
"gui/rocket-info",
|
||||
|
||||
@@ -12,7 +12,7 @@ local Reports = require("modules.exp_legacy.modules.control.reports") --- @dep m
|
||||
local Warnings = require("modules.exp_legacy.modules.control.warnings") --- @dep modules.control.warnings
|
||||
local Jail = require("modules.exp_legacy.modules.control.jail") --- @dep modules.control.jail
|
||||
local Colors = require("modules/exp_util/include/color")
|
||||
local format_player_name = ExpUtil.format_player_name_locale --- @dep expcore.common
|
||||
local format_player_name = ExpUtil.format_player_name_locale
|
||||
|
||||
local SelectedPlayer, SelectedAction
|
||||
local function set_datastores(player, action)
|
||||
@@ -91,7 +91,7 @@ local report_player = new_button("utility/spawn_flag", { "player-list.report-pla
|
||||
:on_click(function(player)
|
||||
local selected_player_name = get_action_player_name(player)
|
||||
if Reports.is_reported(selected_player_name, player.name) then
|
||||
player.print({ "expcom-report.already-reported" }, Colors.orange_red)
|
||||
player.print({ "exp-commands_report.already-reported" }, Colors.orange_red)
|
||||
else
|
||||
SelectedAction:set(player, "command/report")
|
||||
end
|
||||
@@ -100,8 +100,8 @@ local report_player = new_button("utility/spawn_flag", { "player-list.report-pla
|
||||
local function report_player_callback(player, reason)
|
||||
local selected_player_name, selected_player_color = get_action_player_name(player)
|
||||
local by_player_name_color = format_player_name(player)
|
||||
game.print{ "expcom-report.non-admin", selected_player_color, reason }
|
||||
Roles.print_to_roles_higher("Trainee", { "expcom-report.admin", selected_player_color, by_player_name_color, reason })
|
||||
game.print{ "exp-commands_reports.response", selected_player_color, reason }
|
||||
Roles.print_to_roles_higher("Trainee", { "exp-commands_reports.response-admin", selected_player_color, by_player_name_color, reason })
|
||||
Reports.report_player(selected_player_name, player.name, reason)
|
||||
end
|
||||
|
||||
@@ -115,7 +115,7 @@ local warn_player = new_button("utility/spawn_flag", { "player-list.warn-player"
|
||||
local function warn_player_callback(player, reason)
|
||||
local selected_player_name, selected_player_color = get_action_player_name(player)
|
||||
local by_player_name_color = format_player_name(player)
|
||||
game.print{ "expcom-warnings.received", selected_player_color, by_player_name_color, reason }
|
||||
game.print{ "exp-commands_warnings.create", selected_player_color, by_player_name_color, reason }
|
||||
Warnings.add_warning(selected_player_name, player.name, reason)
|
||||
end
|
||||
|
||||
@@ -125,7 +125,7 @@ local jail_player = new_button("utility/multiplayer_waiting_icon", { "player-lis
|
||||
:on_click(function(player)
|
||||
local selected_player_name, selected_player_color = get_action_player_name(player)
|
||||
if Jail.is_jailed(selected_player_name) then
|
||||
player.print({ "expcom-jail.already-jailed", selected_player_color }, Colors.orange_red)
|
||||
player.print({ "exp-commands_jail.already-jailed", selected_player_color }, Colors.orange_red)
|
||||
else
|
||||
SelectedAction:set(player, "command/jail")
|
||||
end
|
||||
@@ -134,7 +134,7 @@ local jail_player = new_button("utility/multiplayer_waiting_icon", { "player-lis
|
||||
local function jail_player_callback(player, reason)
|
||||
local selected_player_name, selected_player_color = get_action_player_name(player)
|
||||
local by_player_name_color = format_player_name(player)
|
||||
game.print{ "expcom-jail.give", selected_player_color, by_player_name_color, reason }
|
||||
game.print{ "exp-commands_jail.jailed", selected_player_color, by_player_name_color, reason }
|
||||
Jail.jail_player(selected_player_name, player.name, reason)
|
||||
end
|
||||
|
||||
|
||||
@@ -3,15 +3,6 @@
|
||||
-- all files which are loaded (including the config files) are present in ./config/file_loader.lua
|
||||
-- this file is the landing point for all scenarios please DO NOT edit directly, further comments are to aid development
|
||||
|
||||
local _xpcall = xpcall
|
||||
--- @diagnostic disable
|
||||
xpcall = function(func, error_handler, ...)
|
||||
local rtn = { _xpcall(func, error_handler, ...) }
|
||||
if not rtn[1] then error(rtn[2]) end
|
||||
return table.unpack(rtn)
|
||||
end
|
||||
--- @diagnostic enable
|
||||
|
||||
log("[START] -----| Explosive Gaming Scenario Loader |-----")
|
||||
log("[INFO] Setting up lua environment")
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ left-button-tooltip=Hide all open windows.
|
||||
[expcore-data]
|
||||
description-preference=Allows you to set/get your data saving preference.
|
||||
description-data=Writes all your player data to a file on your computer.
|
||||
arg-option=One of "All", "Statistics", "Settings", "Required"
|
||||
set-preference=You data saving preference has been set to __1__. Existing data will not be effected until you rejoin.
|
||||
get-preference=You data saving preference is __1__. Use /set-preference to change this. Use /save-data to get a local copy of your data.
|
||||
get-data=Your player data has been writen to file, location: factorio/script_output/expgaming_player_data.json
|
||||
|
||||
@@ -23,6 +23,9 @@ end)
|
||||
|
||||
local speech_bubble_async =
|
||||
Async.register(function(data)
|
||||
--- @cast data { ent: LuaEntity, name: string, msg_number: number }
|
||||
if not data.ent.valid then return end
|
||||
|
||||
local message =
|
||||
data.ent.surface.create_entity{
|
||||
name = "compi-speech-bubble",
|
||||
|
||||
@@ -6,7 +6,7 @@ local Event = require("modules/exp_legacy/utils/event") --- @dep utils.event
|
||||
local Storage = require("modules/exp_util/storage") --- @dep utils.global
|
||||
local Jail = require("modules.exp_legacy.modules.control.jail") --- @dep modules.control.jail
|
||||
local Protection = require("modules.exp_legacy.modules.control.protection") --- @dep modules.control.protection
|
||||
local format_player_name = ExpUtil.format_player_name_locale --- @dep expcore.common
|
||||
local format_player_name = ExpUtil.format_player_name_locale
|
||||
|
||||
--- Stores how many times the repeat violation was triggered
|
||||
local repeat_count = {}
|
||||
|
||||
@@ -5,7 +5,7 @@ local ExpUtil = require("modules/exp_util")
|
||||
local Event = require("modules/exp_legacy/utils/event") --- @dep utils.event
|
||||
local Jail = require("modules.exp_legacy.modules.control.jail") --- @dep modules.control.jail
|
||||
local Reports = require("modules.exp_legacy.modules.control.reports") --- @dep modules.control.reports
|
||||
local format_player_name = ExpUtil.format_player_name_locale --- @dep expcore.common
|
||||
local format_player_name = ExpUtil.format_player_name_locale
|
||||
|
||||
--- Returns the playtime of the reporter. Used when calculating the total playtime of all reporters
|
||||
local function reporter_playtime(_, by_player_name, _)
|
||||
|
||||
@@ -8,7 +8,7 @@ local ExpUtil = require("modules/exp_util")
|
||||
local Event = require("modules/exp_legacy/utils/event") --- @dep utils.event
|
||||
local Gui = require("modules.exp_legacy.expcore.gui") --- @dep expcore.gui
|
||||
local Roles = require("modules.exp_legacy.expcore.roles") --- @dep expcore.roles
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Commands = require("modules/exp_commands") --- @dep expcore.commands
|
||||
local PlayerData = require("modules.exp_legacy.expcore.player_data") --- @dep expcore.player_data
|
||||
local External = require("modules.exp_legacy.expcore.external") --- @dep expcore.external
|
||||
local format_number = require("util").format_number --- @dep util
|
||||
@@ -193,9 +193,9 @@ define_tab({ "readme.commands-tab" }, { "readme.commands-tooltip" },
|
||||
commands.style.cell_padding = 0
|
||||
|
||||
-- Add the rules to the table
|
||||
for name, command in pairs(Commands.get(player)) do
|
||||
for name, command in pairs(Commands.list_for_player(player)) do
|
||||
Gui.centered_label(commands, 120, name)
|
||||
Gui.centered_label(commands, 450, command.help)
|
||||
Gui.centered_label(commands, 450, command.description)
|
||||
end
|
||||
|
||||
return container
|
||||
|
||||
@@ -395,7 +395,7 @@ local vlayer_gui_control_build =
|
||||
Selection.stop(player)
|
||||
else
|
||||
Selection.start(player, SelectionConvertArea)
|
||||
player.print{ "expcom-waterfill.entered-area-selection" }
|
||||
player.print{ "exp-commands_waterfill.entered-area-selection" }
|
||||
end
|
||||
|
||||
vlayer_gui_list_refresh(player)
|
||||
|
||||
Reference in New Issue
Block a user