From 736fbaed42077b98fe6dabb52bb076d617427492 Mon Sep 17 00:00:00 2001 From: Sense101 <67970865+Sense101@users.noreply.github.com> Date: Tue, 24 Aug 2021 18:38:16 +0100 Subject: [PATCH] cleanup of trim code (#1283) --- src/js/game/hud/parts/puzzle_editor_settings.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/game/hud/parts/puzzle_editor_settings.js b/src/js/game/hud/parts/puzzle_editor_settings.js index 13564da4..bd738198 100644 --- a/src/js/game/hud/parts/puzzle_editor_settings.js +++ b/src/js/game/hud/parts/puzzle_editor_settings.js @@ -149,8 +149,9 @@ export class HUDPuzzleEditorSettings extends BaseHUDPart { assertAlways(false, "Failed to re-place building in trim"); } - if (building.components.ConstantSignal) { - result.components.ConstantSignal.signal = building.components.ConstantSignal.signal; + for (const key in building.components) { + /** @type {import("../../../core/global_registries").Component} */ (building + .components[key]).copyAdditionalStateTo(result.components[key]); } } });