mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Add belt rendering (very slow for now)
This commit is contained in:
@@ -227,7 +227,9 @@ export class BeltSystem extends GameSystemWithFilter {
|
||||
}
|
||||
|
||||
draw(parameters) {
|
||||
this.forEachMatchingEntityOnScreen(parameters, this.drawEntityItems.bind(this));
|
||||
for (let i = 0; i < this.beltPaths.length; ++i) {
|
||||
this.beltPaths[i].draw(parameters);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -239,9 +239,9 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
|
||||
|
||||
const beltComp = receiver.components.Belt;
|
||||
if (beltComp) {
|
||||
// Ayy, its a belt!
|
||||
if (beltComp.canAcceptItem()) {
|
||||
beltComp.takeItem(item);
|
||||
const path = beltComp.assignedPath;
|
||||
assert(path, "belt has no path");
|
||||
if (path.tryAcceptItem(item)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user