module: make sendGlobal() global args type known
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
3661cb8721
commit
23b03f973f
5 changed files with 23 additions and 24 deletions
|
|
@ -74,7 +74,7 @@ pub fn World(comptime mods: anytype) type {
|
|||
world.modules.sendToModule(module_tag, event_name, args);
|
||||
}
|
||||
|
||||
pub inline fn sendGlobal(m: *@This(), comptime event_name: Modules.GlobalEvent, args: anytype) void {
|
||||
pub inline fn sendGlobal(m: *@This(), comptime event_name: Modules.GlobalEvent, args: Modules.GlobalArgsM(M, event_name)) void {
|
||||
const mod_ptr: *Mods = @alignCast(@fieldParentPtr(Mods, @tagName(module_tag), m));
|
||||
const world = @fieldParentPtr(WorldT, "mod", mod_ptr);
|
||||
world.modules.sendGlobal(module_tag, event_name, args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue