mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-29 15:11:56 +00:00
Maintain category of edited existing thing's info
This commit is contained in:
parent
1afa0b9e7b
commit
c67e8dec89
1 changed files with 11 additions and 3 deletions
|
@ -12,7 +12,7 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -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)
|
||||||
|
{
|
||||||
|
Dictionary<int, ThingTypeInfo> thingtypes = General.Map.Config.GetThingTypes();
|
||||||
|
thingtypes.TryGetValue(editnum, out ThingTypeInfo ti);
|
||||||
|
if (ti != null)
|
||||||
|
{
|
||||||
doomednum = editnum;
|
doomednum = editnum;
|
||||||
|
props["category"] = new List<string>() { ti.Category.Title };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Now parse the contents of actor structure
|
// Now parse the contents of actor structure
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue