Exemplo n.º 1
0
 public void InstallLoadout(StandardisedItem item, List <StandardisedLoadoutEntry> loadout)
 {
     foreach (var port in item.Ports)
     {
         InstallLoadout(port, loadout);
     }
 }
Exemplo n.º 2
0
        public StandardisedItem BuildItem(EntityClassDefinition entity)
        {
            var stdItem = new StandardisedItem
            {
                ClassName    = entity.ClassName,
                Size         = entity.Components.SAttachableComponentParams?.AttachDef.Size ?? 0,
                Grade        = entity.Components.SAttachableComponentParams?.AttachDef.Grade ?? 0,
                Type         = BuildTypeName(entity.Components.SAttachableComponentParams?.AttachDef.Type, entity.Components.SAttachableComponentParams?.AttachDef.SubType),
                Name         = localisationSvc.GetText(entity.Components.SAttachableComponentParams?.AttachDef.Localization.Name, entity.ClassName),
                Description  = localisationSvc.GetText(entity.Components.SAttachableComponentParams?.AttachDef.Localization.Description),
                Manufacturer = manufacturerSvc.GetManufacturer(entity.Components.SAttachableComponentParams?.AttachDef.Manufacturer, entity.ClassName),
                Ports        = BuildPortList(entity),
                Tags         = BuildTagList(entity)
            };

            stdItem.Shield             = BuildShieldInfo(entity);
            stdItem.QuantumDrive       = BuildQuantumDriveInfo(entity);
            stdItem.PowerPlant         = BuildPowerPlantInfo(entity);
            stdItem.Cooler             = BuildCoolerInfo(entity);
            stdItem.Durability         = BuildDurabilityInfo(entity);
            stdItem.Thruster           = BuildThrusterInfo(entity);
            stdItem.CargoGrid          = BuildCargoGridInfo(entity);
            stdItem.QuantumFuelTank    = BuildQuantumFuelTankInfo(entity);
            stdItem.HydrogenFuelTank   = BuildHydrogenFuelTankInfo(entity);
            stdItem.HydrogenFuelIntake = BuildHydrogenFuelIntakeInfo(entity);
            stdItem.Armour             = BuildArmourInfo(entity);
            stdItem.Emp                 = BuildEmpInfo(entity);
            stdItem.MissileRack         = BuildMissileRackInfo(entity);
            stdItem.QuantumInterdiction = BuildQigInfo(entity);
            stdItem.Ifcs                = BuildIfcsInfo(entity);
            stdItem.HeatConnection      = BuildHeatConnectionInfo(entity);
            stdItem.PowerConnection     = BuildPowerConnectionInfo(entity);
            stdItem.Weapon              = BuildWeaponInfo(entity);
            stdItem.Ammunition          = BuildAmmunitionInfo(entity);
            stdItem.Missile             = BuildMissileInfo(entity);
            stdItem.Scanner             = BuildScannerInfo(entity);
            stdItem.Radar               = BuildRadarInfo(entity);
            stdItem.Ping                = BuildPingInfo(entity);
            stdItem.WeaponRegenPool     = BuildWeaponRegenInfo(entity);

            return(stdItem);
        }