Esempio n. 1
0
        public static void AddQuestEntities(VehicleDetail details, DataSet dataSet, List <Fox2EntityClass> entityList)
        {
            List <Vehicle>  vehicles  = details.vehicles;
            VehicleMetadata hMetadata = details.vehicleMetadata;

            if (vehicles.Count() > 0)
            {
                List <Fox2EntityClass> tempVehicleList = new List <Fox2EntityClass>();
                foreach (Vehicle vehicle in vehicles)
                {
                    if (!HasBodyData(entityList, vehicle.vehicle))
                    {
                        entityList.Add(new TppVehicle2BodyData(vehicle.vehicle, dataSet));
                    }
                    if (!HasAttachmentData(entityList, vehicle.vehicle))
                    {
                        entityList.Add(new TppVehicle2AttachmentData(vehicle.vehicle, dataSet));
                    }

                    GameObjectLocator           locator      = new GameObjectLocator(vehicle.GetObjectName(), dataSet, "TppVehicle2");
                    Transform                   transform    = new Transform(locator, vehicle.position);
                    TppVehicle2LocatorParameter locatorParam = new TppVehicle2LocatorParameter(locator);

                    locator.SetTransform(transform);
                    locator.SetParameter(locatorParam);

                    entityList.Add(locator);
                    entityList.Add(transform);
                    entityList.Add(locatorParam);
                }
            }
        }
Esempio n. 2
0
        internal static void AddQuestEntities(HelicopterDetail questDetail, DataSet dataSet, List <Fox2EntityClass> entityList)
        {
            List <Helicopter> helis = questDetail.helicopters;

            if (helis.Count() > 1) // reinforceHeli does not need fox2 entries
            {
                foreach (Helicopter heli in helis)
                {
                    if (heli.ID == 0)
                    {
                        continue;
                    }

                    GameObjectLocator        heliLocator          = new GameObjectLocator(heli.GetObjectName(), dataSet, "TppEnemyHeli");
                    Transform                heliTransform        = new Transform(heliLocator, new Core.Classes.InfiniteHeaven.Position());
                    TppHeli2LocatorParameter heliLocatorParameter = new TppHeli2LocatorParameter(heliLocator);

                    heliLocator.SetTransform(heliTransform);
                    heliLocator.SetParameter(heliLocatorParameter);

                    entityList.Add(heliLocator);
                    entityList.Add(heliTransform);
                    entityList.Add(heliLocatorParameter);
                }
            }
        }
Esempio n. 3
0
        internal static void AddQuestEntities(CameraDetail detail, DataSet dataSet, List <Fox2EntityClass> entityList)
        {
            List <Camera> cameras = detail.cameras;

            if (cameras.Count() > 0)
            {
                GameObject tppCamera = new GameObject("SecurityCameraGameObject", dataSet, "TppSecurityCamera2", cameras.Count(), cameras.Count());
                TppSecurityCamera2Parameter tppCameraParameter = new TppSecurityCamera2Parameter(tppCamera);

                tppCamera.SetParameter(tppCameraParameter);

                entityList.Add(tppCamera);
                entityList.Add(tppCameraParameter);

                foreach (Camera camera in cameras)
                {
                    GameObjectLocator locator   = new GameObjectLocator(camera.GetObjectName(), dataSet, "TppSecurityCamera2");
                    Transform         transform = new Transform(locator, camera.position);
                    TppSecurityCamera2LocatorParameter locatorParameter = new TppSecurityCamera2LocatorParameter(locator);

                    locator.SetTransform(transform);
                    locator.SetParameter(locatorParameter);

                    entityList.Add(locator);
                    entityList.Add(transform);
                    entityList.Add(locatorParameter);
                }
            }
        }
