/// <summary>
        /// Creates the balloon, the dwarves, and the initial balloon port.
        /// </summary>
        public void CreateInitialEmbarkment()
        {
            // If no file exists, we have to create the balloon and balloon port.
            if (!string.IsNullOrEmpty(ExistingFile))
            {
                return;
            }

            BalloonPort port = GenerateInitialBalloonPort(Master.Faction.RoomBuilder, ChunkManager,
                                                          Camera.Position.X, Camera.Position.Z, 3);

            CreateInitialDwarves();
            PlayerFaction.AddMoney(InitialEmbark.Money);

            foreach (var res in InitialEmbark.Resources)
            {
                PlayerFaction.AddResources(new ResourceAmount(res.Key, res.Value));
            }
            var portBox = port.GetBoundingBox();

            ComponentManager.RootComponent.AddChild(Balloon.CreateBalloon(
                                                        portBox.Center() + new Vector3(0, 100, 0),
                                                        portBox.Center() + new Vector3(0, 10, 0), ComponentManager,
                                                        new ShipmentOrder(0, null), Master.Faction));

            Camera.Target   = portBox.Center();
            Camera.Position = Camera.Target + new Vector3(0, 15, -15);

            GenerateInitialObjects();
        }
        public DateTime Hire(Applicant currentApplicant, int delay)
        {
            var startDate = Time.CurrentDate;

            if (PersistentData.NewArrivals.Count > 0)
            {
                startDate = PersistentData.NewArrivals.Last().ArrivalTime;
            }

            PersistentData.NewArrivals.Add(new PersistentWorldData.ApplicantArrival()
            {
                Applicant   = currentApplicant,
                ArrivalTime = startDate + new TimeSpan(0, delay, 0, 0, 0)
            });

            PlayerFaction.AddMoney(-(decimal)(currentApplicant.Level.Pay * 4));
            return(PersistentData.NewArrivals.Last().ArrivalTime);
        }
 public void FireEmployee(CreatureAI Employee)
 {
     PlayerFaction.Minions.Remove(Employee);
     PersistentData.SelectedMinions.Remove(Employee);
     PlayerFaction.AddMoney(-(decimal)(Employee.Stats.CurrentLevel.Pay * 4));
 }
Beispiel #4
0
 public void LoseBux(DwarfBux Bux)
 {
     PlayerFaction.AddMoney(-Bux);
     MakeAnnouncement(String.Format("Lost {0}", Bux));
 }
Beispiel #5
0
 public void AwardBux(DwarfBux Bux)
 {
     PlayerFaction.AddMoney(Bux);
     MakeAnnouncement(String.Format("Gained {0}", Bux));
 }