[Regression] All entities without reactors return 1000 to Lua getEnergy() and getMaxEnergy()
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 869
- Forks
- 222
- Avg merge
- 18h 33m
- Merged PRs (30d)
- 1
Description
In 2024.12.08, SpaceShips return 1000 to getEnergy() and getMaxEnergy() if they lack a reactor, but other non-STBO entities such as asteroids return an error. On master, all entities, including non-STBOs, return 1000 energy and max energy if they lack a reactor.
Steps to reproduce
- Place an Asteroid in a scenario.
- Run the scenario.
- Select the Asteroid in the GM screen
- From the Lua console, run
print(getGMSelection()[1]:getEnergy())orprint(getGMSelection()[1]:getMaxEnergy())
Expected behavior
The asteroid either returns a sensible value (such as 0) or throws an error. In 2024.12.08, the asteroid throws attempt to call a nil value (method 'getEnergy') or attempt to call a nil value (method 'getMaxEnergy').
Observed behavior
The asteroid returns 1000 for both.
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 reproducing the issue with an Asteroid selected in the GM screen, then run getEnergy() and getMaxEnergy() from the Lua console. Compare the results on master with 2024.12.08. Done means entities without reactors no longer incorrectly return 1000, with behavior matching the selected expected outcome: a sensible value or an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100