-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.cs
More file actions
153 lines (103 loc) · 3.42 KB
/
Config.cs
File metadata and controls
153 lines (103 loc) · 3.42 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Terraria.ID;
using Terraria.ModLoader.Config;
using HamstarHelpers.Classes.UI.ModConfig;
namespace Psycho {
class MyFloatInputElement : FloatInputElement { }
public class LargeIntSetting {
[Range( 0, 2000)]
public int Value;
}
public class PsychoConfig : ModConfig {
public override ConfigScope Mode => ConfigScope.ServerSide;
////
[DefaultValue(true)]
public bool Enabled = true;
[DefaultValue( false )]
public bool DebugModeInfo = false;
////
[DefaultValue( true )]
public bool AllPsychosAreInvincible = true;
[DefaultValue( true )]
public bool AllPsychosAlwaysInstaKill = true;
[Range( 0, 60 * 60 )]
[DefaultValue( (int)( 60f * 1.5f ) )]
public int PsychoHealRate = (int)( 60f * 1.5f );
[Range( 0, 1000 )]
[DefaultValue( 50 )]
public int PsychoHealAmount = 50;
[Range( 0f, 1f )]
[DefaultValue( 0.022f )]
[CustomModConfigItem( typeof( MyFloatInputElement ) )]
public float PsychoSpawnChance = 0.022f; //0.018f;
[DefaultValue( true )]
public bool PsychoCanDropLoot = true;
[Range( 0f, 1f )]
[DefaultValue( 0.012f )]
[CustomModConfigItem( typeof( MyFloatInputElement ) )]
public float ButcherSpawnChance = 0.012f;
[DefaultValue( true )]
public bool ButcherSpawnBlockedAtTown = true;
[DefaultValue( true )]
public bool ButcherCanDropLoot = true;
[Range( 0f, 1f )]
[DefaultValue( 0.015f )]
[CustomModConfigItem( typeof( MyFloatInputElement ) )]
public float SniperSpawnChance = 0.015f;
[DefaultValue( true )]
public bool SniperJungleOnly = true;
[DefaultValue( false )]
public bool SniperCanDropLoot = false;
[Range( 1, 10000 )]
[DefaultValue( 600 )]
public int SniperHardModeDamage = 600;
[Range( 1, 10000 )]
[DefaultValue( 400 )]
public int SniperPreHardModeDamage = 400;
[Range( 1, 10000 )]
[DefaultValue( 10 )]
public int SniperSpawnHp = 10;
[Range( 1, 10000 )]
[DefaultValue( 300 )]
public int SniperSpawnArmor = 300;
public List<LargeIntSetting> PsychoWardingNeedsBuffTypes = new List<LargeIntSetting>() {
//BuffID.HeartLamp,
//BuffID.Sunflower,
new LargeIntSetting{ Value = BuffID.StarInBottle }
//BuffID.Campfire
};
public List<LargeIntSetting> ButcherWardingNeedsBuffTypes = new List<LargeIntSetting>() {
//BuffID.HeartLamp,
new LargeIntSetting{ Value = BuffID.StarInBottle }
};
public List<LargeIntSetting> SniperWardingNeedsBuffTypes = new List<LargeIntSetting>() {
//BuffID.HeartLamp,
new LargeIntSetting{ Value = BuffID.StarInBottle }
};
[Header( "\n \nOBSOLETE SETTINGS BELOW" )]
public List<int> PsychoWardingNeedsBuffs = new List<int>() {
//BuffID.HeartLamp,
//BuffID.Sunflower,
BuffID.StarInBottle
//BuffID.Campfire
};
public List<int> ButcherWardingNeedsBuffs = new List<int>() {
//BuffID.HeartLamp,
BuffID.StarInBottle
};
public List<int> SniperWardingNeedsBuffs = new List<int>() {
//BuffID.HeartLamp,
BuffID.StarInBottle
};
////////////////
public override ModConfig Clone() {
var clone = (PsychoConfig)base.Clone();
clone.PsychoWardingNeedsBuffTypes = new List<LargeIntSetting>( this.PsychoWardingNeedsBuffTypes );
clone.ButcherWardingNeedsBuffTypes = new List<LargeIntSetting>( this.ButcherWardingNeedsBuffTypes );
clone.SniperWardingNeedsBuffTypes = new List<LargeIntSetting>( this.SniperWardingNeedsBuffTypes );
return clone;
}
}
}