67 lines
2.0 KiB
C#
67 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using RecNet;
|
|
|
|
namespace RecRoom.Challenges
|
|
{
|
|
// Token: 0x02000B20 RID: 2848
|
|
public abstract class VarEqualsChallenge<T, SerializedT> : RequiredObjectChallenge<T, SerializedT> where T : struct
|
|
{
|
|
// Token: 0x06015B4B RID: 88907 RVA: 0x00606B3C File Offset: 0x00604D3C
|
|
public VarEqualsChallenge()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06015B4C RID: 88908 RVA: 0x00606B44 File Offset: 0x00604D44
|
|
public VarEqualsChallenge(string varKey)
|
|
{
|
|
this.VarKey = varKey;
|
|
}
|
|
|
|
// Token: 0x06015B4D RID: 88909 RVA: 0x00606B54 File Offset: 0x00604D54
|
|
public VarEqualsChallenge(string varKey, T[] requiredValues)
|
|
: this(varKey, true, requiredValues)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06015B4E RID: 88910 RVA: 0x00606B60 File Offset: 0x00604D60
|
|
public VarEqualsChallenge(string varKey, T requiredValue, params T[] requiredValues)
|
|
: this(varKey, true, requiredValue, requiredValues)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06015B4F RID: 88911 RVA: 0x00606B6C File Offset: 0x00604D6C
|
|
public VarEqualsChallenge(string varKey, bool inclusive, T requiredValue, params T[] requiredValues)
|
|
: this(varKey, inclusive, requiredValues.Union(new T[] { requiredValue }).ToArray<T>())
|
|
{
|
|
}
|
|
|
|
// Token: 0x06015B50 RID: 88912 RVA: 0x00606B90 File Offset: 0x00604D90
|
|
public VarEqualsChallenge(string varKey, bool inclusive, T[] requiredValues)
|
|
: base(inclusive, requiredValues)
|
|
{
|
|
this.VarKey = varKey;
|
|
}
|
|
|
|
// Token: 0x06015B51 RID: 88913 RVA: 0x00606BA4 File Offset: 0x00604DA4
|
|
public override Dictionary<string, object> Serialize()
|
|
{
|
|
Dictionary<string, object> dictionary = base.Serialize();
|
|
dictionary["v"] = this.VarKey;
|
|
return dictionary;
|
|
}
|
|
|
|
// Token: 0x06015B52 RID: 88914 RVA: 0x00606BCC File Offset: 0x00604DCC
|
|
protected override void DeserializeInternal(Dictionary<string, object> jsonDict)
|
|
{
|
|
base.DeserializeInternal(jsonDict);
|
|
this.VarKey = OFPFHHLNHIC.KOFIKGFMMKD<string>("v", jsonDict);
|
|
}
|
|
|
|
// Token: 0x04003CA9 RID: 15529
|
|
[DBGMDIHCPIN]
|
|
public string VarKey;
|
|
}
|
|
}
|