From 2651e65c08da7a7d3f2c1b23f5e31527f5362c36 Mon Sep 17 00:00:00 2001 From: EmeraldBlock Date: Fri, 2 Jul 2021 19:18:43 -0500 Subject: [PATCH] provide previous key when editing signal --- src/js/game/systems/constant_signal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/game/systems/constant_signal.js b/src/js/game/systems/constant_signal.js index 5fabb80e..29079825 100644 --- a/src/js/game/systems/constant_signal.js +++ b/src/js/game/systems/constant_signal.js @@ -49,11 +49,12 @@ export class ConstantSignalSystem extends GameSystemWithFilter { // Ok, query, but also save the uid because it could get stale const uid = entity.uid; + const signal = entity.components.ConstantSignal.signal; const signalValueInput = new FormElementInput({ id: "signalValue", label: fillInLinkIntoTranslation(T.dialogs.editSignal.descShortKey, THIRDPARTY_URLS.shapeViewer), placeholder: "", - defaultValue: "", + defaultValue: signal ? signal.getAsCopyableKey() : "", validator: val => this.parseSignalCode(entity, val), });