fix overshield

This commit is contained in:
Kistaro Windrider 2024-08-18 01:29:27 -07:00
parent fa0cff1ffc
commit cc3ed20f76
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -568,6 +568,7 @@ function ship_m:refresh_shield()
if (lframe < self.shield_refresh_ready) return
if (self.power < self.shieldcost) return
self.shield += 1
self.shield = min(self.shield, self.maxshield)
self.power -= self.shieldcost
self.shield_refresh_ready = lframe + self.shieldcooldown
end