using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HaloObjects;

namespace HaloPlugins.Xbox
{
    public class mach
    {
       public List<MetaNode> Fields = new List<MetaNode>();

       public mach()
       {
           Fields.AddRange(new MetaNode[] {
           new Bitmask("Flags", new string[] { "Does_Not_Cast_Shadow", "Search_Cardinal_Direction_Lightmaps", "unused", "Not_A_Pathfinding_Obstacle", "Extension_Of_Parent", "Does_Not_Cause_Collision_Damage", "Early_Mover", "Early_Mover_Localized_Physics", "Use_Static_Massive_Lightmap_Sample", "Object_Scales_Attachments", "Inherits_Player's_Appearance", "Dead_Bipeds_Can't_Localize", "Attach_To_Clusters_By_Dynamic_Sphere", "Effects_Created_By_This_Object_Do_Not" }, 32),
           new Value("Bounding Radius", typeof(float)),
           new Value("Bounding Offset X", typeof(float)),
           new Value("Bounding Offset Y", typeof(float)),
           new Value("Bounding Offset Z", typeof(float)),
           new Value("Acceleration Scale", typeof(float)),
           new HaloObjects.Enum("Lightmap Shadow Mode", new string[] { "Default", "Never", "Always" }, 32),
           new HaloObjects.Enum("Sweetener Size", new string[] { "Small", "Medium", "Large" }, 32),
           new Value("Dynamic Light Sphere Radius", typeof(float)),
           new Value("Dynamic Light Sphere Offset X", typeof(float)),
           new Value("Dynamic Light Sphere Offset Y", typeof(float)),
           new Value("Dynamic Light Sphere Offset Z", typeof(float)),
           new StringID("Default Model Variant"),
           new TagReference("Model"),
           new TagReference("Crate_Object"),
           new TagReference("Modifier_Shader"),
           new TagReference("Creation_Effect"),
           new TagReference("Material_Effects"),
           new Reflexive("Ai Properties", 16, new MetaNode[] { 
               new Bitmask("Flags", new string[] { "Destroyable_Cover", "Pathfinding_Ignore_When_Dead", "Dynamic_Cover" }, 32),
               new StringID("Type Name"),
               new HaloObjects.Enum("Size", new string[] { "Default", "Tiny", "Small", "Medium", "Large", "Huge", "Immobile" }, 32),
               new HaloObjects.Enum("Leap Jump Speed", new string[] { "None", "Down", "Step", "Crouch", "Stand", "Storey", "Tower", "Infinite" }, 32),
           }),
           new Reflexive("Functions", 32, new MetaNode[] { 
               new Bitmask("Flags", new string[] { "Invert", "Mapping_Does_Not_Controls_Active", "Always_Active", "Random_Time_Offset" }, 32),
               new StringID("Import Name"),
               new StringID("Export Name"),
               new StringID("Turn Off With"),
               new Value("Min Value", typeof(float)),
               new Reflexive("Function Type (Graph)", 1, new MetaNode[] { 
                   new Value("Data", typeof(byte)),
               }),
               new StringID("Scale By"),
           }),
           new Value("Apply Collision Damage Scale", typeof(float)),
           new Value("Min Game Acc (Default)", typeof(float)),
           new Value("Max Game Acc (Default)", typeof(float)),
           new Value("Min Gam Scale (Default)", typeof(float)),
           new Value("Max Gam Scale (Default)", typeof(float)),
           new Value("Min abs Acc (Default)", typeof(float)),
           new Value("Max abs Acc (Default)", typeof(float)),
           new Value("Min abs Scale (Default)", typeof(float)),
           new Value("Max abs Scale (Default)", typeof(float)),
           new Value("Hud Text Message Index", typeof(short)),
           new Unused(2),
           new Reflexive("Attachments", 24, new MetaNode[] { 
               new TagReference("Type"),
               new StringID("Marker"),
               new StringID("Change Color"),
               new StringID("Primary Scale"),
               new StringID("Secondary Scale"),
           }),
           new Reflexive("Widgets", 8, new MetaNode[] { 
               new TagReference("Type"),
           }),
           new Reflexive("Old Functions", 8, new MetaNode[] { 
               new Unused(8),
           }),
           new Reflexive("Change Colors", 16, new MetaNode[] { 
               new Reflexive("Initial Permutations", 32, new MetaNode[] { 
                   new Value("Weight", typeof(float)),
                   new Value("Color Lower Bound R", typeof(float)),
                   new Value("Color Lower Bound G", typeof(float)),
                   new Value("Color Lower Bound B", typeof(float)),
                   new Value("Color Upper Bound R", typeof(float)),
                   new Value("Color Upper Bound G", typeof(float)),
                   new Value("Color Upper Bound B", typeof(float)),
                   new StringID("Variant Name"),
               }),
               new Reflexive("Functions", 36, new MetaNode[] { 
                   new Bitmask("Scale Flags", new string[] { "Blend_In_HSV", "...More_Colors" }, 32),
                   new Value("Color Lower Bound R", typeof(float)),
                   new Value("Color Lower Bound G", typeof(float)),
                   new Value("Color Lower Bound B", typeof(float)),
                   new Value("Color Upper Bound R", typeof(float)),
                   new Value("Color Upper Bound G", typeof(float)),
                   new Value("Color Upper Bound B", typeof(float)),
                   new StringID("Darken By"),
                   new StringID("Scale By"),
               }),
           }),
           new Reflexive("Predicted Resource", 8, new MetaNode[] { 
               new Value("Type", typeof(short)),
               new Value("Resource Index", typeof(short)),
               new Ident("Tag_Index"),
           }),
           new Bitmask("Flags", new string[] { "Position_Loops", "unused", "Position_Iterpolation" }, 32),
           new Value("Power Transition Time", typeof(float)),
           new Value("Power Acceleration Time", typeof(float)),
           new Value("Position Transition Time", typeof(float)),
           new Value("Position Acceleration Time", typeof(float)),
           new Value("Depowered Transition Time", typeof(float)),
           new Value("Depowered Acceleration Time", typeof(float)),
           new Bitmask("Lightmap Flags", new string[] { "Don't_Use_In_Lightmap", "Don't_Use_In_Lightprobe" }, 32),
           new TagReference("Open_(up)"),
           new TagReference("Close_(down)"),
           new TagReference("Opened"),
           new TagReference("Closed"),
           new TagReference("Depowered"),
           new TagReference("Repowered"),
           new Value("Delay Time", typeof(float)),
           new TagReference("Delay_Effect"),
           new Value("Automatic Activation Radius", typeof(float)),
           new HaloObjects.Enum("Type", new string[] { "Door", "Platform", "Gear" }, 16),
           new Bitmask("Flags", new string[] { "Pathfinding_Obstacle", "...But_Not_When_Open", "Elevator" }, 16),
           new Value("Door Open Time (sec)", typeof(float)),
           new Value("Door Occlusion Bounds [0,1]", typeof(float)),
           new Value("...To", typeof(float)),
           new HaloObjects.Enum("Collision Response", new string[] { "Pause_Until_Crushed", "Reverse_Directions", "Discs" }, 16),
           new Value("Elevator Node", typeof(short)),
           new HaloObjects.Enum("Pathfinding Policy", new string[] { "Discs", "Sectors", "Cut_Out", "None" }, 32),
           });
       }
    }
}
