Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI 4 Sim Verison 2 #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions mods/U4S/modules/Sim/Main.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---@class CallBackData
---@field name string
---@field args any
---@field from integer

---@class SimToUISyncData
---@field name string
---@field fileName FileName
---@field functionName string
---@field args table?
---@field func fun(...:any) ?
---@field func fun(data: CallBackData) ?

---TODO
function ValidateArgs(args)
Expand All @@ -23,5 +28,9 @@ end
function Process(name, args, from)
if not callbacks[name] then return end

callbacks[name](args)
callbacks[name] {
name = name,
args = args,
from = from
}
end