-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
355 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
server/core/src/main/java/dev/slimevr/config/ResetsConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package dev.slimevr.config | ||
|
||
import dev.slimevr.VRServer | ||
|
||
enum class ArmsResetModes(val id: Int) { | ||
// Upper arm going back and forearm going forward | ||
BACK(0), | ||
|
||
// Arms going forward | ||
FORWARD(1), | ||
|
||
// Arms going up to the sides into a tpose | ||
TPOSE_UP(2), | ||
|
||
// Arms going down to the sides from a tpose | ||
TPOSE_DOWN(3), | ||
; | ||
|
||
companion object { | ||
val values = entries.toTypedArray() | ||
|
||
@JvmStatic | ||
fun fromId(id: Int): ArmsResetModes? { | ||
for (filter in values) { | ||
if (filter.id == id) return filter | ||
} | ||
return null | ||
} | ||
} | ||
} | ||
|
||
class ResetsConfig { | ||
|
||
// Enable mounting reset for feet? | ||
var resetMountingFeet = false | ||
|
||
// Reset mode used for the arms | ||
var mode = ArmsResetModes.BACK | ||
|
||
fun updateTrackersResetsSettings() { | ||
for (t in VRServer.instance.allTrackers) { | ||
if (t.needsReset) { | ||
t.resetsHandler.readArmsResetModeConfig(this) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.