SpaceObject getSize()/setSize() not exposed to lua
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 869
- Forks
- 222
- Avg merge
- 18h 33m
- Merged PRs (30d)
- 1
Description
Hi, Im so far enjoying the game.
But unless I missed something the getSize and setSize from spaceObject are not exposed for lua scripting.
I suppose it is normal that not all spaceObjects support resizing but the lack of getSize is a bit troublesome since we can use setSize for a selected few subClass (eg: asteroid, spaceStation). Thus using hardcoded value from the SpaceObject constructor isn't reliable in these case.
The current workAround I am using is: adding getSize/setSize that returns/call the getRadius/setRadius and then using REGISTER_SCRIPT_CLASS_FUNCTION to expose them to lua.
So far, the getSize seems to work well and setSize works somewhat on some of them (black hole, nebula and wormHole).
Thus I was wondering if it isn't implemented yet or if this is a design decision.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing SpaceObject's getSize/setSize and the existing getRadius/setRadius implementations, then inspect where REGISTER_SCRIPT_CLASS_FUNCTION exposes methods to Lua. Check how asteroid and spaceStation handle resizing, and verify in Lua that getSize is available and setSize behaves consistently for the supported subclasses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, lua
- Domain
- api, game-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100