Example #1
0
        private static Table BuildHostageList(HostageDetail hostageDetail)
        {
            Table           hostageList = new Table("hostageList");
            List <Hostage>  hostages    = hostageDetail.hostages;
            HostageMetadata meta        = hostageDetail.hostageMetadata;

            string scaredCommand  = @"{id = ""SetForceScared"",   scared=true, ever=true }";
            string braveCommand   = @"{id = ""SetHostage2Flag"",  flag=""disableScared"", on=true }";
            string injuredCommand = @"{id = ""SetHostage2Flag"",  flag=""disableFulton"",on=true }";
            string untiedCommand  = @"{id = ""SetHostage2Flag"",  flag=""unlocked"",   on=true,}";

            if (hostages.Count == 0)
            {
                hostageList.Add(@"
        nil ");
            }
            else
            {
                foreach (Hostage hostage in hostages)
                {
                    hostageList.Add($@"
        {{
            hostageName = ""{hostage.GetObjectName()}"",
            isFaceRandom = true,
            isTarget = {hostage.isTarget.ToString().ToLower()},
            voiceType = {{""hostage_a"", ""hostage_b"", {(hostage.language.Equals("english") ? @" ""hostage_c"", ""hostage_d""," : "")}}},
            langType = ""{hostage.language}"", {(hostage.staffType.Equals("NONE") ? "" : $@"
            staffTypeId = TppDefine.STAFF_TYPE_ID.{hostage.staffType},")} {(hostage.skill.Equals("NONE") ? "" : $@"
            skill = ""{hostage.skill}"", ")}
            bodyId = {NPCBodyInfo.GetBodyInfo(meta.hostageBodyName).gameId},
Example #2
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);
                }
            }
        }
Example #3
0
        public static void GetDefinition(HostageDetail hostageDetail, DefinitionLua definitionLua)
        {
            int           hostageCount = hostageDetail.hostages.Count;
            BodyInfoEntry hostageBody  = NPCBodyInfo.GetBodyInfo(hostageDetail.hostageMetadata.hostageBodyName);

            if (hostageCount > 0)
            {
                definitionLua.AddPackPath("/Assets/tpp/pack/mission2/ih/ih_hostage_base.fpk");
                definitionLua.AddPackPath(hostageBody.missionPackPath);

                definitionLua.AddPackInfo($@"randomFaceListIH = {{ gender = ""{(hostageBody.isFemale ? "FEMALE" : "MALE")}"", count = {hostageCount}}}");
            }
        }