1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Add setting to disable smart tunnels

This commit is contained in:
tobspr
2020-06-16 19:24:23 +02:00
parent 88fba76e3b
commit b753187cde
5 changed files with 24 additions and 5 deletions

View File

@@ -58,6 +58,11 @@ export class UndergroundBeltSystem extends GameSystemWithFilter {
* @param {Entity} entity
*/
onEntityPlaced(entity) {
if (!this.root.app.settings.getAllSettings().enableTunnelSmartplace) {
// Smart-place disabled
return;
}
const undergroundComp = entity.components.UndergroundBelt;
if (undergroundComp && undergroundComp.mode === enumUndergroundBeltMode.receiver) {
const staticComp = entity.components.StaticMapEntity;