1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00

Train spawner reload: Copy train settings

This commit is contained in:
Hellss
2022-01-11 17:42:14 +03:00
parent 9aed01d2b6
commit cf37815bcb
2 changed files with 30 additions and 5 deletions

View File

@@ -627,6 +627,14 @@ local function createFrame()
Draw()
end
net.Receive("train_spawner_open",function()
local tbl = net.ReadTable()
local tool = LocalPlayer():GetTool("train_spawner")
Settings[tbl.Train] = tbl
Settings.Train = tbl.Train
tool.Settings = tbl
UpdateConCMD()
end)
net.Receive("MetrostroiTrainSpawner",createFrame)
net.Receive("MetrostroiMaxWagons", function()
MaxWagons = GetGlobalInt("metrostroi_maxtrains")*GetGlobalInt("metrostroi_maxwagons")