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

move drawing belts to own function

This commit is contained in:
EmeraldBlock 2021-06-04 19:15:28 -05:00
parent 86cef32bc2
commit fc3b6eeb0c
2 changed files with 12 additions and 4 deletions

View File

@ -321,10 +321,7 @@ export class HUDScreenshotExporter extends BaseHUDPart {
if (hideBackground) { if (hideBackground) {
this.root.map.drawVisibleChunks( this.root.map.drawVisibleChunks(
parameters, parameters,
/** @this {MapChunkView} */ function (parameters) { MapChunkView.prototype.drawBackgroundLayerBeltsOnly
this.root.systemMgr.systems.beltUnderlays.drawChunk(parameters, this);
this.root.systemMgr.systems.belt.drawChunk(parameters, this);
}
); );
} else { } else {
this.root.map.drawBackground(parameters); this.root.map.drawBackground(parameters);

View File

@ -53,6 +53,17 @@ export class MapChunkView extends MapChunk {
systems.belt.drawChunk(parameters, this); systems.belt.drawChunk(parameters, this);
} }
/**
* Draws only the belts of the background layer
* @param {DrawParameters} parameters
*/
drawBackgroundLayerBeltsOnly(parameters) {
const systems = this.root.systemMgr.systems;
systems.beltUnderlays.drawChunk(parameters, this);
systems.belt.drawChunk(parameters, this);
}
/** /**
* Draws the dynamic foreground layer * Draws the dynamic foreground layer
* @param {DrawParameters} parameters * @param {DrawParameters} parameters