mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
Modification des paramètres en cours de jeu + UI + corrections
This commit is contained in:
@@ -18,7 +18,14 @@ export const PenaltySettings = () => {
|
||||
}, [penaltySettings]);
|
||||
|
||||
function applySettings() {
|
||||
changePenaltySettings({maxPenalties: Number(maxPenalties), allowedTimeOutOfZone: Number(allowedTimeOutOfZone), allowedTimeBetweenPositionUpdate: Number(allowedTimeBetweenUpdates)});
|
||||
const newSettings = {maxPenalties: Number(maxPenalties), allowedTimeOutOfZone: Number(allowedTimeOutOfZone), allowedTimeBetweenPositionUpdate: Number(allowedTimeBetweenUpdates)};
|
||||
const changingSettings = {};
|
||||
for (const key in newSettings) {
|
||||
if (newSettings[key] != penaltySettings[key]) {
|
||||
changingSettings[key] = newSettings[key];
|
||||
}
|
||||
}
|
||||
changePenaltySettings(changingSettings);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user