fix overshield
This commit is contained in:
parent
fa0cff1ffc
commit
cc3ed20f76
@ -568,6 +568,7 @@ function ship_m:refresh_shield()
|
|||||||
if (lframe < self.shield_refresh_ready) return
|
if (lframe < self.shield_refresh_ready) return
|
||||||
if (self.power < self.shieldcost) return
|
if (self.power < self.shieldcost) return
|
||||||
self.shield += 1
|
self.shield += 1
|
||||||
|
self.shield = min(self.shield, self.maxshield)
|
||||||
self.power -= self.shieldcost
|
self.power -= self.shieldcost
|
||||||
self.shield_refresh_ready = lframe + self.shieldcooldown
|
self.shield_refresh_ready = lframe + self.shieldcooldown
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user