| | 1 | | using System; |
| | 2 | |
|
| | 3 | | namespace KernelConfigurationTypes |
| | 4 | | { |
| | 5 | | [Serializable] |
| | 6 | | public class Features |
| | 7 | | { |
| | 8 | | public bool enableBuilderInWorld = false; |
| | 9 | | public bool enableTutorial = true; |
| | 10 | | public bool enablePeopleCounter = false; |
| | 11 | | public bool enableExploreV2 = false; |
| | 12 | |
|
| | 13 | | public override bool Equals(object obj) { return obj is Features other && Equals(other); } |
| | 14 | | protected bool Equals(Features other) |
| | 15 | | { |
| | 16 | | return enableBuilderInWorld == other.enableBuilderInWorld |
| | 17 | | && enableTutorial == other.enableTutorial |
| | 18 | | && enablePeopleCounter == other.enablePeopleCounter |
| | 19 | | && enableExploreV2 == other.enableExploreV2; |
| | 20 | | } |
| | 21 | | public Features Clone() |
| | 22 | | { |
| | 23 | | Features clone = (Features)this.MemberwiseClone(); |
| | 24 | | return clone; |
| | 25 | | } |
| | 26 | | } |
| | 27 | |
|
| | 28 | | [Serializable] |
| | 29 | | public class Comms |
| | 30 | | { |
| | 31 | | public float commRadius = 4; |
| | 32 | | public bool voiceChatEnabled = false; |
| | 33 | |
|
| | 34 | | public bool Equals(Comms other) |
| | 35 | | { |
| | 36 | | return commRadius == other?.commRadius && |
| | 37 | | voiceChatEnabled == other?.voiceChatEnabled; |
| | 38 | | } |
| | 39 | |
|
| | 40 | | public Comms Clone() |
| | 41 | | { |
| | 42 | | Comms clone = (Comms)this.MemberwiseClone(); |
| | 43 | | return clone; |
| | 44 | | } |
| | 45 | | } |
| | 46 | |
|
| | 47 | | [Serializable] |
| | 48 | | public class Profiles |
| | 49 | | { |
| | 50 | | public string nameValidCharacterRegex = ""; |
| | 51 | | public string nameValidRegex = ""; |
| | 52 | |
|
| | 53 | | public bool Equals(Profiles other) |
| | 54 | | { |
| | 55 | | return nameValidCharacterRegex == other?.nameValidCharacterRegex && |
| | 56 | | nameValidRegex == other?.nameValidRegex; |
| | 57 | | } |
| | 58 | |
|
| | 59 | | public Profiles Clone() |
| | 60 | | { |
| | 61 | | Profiles clone = (Profiles)this.MemberwiseClone(); |
| | 62 | | return clone; |
| | 63 | | } |
| | 64 | | } |
| | 65 | |
|
| | 66 | | [Serializable] |
| | 67 | | public class WorldRange |
| | 68 | | { |
| | 69 | | public int xMin = 0; |
| | 70 | | public int xMax = 0; |
| | 71 | | public int yMin = 0; |
| | 72 | | public int yMax = 0; |
| | 73 | |
|
| | 74 | | public bool Equals(WorldRange other) |
| | 75 | | { |
| | 76 | | return xMin == other?.xMin && |
| | 77 | | xMax == other?.xMax && |
| | 78 | | yMin == other?.yMin && |
| | 79 | | yMax == other?.yMax; |
| | 80 | | } |
| | 81 | |
|
| | 82 | | public WorldRange Clone() |
| | 83 | | { |
| | 84 | | WorldRange clone = (WorldRange)this.MemberwiseClone(); |
| | 85 | | return clone; |
| | 86 | | } |
| | 87 | | public WorldRange(int xMin, int yMin, int xMax, int yMax) |
| | 88 | | { |
| | 89 | | this.xMin = xMin; |
| | 90 | | this.yMin = yMin; |
| | 91 | | this.xMax = xMax; |
| | 92 | | this.yMax = yMax; |
| | 93 | | } |
| | 94 | |
|
| | 95 | | public bool Contains(int x, int y) |
| | 96 | | { |
| | 97 | | return x >= xMin && x <= xMax && |
| | 98 | | y >= yMin && y <= yMax; |
| | 99 | | } |
| | 100 | | } |
| | 101 | |
|
| | 102 | | [Serializable] |
| | 103 | | public class Debugging |
| | 104 | | { |
| | 105 | | public bool sceneDebugPanelEnabled = false; |
| | 106 | | public string sceneDebugPanelTargetSceneId = string.Empty; |
| | 107 | | public string sceneLimitsWarningSceneId = string.Empty; |
| | 108 | |
|
| | 109 | | public bool Equals(Debugging other) |
| | 110 | | { |
| | 111 | | return sceneDebugPanelEnabled == other?.sceneDebugPanelEnabled && |
| | 112 | | sceneDebugPanelTargetSceneId == other?.sceneDebugPanelTargetSceneId && |
| | 113 | | sceneLimitsWarningSceneId == other?.sceneLimitsWarningSceneId; |
| | 114 | | } |
| | 115 | |
|
| | 116 | | public Debugging Clone() |
| | 117 | | { |
| | 118 | | Debugging clone = (Debugging)this.MemberwiseClone(); |
| | 119 | | return clone; |
| | 120 | | } |
| | 121 | | } |
| | 122 | |
|
| | 123 | | [Serializable] |
| | 124 | | public class ProceduralSkybox |
| | 125 | | { |
| 9 | 126 | | public string configToLoad = "Generic_Skybox"; |
| 9 | 127 | | public float lifecycleDuration = 120; |
| 9 | 128 | | public float fixedTime = -1; |
| | 129 | | public bool disableReflection = false; |
| 9 | 130 | | public float updateReflectionTime = -1; // in mins |
| | 131 | |
|
| | 132 | | public bool Equals(ProceduralSkybox other) |
| | 133 | | { |
| 2 | 134 | | return configToLoad == other?.configToLoad && |
| | 135 | | lifecycleDuration == other?.lifecycleDuration && |
| | 136 | | fixedTime == other?.fixedTime; |
| | 137 | | } |
| | 138 | |
|
| | 139 | | public ProceduralSkybox Clone() |
| | 140 | | { |
| 2 | 141 | | ProceduralSkybox clone = (ProceduralSkybox)this.MemberwiseClone(); |
| 2 | 142 | | return clone; |
| | 143 | | } |
| | 144 | | } |
| | 145 | | } |