mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-14 15:07:59 +00:00
do not allow less than zero on extra counters
This commit is contained in:
@@ -51,6 +51,10 @@ const ExtraCountersBar = ({
|
|||||||
updatedCounterTotal: number,
|
updatedCounterTotal: number,
|
||||||
type: CounterType
|
type: CounterType
|
||||||
) => {
|
) => {
|
||||||
|
if (updatedCounterTotal < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const existingCounter = player.extraCounters.find(
|
const existingCounter = player.extraCounters.find(
|
||||||
(counter) => counter.type === type
|
(counter) => counter.type === type
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user