Example #1
0
        public void TakeStructure(Structure structure, Corporation oldOwner)
        {
            structure.CorporationShips(this).ForEach(s => this.ships.Add(s));
            structure.Stores.ForEach(AddAsset);

            this.structures.Add(structure);

            Universe.EventPump.RaiseEvent(this, EventType.StructureLost, "Took {0} (a {1}) from {2}", Name, structure.StructureType, oldOwner);
        }
Example #2
0
        public void LoseStructure(Structure structure, Corporation newOwner)
        {
            structure.Personnel.ForEach(p => this.employees.Remove(p));
            structure.Ships.ForEach(s => this.ships.Remove(s));
            structure.Stores.ForEach(RemoveAsset);

            this.structures.Remove(structure);

            Universe.EventPump.RaiseEvent(this, EventType.StructureLost, "Lost {0} (a {1}) to {2}", Name, structure.StructureType, newOwner);
        }