Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

[BUG] Rapid cable layers can be overfilled #83

Open
KubeRoot opened this issue Jun 27, 2021 · 2 comments
Open

[BUG] Rapid cable layers can be overfilled #83

KubeRoot opened this issue Jun 27, 2021 · 2 comments

Comments

@KubeRoot
Copy link
Contributor

KubeRoot commented Jun 27, 2021

Reproduction:

Get an empty rapid cable layer.
Create a stack of over 90 cables.
Put the cables into the rapid cable layer.
The rapid cable layer will accept all the cables, despite only having 90 capacity.

Additional notes:

Cable stack size was previously raised from 30, which is below any RCL capacity, to 300. This might be related to the issue.

Likely figured out the issue:

		if(!loaded)
			if(!user.transferItemToLoc(W, src))
				to_chat(user, "<span class='warning'>[src] is stuck to your hand!</span>")
				return
			else
				loaded = W //W.loc is src at this point.
				loaded.max_amount = max_amount //We store a lot.
				return

If there is no cable in the RCL, it moves the whole cable stack into the RCL and sets its capacity to the RCL capacity. But because the cable can actually already have more capacity than the RCL, leading the action to creating an over-capacity cable stack being stored in the RCL.

@Urumasi
Copy link
Contributor

Urumasi commented Jun 27, 2021

Potential fix is to increase the limit of RCLs similar to cable coils to 900

@Laboredih123
Copy link

bruh this wasnt closed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants