Exemplo n.º 1
0
 //mxd. This removes a thing from the category
 internal void RemoveThing(ThingTypeInfo t)
 {
     // Remove
     if (things.Contains(t))
     {
         things.Remove(t);
     }
 }
Exemplo n.º 2
0
        // This applies default settings to a thing
        public void ApplyDefaultThingSettings(Thing t)
        {
            t.Type = defaultthingtype;
            t.Rotate(defaultthingangle);
            foreach (string f in defaultthingflags)
            {
                t.SetFlag(f, true);
            }

            //mxd. Set default arguments
            ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.Type);

            if (tti != null)
            {
                t.Args[0] = (int)tti.Args[0].DefaultValue;
                t.Args[1] = (int)tti.Args[1].DefaultValue;
                t.Args[2] = (int)tti.Args[2].DefaultValue;
                t.Args[3] = (int)tti.Args[3].DefaultValue;
                t.Args[4] = (int)tti.Args[4].DefaultValue;
            }
        }
Exemplo n.º 3
0
 // This adds a thing to the category
 internal void AddThing(ThingTypeInfo t)
 {
     // Add
     things.Add(t);
 }