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

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

       public weap()
       {
           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("Item Flags", new string[] { "Always_Maintains_Z_Up", "Destroyed_By_Explosions", "Unaffected_By_Gravity" }, 32),
           new Value("Old Message Index", typeof(short)),
           new Value("Sort Order", typeof(short)),
           new Value("Multiplayer On-ground Scale", typeof(float)),
           new Value("Campaign On-Ground Scale", typeof(float)),
           new StringID("Pickup"),
           new StringID("Swap"),
           new StringID("Pickup or Dual Wield"),
           new StringID("Swap or Dual Wield"),
           new StringID("Dual Wield Only"),
           new StringID("Picked Up"),
           new StringID("Ammo Singular"),
           new StringID("Ammo Plural"),
           new StringID("Switched To"),
           new StringID("Swap AI"),
           new TagReference("unused"),
           new TagReference("Collision_Sound"),
           new Reflexive("Predicted Bitmaps", 8, new MetaNode[] { 
               new TagReference("Bitmap"),
           }),
           new TagReference("Detonation_Damage_Effect"),
           new Value("Detonation Delay", typeof(float)),
           new Value("...To", typeof(float)),
           new TagReference("Deonating_Effect"),
           new TagReference("Detonation_Effect"),
           new Bitmask("Flags", new string[] { "Vertical_Heat_Display", "Mutually_Exclusive_Triggers", "Attacks_Automatically_on_Bump", "Must_Be_Readied", "Doesn't_Count_Toward_Maximum", "Aim_Assists_Only_When_Zoomed", "Prevents_Grenade_Throwing", "Must_Be_Picked_Up", "Holds_Triggers_When_Dropped", "Prevents_Melee_Attack", "Detonates_When_Dropped", "Cannot_Fire_At_Maximum_Range", "Secondary_Trigger_Overrides_Grenades", "(OBSOLETE)Does_Not_Depower", "Enables_Integrated_Night_Vision", "AIs_Use_Weapon_Melee_Damage", "Forces_No_Binoculars", "Loop_FP_Firing_Animation", "Prevents_Sprinting", "Cannot_Fire_While_Boosting", "Prevents_Driving", "Prevents_Gunning", "Can_Be_Dual_Wielded", "Can_Only_Be_Dual_Wielded", "Melee_Only", "Cant_Fire_If_Parent_Dead", "Weapon_Ages_With_Each_Kill", "Weapon_Uses_Old_Dual_Fire_Error", "Primary_Trigger_Melee_Attacks", "Cannot_Be_Used_By_Player" }, 32),
           new HaloObjects.Enum("Secondary Trigger Mode", new string[] { "Normal", "Slaved_To_Primary", "Inhibits_Primary", "Loads_Alternate_Ammunition", "Loads_Multiple_Primary_Ammunition" }, 32),
           new Value("Max Alternate Shots Loaded", typeof(float)),
           new Value("Turn On Time Sec", typeof(float)),
           new Value("Ready Time Sec", typeof(float)),
           new TagReference("Ready_Effect"),
           new TagReference("Ready_Damage_Effect"),
           new Value("Heat Recovery Threshold", typeof(float)),
           new Value("Overheated Threshold", typeof(float)),
           new Value("Heat Detonation Threshold", typeof(float)),
           new Value("Heat Detonation Fraction", typeof(float)),
           new Value("Heat Loss Per Second", typeof(float)),
           new Value("Heat Illumination", typeof(float)),
           new Value("Overheadted Heat Loss Per Second", typeof(float)),
           new TagReference("Overheated"),
           new TagReference("Overheated_Damage_Effect"),
           new TagReference("Detonation"),
           new TagReference("Detonation_Damage_Effect"),
           new TagReference("Player_Melee_Damage"),
           new TagReference("Player_Melee_Response"),
           new Value("Melee Aim Assist Magnetism Angle", typeof(float)),
           new Value("Melee Aim Assist Magnetism Range", typeof(float)),
           new Value("Melee Aim Assist Throttle Magnitude", typeof(float)),
           new Value("Melee Aim Assist Throttle Minimum Distance", typeof(float)),
           new Value("Melee Aim Assist Throttle Maximum Adjustment Angle", typeof(float)),
           new Value("Melee Damage Parameters Damage Pyramid Angles Yaw", typeof(float)),
           new Value("Melee Damage Parameters Damage Pyramid Angles Pitch", typeof(float)),
           new Value("Melee Damage Parameters Damage Pyramid Depth", typeof(float)),
           new TagReference("1st_Hit_Melee_Damage"),
           new TagReference("1st_Hit_Melee_Response_Damage"),
           new TagReference("2nd_Hit_Melee_Damage"),
           new TagReference("2nd_Hit_Melee_Response_Damage"),
           new TagReference("3rd_Hit_Melee_Damage"),
           new TagReference("3rd_Hit_Melee_Response"),
           new TagReference("Lunge_Melee_Damage"),
           new TagReference("Lunge_Melee_Response"),
           new HaloObjects.Enum("Melee Damage Reporting Type", new string[] { "The_Guardians", "Falling_Damage", "Generic_Collision_Damage", "Generic_Melee_Damage", "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", "Flag_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", "Sentinal_Beam", "Sentinal_RPG", "Teleporter" }, 16),
           new Value("Magnification Levels", typeof(short)),
           new Value("Magnification Range Lower", typeof(float)),
           new Value("Magnification Range Upper", typeof(float)),
           new Value("Auto Aim Angle Radians", typeof(float)),
           new Value("Auto Aim Range", typeof(float)),
           new Value("Magnetism Angle Radians", typeof(float)),
           new Value("Magnetism Range", typeof(float)),
           new Value("Deviation Angle Radians", typeof(float)),
           new HaloObjects.Enum("Movement Penalized", new string[] { "Always", "When_Zoomed", "When_Zoomed_or_Reloading" }, 32),
           new Value("Forwards Movement Penalty", typeof(float)),
           new Value("Sideways Movement Penalty", typeof(float)),
           new Unused(16),
           new Value("AI Scariness", typeof(float)),
           new Value("Weapon Power-on Time Sec", typeof(float)),
           new Value("Weapon Power-off Time Sec", typeof(float)),
           new TagReference("Weapon_Power-on_Effect"),
           new TagReference("Weapon_Power-off_Effect"),
           new Value("Age Heat Recovery Penalty", typeof(float)),
           new Value("Age Rate of Fire Penalty", typeof(float)),
           new Value("Age Misfire Start", typeof(float)),
           new Value("Age Misfire Chance", typeof(float)),
           new TagReference("Pickup_Sound"),
           new TagReference("Zoom-In_Sound"),
           new TagReference("Zoom-Out_Sound"),
           new Value("Active Camo Ding", typeof(float)),
           new Value("Active Camo Regrowth Rate", typeof(float)),
           new StringID("Handle Node"),
           new StringID("Weapon Class"),
           new StringID("Weapon Name"),
           new HaloObjects.Enum("Multiplayer Weapon Type", new string[] { "None", "CTF_Flag", "Oddball_Ball", "Headhunter_Head", "Juggernaught_Powerup" }, 16),
           new HaloObjects.Enum("Weapon Type", new string[] { "Undefined", "Shotgun", "Needler", "Plasma_Pistol", "Plasma_Rifle", "Rocket_Launcher" }, 16),
           new HaloObjects.Enum("Tracking Type", new string[] {  }, 32),
           new Unused(16),
           new Reflexive("First Person", 16, new MetaNode[] { 
               new TagReference("First_Person_Model"),
               new TagReference("First_Person_Animations"),
           }),
           new TagReference("New_HUD_Interface"),
           new Reflexive("Predicted Resource", 8, new MetaNode[] { 
               new TagReference("Resource"),
           }),
           new Reflexive("Magazine", 92, new MetaNode[] { 
               new Bitmask("Flags", new string[] { "Wastes_Rounds_When_Reloaded", "Every_Round_Must_Be_Chambered" }, 32),
               new Value("Rounds Recharged Per Second", typeof(short)),
               new Value("Rounds Total Initial", typeof(short)),
               new Value("Rounds Total Maximum", typeof(short)),
               new Value("Rounds Total Loaded Maximum", typeof(short)),
               new Value("Max Rounds Held", typeof(int)),
               new Value("Reload Time Seconds", typeof(float)),
               new Value("Rounds Reloaded", typeof(short)),
               new Unused(2),
               new Value("Chamber Time Seconds", typeof(float)),
               new Unused(24),
               new TagReference("Reloading_Effect"),
               new TagReference("Reloading_Damage_Effect"),
               new TagReference("Chambering_Effect"),
               new TagReference("Chambering_Damage_Effect"),
               new Reflexive("Magazines", 12, new MetaNode[] { 
                   new Value("Rounds", typeof(short)),
                   new Unused(2),
                   new TagReference("Equipment"),
               }),
           }),
           new Reflexive("New Triggers", 64, new MetaNode[] { 
               new Bitmask("Flags", new string[] { "Autofire_Single_Action_Only" }, 32),
               new HaloObjects.Enum("Button Used", new string[] { "Right_Trigger", "Left_Trigger", "Melee_Attack_(SP_Only)", "Automated_Fire_(Unassigned)" }, 16),
               new HaloObjects.Enum("Behavior", new string[] { "Spew", "Latch", "1-Latch_2-Autofire", "Charge", "1-Latch_2-Zoom", "1-Latch_2-Lockon" }, 16),
               new Value("Primary Barrel", typeof(short)),
               new Value("Secondary Barrel", typeof(short)),
               new HaloObjects.Enum("Prediction", new string[] { "None", "Spew", "Charge" }, 32),
               new Value("Autofire Time", typeof(float)),
               new Value("Autofire Throw", typeof(float)),
               new HaloObjects.Enum("Secondary Action", new string[] { "Fire", "Charge", "Track", "Fire_Other" }, 32),
               new Value("Charging Time", typeof(float)),
               new Value("Charged Time", typeof(float)),
               new HaloObjects.Enum("Overcharged Action", new string[] { "None", "Explode", "Discharge" }, 32),
               new Value("Charged Illumination", typeof(float)),
               new Value("Spew Time", typeof(float)),
               new TagReference("Charging_Effect"),
               new TagReference("Charging_Damage_Effect"),
           }),
           new Reflexive("Barrels", 236, new MetaNode[] { 
               new Bitmask("Flags", new string[] { "Tracks_Fired_Projectile", "Random_Firing_Effects", "Can_Fire_With_Partial_Ammo", "Projectiles_use_Weapon_Origin", "Ejects_During_Chamber", "Use_Error_When_Unzoomed", "Projectile_Vector_Cannot_Be_Adjusted", "Projectiles_Have_Identical_Error", "Projectiles_Fire_Parallel", "Cant_Fire_When_Others_Firing", "Cant_Fire_When_Others_Recovering", "Don't_Clear_Fire_Bit_After_Recovering", "Stagger_Fire_Across_Multiple_Markers", "Fires_Locked_Projectiles" }, 32),
               new Value("Rounds per Second Min", typeof(float)),
               new Value("Rounds per Second Max", typeof(float)),
               new Value("Acceleration Time Sec", typeof(float)),
               new Value("Deceleration Time Sec", typeof(float)),
               new Value("Barrel Spin Scale", typeof(float)),
               new Value("Blurred Rate Of Fire", typeof(float)),
               new Value("Shots Per Fire Lower", typeof(short)),
               new Value("Shots Per Fire Upper", typeof(short)),
               new Value("Fire Recovery Time Sec", typeof(float)),
               new Value("Soft Recovery Fraction", typeof(float)),
               new Value("Magazine", typeof(short)),
               new Value("Rounds per Shot", typeof(short)),
               new Value("Minimum Rounds Loaded", typeof(short)),
               new Value("Rounds Between Tracers", typeof(short)),
               new StringID("Optional Barrel Marker Name"),
               new HaloObjects.Enum("Prediction Type", new string[] { "None", "Continuous", "Instant" }, 16),
               new HaloObjects.Enum("Firing Noise", new string[] { "Silent", "Medium", "Loud", "Shout", "Quiet" }, 16),
               new Value("Error Acceleration Time Sec", typeof(float)),
               new Value("Error Deceleration Time Sec", typeof(float)),
               new Value("Damage Error Lower", typeof(float)),
               new Value("Damage Error Upper", typeof(float)),
               new Value("Dual Weapon Error Acceleration Time Sec", typeof(float)),
               new Value("Dual Weapon Error Deceleration Time Sec", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Dual Weapon Minimum Error Radians", typeof(float)),
               new Value("Dual Weapon Error Angle Lower", typeof(float)),
               new Value("Dual Weapon Error Angle Upper", typeof(float)),
               new Value("Dual Wield Damage Scale", typeof(float)),
               new HaloObjects.Enum("Distribution Function", new string[] { "Point", "Horizontal_Fan" }, 16),
               new Value("Projectiles per Shot", typeof(short)),
               new Value("Distribution Angle Radians", typeof(float)),
               new Value("Minimum Error", typeof(float)),
               new Value("Error Angle Min", typeof(float)),
               new Value("Error Angle Max", typeof(float)),
               new Value("First Person Offset X", typeof(float)),
               new Value("First Person Offset Y", typeof(float)),
               new Value("First Person Offset Z", typeof(float)),
               new HaloObjects.Enum("Damage Reporting Type", new string[] { "The_Guardians", "Falling_Damage", "Generic_Collision_Damage", "Generic_Melee_Damage", "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", "Flag_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", "Sentinal_Beam", "Sentinal_RPG", "Teleporter" }, 32),
               new TagReference("Projectile"),
               new TagReference("Damage_Effect"),
               new Value("Ejection Port Recovery Time", typeof(float)),
               new Value("Illumination Recovery Time", typeof(float)),
               new Value("Heat Generated Per Round", typeof(float)),
               new Value("Age Generated Per Round", typeof(float)),
               new Value("Overload Time Sec", typeof(float)),
               new Value("Angle Change Per Shot Lower", typeof(float)),
               new Value("Angle Change Per Shot Upper", typeof(float)),
               new Value("Angle Change Acceleration Time Sec", typeof(float)),
               new Value("Angle Change Deceleration Time Sec", typeof(float)),
               new HaloObjects.Enum("Angle Change Function", new string[] { "Linear", "Early", "Very_Early", "Late", "Very_Late", "Cosine", "Zero", "One" }, 32),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Value("Unknown Calculated Constant", typeof(float)),
               new Reflexive("Firing Effects", 52, new MetaNode[] { 
                   new Value("Shot Count Lower Bound", typeof(short)),
                   new Value("Shot Count Upper Bound", typeof(short)),
                   new TagReference("Firing_Effect"),
                   new TagReference("Misfire_Effect"),
                   new TagReference("Empty_Effect"),
                   new TagReference("Firing_Damage"),
                   new TagReference("Misfire_Damage"),
                   new TagReference("Empty_Damage"),
               }),
           }),
           new Value("Unknown Calculated Constant", typeof(float)),
           new Value("Unknown Calculated Constant", typeof(float)),
           new Value("Max Movement Acceleration", typeof(float)),
           new Value("Max Movement Velocity", typeof(float)),
           new Value("Max Turning Acceleration", typeof(float)),
           new Value("Max Turning Velocity", typeof(float)),
           new TagReference("Deployed_Vehicle"),
           new TagReference("Aged_Effect"),
           new TagReference("Aged_Weapon"),
           new Value("FP Weapon Offset i", typeof(float)),
           new Value("FP Weapon Offset j", typeof(float)),
           new Value("FP Weapon Offset k", typeof(float)),
           new Value("FP Scope Size i", typeof(float)),
           new Value("FP Scope Size j", typeof(float)),
           });
       }
    }
}
