Example #1
0
        public Sector(string Name, uint sectorId, uint sectorGuid, Color ambientColor, Color fogColor, Color dustColor, BackgroundDesc backgroundDesc, BackgroundDesc starsDesc, BackgroundDesc starsMult, BackgroundDesc starsVariance, MovingNebulaDesc[] movingNebulas, LightDesc[] lightDescs, SunDesc[] sunDescs, JGlobalFog jGlobalFog, JCameraFx jCameraFx)
        {
            this.sectorId   = sectorId;
            this.sectorGuid = sectorGuid;
            this.Name       = Name;
            CreatedTime     = DateTime.UtcNow.ToUniversalTime();
            Tick.Reset(SectorTime);
            loop.OnUpdated = Update;
            loop.Initialize();

            SectorCard     sector     = new SectorCard(sectorGuid, CardView.Sector, 25000, 25000, 25000, sectorGuid, ambientColor, fogColor, 12, dustColor, 12, backgroundDesc, starsDesc, starsMult, starsVariance, movingNebulas, lightDescs, sunDescs, jGlobalFog, jCameraFx, new string[0]);
            GUICard        sectorGUI  = new GUICard(sectorGuid, CardView.GUI, serverSectorName, 0, "", 0, "", "", "", new string[0]);
            RegulationCard sectorReg  = new RegulationCard(sectorGuid, CardView.Regulation, new ConsumableEffectType[0], new Dictionary <uint, HashSet <ShipAbilitySide> >(), new Dictionary <uint, HashSet <ShipAbilityTarget> >(), TargetBracketMode.Default, true);
            RoomCard       sectorRoom = new RoomCard(sectorGuid, CardView.Room);

            Catalogue.AddCard(sector);
            Catalogue.AddCard(sectorGUI);
            Catalogue.AddCard(sectorReg);
            Catalogue.AddCard(sectorRoom);
        }
