Merge pull request #504 from bbassie/refactor/remove-exp-legacy

Remove the exp_legacy plugin
This commit is contained in:
Bastiaan authored and GitHub committed 2026-10-15 14:07:01 +01:00
1 parent 98c3173807
commit 55bdf72fff
27 files changed
+39 -1697

No files matched your search

+2 -3
View File
@@ -1,5 +1,5 @@
--[[-- Command Rcon - ExpCore
Adds rcon interfaces for the legacy exp core
--[[-- Command Rcon - ExpGaming
Adds rcon statics for the ExpGaming modules
]]
local Commands = require("modules/exp_commands")
@@ -8,5 +8,4 @@ local add_static, add_dynamic = Commands.add_rcon_static, Commands.add_rcon_dyna
add_static("Gui", require("modules/exp_gui"))
add_static("Roles", require("modules/exp_roles"))
add_static("Datastore", require("modules.exp_legacy.expcore.datastore"))
add_static("ExpServerList", require("modules/exp_server_list"))
@@ -1,132 +0,0 @@
local Gui = require("modules/exp_scenario/gui/debug/shim")
local Datastore = require("modules.exp_legacy.expcore.datastore")
local Color = require("modules/exp_util/include/color")
local Model = require("modules/exp_scenario/gui/debug/model")
local dump = Model.dump
local concat = table.concat
local Public = {}
local header_name = Gui.uid_name()
local left_panel_name = Gui.uid_name()
local right_panel_name = Gui.uid_name()
local input_text_box_name = Gui.uid_name()
local refresh_name = Gui.uid_name()
Public.name = "Datastore"
function Public.show(container)
local main_flow = container.add{ type = "flow", direction = "horizontal" }
local left_panel = main_flow.add{ type = "scroll-pane", name = left_panel_name }
local left_panel_style = left_panel.style
left_panel_style.width = 300
for name in pairs(table.key_sort(Datastore.debug())) do
local header = left_panel.add{ type = "flow" }.add{ type = "label", name = header_name, caption = name }
Gui.set_data(header, name)
end
local right_flow = main_flow.add{ type = "flow", direction = "vertical" }
local right_top_flow = right_flow.add{ type = "flow", direction = "horizontal" }
local input_text_box = right_top_flow.add{ type = "text-box", name = input_text_box_name }
local input_text_box_style = input_text_box.style
input_text_box_style.horizontally_stretchable = true
input_text_box_style.height = 32
input_text_box_style.maximal_width = 1000
local refresh_button =
right_top_flow.add{ type = "sprite-button", name = refresh_name, sprite = "utility/reset", tooltip = "refresh" }
local refresh_button_style = refresh_button.style
refresh_button_style.width = 32
refresh_button_style.height = 32
local right_panel = right_flow.add{ type = "text-box", name = right_panel_name }
right_panel.read_only = true
right_panel.selectable = true
local right_panel_style = right_panel.style
right_panel_style.vertically_stretchable = true
right_panel_style.horizontally_stretchable = true
right_panel_style.maximal_width = 1000
right_panel_style.maximal_height = 1000
local data = {
right_panel = right_panel,
input_text_box = input_text_box,
selected_header = nil,
}
Gui.set_data(input_text_box, data)
Gui.set_data(left_panel, data)
Gui.set_data(refresh_button, data)
end
Gui.on_click(
header_name,
function(event)
local element = event.element
local table_name = Gui.get_data(element)
local left_panel = element.parent.parent
local data = Gui.get_data(left_panel)
local right_panel = data.right_panel
local selected_header = data.selected_header
local input_text_box = data.input_text_box
if selected_header then
selected_header.style.font_color = Color.white
end
element.style.font_color = Color.orange
data.selected_header = element
input_text_box.text = table_name
input_text_box.style.font_color = Color.black
local content = Datastore.debug(table_name)
local content_string = {}
for key, value in pairs(content) do
content_string[#content_string + 1] = key:gsub("^%l", string.upper) .. " = " .. dump(value)
end
right_panel.text = concat(content_string, "\n")
end
)
local function update_dump(text_input, data)
local content = Datastore.debug(text_input.text)
local content_string = {}
for key, value in pairs(content) do
content_string[#content_string + 1] = key:gsub("^%l", string.upper) .. " = " .. dump(value)
end
data.right_panel.text = concat(content_string, "\n")
end
Gui.on_text_changed(
input_text_box_name,
function(event)
local element = event.element
local data = Gui.get_data(element)
update_dump(element, data)
end
)
Gui.on_click(
refresh_name,
function(event)
local element = event.element
local data = Gui.get_data(element)
local input_text_box = data.input_text_box
update_dump(input_text_box, data)
end
)
return Public
@@ -5,7 +5,6 @@ local Public = {}
local pages = {
require("modules/exp_scenario/gui/debug/redmew_global_view"),
require("modules/exp_scenario/gui/debug/expcore_datastore_view"),
require("modules/exp_scenario/gui/debug/expcore_gui_view"),
require("modules/exp_scenario/gui/debug/global_view"),
require("modules/exp_scenario/gui/debug/package_view"),
+12
View File
@@ -528,6 +528,18 @@ tooltip-goto-disabled=You are not on a warp point, walk to a warp point
[exp_afk-kick]
kick-message=All players were kicked because everyone was AFK.
[info]
discord=Join us on our discord at: __1__
website=Please visit our website at: __1__
status=Want to check if out servers are down? Visit: __1__
github=Want to help improve our server with some extra features? Help us at: __1__
patreon=Consider supporting our server at: __1__
custom-commands=We use custom commands, such as /tag and /me, use /chelp for more info.
read-readme=Make sure you have read the information gui (It can be found through the info mark on the top left)
softmod=We run a softmod on our servers. A softmod is a custom scenario that runs on this server, an example is the player list.
redmew=We don't talk about redmew here; they beat us to 1000 members ;-;
lhd=All trains must be LHD! This is a long standing rule on our servers, please respect this.
[exp_chat-auto-reply]
chat-reply=[Compilatron] __1__
chat-disallowed=You can't use global chat commands
+12
View File
@@ -518,6 +518,18 @@ message-research=你要研究 [technology=__1__] 在 __2__ 級 才可使用太
[exp_afk-kick]
kick-message=因地圖中沒有活躍玩家,所以所有人都已被請離。
[info]
discord=加入社群: __1__
website=訪問網站: __1__
status=伺服器狀態: __1__
github=增加功能或回報錯誤: __1__
patreon=支持我們: __1__
custom-commands=這裹使用了自制指令,如 /tag 和 /me。可使用 /chelp 查看更多。
read-readme=確保你已閱讀相關資訊。按左上 i 圖標可再次查看
softmod=這裹用了自設情境,是一種軟裝模組。
redmew=We don't talk about redmew here; they beat us to 1000 members ;-;
lhd=列車必須是左則通行。這是本服務器長久以來的規則。
[exp_chat-auto-reply]
chat-reply=[Compilatron] __1__
chat-disallowed=You can't use global chat commands
+12
View File
@@ -518,6 +518,18 @@ message-research=你要研究 [technology=__1__] 在 __2__ 級 才可使用太
[exp_afk-kick]
kick-message=因地圖中沒有活躍玩家,所以所有人都已被請離。
[info]
discord=加入社群: __1__
website=訪問網站: __1__
status=伺服器狀態: __1__
github=增加功能或回報錯誤: __1__
patreon=支持我們: __1__
custom-commands=這裹使用了自制指令,如 /tag 和 /me。可使用 /chelp 查看更多。
read-readme=確保你已閱讀相關資訊。按左上 i 圖標可再次查看
softmod=這裹用了自設情境,是一種軟裝模組。
redmew=We don't talk about redmew here; they beat us to 1000 members ;-;
lhd=列車必須是左則通行。這是本服務器長久以來的規則。
[exp_chat-auto-reply]
chat-reply=[Compilatron] __1__
chat-disallowed=You can't use global chat commands