1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Fix trying to clear nonexistent hub rendering cache

This commit is contained in:
EmeraldBlock 2020-10-21 18:54:40 -05:00
parent 4045081e52
commit d425822d6b

View File

@ -172,7 +172,7 @@ export class HUDSandboxController extends BaseHUDPart {
} }
} }
this.root.buffers.cache.get("hub").clear(); this.root.buffers.cache.get("hub") && this.root.buffers.cache.get("hub").clear();
this.root.hud.parts.pinnedShapes.rerenderFull(); this.root.hud.parts.pinnedShapes.rerenderFull();
this.root.hud.signals.notification.dispatch( this.root.hud.signals.notification.dispatch(
@ -204,13 +204,12 @@ export class HUDSandboxController extends BaseHUDPart {
} }
overrideLevel(shape) { overrideLevel(shape) {
console.log(shape);
const hubGoals = this.root.hubGoals; const hubGoals = this.root.hubGoals;
hubGoals.currentGoal.definition = this.root.shapeDefinitionMgr.getShapeFromShortKey(shape); hubGoals.currentGoal.definition = this.root.shapeDefinitionMgr.getShapeFromShortKey(shape);
hubGoals.storedShapes[hubGoals.currentGoal.definition.getHash()] = 0; hubGoals.storedShapes[hubGoals.currentGoal.definition.getHash()] = 0;
this.root.buffers.cache.get("hub").clear(); this.root.buffers.cache.get("hub") && this.root.buffers.cache.get("hub").clear();
this.root.hud.parts.pinnedShapes.rerenderFull(); this.root.hud.parts.pinnedShapes.rerenderFull();
this.root.hud.signals.notification.dispatch( this.root.hud.signals.notification.dispatch(