Example #2
0
        // This method will generate all "static" cards that the server is going to send to the client.
        public static void SetupCards()
        {
            RewardCard colonialBonusReward = new RewardCard(3027, CardView.Reward, 0, AugmentActionType.None, "", 0);
            RewardCard cylonBonusReward    = new RewardCard(3127, CardView.Reward, 0, AugmentActionType.None, "", 0);

            AddCard(colonialBonusReward);
            AddCard(cylonBonusReward);

            // These two cards shouldn't be static since they are most likely set according to the database.
            // Since we are just debugging this, there's no need to hook it up even with the fake database yet.
            GUICard colonialBonus = new GUICard(colonialBonusReward.CardGUID, CardView.GUI, "bonus_faction_balance_neutral", (byte)0, "", 0, "", "", "", new string[0]);
            GUICard cylonBonus    = new GUICard(cylonBonusReward.CardGUID, CardView.GUI, "bonus_faction_balance_neutral", (byte)0, "", 0, "", "", "", new string[0]);

            AddCard(colonialBonus);
            AddCard(cylonBonus);

            AvatarCatalogueCard avatarCatalogue = new AvatarCatalogueCard(109873795, CardView.AvatarCatalogue);

            AddCard(avatarCatalogue);

            Color          ambientColor   = Color.FromArgb(255, 100, 100, 100);
            Color          fogColor       = Color.FromArgb(255, 100, 100, 100);
            Color          dustColor      = Color.FromArgb(255, 100, 100, 100);
            BackgroundDesc backgroundDesc = new BackgroundDesc("nebula1", new Quaternion(0, 0, 0, 0), Color.FromArgb(100, 100, 100, 100), new Vector3(0, 0, 0));
            BackgroundDesc starsDesc      = new BackgroundDesc("stars", new Quaternion(0, 0, 0, 0), Color.FromArgb(100, 100, 100, 100), new Vector3(0, 0, 0));
            BackgroundDesc starsMult      = new BackgroundDesc("starsmultiply_mid", new Quaternion(0, 0, 0, 0), Color.FromArgb(100, 100, 100, 100), new Vector3(0, 0, 0));
            BackgroundDesc starsVariance  = new BackgroundDesc("starsvariances", new Quaternion(0, 0, 0, 0), Color.FromArgb(100, 100, 100, 100), new Vector3(0, 0, 0));

            MovingNebulaDesc[] movingNebulas = new MovingNebulaDesc[0];
            LightDesc[]        lightDescs    = new LightDesc[0];
            SunDesc[]          sunDescs      = new SunDesc[0];
            JGlobalFog         jGlobalFog    = new JGlobalFog(false, Color.FromArgb(0, 0, 0, 0), 0, 0);
            JCameraFx          jCameraFx     = new JCameraFx(false);

            SectorCard     sector4    = new SectorCard(1427, CardView.Sector, 1000, 1000, 1000, 1427, ambientColor, fogColor, 12, dustColor, 12, backgroundDesc, starsDesc, starsMult, starsVariance, movingNebulas, lightDescs, sunDescs, jGlobalFog, jCameraFx, new string[0]);
            GUICard        sector4GUI = new GUICard(1427, CardView.GUI, "sector4", 0, "", 0, "", "", "", new string[0]);
            RegulationCard sector4Reg = new RegulationCard(1427, CardView.Regulation, new ConsumableEffectType[0], new Dictionary <uint, HashSet <ShipAbilitySide> >(), new Dictionary <uint, HashSet <ShipAbilityTarget> >(), TargetBracketMode.Default, true);

            AddCard(sector4);
            AddCard(sector4GUI);
            AddCard(sector4Reg);


            Dictionary <ObjectStat, float> mk7Stats = new Dictionary <ObjectStat, float>();

            mk7Stats.Add(ObjectStat.MaxHullPoints, 585);
            mk7Stats.Add(ObjectStat.HullRecovery, 4.5f);
            mk7Stats.Add(ObjectStat.ArmorValue, 5);
            mk7Stats.Add(ObjectStat.CriticalDefense, 80);
            mk7Stats.Add(ObjectStat.Avoidance, 510);
            mk7Stats.Add(ObjectStat.TurnSpeed, 50);
            mk7Stats.Add(ObjectStat.TurnAcceleration, 55);
            mk7Stats.Add(ObjectStat.InertiaCompensation, 100);
            mk7Stats.Add(ObjectStat.Acceleration, 12);
            mk7Stats.Add(ObjectStat.Speed, 55);
            mk7Stats.Add(ObjectStat.BoostSpeed, 85);
            mk7Stats.Add(ObjectStat.BoostCost, 0.75f);
            mk7Stats.Add(ObjectStat.FtlRange, 4.5f);
            mk7Stats.Add(ObjectStat.FtlCharge, 15);
            mk7Stats.Add(ObjectStat.FtlCost, 30);
            mk7Stats.Add(ObjectStat.MaxPowerPoints, 150);
            mk7Stats.Add(ObjectStat.PowerRecovery, 5);
            mk7Stats.Add(ObjectStat.FirewallRating, 100);
            mk7Stats.Add(ObjectStat.DradisRange, 2000);
            mk7Stats.Add(ObjectStat.DetectionVisualRadius, 200);

            mk7Stats.Add(ObjectStat.StrafeAcceleration, 145);
            mk7Stats.Add(ObjectStat.StrafeMaxSpeed, 40);
            mk7Stats.Add(ObjectStat.PitchMaxSpeed, 65);
            mk7Stats.Add(ObjectStat.PitchAcceleration, 120);
            mk7Stats.Add(ObjectStat.YawMaxSpeed, 65);
            mk7Stats.Add(ObjectStat.YawAcceleration, 120);
            mk7Stats.Add(ObjectStat.RollMaxSpeed, 135);
            mk7Stats.Add(ObjectStat.RollAcceleration, 120);

            ShipCard mk7ShipCard = new ShipCard(22131177, CardView.Ship, 100, 2, 2, 1, 100, 0, 100, 1, new ShipRole[1] {
                ShipRole.Assault
            }, ShipRoleDeprecated.Fighter, "ship_viper_mk7_paperdoll_layouts", new List <ShipSlotCard>(), false, new List <uint>(), -1, new ObjectStats(mk7Stats), Faction.Colonial, new List <ShipImmutableSlot>());
            GUICard       mk7GuiCard       = new GUICard(22131177, CardView.GUI, "vipermk7", 0, "", 0, "", "gui/infojournal/ships/Human11", "", new string[0]);
            ShopItemCard  mk7ShopItemCard  = new ShopItemCard(22131177, CardView.Price, ShopCategory.Ship, ShopItemType.Ship, 1, new string[0], 0, new Price(), new Price(), new Price(), Faction.Colonial, false);
            CameraCard    mk7CameraCard    = new CameraCard(22131177, CardView.Camera, 20, 40, 10, 20, 20);
            WorldCard     mk7WorldCard     = new WorldCard(22131177, CardView.World, "HumanT1Merit", 0, 0, new SpotDesc[0], "", 0, 0, true, true, true);
            ShipLightCard mk7ShipLightCard = new ShipLightCard(22131177, CardView.ShipLight, 100, 1, new ShipRole[1] {
                ShipRole.Assault
            }, ShipRoleDeprecated.Fighter);

            MovementCard movementCard = new MovementCard(22131177, CardView.Movement);

            AddCard(movementCard);

            AddCard(mk7ShipCard);
            AddCard(mk7GuiCard);
            AddCard(mk7ShopItemCard);
            AddCard(mk7CameraCard);
            AddCard(mk7WorldCard);
            AddCard(mk7ShipLightCard);

            RewardCard idk2 = new RewardCard(49842157, CardView.Reward, 0, AugmentActionType.LootItem, "", 0);
            GlobalCard idk  = new GlobalCard(49842157, CardView.Global, 100, 100, 100, 10, idk2, new Dictionary <int, RewardCard>());
            GUICard    idk3 = new GUICard(49842157, CardView.GUI, "", (byte)0, "", 0, "", "", "", new string[0]);

            AddCard(idk2);
            AddCard(idk);
            AddCard(idk3);

            GUICard idk4 = new GUICard(130920111, CardView.GUI, "", (byte)0, "", 0, "", "", "", new string[0]);

            AddCard(idk4);

            GalaxyMapCard galaxyMapCard = new GalaxyMapCard(150576033, CardView.GalaxyMap, new Dictionary <uint, MapStarDesc>(), new int[0], 0);

            AddCard(galaxyMapCard);

            StickerListCard stickerListCard = new StickerListCard(166885587, CardView.StickerList);

            AddCard(stickerListCard);
        }