//constructor public NodeInfo(Thing t) { type = NodeInfoType.THING; index = t.Index; action = t.Action; tag = t.Tag; polyobjnumber = ((t.Type > 9299 && t.Type < 9304) ? t.AngleDoom : int.MinValue); ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.Type); defaultname = (tti != null ? tti.Title : "Thing"); }
// Copy constructor public NodeInfo(NodeInfo other, int neweffect) { this.type = other.type; this.index = other.index; this.action = neweffect; this.tag = other.tag; this.polyobjnumber = other.polyobjnumber; switch (type) { case NodeInfoType.LINEDEF: if (General.Map.Config.LinedefActions.ContainsKey(action)) { defaultname = General.Map.Config.LinedefActions[action].Title; } else if (action > 0 && GameConfiguration.IsGeneralized(action)) { defaultname = "Generalized (" + General.Map.Config.GetGeneralizedActionCategory(action) + ")"; } else { defaultname = "Linedef"; } break; case NodeInfoType.SECTOR: if (General.Map.Config.SectorEffects.ContainsKey(action)) { defaultname = General.Map.Config.SectorEffects[action].Title; } else if (action > 0) { defaultname = General.Map.Config.GetGeneralizedSectorEffectName(action); } else { defaultname = "Sector"; } break; default: throw new NotImplementedException("Not implemented..."); } }
public NodeInfo(Sector s, int tagindex) { type = NodeInfoType.SECTOR; index = s.Index; action = s.Effect; tag = s.Tags[tagindex]; if (General.Map.Config.SectorEffects.ContainsKey(action)) { defaultname = General.Map.Config.SectorEffects[action].Title; } else if (action > 0) { defaultname = General.Map.Config.GetGeneralizedSectorEffectName(action); } else { defaultname = "Sector"; } }
public NodeInfo(Linedef l, int tagindex) { type = NodeInfoType.LINEDEF; index = l.Index; action = l.Action; tag = l.Tags[tagindex]; polyobjnumber = ((l.Action > 0 && l.Action < 9) ? l.Args[0] : int.MinValue); if (General.Map.Config.LinedefActions.ContainsKey(action)) { defaultname = General.Map.Config.LinedefActions[action].Title; } else if (action > 0 && GameConfiguration.IsGeneralized(action)) { defaultname = "Generalized (" + General.Map.Config.GetGeneralizedActionCategory(action) + ")"; } else { defaultname = "Linedef"; } }
public NodeInfo(Linedef ld) { type = NodeInfoType.LINEDEF; linedef = ld; }
public NodeInfo(Sector s) { type = NodeInfoType.SECTOR; sector = s; }
public NodeInfo(SectorGroup sg) { type = NodeInfoType.SECTOR_GROUP; sectorgroup = sg; }