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

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

       public hlmt()
       {
           Fields.AddRange(new MetaNode[] {
           new TagReference("Render_Model"),
           new TagReference("Collision_Model"),
           new TagReference("Animation"),
           new TagReference("Physics"),
           new TagReference("Physics_Model"),
           new Value("Disappear Distance", typeof(float)),
           new Value("Begin Fade Distance", typeof(float)),
           new Unused(4),
           new Value("Reduce To L1", typeof(float)),
           new Value("Reduce To L2", typeof(float)),
           new Value("Reduce To L3", typeof(float)),
           new Value("Reduce To L4", typeof(float)),
           new Value("Reduce To L5", typeof(float)),
           new Unused(4),
           new HaloObjects.Enum("Spawn Type", new string[] { "Fade_At_Super_High_Detail_Level", "Fade_At_High_Detail_Level", "Fade_At_Medium_Detail_Level", "Fade_At_Low_Detail_Level", "Fade_At_Super_Low_Detail_Level", "Fade_Never" }, 16),
           new Unused(2),
           new Reflexive("Variants", 56, new MetaNode[] { 
               new StringID("Name"),
               new Unused(16),
               new Reflexive("Regions", 20, new MetaNode[] { 
                   new StringID("Name"),
                   new Value("Parent Variant #", typeof(short)),
                   new Unused(2),
                   new Reflexive("Permutation", 32, new MetaNode[] { 
                       new StringID("Name"),
                       new Bitmask("Flags", new string[] { "Copy_States_To_All_Permutations" }, 32),
                       new Value("Probability", typeof(float)),
                       new Reflexive("States", 24, new MetaNode[] { 
                           new StringID("Name"),
                           new Bitmask("Property Flags", new string[] { "Blurred", "Hella_Blurred", "Shielded" }, 16),
                           new HaloObjects.Enum("State", new string[] { "Default", "Minor_Damage", "Medium_Damage", "Major_Damage", "Destroyed" }, 16),
                           new TagReference("Looping_Effect"),
                           new StringID("Looping Effect Marker Name"),
                           new Value("Initial Probability", typeof(float)),
                       }),
                       new Unused(12),
                   }),
                   new HaloObjects.Enum("Sort Order", new string[] { "No_Sorting", "-5_(Closest)", "-4", "-3", "-2", "-1", "0_(Same_As_Model)", "1", "2", "3", "4", "5_(Farthest)" }, 32),
               }),
               new Reflexive("Objects", 16, new MetaNode[] { 
                   new StringID("Parent Marker"),
                   new StringID("Child Marker"),
                   new TagReference("Child_Object"),
               }),
               new Unused(8),
               new StringID("Dialogue Sound Effect"),
               new TagReference("Dialogue"),
           }),
           new Reflexive("Materials", 20, new MetaNode[] { 
               new StringID("Material Name"),
               new HaloObjects.Enum("Material Type", new string[] { "Dirt", "Sand", "Stone", "Snow", "Wood", "Metal_(hollow)", "Metal_(thin)", "Metal_(thick)", "Rubber", "Glass", "Force_Field", "Grunt", "Hunter_Armor", "Hunter_Skin", "Elite", "Jackal", "Jackal_Energy_Shield", "Engineer_Skin", "Engineer_Force_Field", "Flood_Combat_Form", "Flood_Carrier_Form", "Cyborg_Armor", "Cyborg_Energy_Shield", "Human_Armor", "Human_Skin", "Sentinel", "Monitor", "Plastic", "Water", "Leaves", "Elite_Energy_Shield", "Ice", "Hunter_Shield" }, 32),
               new HaloObjects.Enum("Damage Section", new string[] {  }, 32),
               new StringID("Global Material Name"),
               new Unused(4),
           }),
           new Reflexive("New Damage Info", 248, new MetaNode[] { 
               new Bitmask("Flags", new string[] { "Takes_Sheild_Damage_For_Children", "Takes_Body_Damage_For_Children", "Always_Shields_Friendly_Damage", "Passes_Area_Damage_To_Children", "Parent_Never_Takes_Body_Damage_For_Children", "Only_Damaged_By_Explosives", "Parent_Never_Takes_Shield_Damage_For_Children", "Cannot_Die_From_Damage", "Passes_Attached_Damage_To_Riders" }, 32),
               new StringID("Global Indirect Material Name"),
               new Value("Indirect Damage Section", typeof(int)),
               new Unused(4),
               new HaloObjects.Enum("Collision Damage Reporting Type", new string[] { "Teh_Guardians!!1!!1!", "Falling_Damage", "Generic_Collision_Damage", "Generic_Melee_Edamage", "Generic_Explosion", "Magnum_Pistol", "Plasma_Pistol", "Needler", "Smg", "Plasma_Rifle", "Battle_Rifle", "carbine", "Shotgun", "Sniper_Rifle", "Beam_Rifle", "Rocket_Launcher", "Flak_Cannon", "Brute_shot", "Disintegrator", "Brute_Plasma_Rifle", "Energy_sword", "Frag_Grenade", "Plasma_Grenade", "Flasg_Melee_Damage", "Bomb_Melee_Damage", "Bomb_Explosion_Damage", "Ball_Melee_Damage", "Human_Turret", "Plasma_Turret", "Banshee", "Ghost", "Mongoose", "Scorpion", "Spectre_Driver", "Spectre_Gunner", "Warthog_Driver", "Warthog_Gunner", "Wraith", "Tank", "Sentinel_beam", "Sentinel_Rpg", "Teleporter" }, 16),
               new HaloObjects.Enum("Response Damage Reporting Type", new string[] { "Teh_Guardians!!1!!1!", "Falling_Damage", "Generic_Collision_Damage", "Generic_Melee_Edamage", "Generic_Explosion", "Magnum_Pistol", "Plasma_Pistol", "Needler", "Smg", "Plasma_Rifle", "Battle_Rifle", "carbine", "Shotgun", "Sniper_Rifle", "Beam_Rifle", "Rocket_Launcher", "Flak_Cannon", "Brute_shot", "Disintegrator", "Brute_Plasma_Rifle", "Energy_sword", "Frag_Grenade", "Plasma_Grenade", "Flasg_Melee_Damage", "Bomb_Melee_Damage", "Bomb_Explosion_Damage", "Ball_Melee_Damage", "Human_Turret", "Plasma_Turret", "Banshee", "Ghost", "Mongoose", "Scorpion", "Spectre_Driver", "Spectre_Gunner", "Warthog_Driver", "Warthog_Gunner", "Wraith", "Tank", "Sentinel_beam", "Sentinel_Rpg", "Teleporter" }, 16),
               new Unused(20),
               new Value("Max Vitality", typeof(float)),
               new Value("Min Stun Damage", typeof(float)),
               new Value("Stun Time", typeof(float)),
               new Value("Recharge Time", typeof(float)),
               new Value("Recharge Fraction", typeof(float)),
               new Unused(64),
               new TagReference("Shield_Damaged_FP_Shader"),
               new TagReference("Shield_Damaged_Shader"),
               new Value("Max Shield Vitality", typeof(float)),
               new StringID("Global Sheild Material Name"),
               new Value("Min Stun Damage", typeof(float)),
               new Value("Stun Time", typeof(float)),
               new Value("Shield Recharge Time", typeof(float)),
               new Value("Sheild Damaged Threshold", typeof(float)),
               new TagReference("Sheild_Damaged_Effect"),
               new TagReference("Sheild_Depleted_Effect"),
               new TagReference("Sheild_Recharging_Effect"),
               new Reflexive("Damage Secctions", 56, new MetaNode[] { 
                   new StringID("Name"),
                   new Bitmask("Flags", new string[] { "Absorbs_Body_Damage", "Takes_Full_Damage_When_Object_Dies", "Cannot_Die_With_Riders", "Takes_Full_Damage_When_Object_Destroyed", "Restored_On_Ressurection", "unused", "unused", "Headshotable", "Ignores_Sheilds" }, 32),
                   new Value("Vitality Percentage", typeof(float)),
                   new Reflexive("Instant Responses", 80, new MetaNode[] { 
                       new HaloObjects.Enum("Response Type", new string[] { "Receives_All_Damage", "Receives_Area_Effect_Damage", "Receives_Local_Damage" }, 16),
                       new HaloObjects.Enum("Constraint Damage Type", new string[] { "None", "Destroy_One_Of_Group", "Destroy_Entire_Group", "Loosen_One_Of_Group", "Loosen_Entire_Group" }, 16),
                       new Bitmask("Flags", new string[] { "Kills_Object", "Inhibits_Melee_Attack", "Inhibits_Weapon_Attack", "Inhibits_Walking", "Forces_Drop_Weapon", "Kills_Weapon_Primary_Trigger", "Kills_Weapon_Secondary_Trigger", "Light_Damage_Left_Turn", "Major_Damage_Left_Turn", "Light_Damage_Right_Turn", "Major_Damage_Right_Turn", "Light_Damage_Engine", "Major_Damage_Engine", "Kills_Object_(No_Player_Solo)", "Causes_Detonation", "Destory_All_Group_Constraints", "Kills_Variant_Objects", "Force_Unattached_Effects", "Fires_Under_Threshold", "Triggers_Special_Death", "Only_On_Special_Death", "Only_NOT_on_Special_Death" }, 32),
                       new Value("Damage Threshold", typeof(float)),
                       new TagReference("Transition_Effect"),
                       new TagReference("Transition_Damage_Effect"),
                       new StringID("Region"),
                       new HaloObjects.Enum("New State", new string[] { "Default", "Minor_Damage", "Medium_Damage", "Major_Damage", "Destroyed" }, 16),
                       new Value("Runtime Region Index", typeof(short)),
                       new StringID("Effect Marker Name"),
                       new StringID("Damage Effect Marker Name"),
                       new Value("Response Delay", typeof(float)),
                       new TagReference("Delay_Effect"),
                       new StringID("Delay Effect Marker Name"),
                       new StringID("Contraint/Group Name"),
                       new StringID("Ejecting Seat Label"),
                       new Value("Skip Fraction", typeof(float)),
                       new StringID("Destroyed Child Object Marker Name"),
                       new Value("Total Damage Threshold", typeof(float)),
                   }),
                   new Unused(20),
                   new Value("Stun Time", typeof(float)),
                   new Value("Recharge Time", typeof(float)),
                   new StringID("Resurrection Restored Region Name"),
                   new Unused(4),
               }),
               new Reflexive("Nodes", 16, new MetaNode[] { 
                   new Unused(16),
               }),
               new Unused(12),
               new Reflexive("Damage Seats", 20, new MetaNode[] { 
                   new StringID("Seat Label"),
                   new Value("Direct Damage Scale", typeof(float)),
                   new Value("Damage Transfer Fall-Off Radius", typeof(float)),
                   new Value("Max Transfer Damage Scale", typeof(float)),
                   new Value("Min Transfer Damage Scale", typeof(float)),
               }),
               new Reflexive("Damage Constraints", 20, new MetaNode[] { 
                   new StringID("Physics Model Constraint Name"),
                   new StringID("Damage Constraint Name"),
                   new StringID("Damage Constaint Goup Name"),
                   new Value("Group Probability Scale", typeof(float)),
                   new Unused(4),
               }),
               new TagReference("Overshield_FP_Shader"),
               new TagReference("Overshield_Shader"),
           }),
           new Reflexive("Targets", 28, new MetaNode[] { 
               new StringID("Marker Name"),
               new Value("Size", typeof(float)),
               new Value("Cone Angle", typeof(float)),
               new Value("Damage Section #", typeof(short)),
               new Value("Variant #", typeof(short)),
               new Value("Targeting Relevance", typeof(float)),
               new Bitmask("Flags", new string[] { "Locked_By_Human_Tracking", "Locked_By_Plasma_Tracking", "Headshot", "Vulnerable", "Always_Locked_By_Plasma_Tracking" }, 32),
               new Value("Lock-On Distance", typeof(float)),
           }),
           new Reflexive("Model Variations", 16, new MetaNode[] { 
               new StringID("Type"),
               new Unused(4),
               new Reflexive("Permutation", 8, new MetaNode[] { 
                   new StringID("Variation"),
                   new Unused(4),
               }),
           }),
           new Reflexive("Nodes", 92, new MetaNode[] { 
               new StringID("Name"),
               new Value("Parent (Index)", typeof(short)),
               new Value("First Child (Index)", typeof(short)),
               new Value("Next Sibling (Index)", typeof(short)),
               new Unused(2),
               new Value("Y", typeof(float)),
               new Value("X", typeof(float)),
               new Value("Z", typeof(float)),
               new Value("i", typeof(float)),
               new Value("j", typeof(float)),
               new Value("k", typeof(float)),
               new Value("w", typeof(float)),
               new Value("Scale Factor", typeof(float)),
               new Unused(36),
               new Value("Y (Leave Child)", typeof(float)),
               new Value("X (Leave Child)", typeof(float)),
               new Value("Z (Leave Child)", typeof(float)),
           }),
           new Unused(4),
           new Reflexive("Model Object Data", 20, new MetaNode[] { 
               new HaloObjects.Enum("Type", new string[] {  }, 32),
               new Value("X", typeof(float)),
               new Value("Y", typeof(float)),
               new Value("Z", typeof(float)),
               new Value("Radius", typeof(float)),
           }),
           new TagReference("Unit_Dialoge"),
           new TagReference("Active_Camo_Shader"),
           new Bitmask("Flags", new string[] { "Active_Camo_Always_On", "Active_Camo_Always_Merge", "Active_Camo_Never_Merge" }, 32),
           new StringID("Default Dialogue Effect"),
           new Bitmask("Runtime Flags", new string[] { "Contains_Run-Time_Nodes" }, 32),
           new Unused(72),
           new TagReference("Hologram_Shader"),
           new StringID("Hologram Control Function"),
           });
       }
    }
}
