Skip to content

Commit

Permalink
replace service instead of error
Browse files Browse the repository at this point in the history
  • Loading branch information
audinowho committed May 26, 2024
1 parent aa1168b commit c1af3bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RogueEssence/Lua/ScriptServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public IEnumerator<YieldInstruction> PublishCoroutine(string msgname, params obj
public override void SetupLuaFunctions(LuaEngine state)
{
m_fncallsub = State.RunString("return function(med, svc) xpcall(svc.Subscribe, PrintStack, svc, med) end").First() as LuaFunction;
m_fncallunsub = State.RunString("return function(med, svc) xpcall(svc.UnSubscribe, svc, med) end").First() as LuaFunction;
m_fncallunsub = State.RunString("return function(med, svc) xpcall(svc.UnSubscribe, PrintStack, svc, med) end").First() as LuaFunction;
}

/// <summary>
Expand All @@ -107,6 +107,7 @@ public override void SetupLuaFunctions(LuaEngine state)
/// <param name="instance"></param>
public void AddService(string name, LuaTable instance)
{
RemoveService(name);
ServiceEntry svc = new ServiceEntry();
svc.name = name;
svc.lobj = instance;
Expand Down

0 comments on commit c1af3bb

Please sign in to comment.