Still use max zap setting for some punishments even if step is disabled

This commit is contained in:
RandyTheSilly committed 2026-08-24 00:05:14 -04:00
1 parent 86c250a052
commit 6a6560fff0
2 files changed
+6 -7

No files matched your search

+3 -4
View File
@@ -300,12 +300,11 @@ static void inbox_received_handler(DictionaryIterator *iter, void *context) {
apply_uint8_from_tuple(iter, MESSAGE_KEY_PKJS_PAVLOK_ZAP_MAX, &settings.PavlokMax);
apply_uint8_from_tuple(iter, MESSAGE_KEY_PKJS_AWARENESS_TIME_GAP, &settings.AwarenessTimeGapMinutes);
apply_uint8_from_tuple(iter, MESSAGE_KEY_PKJS_AWARENESS_TIME_LIMIT, &settings.AwarenessTimeLimitSeconds);
if (settings.PavlokStep == 0) {
// match min and max values if disabling step mode, as the max is used for force exit/overwrite punishments
settings.PavlokMax = settings.PavlokMin;
} else if (settings.PavlokMax <= settings.PavlokMin) {
if (settings.PavlokMax <= settings.PavlokMin) {
// disable step mode if max is not higher than min
settings.PavlokStep = 0;
// ensure force quit/overwrite punishments aren't weaker than base
settings.PavlokMax = settings.PavlokMin;
}
persist_write_data(STORAGE_KEY_SETTINGS, &settings, sizeof(settings));
}