Esempio n. 1
0
 internal static void GetDefinition(HelicopterDetail questDetail, DefinitionLua definitionLua)
 {
     if (questDetail.helicopters.Any(helicopter => helicopter.isSpawn))
     {
         definitionLua.AddDefinition($"hasEnemyHeli = {(questDetail.helicopters.Any(helicopter => helicopter.isSpawn) ? "true" : "false")}");
     }
 }
Esempio n. 2
0
        public static void GetDefinition(EnemyDetail detail, DefinitionLua definitionLua)
        {
            if (detail.enemies.Count > 0)
            {
                string region = GetRegion(detail.enemyMetadata.subtype);

                StringBuilder faceIdList = new StringBuilder("faceIdList = {");
                if (HasBalaclavas(detail.enemies))
                {
                    faceIdList.Append($"TppDefine.QUEST_FACE_ID_LIST.{region}_BALACLAVA, ");
                }
                faceIdList.Append("}");
                definitionLua.AddPackInfo(faceIdList.ToString()); // if necessary faceIdList and bodyIdList should be components of definitionLua

                StringBuilder bodyIdList = new StringBuilder("bodyIdList = {");
                if (HasArmors(detail.enemies))
                {
                    bodyIdList.Append($"TppDefine.QUEST_BODY_ID_LIST.{region}_ARMOR, ");
                }
                foreach (string body in GetBodies(detail.enemies))
                {
                    bodyIdList.Append($"TppEnemyBodyId.{body}, ");
                }
                bodyIdList.Append("}");
                definitionLua.AddPackInfo(bodyIdList.ToString());
            }
        }
Esempio n. 3
0
        private static string BuildDefinition(CoreDetails coreDetails, DetailManager[] managers) //rewrite
        {
            DefinitionLua definitionLua       = new DefinitionLua();
            string        questCompleteLangId = coreDetails.progressLangID;

            definitionLua.AddDefinition($"locationId = {coreDetails.locationID}");
            definitionLua.AddDefinition($@"areaName = ""{coreDetails.loadArea}""");
            if (LoadAreas.isMtbs(coreDetails.locationID))
            {
                definitionLua.AddDefinition($@"clusterName = ""{coreDetails.loadArea.Substring(4)}""");
            }
            definitionLua.AddDefinition($"iconPos = Vector3({coreDetails.coords.xCoord},{coreDetails.coords.yCoord},{coreDetails.coords.zCoord})");
            definitionLua.AddDefinition($"radius = {coreDetails.radius}");
            definitionLua.AddDefinition($"category = TppQuest.QUEST_CATEGORIES_ENUM.{coreDetails.category}");
            definitionLua.AddDefinition($@"questCompleteLangId = ""{questCompleteLangId}""");
            definitionLua.AddDefinition("canOpenQuest=InfQuest.AllwaysOpenQuest");
            definitionLua.AddDefinition($"questRank = TppDefine.QUEST_RANK.{coreDetails.reward}");
            definitionLua.AddDefinition("disableLzs = {}");

            foreach (DetailManager manager in managers)
            {
                manager.AddToDefinitionLua(definitionLua);
            }
            definitionLua.AddPackPath($"/Assets/tpp/pack/mission2/quest/ih/{coreDetails.FpkName}.fpk");

            return(definitionLua.GetDefinitionLuaFormatted());
        }
Esempio n. 4
0
        internal static void GetDefinition(WalkerDetail walkerDetail, DefinitionLua definitionLua)
        {
            int walkerCount = walkerDetail.walkers.Count;

            if (walkerCount > 0)
            {
                definitionLua.AddPackPath("/Assets/tpp/pack/mission2/common/mis_com_walkergear.fpk");
            }
        }
Esempio n. 5
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}}}");
            }
        }
Esempio n. 6
0
        internal static void GetDefinition(ItemDetail questDetail, DefinitionLua definitionLua)
        {
            List <string> requestList         = new List <string>();
            StringBuilder requestEquipBuilder = new StringBuilder("requestEquipIds = {");

            foreach (Item item in questDetail.items)
            {
                if (requestList.Contains(item.item))
                {
                    continue;
                }
                else if (item.item.Contains("EQP_WP_"))
                {
                    requestEquipBuilder.Append($@"""{item.item}"", ");
                    requestList.Add(item.item);
                }
            }
            requestEquipBuilder.Append("}");

            definitionLua.AddDefinition(requestEquipBuilder.ToString());
        }
Esempio n. 7
0
 public override void AddToDefinitionLua(DefinitionLua definitionLua)
 {
     ItemLua.GetDefinition((ItemDetail)detail, definitionLua);
 }
Esempio n. 8
0
 public override void AddToDefinitionLua(DefinitionLua definitionLua)
 {
     WalkerLua.GetDefinition((WalkerDetail)base.detail, definitionLua);
 }
Esempio n. 9
0
 public override void AddToDefinitionLua(DefinitionLua definitionLua)
 {
     EnemyLua.GetDefinition((EnemyDetail)detail, definitionLua);
 }
Esempio n. 10
0
 public override void AddToDefinitionLua(DefinitionLua definitionLua)
 {
     HostageLua.GetDefinition((HostageDetail)base.detail, definitionLua);
 }
Esempio n. 11
0
 public virtual void AddToDefinitionLua(DefinitionLua definitionLua)
 {
     return;
 }