Esempio n. 4
0
        internal static void AddQuestEntities(WalkerDetail walkerDetail, DataSet dataSet, List <Fox2EntityClass> entityList)
        {
            List <WalkerGear> walkers = walkerDetail.walkers;

            if (walkers.Count() > 0)
            {
                GameObject TppCommonWalkerGear2 = new GameObject("WalkerGearGameObject", dataSet, "TppCommonWalkerGear2", walkers.Count(), walkers.Count());
                TppWalkerGear2Parameter walkerGear2Parameter = new TppWalkerGear2Parameter(TppCommonWalkerGear2);

                TppCommonWalkerGear2.SetParameter(walkerGear2Parameter);

                entityList.Add(TppCommonWalkerGear2);
                entityList.Add(walkerGear2Parameter);

                foreach (WalkerGear walker in walkers)
                {
                    GameObjectLocator walkerLocator   = new GameObjectLocator(walker.GetObjectName(), dataSet, "TppCommonWalkerGear2");
                    Transform         walkerTransform = new Transform(walkerLocator, walker.position);
                    TppWalkerGear2LocatorParameter walkerLocatorParameter = new TppWalkerGear2LocatorParameter(walkerLocator);

                    walkerLocator.SetTransform(walkerTransform);
                    walkerLocator.SetParameter(walkerLocatorParameter);

                    entityList.Add(walkerLocator);
                    entityList.Add(walkerTransform);
                    entityList.Add(walkerLocatorParameter);
                }
            }
        }
Esempio n. 5
0
        internal static void AddQuestEntities(UAVDetail detail, DataSet dataSet, List <Fox2EntityClass> entityList)
        {
            List <UAV> UAVs = detail.UAVs;

            if (UAVs.Count() > 0)
            {
                GameObject      tppUAV          = new GameObject("UavGameObject", dataSet, "TppUav", UAVs.Count(), UAVs.Count()); // realized count is apparently fova?
                TppUavParameter tppUAVParameter = new TppUavParameter(tppUAV);

                tppUAV.SetParameter(tppUAVParameter);

                entityList.Add(tppUAV);
                entityList.Add(tppUAVParameter);

                foreach (UAV UAV in UAVs)
                {
                    GameObjectLocator      UAVLocator          = new GameObjectLocator(UAV.GetObjectName(), dataSet, "TppUav");
                    Transform              UAVTransform        = new Transform(UAVLocator, UAV.position);
                    TppUavLocatorParameter UAVLocatorParameter = new TppUavLocatorParameter(UAVLocator);

                    UAVLocator.SetTransform(UAVTransform);
                    UAVLocator.SetParameter(UAVLocatorParameter);

                    entityList.Add(UAVLocator);
                    entityList.Add(UAVTransform);
                    entityList.Add(UAVLocatorParameter);
                }
            }
        }
Esempio n. 6
0
        public static void AddQuestEntities(HostageDetail hDetails, DataSet dataSet, List <Fox2EntityClass> entityList)
        {
            List <Hostage>  hostages      = hDetails.hostages;
            HostageMetadata hMetadata     = hDetails.hostageMetadata;
            BodyInfoEntry   hostageBodies = NPCBodyInfo.GetBodyInfo(hMetadata.hostageBodyName);

            if (hostages.Count() > 0)
            {
                GameObject           gameObjectTppHostageUnique = new GameObject("GameObjectTppHostageUnique", dataSet, "TppHostageUnique2", hostages.Count(), hostages.Count());
                TppHostage2Parameter hostageParameter           = new TppHostage2Parameter(gameObjectTppHostageUnique, hostageBodies.partsPath);

                gameObjectTppHostageUnique.SetParameter(hostageParameter);

                entityList.Add(gameObjectTppHostageUnique);
                entityList.Add(hostageParameter);

                foreach (Hostage hostage in hostages)
                {
                    GameObjectLocator           hostageLocator          = new GameObjectLocator(hostage.GetObjectName(), dataSet, "TppHostageUnique2");
                    Transform                   hostageTransform        = new Transform(hostageLocator, hostage.position);
                    TppHostage2LocatorParameter hostageLocatorParameter = new TppHostage2LocatorParameter(hostageLocator);

                    hostageLocator.SetTransform(hostageTransform);
                    hostageLocator.SetParameter(hostageLocatorParameter);

                    entityList.Add(hostageLocator);
                    entityList.Add(hostageTransform);
                    entityList.Add(hostageLocatorParameter);
                }
            }
        }
