Исправлен мод heroturrets

Добавлен мод blueprint-sandboxes
Добавляет метку версии в zzzparanoidal (#72)
This commit is contained in:
2024-08-16 10:59:02 +03:00
parent b5ed31105c
commit 46d69f3a45
56 changed files with 4537 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
-- Chat helpers to proxy messages between Sandboxes and the normal Surfaces
local Chat = {}
-- Proxy Chats between Sandbox Force <-> Original Force
function Chat.OnChat(event)
if event.player_index == nil then
return
end
local player = game.players[event.player_index]
local playerData = global.players[event.player_index]
if Sandbox.IsPlayerInsideSandbox(player) then
game.forces[playerData.forceName].print(player.name .. ": " .. event.message, player.chat_color)
else
local sandboxForce = game.forces[playerData.sandboxForceName]
if sandboxForce ~= nil then
sandboxForce.print(player.name .. ": " .. event.message, player.chat_color)
end
end
end
return Chat