mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Fix entity rendering bug when zooming out, add "Wires update" label to main menu
This commit is contained in:
@@ -35,6 +35,7 @@ export class MapView extends BaseMap {
|
||||
|
||||
this.root.signals.entityAdded.add(this.onEntityChanged, this);
|
||||
this.root.signals.entityDestroyed.add(this.onEntityChanged, this);
|
||||
this.root.signals.entityChanged.add(this.onEntityChanged, this);
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
@@ -44,7 +45,7 @@ export class MapView extends BaseMap {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when an entity was added or removed
|
||||
* Called when an entity was added, removed or changed
|
||||
* @param {Entity} entity
|
||||
*/
|
||||
onEntityChanged(entity) {
|
||||
|
||||
@@ -141,6 +141,7 @@ export class GameRoot {
|
||||
// Entities
|
||||
entityManuallyPlaced: /** @type {TypedSignal<[Entity]>} */ (new Signal()),
|
||||
entityAdded: /** @type {TypedSignal<[Entity]>} */ (new Signal()),
|
||||
entityChanged: /** @type {TypedSignal<[Entity]>} */ (new Signal()),
|
||||
entityGotNewComponent: /** @type {TypedSignal<[Entity]>} */ (new Signal()),
|
||||
entityComponentRemoved: /** @type {TypedSignal<[Entity]>} */ (new Signal()),
|
||||
entityQueuedForDestroy: /** @type {TypedSignal<[Entity]>} */ (new Signal()),
|
||||
|
||||
@@ -185,6 +185,9 @@ export class BeltSystem extends GameSystemWithFilter {
|
||||
if (G_IS_DEV && globalConfig.debug.checkBeltPaths) {
|
||||
this.debug_verifyBeltPaths();
|
||||
}
|
||||
|
||||
// Make sure the chunks know about the update
|
||||
this.root.signals.entityChanged.dispatch(targetEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user