Still use max zap setting for some punishments even if step is disabled
This commit is contained in:
+3
-4
@@ -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_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_GAP, &settings.AwarenessTimeGapMinutes);
|
||||||
apply_uint8_from_tuple(iter, MESSAGE_KEY_PKJS_AWARENESS_TIME_LIMIT, &settings.AwarenessTimeLimitSeconds);
|
apply_uint8_from_tuple(iter, MESSAGE_KEY_PKJS_AWARENESS_TIME_LIMIT, &settings.AwarenessTimeLimitSeconds);
|
||||||
if (settings.PavlokStep == 0) {
|
if (settings.PavlokMax <= settings.PavlokMin) {
|
||||||
// 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) {
|
|
||||||
// disable step mode if max is not higher than min
|
// disable step mode if max is not higher than min
|
||||||
settings.PavlokStep = 0;
|
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));
|
persist_write_data(STORAGE_KEY_SETTINGS, &settings, sizeof(settings));
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -40,7 +40,7 @@ module.exports = [
|
|||||||
"max": 100,
|
"max": 100,
|
||||||
"step": 5,
|
"step": 5,
|
||||||
"label": "Zap Intensity (Base)",
|
"label": "Zap Intensity (Base)",
|
||||||
"description": "% intensity of base zap."
|
"description": "% intensity of base zap. Used for awareness alarm zaps."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "pavlok_zap_step",
|
"id": "pavlok_zap_step",
|
||||||
@@ -51,7 +51,7 @@ module.exports = [
|
|||||||
"max": 100,
|
"max": 100,
|
||||||
"step": 5,
|
"step": 5,
|
||||||
"label": "Zap Step",
|
"label": "Zap Step",
|
||||||
"description": "% to increase base zap intensity by after each failed awareness alarm; set to 0 to disable."
|
"description": "% to increment base zap intensity after each failed awareness alarm; set to 0 to disable."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "pavlok_zap_max",
|
"id": "pavlok_zap_max",
|
||||||
@@ -62,7 +62,7 @@ module.exports = [
|
|||||||
"max": 100,
|
"max": 100,
|
||||||
"step": 5,
|
"step": 5,
|
||||||
"label": "Zap Intensity (Max)",
|
"label": "Zap Intensity (Max)",
|
||||||
"description": "% intensity of maximum zap; only takes effect if greater than base and step is enabled. Also used for force exit/alarm overwrite penalties."
|
"description": "% intensity of max zap; only takes effect if greater than base. Used for force exit/alarm overwrite penalties, as well as max value to step to in awareness alarms if zap step is enabled."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "pavlok_zap_interval",
|
"id": "pavlok_zap_interval",
|
||||||
|
|||||||
Reference in New Issue
Block a user