Cleanup useless battery box metadata
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 23
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
Some cleanup was done a moment ago:
- #126
Adding this new issue for leftovers to keep things easier to follow.
It would be possible to remove all metadata from batteries and only store values for charge and max_charge at network level.
However that would make it impossible to detach battery from network by digging cable that connects it to network and also destroying network data would either reset batteries or would require complex handling for batteries, I think having metadata for that is good so maybe not remove that (
internal_EU_charge).Next changes for battery handling
Batteries are not functional when not attached to network which means that
*_EU_supplyand*_EU_demandmeta data values for batteries could be removed completely. Possibly alsointernal_EU_charge_max. Those are still there but not used that much after last PR #126This requires always balancing charge level between batteries attached to network, it is done already to some degree but is bit buggy. Take battery upgrades into account as those allow having different maximum capacity for batteries, therefore it would be best to allow battery to set actual charge values and only inform batteries about network charge level as percentage value. That would also fix current glitches with having 1000kEU max charge battery with 1200kEU actual charge.
Originally posted by @S-S-X in #108
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
The issue names no files or tests; start by reviewing the prior cleanup in #126 and tracing the existing battery and network charge handling. Done means unused battery metadata is removed where appropriate, charge balancing accounts for battery upgrades, and the described capacity mismatch and network-detachment behavior remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100