Skip to content
Snippets Groups Projects
Commit c67e8dec authored by sphere's avatar sphere
Browse files

Maintain category of edited existing thing's info

parent 1afa0b9e
Branches
Tags
No related merge requests found
Pipeline #4168 passed
...@@ -12,13 +12,13 @@ namespace CodeImp.DoomBuilder.ZDoom ...@@ -12,13 +12,13 @@ namespace CodeImp.DoomBuilder.ZDoom
public sealed class LuaMobjStructure : ActorStructure public sealed class LuaMobjStructure : ActorStructure
{ {
#region ================== DECORATE Actor Structure parsing #region ================== Lua Actor Structure parsing
internal LuaMobjStructure(ZDTextParser zdparser, string objname, int editnum) internal LuaMobjStructure(ZDTextParser zdparser, string objname, int editnum)
{ {
classname = string.Empty; classname = string.Empty;
LuaParser parser = (LuaParser)zdparser; LuaParser parser = (LuaParser)zdparser;
bool done = false; //mxd bool done = false; //mxd
General.WriteLogLine(objname); General.WriteLogLine(objname);
...@@ -31,7 +31,15 @@ namespace CodeImp.DoomBuilder.ZDoom ...@@ -31,7 +31,15 @@ namespace CodeImp.DoomBuilder.ZDoom
props["$title"] = new List<string> { objname }; props["$title"] = new List<string> { objname };
if (editnum > 0) if (editnum > 0)
doomednum = editnum; {
Dictionary<int, ThingTypeInfo> thingtypes = General.Map.Config.GetThingTypes();
thingtypes.TryGetValue(editnum, out ThingTypeInfo ti);
if (ti != null)
{
doomednum = editnum;
props["category"] = new List<string>() { ti.Category.Title };
}
}
// Now parse the contents of actor structure // Now parse the contents of actor structure
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment