Ejemplo n.º 1
0
        /// <summary>
        /// If we call building.Repair() then we woud trigger the KSP event and send a message to the server.
        /// Therefore we add the id to the ignore field so the event FacilityRepaired doesn't send a network message
        /// </summary>
        public void RepairFacilityWithoutSendingMessage(DestructibleBuilding building)
        {
            if (building == null || building.IsIntact || !building.IsDestroyed)
            {
                return;
            }

            BuildingIdToIgnore = building.id;
            building.Repair();
            BuildingIdToIgnore = string.Empty;
        }