refactor access to context data

This commit is contained in:
gnembon committed 2023-01-16 19:01:10 +01:00
1 parent bc31faca21
commit 8dd08d5cb1
15 files changed
+239 -194

No files matched your search

@@ -167,7 +167,7 @@ public class CarpetEventServer
*/
public void execute()
{
CarpetServer.scriptServer.events.runScheduledCall(ctx.origin, ctx.s, host, (CarpetScriptHost) ctx.host, function, parametrizedArgs);
CarpetServer.scriptServer.events.runScheduledCall(ctx.origin(), ctx.source(), host, (CarpetScriptHost) ctx.host, function, parametrizedArgs);
}
}
@@ -1315,7 +1315,7 @@ public class CarpetEventServer
{
Event ev = Event.getEvent(event, ((CarpetScriptHost)cc.host).scriptServer());
if (ev == null) return -1;
return ev.handler.signal(cc.s, optionalTarget, callArgs);
return ev.handler.signal(cc.source(), optionalTarget, callArgs);
}
private void onEventAddedToHost(Event event, ScriptHost host)