mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-04 21:37:11 +00:00
MissileSilo cooldown (#309)
changed the sam cooldown to be a general cooldown function and added a missilesilo cooldown The function either adds the current tick as the starting point of the cooldown or sets the cooldown to null and updates the unit. That way getcooldown function can be used to get back the tick the cooldown was started and can be compared to the cooldown set in the config. changed the sam test / added a missilesilo test --------- Co-authored-by: evanpelle <evanpelle@gmail.com>
This commit is contained in:
@@ -114,8 +114,11 @@ export class UnitView {
|
||||
}
|
||||
return this.data.warshipTargetId;
|
||||
}
|
||||
isSamCooldown(): boolean {
|
||||
return this.data.isSamCooldown;
|
||||
ticksLeftInCooldown(): Tick {
|
||||
return this.data.ticksLeftInCooldown;
|
||||
}
|
||||
isCooldown(): boolean {
|
||||
return this.data.ticksLeftInCooldown > 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user