-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathItemModuleBinoculars.cs
34 lines (29 loc) · 1.17 KB
/
ItemModuleBinoculars.cs
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
using ThunderRoad;
namespace TOR {
public class ItemModuleBinoculars : ItemModule {
// controls
public string leftGripPrimaryAction = "";
public string leftGripSecondaryAction = "cycleScope";
public string rightGripPrimaryAction = "";
public string rightGripSecondaryAction = "cycleScope";
// standard refs
public string leftScopeID = "LeftScope";
public string leftScopeCameraID = "LeftScopeCamera";
public string rightScopeID = "RightScope";
public string rightScopeCameraID = "RightScopeCamera";
public string zoomSoundsID = "ZoomSounds";
// scope
public int scopeDepth = 24;
public int[] scopeResolution;
public float[] scopeZoom = { 10f, 6f, 18f };
public override void OnItemLoaded(Item item) {
base.OnItemLoaded(item);
item.OnSpawnEvent += AddCustomModules;
}
public void AddCustomModules(EventTime eventTime) {
if (eventTime == EventTime.OnStart) return;
Utils.AddModule<ItemBinoculars>(item.gameObject);
item.OnSpawnEvent -= AddCustomModules;
}
}
}