Make quarries dig whole layer at once if area is not active
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 23
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
Here if area is not active set quarry to layer digging mode where it only executes digging every (radius * 2 + 1) ^ 2 * technic.run_interval seconds and digs whole layer at once using VM.
https://github.com/mt-mods/technic/blob/64222e10154755d774a22622ae09ec7aa6078405/technic/machines/HV/quarry.lua#L220-L241
That is for radius 8 quarry and technic running at 1hz digging happens every 289 seconds and 289 nodes digged at once, 279 executions will be no-op returning immediately.
This requires some way to check if area is actually active / there's players in area. Probably this means looping over connected players and checking distance to current digging position.
This could be improved even more by making VM handle digging only once per mapblock skipping at least 4095 iterations (bit over 68 minutes idle releasing areas from memory for better use) and digging 4096 nodes at once if nobody is near digging position for long time.
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
Read technic/machines/HV/quarry.lua at lines 220-241 to understand the current digging loop and how the quarry position advances. Then inspect how connected players and active areas could be identified from the issue's proposed behavior. Done means inactive areas dig a whole layer in one VM operation at the specified interval, while active areas retain normal behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100