Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit c177277

Browse files
authored
Merge pull request #412 from cortex-command-community/CF325-Couldnt-Find-Preset
CF325 - Couldn't find the preset
2 parents e1c0009 + 77ddee3 commit c177277

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

System/Entity.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,7 @@ namespace RTE {
5454
if (preset) {
5555
preset->Clone(this);
5656
} else {
57-
if (className == "AtomGroup" || className == "Attachable" || className == "AEmitter") {
58-
reader.ReportError("The PresetName to be copied was not found in data modules.");
59-
}
60-
// If we couldn't find the preset to copy from, read it as an original but report the problem in the console
61-
g_ConsoleMan.PrintString("ERROR: Couldn't find the preset '" + refName + "' accessed in " + reader.GetCurrentFilePath() + " at line " + reader.GetCurrentFileLine());
62-
// Preset name might have "[ModuleName]/" preceding it, detect it here and select proper module!
63-
int slashPos = refName.find_first_of('/');
64-
m_PresetName = (slashPos != std::string::npos) ? refName.substr(slashPos + 1) : refName;
65-
// Mark this so that the derived class knows it should be added to the PresetMan when it's done reading all properties.
66-
m_IsOriginalPreset = true;
67-
// Indicate where this was read from
68-
m_DefinedInModule = reader.GetReadModuleID();
57+
reader.ReportError("Couldn't find the preset \"" + refName + "\" of type \"" + className + "\" when trying to do CopyOf.");
6958
}
7059
} else if (propName == "PresetName" || propName == "InstanceName") {
7160
SetPresetName(reader.ReadPropValue());

0 commit comments

Comments
 (0)