dual-universe / lua-examples

This repository has been created to serve as a sharing and learning platform for the Dual Universe community and the development of simple and complex Lua applications. You will find on this repo the examples released by Novaquark during the devblog and thread.
https://www.dualuniverse.game
GNU General Public License v3.0
59 stars 19 forks source link

Added missing elements from Lua API Mockup #4

Closed matpratta closed 2 years ago

matpratta commented 2 years ago

Noticed those two elements were not yet defined on the API.

FuelContainer is a guess, as it's not on the Codex. Not sure if it's 100% correct but I noticed it seems to follow the Container API by printing a list of all methods in-game.

ShieldGenerator is the dynamic-core one. I noticed that the BaseShieldGenerator does exist already, but looking at the Codex they have different methods, so made it inherited from the Element class instead and added the methods on it, similar to how the Base version works. All missing/extra methods were fixed with info on the Codex.

matpratta commented 2 years ago

Quick note here, The force push I did was just because GitHub was complaining about the commits not being signed, so set-up commit signing and re-pushed that branch to fix it :)

NQ-Ligo commented 2 years ago

There is currently no difference between an item container and a Fuel Container. No reason to add a FuelContainer class.

However, on Shield Generator, there is indeed different API. There is indeed a lac on the API mockup here. I will check that.

Thanks

matpratta commented 2 years ago

Thanks @NQ-Ligo! After looking around on the Codex the Shield Generation was probably the last item remaining. Good to know about the Fuel Container too!

NQ-Ligo commented 2 years ago

Some points are missing in your commit. I pushed it on an different commit. However thanks for your contribution, I added the ShieldGenerator ;)