Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks removed from projection even when result is not in violation #109

Open
jrloken opened this issue May 1, 2023 · 8 comments
Open
Labels
UnableToReproduce This report doesn't provide enough details to reproduce

Comments

@jrloken
Copy link

jrloken commented May 1, 2023

I'm seeing on the server I play on, a block that is limited to 10 per grid, where 5 are already placed, having the 5 that are not placed removed from the projection. The result is only 5 blocks are placed on the finished grid, instead of the 10 allowed.

It looks like a fairly simple fix (🤞 ) around https://github.com/N1Ran/BlockLimiter/blob/master/BlockLimiter/Patch/ProjectionPatch.cs#L129 to prefer to remove blocks from the projection that are already placed. Would you accept a PR for this?

@N1Ran
Copy link
Owner

N1Ran commented May 28, 2023

I'm going to need log and config for this issue. Testing showed it's working as intended. It calculates the projector owner's limit and remove base on the limit it calculates. It's not always based on the grid's limit. It can also be affected by faction and player limit.

@N1Ran N1Ran added the UnableToReproduce This report doesn't provide enough details to reproduce label May 28, 2023
@Privatteer
Copy link

Privatteer commented Jul 17, 2023

Definitely an issue if a restart or concealment interrupts the welding/projection or repairing a damaged ship. It double counts projected blocks and placed blocks too quickly before the projector identifies that they are already placed.
Mylimit clearly shows after the block removal I am under the grid, player and faction limits.
Can place the blocks manually afterwards but crawling thru my ship looking for that one o2 gen being blocked etc is tiresome.

I'm going to request a log file but doubt I will get from server operator.
Edit: I believe block limitation is set to "Soft" - ie no placement
Blocklimit fucking with me jpg

@N1Ran
Copy link
Owner

N1Ran commented Jul 17, 2023

Restart can't affect count. Counts are only saved during sessions and a new count is done on server start. Concealment affecting count is also new to me and the is very unlikely. You are likely experiencing an issue with owned projectors increasing your count. If you own projectors on other ships, if the project a block, it will count as yours instead of the owner of the ship. Projector count is done immediately the block starts projecting.

@Privatteer
Copy link

I have 1 Projector only am aware of that issue, they get deleted after builds.
Restart/concealment when the new count is done is the issue. It appears to count blocks already placed before the projector has fully loaded the projection and removed items already built.
Concealment automatically shuts off projector on our server.

As per the pic limits are per grid.

@N1Ran
Copy link
Owner

N1Ran commented Jul 17, 2023

Counting already placed block is as intended. If the block exists, it counts it. The way the projection limit work is, it takes the block count on the grid and subtracts that from the limit placed. Whatever the result is will be the threshold of the projection. In the case of your reactor, only 3 will be able to be projected cause 30 - 27 = 3. The rest will be removed from the projection.

@Privatteer
Copy link

Counting already placed blocks is fine but the limiter is not waiting long enough for the projector to remove the 27 already built reactors. It thinks I am at 57 reactors hence the high number of removed blocks in pic.

Therefore the final 3 reactors are never projected as they are block limited.

I have to manually hunt thru the ship and find where they were intended to be without even a projected image to indicate the location.

@Privatteer
Copy link

5x6 grid of reactors for total of 30.
"Built" 15. Restarted projector after server restart.

15 blocks removed from projection before it's removed built blocks resulting in 6 additional reactors being projected.
Built extra 6 and restarted projection. 1 additional reactor shown/built.
24 reactors built, remaining 6 are never shown despite as clearly visible reloading projection multiple times.

This is preventing multiple people on our server from repairing damaged ships.

15 removed
23 removed
24 removed

@jrloken
Copy link
Author

jrloken commented Oct 18, 2023

@N1Ran I stepped away from the game for a bit and missed the activity on this issue, but I am getting back into it. I agree with @Privatteer 's observations. If you'll accept a PR I'll put one together or if you're not convinced there is a defect I'll see what I can get together to make it a little more obvious

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UnableToReproduce This report doesn't provide enough details to reproduce
Projects
None yet
Development

No branches or pull requests

3 participants