mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fix hub not accepting all itmes
This commit is contained in:
parent
8dd4e63b3c
commit
65529cce1a
@ -345,6 +345,7 @@
|
|||||||
<key type="filename">sprites/blueprints/miner.png</key>
|
<key type="filename">sprites/blueprints/miner.png</key>
|
||||||
<key type="filename">sprites/blueprints/rotater-ccw.png</key>
|
<key type="filename">sprites/blueprints/rotater-ccw.png</key>
|
||||||
<key type="filename">sprites/blueprints/rotater.png</key>
|
<key type="filename">sprites/blueprints/rotater.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/splitter-compact-inverse.png</key>
|
||||||
<key type="filename">sprites/blueprints/splitter-compact.png</key>
|
<key type="filename">sprites/blueprints/splitter-compact.png</key>
|
||||||
<key type="filename">sprites/blueprints/trash.png</key>
|
<key type="filename">sprites/blueprints/trash.png</key>
|
||||||
<key type="filename">sprites/blueprints/underground_belt_entry-tier2.png</key>
|
<key type="filename">sprites/blueprints/underground_belt_entry-tier2.png</key>
|
||||||
@ -353,6 +354,7 @@
|
|||||||
<key type="filename">sprites/blueprints/underground_belt_exit.png</key>
|
<key type="filename">sprites/blueprints/underground_belt_exit.png</key>
|
||||||
<key type="filename">sprites/buildings/miner-chainable.png</key>
|
<key type="filename">sprites/buildings/miner-chainable.png</key>
|
||||||
<key type="filename">sprites/buildings/rotater-ccw.png</key>
|
<key type="filename">sprites/buildings/rotater-ccw.png</key>
|
||||||
|
<key type="filename">sprites/buildings/splitter-compact-inverse.png</key>
|
||||||
<key type="filename">sprites/buildings/splitter-compact.png</key>
|
<key type="filename">sprites/buildings/splitter-compact.png</key>
|
||||||
<key type="filename">sprites/buildings/underground_belt_entry-tier2.png</key>
|
<key type="filename">sprites/buildings/underground_belt_entry-tier2.png</key>
|
||||||
<key type="filename">sprites/buildings/underground_belt_entry.png</key>
|
<key type="filename">sprites/buildings/underground_belt_entry.png</key>
|
||||||
|
@ -76,7 +76,7 @@ export const globalConfig = {
|
|||||||
|
|
||||||
debug: {
|
debug: {
|
||||||
/* dev:start */
|
/* dev:start */
|
||||||
// fastGameEnter: true,
|
fastGameEnter: true,
|
||||||
noArtificialDelays: true,
|
noArtificialDelays: true,
|
||||||
// disableSavegameWrite: true,
|
// disableSavegameWrite: true,
|
||||||
showEntityBounds: false,
|
showEntityBounds: false,
|
||||||
|
@ -197,10 +197,11 @@ export class BeltSystem extends GameSystemWithFilter {
|
|||||||
|
|
||||||
const speedMultiplier = this.root.hubGoals.getBeltBaseSpeed();
|
const speedMultiplier = this.root.hubGoals.getBeltBaseSpeed();
|
||||||
|
|
||||||
// SYNC with systems/item_processor.js:drawEntityUnderlays!
|
// SYNC with systems/item_acceptor.js:drawEntityUnderlays!
|
||||||
// 126 / 42 is the exact animation speed of the png animation
|
// 126 / 42 is the exact animation speed of the png animation
|
||||||
const animationIndex = Math.floor(
|
const animationIndex = Math.floor(
|
||||||
(this.root.time.now() * speedMultiplier * BELT_ANIM_COUNT * 126) / 42
|
((this.root.time.now() * speedMultiplier * BELT_ANIM_COUNT * 126) / 42) *
|
||||||
|
globalConfig.itemSpacingOnBelts
|
||||||
);
|
);
|
||||||
const contents = chunk.contents;
|
const contents = chunk.contents;
|
||||||
for (let y = 0; y < globalConfig.mapChunkSize; ++y) {
|
for (let y = 0; y < globalConfig.mapChunkSize; ++y) {
|
||||||
|
@ -97,11 +97,12 @@ export class ItemAcceptorSystem extends GameSystemWithFilter {
|
|||||||
|
|
||||||
// SYNC with systems/belt.js:drawSingleEntity!
|
// SYNC with systems/belt.js:drawSingleEntity!
|
||||||
const animationIndex = Math.floor(
|
const animationIndex = Math.floor(
|
||||||
(this.root.time.now() *
|
((this.root.time.now() *
|
||||||
this.root.hubGoals.getBeltBaseSpeed() *
|
this.root.hubGoals.getBeltBaseSpeed() *
|
||||||
this.underlayBeltSprites.length *
|
this.underlayBeltSprites.length *
|
||||||
126) /
|
126) /
|
||||||
42
|
42) *
|
||||||
|
globalConfig.itemSpacingOnBelts
|
||||||
);
|
);
|
||||||
|
|
||||||
drawRotatedSprite({
|
drawRotatedSprite({
|
||||||
|
@ -311,12 +311,14 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
|||||||
// HUB
|
// HUB
|
||||||
|
|
||||||
case enumItemProcessorTypes.hub: {
|
case enumItemProcessorTypes.hub: {
|
||||||
const shapeItem = /** @type {ShapeItem} */ (items[0].item);
|
|
||||||
|
|
||||||
const hubComponent = entity.components.Hub;
|
const hubComponent = entity.components.Hub;
|
||||||
assert(hubComponent, "Hub item processor has no hub component");
|
assert(hubComponent, "Hub item processor has no hub component");
|
||||||
|
|
||||||
hubComponent.queueShapeDefinition(shapeItem.definition);
|
for (let i = 0; i < items.length; ++i) {
|
||||||
|
const shapeItem = /** @type {ShapeItem} */ (items[i].item);
|
||||||
|
hubComponent.queueShapeDefinition(shapeItem.definition);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user