GregTechCEu / GregTech

GregTech CE 1.12 fork continuing progression and development
GNU Lesser General Public License v3.0
223 stars 166 forks source link

Add config options to prevent wallsharing and extended facing #2439

Open M-W-K opened 1 month ago

M-W-K commented 1 month ago

What

Adds a pair of config options, one to change the default wallsharing behavior, and the other to change the default extended facing behavior to false. Also adds a system to prevent wallsharing.

Implementation Details

For extended facing, simply changes the default return from 'true' to the config option. For wallsharing, when a multiblock that disallows wallsharing is formed, it 'reserves' block positions in its dimension inside a map. When a multiblock that disallows wallsharing is trying to form, it checks the reserved positions in its dimension and prevents formation if it overlaps a reserved position. When a multiblock is invalidated, it unreserves its locations.

Outcome

Resolves #2436

Additional Information

When wallsharing is allowed, the extra checks are never performed and the maps never populated, so the overhead should be basically unnoticeable. For this reason, even though wallsharing and extended facing are intended behaviors, adding these as config options won't impact performance for those who leave them set to true.

MazeMaus commented 1 month ago

Dont know if am suposed to comment here or on my original issue post. But yee that is very nice! :)