-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVariationColorHandler.cs
More file actions
45 lines (43 loc) · 1.88 KB
/
VariationColorHandler.cs
File metadata and controls
45 lines (43 loc) · 1.88 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
using System;
using UnityEngine;
using UMM;
namespace BetterWeaponColourMenu
{
public class VariationColorHandler : MonoBehaviour
{
public int weaponnum;
//public VarColorMain VCM;
public bool alt;
public bool swapColor1;
public bool swapColor2;
public bool swapColor3;
private void Start()
{
/* load which colors should be swapped from persistent data when this component is made to pass into the guncolorsetter
if (!UKMod.PersistentModDataExists("Weapon." + weaponnum + ".Alt." + alt + ".Col1", "Tony.GunColorVariation"))
{
UKMod.SetPersistentModData("Weapon." + weaponnum + ".Alt." + alt + ".Col1", "false", "Tony.GunColorVariation");
}
else
{
test = UKMod.RetrieveStringPersistentModData("Weapon." + weaponnum + ".Alt." + alt + ".Col1", "Tony.GunColorVariation");
}
/* if (!UKMod.PersistentModDataExists("Weapon." + weaponnum + ".Alt." + alt + ".Col2." + swapColor2, "Tony.GunColorVariation"))
{
VCM.SetPersistentModData("Weapon." + weaponnum + ".Alt." + alt + ".Col2." + swapColor2, "Tony.GunColorVariation");
}
else
{
swapColor2 = VCM.RetrieveBooleanPersistentModData("Weapon." + weaponnum + ".Alt." + alt + ".Col1." + swapColor2);
}
if (!UKMod.PersistentModDataExists("Weapon." + weaponnum + ".Alt." + alt + ".Col3." + swapColor3, "Tony.GunColorVariation"))
{
VCM.SetPersistentModData("Weapon." + weaponnum + ".Alt." + alt + ".Col3." + swapColor3, "Tony.GunColorVariation");
}
else
{
swapColor3 = VCM.RetrieveBooleanPersistentModData("Weapon." + weaponnum + ".Alt." + alt + ".Col1." + swapColor3);
}*/
}
}
}