forked from quisquous/cactbot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoopsy_options.ts
78 lines (67 loc) · 2.54 KB
/
oopsy_options.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import ContentType from '../../resources/content_type';
import UserConfig from '../../resources/user_config';
import ZoneId from '../../resources/zone_id';
import { BaseOptions } from '../../types/data';
import { LooseOopsyTriggerSet } from '../../types/oopsy';
import { PartyMemberParamObjectKeys, PartyTrackerOptions } from '../../types/party';
import { ZoneIdType } from '../../types/trigger';
export type DisabledTriggers = { [triggerId: string]: boolean };
export type TriggerAutoConfig = { enabled: boolean };
export type PerTriggerAutoConfig = { [triggerId: string]: TriggerAutoConfig };
type OopsyNonConfigOptions = {
Triggers: LooseOopsyTriggerSet[];
PlayerNicks: { [gameName: string]: string };
DisabledTriggers: DisabledTriggers;
// TODO: should content_type export what type it is?
IgnoreContentTypes: number[];
IgnoreZoneIds: ZoneIdType[];
PerTriggerAutoConfig: PerTriggerAutoConfig;
};
const defaultOopsyNonConfigOptions: OopsyNonConfigOptions = {
Triggers: [],
PlayerNicks: {},
DisabledTriggers: {},
IgnoreContentTypes: [
ContentType.Pvp,
ContentType.Eureka,
ContentType.SaveTheQueen,
],
IgnoreZoneIds: [
// Bozja zones have an (unnamed) content type of 29 which also applies
// to Delubrum Reginae (which we want oopsy on). So, ignore by zone.
ZoneId.TheBozjanSouthernFront,
ZoneId.Zadnor,
],
PerTriggerAutoConfig: {},
};
// TODO: figure out how to get this type from oopsyraidsy_config??
// These values are overwritten and are just here for typing.
export type DeathReportSide = 'left' | 'right' | 'disabled';
type OopsyConfigOptions = {
DefaultPlayerLabel: PartyMemberParamObjectKeys;
NumLiveListItemsInCombat: number;
MinimumTimeForPullMistake: number;
TimeToShowDeathReportMs: number;
DeathReportSide: DeathReportSide;
MinimumTimeForOverwrittenMit: number;
MinimumTimeForOverwrittenDamage: number;
};
const defaultOopsyConfigOptions: OopsyConfigOptions = {
// TODO: support DefaultPlayerLabel in oopsy and add it to options
DefaultPlayerLabel: 'nick',
NumLiveListItemsInCombat: 5,
MinimumTimeForPullMistake: 0.4,
TimeToShowDeathReportMs: 4000,
DeathReportSide: 'left',
MinimumTimeForOverwrittenMit: 2,
MinimumTimeForOverwrittenDamage: 2,
};
export interface OopsyOptions
extends BaseOptions, OopsyNonConfigOptions, OopsyConfigOptions, PartyTrackerOptions {}
// See user/raidboss-example.js for documentation.
const Options: OopsyOptions = {
...UserConfig.getDefaultBaseOptions(),
...defaultOopsyNonConfigOptions,
...defaultOopsyConfigOptions,
};
export default Options;