public override void SetDetailsFromSetup(Detail detail, CoreDetails core) { // Routes List <string> heliRoutes = new List <string>(); if (core.routeName != "NONE") { heliRoutes = new RouteManager().GetRouteNames(core.routeName); } heliRoutes.AddRange(EnemyInfo.GetCP(core.CPName).CPheliRoutes); routes = heliRoutes; List <Helicopter> qObjects = detail.GetQuestObjects().Cast <Helicopter>().ToList(); int heliCount = (routes.Count > 0 ? 1 : 0); int objectCount = qObjects.Count; for (int i = 0; i < heliCount; i++) { if (i >= objectCount) // add { qObjects.Add(new Helicopter(i)); } } for (int i = objectCount - 1; i >= heliCount; i--) //remove { qObjects.RemoveAt(i); } detail.SetQuestObjects(qObjects.Cast <QuestObject>().ToList()); }
public override void SetDetailsFromSetup(Detail detail, CoreDetails core) { // Routes RouteManager router = new RouteManager(); List <string> uavRoutes = router.GetRouteNames(core.routeName); uavRoutes.AddRange(EnemyInfo.GetCP(core.CPName).CPsoldierRoutes); routes = uavRoutes; base.SetDetailsFromSetup(detail, core); }
public override void SetDetailsFromSetup(Detail detail, CoreDetails core) { // Routes RouteManager router = new RouteManager(); List <string> eneRoutes = router.GetRouteNames(core.routeName); eneRoutes.AddRange(EnemyInfo.GetCP(core.CPName).CPsoldierRoutes); routes = eneRoutes; // Bodies List <string> eneBodies = NPCBodyInfo.GetRegionBodies(core.locationID).ToList(); bodies = eneBodies; // SubTypes List <string> eneSubTypes = NPCBodyInfo.GetRegionSubTypes(core.locationID).ToList(); subtypes = eneSubTypes; // Add/remove/modify detail soldiers string[] soldiers = new string[0]; if (core.CPName != "NONE" || core.routeName != "NONE") { soldiers = EnemyInfo.GetQuestSoldierNames(core.CPName, core.locationID); } List <Enemy> qObjects = detail.GetQuestObjects().Cast <Enemy>().ToList(); int soldierCount = soldiers.Length; int objectCount = qObjects.Count; for (int i = 0; i < soldierCount; i++) { if (i >= objectCount) // add { qObjects.Add(new Enemy(soldiers[i])); } else // modify { qObjects[i].name = soldiers[i]; } } for (int i = objectCount - 1; i >= soldierCount; i--) //remove { qObjects.RemoveAt(i); } detail.SetQuestObjects(qObjects.Cast <QuestObject>().ToList()); EnemyBox.ResetFovaCounts(); }