Can Shard Use Spring Lua Widgets?
That depends, if Shard is running as a Spring LuaAI, or if it’s running as a native AI using the same interface as AIs such as KAIK, or AAI
Native Shard
No, it can’t. This is because the lua running in the native Shard AI is provided by a custom interface. This interface doesn’t match the Spring gadget and widget APIs, and the widgets would need to be rewritten. Think of them as two parallel universes, they cannot communicate with each other, so Shard code runs completely separated from Widget code.
Spring LuaAI Shard
When running in this context, Shard is sharing the same environment that widgets and gadgets do, and all of the APIs and function calls that widgets use are available. In this scenario, with some work, yes, the logic inside widgets can be used in Shard, with minimal modifications
At the time of writing, Spring Lua AI support is ongoing and incomplete. Perhaps this has been implemented by the time you’re reading this. if not all help is greatly appreciated