public void UpdateService(float deltaTime) { if (ServicedCharacter != null) { serviceDuration -= deltaTime; ServicedCharacter.Needs[NeedFulfilled] -= NeedFulfillmentPerSecond * deltaTime; if (ServicedCharacter.Needs[NeedFulfilled] < 0f) { ServicedCharacter.Needs[NeedFulfilled] = 0f; } if (ServicedCharacter.Needs[NeedFulfilled] <= 0f && serviceDuration <= 0f) { ServicedCharacter.ServiceEnded(); serviceDuration = Prototype.ServiceDuration; ServicedCharacter = null; reservation = null; } } else { reservationTimer -= deltaTime; if (reservationTimer <= 0f) { if (reservation != null) { reservation.ServiceEnded(); reservation = null; } } } }
public void StartDeconstructionPreparation() { if (ServicedCharacter != null) { ServicedCharacter.InterruptActivity(); ServicedCharacter = null; } haltedForDeconstruction = true; reservation = null; serviceDuration = Prototype.ServiceDuration; InputStorage.StartDeconstructionPreparation(); }