X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fserializing%2FLegacySubmodelComponentSerializer.java;h=c50019fc81d11814282276e817375cf8fd9b2c38;hb=8e8d5776ccc95a08885789834abd55cc50e18a24;hp=2ede422c671fbe11f1d7ee70a9051f1da102c9e5;hpb=853d979edee5d49d3b3c5fe08609f6cfd82d863f;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/LegacySubmodelComponentSerializer.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/LegacySubmodelComponentSerializer.java index 2ede422c..c50019fc 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/LegacySubmodelComponentSerializer.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/LegacySubmodelComponentSerializer.java @@ -15,6 +15,7 @@ import net.mograsim.logic.model.model.components.submodels.SubmodelComponent; import net.mograsim.logic.model.model.wires.GUIWire; import net.mograsim.logic.model.model.wires.MovablePin; import net.mograsim.logic.model.model.wires.Pin; +import net.mograsim.logic.model.model.wires.PinUsage; import net.mograsim.logic.model.serializing.LegacySubmodelComponentParams.LegacyInterfacePinParams; import net.mograsim.logic.model.serializing.LegacySubmodelComponentParams.LegacySubmodelParameters; import net.mograsim.logic.model.serializing.LegacySubmodelComponentParams.LegacySubmodelParameters.LegacyInnerComponentParams; @@ -171,8 +172,9 @@ public final class LegacySubmodelComponentSerializer comp.setSubmodelScale(params.submodel.innerScale); comp.setSize(params.width, params.height); for (LegacyInterfacePinParams iPinParams : params.interfacePins) - comp.addSubmodelInterface( - new MovablePin(comp, iPinParams.name, iPinParams.logicWidth, iPinParams.location.x, iPinParams.location.y)); + // TRISTATE because we don't have a better choice + comp.addSubmodelInterface(new MovablePin(comp, iPinParams.name, iPinParams.logicWidth, PinUsage.TRISTATE, iPinParams.location.x, + iPinParams.location.y)); LegacySubmodelParameters submodelParams = params.submodel; ViewModelModifiable submodelModifiable = comp.getSubmodelModifiable(); Map componentsByName = submodelModifiable.getComponentsByName(); @@ -239,7 +241,7 @@ public final class LegacySubmodelComponentSerializer } else { innerComponentParams.id = idGetter.componentIDs.apply(innerComponent); - innerComponentParams.params = innerComponent.getParamsForSerializing(idGetter); + innerComponentParams.params = innerComponent.getParamsForSerializingJSON(idGetter); } innerComponentParams.name = innerComponent.name; i1++;