mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-02-17 05:19:19 +00:00
1-to-2 compact splitters added.
This commit is contained in:
parent
938dfeaa03
commit
d554a8fbe1
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:a83f85517a44fa590a7a5e72b90736ba52065712e537f9eaa0d53aefd6a42457
|
oid sha256:702a80a5ed8461ff5e515101cba268585323ff62e0967c0c39f60288696ae8c5
|
||||||
size 765795
|
size 681673
|
||||||
|
|||||||
BIN
res/ui/building_tutorials/splitter-compact-inverse-split.png
Normal file
BIN
res/ui/building_tutorials/splitter-compact-inverse-split.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
BIN
res/ui/building_tutorials/splitter-compact-split.png
Normal file
BIN
res/ui/building_tutorials/splitter-compact-split.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
BIN
res_raw/sprites/blueprints/splitter-compact-inverse-split.png
Normal file
BIN
res_raw/sprites/blueprints/splitter-compact-inverse-split.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
res_raw/sprites/blueprints/splitter-compact-split.png
Normal file
BIN
res_raw/sprites/blueprints/splitter-compact-split.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
res_raw/sprites/buildings/splitter-compact-inverse-split.png
Normal file
BIN
res_raw/sprites/buildings/splitter-compact-inverse-split.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.2 KiB |
BIN
res_raw/sprites/buildings/splitter-compact-split.png
Normal file
BIN
res_raw/sprites/buildings/splitter-compact-split.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
@ -6,7 +6,7 @@ $buildings: belt, cutter, miner, mixer, painter, rotater, splitter, stacker, tra
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$buildingsAndVariants: belt, splitter, splitter-compact, splitter-compact-inverse, underground_belt,
|
$buildingsAndVariants: belt, splitter, splitter-compact, splitter-compact-inverse, splitter-compact-split, splitter-compact-inverse-split, underground_belt,
|
||||||
underground_belt-tier2, miner, miner-chainable, cutter, cutter-quad, rotater, rotater-ccw, stacker, mixer,
|
underground_belt-tier2, miner, miner-chainable, cutter, cutter-quad, rotater, rotater-ccw, stacker, mixer,
|
||||||
painter, painter-double, painter-quad, trash, trash-storage;
|
painter, painter-double, painter-quad, trash, trash-storage;
|
||||||
@each $building in $buildingsAndVariants {
|
@each $building in $buildingsAndVariants {
|
||||||
|
|||||||
@ -11,7 +11,12 @@ import { T } from "../../translations";
|
|||||||
import { formatItemsPerSecond } from "../../core/utils";
|
import { formatItemsPerSecond } from "../../core/utils";
|
||||||
|
|
||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
export const enumSplitterVariants = { compact: "compact", compactInverse: "compact-inverse" };
|
export const enumSplitterVariants = {
|
||||||
|
compact: "compact",
|
||||||
|
compactInverse: "compact-inverse",
|
||||||
|
compactSplit: "compact-split",
|
||||||
|
compactInverseSplit: "compact-inverse-split",
|
||||||
|
};
|
||||||
|
|
||||||
export class MetaSplitterBuilding extends MetaBuilding {
|
export class MetaSplitterBuilding extends MetaBuilding {
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -24,6 +29,8 @@ export class MetaSplitterBuilding extends MetaBuilding {
|
|||||||
return new Vector(2, 1);
|
return new Vector(2, 1);
|
||||||
case enumSplitterVariants.compact:
|
case enumSplitterVariants.compact:
|
||||||
case enumSplitterVariants.compactInverse:
|
case enumSplitterVariants.compactInverse:
|
||||||
|
case enumSplitterVariants.compactSplit:
|
||||||
|
case enumSplitterVariants.compactInverseSplit:
|
||||||
return new Vector(1, 1);
|
return new Vector(1, 1);
|
||||||
default:
|
default:
|
||||||
assertAlways(false, "Unknown splitter variant: " + variant);
|
assertAlways(false, "Unknown splitter variant: " + variant);
|
||||||
@ -53,6 +60,8 @@ export class MetaSplitterBuilding extends MetaBuilding {
|
|||||||
defaultBuildingVariant,
|
defaultBuildingVariant,
|
||||||
enumSplitterVariants.compact,
|
enumSplitterVariants.compact,
|
||||||
enumSplitterVariants.compactInverse,
|
enumSplitterVariants.compactInverse,
|
||||||
|
enumSplitterVariants.compactSplit,
|
||||||
|
enumSplitterVariants.compactInverseSplit,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
return super.getAvailableVariants(root);
|
return super.getAvailableVariants(root);
|
||||||
@ -161,6 +170,32 @@ export class MetaSplitterBuilding extends MetaBuilding {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case enumSplitterVariants.compactSplit:
|
||||||
|
case enumSplitterVariants.compactInverseSplit: {
|
||||||
|
entity.components.ItemAcceptor.setSlots([
|
||||||
|
{ pos: new Vector(0, 0), directions: [enumDirection.bottom] },
|
||||||
|
]);
|
||||||
|
|
||||||
|
entity.components.ItemEjector.setSlots([
|
||||||
|
{
|
||||||
|
pos: new Vector(0, 0),
|
||||||
|
direction: enumDirection.top,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pos: new Vector(0, 0),
|
||||||
|
direction:
|
||||||
|
variant === enumSplitterVariants.compactInverseSplit
|
||||||
|
? enumDirection.left
|
||||||
|
: enumDirection.right,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
entity.components.ItemAcceptor.beltUnderlays = [
|
||||||
|
{ pos: new Vector(0, 0), direction: enumDirection.top },
|
||||||
|
];
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
assertAlways(false, "Unknown painter variant: " + variant);
|
assertAlways(false, "Unknown painter variant: " + variant);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -470,6 +470,14 @@ buildings:
|
|||||||
name: Merger (compact)
|
name: Merger (compact)
|
||||||
description: Merges two conveyor belts into one.
|
description: Merges two conveyor belts into one.
|
||||||
|
|
||||||
|
compact-split:
|
||||||
|
name: Splitter (compact)
|
||||||
|
description: Splits one conveyor belt into two.
|
||||||
|
|
||||||
|
compact-inverse-split:
|
||||||
|
name: Splitter (compact)
|
||||||
|
description: Splits one conveyor belt into two.
|
||||||
|
|
||||||
cutter:
|
cutter:
|
||||||
default:
|
default:
|
||||||
name: &cutter Cutter
|
name: &cutter Cutter
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user