From bbef295fe373caa32f05b9ee4ec1f77a4448ef81 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Fri, 24 Aug 2018 23:10:46 -0400 Subject: [PATCH] fix default elements disappearing when loading saves if the identifiers don't match --- src/simulation/Simulation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index bd8137b23..9d7e08337 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -76,7 +76,7 @@ int Simulation::Load(int fullX, int fullY, GameSave * save, bool includePressure // if this is a custom element, set the ID to the ID we found when comparing identifiers in the palette map // set type to 0 if we couldn't find an element with that identifier present when loading, // unless this is a default element, in which case keep the current ID, because otherwise when an element is renamed it wouldn't show up anymore in older saves - if (myId != 0 || pi.first.BeginsWith("DEFAULT_PT_")) + if (myId != 0 || !pi.first.BeginsWith("DEFAULT_PT_")) partMap[pi.second] = myId; } }