diff --git a/client/src/lib/Apps/Settings/Settings.svelte b/client/src/lib/Apps/Settings/Settings.svelte
index b50b731..733d52d 100644
--- a/client/src/lib/Apps/Settings/Settings.svelte
+++ b/client/src/lib/Apps/Settings/Settings.svelte
@@ -2,6 +2,7 @@
import { Notifications } from '../../Notifications/notifications'
import { settingsStore } from '../../stores/settingsStore'
import AppContainer from '../AppContainer.svelte'
+ import SettingsInput from './SettingsInput.svelte'
import SettingsToggle from './SettingsToggle.svelte'
settingsStore.subscribe(async value => {
@@ -31,6 +32,13 @@
tooltip="Disables content that could be perceived as offensive for PR and DEI purposes."
>Go Woke
+
+ RNG Weight
+
{
throw new Error('Probability must be between 0 and 1')
}
- return Math.random() < probability
+ return Math.random() < probability * get(settingsStore).randomWeight
}
/**
@@ -94,7 +94,9 @@ const periodicSequence = async () => {
every(15, () => {
if (chance(0.2)) breaching1323Sequence()
else if (chance(0.2)) breaching254Sequence()
- else if (chance(0.05)) bullyingRohanSequence()
+ })
+ every(25, () => {
+ if (chance(0.05)) bullyingRohanSequence()
else if (chance(0.1)) bypassCoprocessorRestrictionsSequence()
})
diff --git a/client/src/lib/stores/settingsStore.ts b/client/src/lib/stores/settingsStore.ts
index 917bcfd..3020681 100644
--- a/client/src/lib/stores/settingsStore.ts
+++ b/client/src/lib/stores/settingsStore.ts
@@ -1,35 +1,38 @@
/* stores global app wide settings */
-import { writable } from "svelte/store";
+import { writable } from 'svelte/store'
export interface SettingsStoreData {
- disableAnnoyances: boolean;
- goWoke: boolean;
- fastStartup: boolean;
+ disableAnnoyances: boolean
+ goWoke: boolean
+ fastStartup: boolean
+ randomWeight: number
}
export const defaults: SettingsStoreData = {
disableAnnoyances: false, // disable non-critical notifications
goWoke: false, // go woke (for showing parents or other officials where DEI has taken over), disables "offensive" sequences
- fastStartup: false, // skip the loading splash screen (for development purposes. Setting this from within the app has no effect.)
-};
+ fastStartup: true, // skip the loading splash screen (for development purposes. Setting this from within the app has no effect.)
+ randomWeight: 1, // the weight of random events (multiplied by the original probability)
+}
const createSequenceStore = () => {
- const { subscribe, set, update } = writable(defaults);
+ const { subscribe, set, update } = writable(defaults)
return {
subscribe,
update: (
data: keyof SettingsStoreData,
newValue: SettingsStoreData[typeof data]
) => {
- update((store) => {
- store[data] = newValue;
- return store;
- });
+ update(store => {
+ // @ts-expect-error
+ store[data] = newValue
+ return store
+ })
},
reset: () => set(defaults),
set: (data: SettingsStoreData) => set(data),
- };
-};
+ }
+}
-export const settingsStore = createSequenceStore();
+export const settingsStore = createSequenceStore()