BlueAmulet/OCEmu

External components?

brainytwoo opened this issue · 2 comments

Is it possible to add external components such as an ExtremeReactors reactor?
This is a question as much as it is a suggestion.

Sure! Just rewrite the entire reactor (emulate it in pure Lua), put it in src/component, and submit a pull request. It's easy. I don't know why @gamax92 hasn't done it already.

Long version, without sarcasm:

It's possible, but extremely tedious and complicated. Mods like ExtremeReactors use complicated routines to control their reactors, and they're written in Java (most likely), not Lua. So without access to the source code, you'd have to replicate the behavior exactly in Lua, which is like... more trouble than it's worth. And even with the source code, you'd still have to convert the routines to Lua, convert the API to Lua, and convert it all to an OCEmu component. Which is, again, like, more trouble than it's worth.

Conclusion: Even if you had the motivation to take on such a project, it's still, like, more trouble than it's worth.

Hey, i was curious if ever i want to add an external component, what step do i need to do. I emulated a tank in lua really basic with small function returning specific preset numbers but whenever i call the component in ocemu it keep saying no primary "my component" available