Esempio n. 7
0
        public static void AddQuestEntities(ActiveItemDetail detail, DataSet dataSet, List <Fox2EntityClass> entityList)
        {
            List <ActiveItem>  activeItems = detail.activeItems;
            ActiveItemMetadata meta        = detail.activeItemMetadata;

            if (activeItems.Count() > 0)
            {
                foreach (ActiveItem activeItem in activeItems)
                {
                    GameObjectLocator         itemLocator = new GameObjectLocator(activeItem.GetObjectName(), dataSet, "TppPlacedSystem");
                    Transform                 transform   = new Transform(itemLocator, activeItem.position);
                    string                    equipId     = Hashing.ToStr32(activeItem.activeItem);
                    TppPlacedLocatorParameter param       = new TppPlacedLocatorParameter(itemLocator, equipId);

                    itemLocator.SetTransform(transform);
                    itemLocator.SetParameter(param);

                    entityList.Add(itemLocator);
                    entityList.Add(transform);
                    entityList.Add(param);
                }
            }
        }
Esempio n. 8
0
        public static void AddQuestEntities(ItemDetail detail, DataSet dataSet, List <Fox2EntityClass> entityList)
        {
            List <Item>  items = detail.items;
            ItemMetadata meta  = detail.itemMetadata;

            if (items.Count() > 0)
            {
                foreach (Item item in items)
                {
                    GameObjectLocator           itemLocator = new GameObjectLocator(item.GetObjectName(), dataSet, "TppPickableSystem");
                    Transform                   transform   = new Transform(itemLocator, item.position);
                    string                      equipId     = Hashing.ToStr32(item.item);
                    TppPickableLocatorParameter param       = new TppPickableLocatorParameter(itemLocator, equipId, item.count, item.isBoxed);

                    itemLocator.SetTransform(transform);
                    itemLocator.SetParameter(param);

                    entityList.Add(itemLocator);
                    entityList.Add(transform);
                    entityList.Add(param);
                }
            }
        }
Esempio n. 9
0
        public static void AddQuestEntities(AnimalDetail detail, DataSet dataSet, List <Fox2EntityClass> entityList)
        {
            List <Animal>  animals = detail.animals;
            AnimalMetadata meta    = detail.animalMetadata;

            if (animals.Count() > 0)
            {
                foreach (string animalType in AnimalInfo.AnimalTypes)
                {
                    int typeCount = GetTypeCount(animals, animalType);
                    if (typeCount > 0)
                    {
                        GameObject animalObject = new GameObject(animalType + "_GameObject", dataSet, animalType, typeCount, typeCount);
                        entityList.Add(animalObject);
                        switch (animalType)
                        {
                        case "TppGoat":
                        case "TppNubian":
                        case "TppZebra":
                            TppAnimalParameter animalParam = new TppAnimalParameter(animalObject, GetFirstAnimalOfType(animals, animalType));
                            animalObject.SetParameter(animalParam);
                            entityList.Add(animalParam);
                            break;

                        case "TppWolf":
                        case "TppJackal":
                            TppWolfParameter wolfParam = new TppWolfParameter(animalObject, GetFirstAnimalOfType(animals, animalType));
                            animalObject.SetParameter(wolfParam);
                            entityList.Add(wolfParam);
                            break;

                        case "TppBear":
                            TppBearParameter bearParam = new TppBearParameter(animalObject, GetFirstAnimalOfType(animals, animalType));
                            animalObject.SetParameter(bearParam);
                            entityList.Add(bearParam);
                            break;
                        }
                    }
                }
                foreach (Animal animal in animals)
                {
                    GameObjectLocator locator   = new GameObjectLocator(animal.GetObjectName(), dataSet, animal.typeID);
                    Transform         transform = new Transform(locator, animal.position);
                    locator.SetTransform(transform);

                    entityList.Add(locator);
                    entityList.Add(transform);

                    switch (animal.typeID)
                    {
                    case "TppGoat":
                    case "TppNubian":
                    case "TppZebra":
                        TppAnimalLocatorParameter animalLocatorParam = new TppAnimalLocatorParameter(locator, animal.count);
                        locator.SetParameter(animalLocatorParam);
                        entityList.Add(animalLocatorParam);
                        break;

                    case "TppWolf":
                    case "TppJackal":
                        TppWolfLocatorParameter wolfLocatorParam = new TppWolfLocatorParameter(locator, animal.count);
                        locator.SetParameter(wolfLocatorParam);
                        entityList.Add(wolfLocatorParam);
                        break;

                    case "TppBear":
                        TppBearLocatorParameter bearLocatorParam = new TppBearLocatorParameter(locator, animal.count);
                        locator.SetParameter(bearLocatorParam);
                        entityList.Add(bearLocatorParam);
                        break;
                    }
                }
            }
        }