You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: common/src/main/kotlin/com/lambda/module/modules/render/ViewModel.kt
+57-48Lines changed: 57 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -26,59 +26,68 @@ object ViewModel : Module(
26
26
) {
27
27
privateval page by setting("Page", Page.General)
28
28
29
-
//ToDo: implement the rest of the settings and maybe add a couple more
30
-
31
29
privateval ignoreHand by setting("Ignore Hand", false, "Prevents adjusting the players hand") { page ==Page.General }
32
30
privateval swingMode by setting("Swing Mode", SwingMode.Standard, "Changes which hands swing") { page ==Page.General }
33
31
val swingDuration by setting("Swing Duration", 6, 0..20, 1, "Adjusts how fast the player swings", "ticks") { page ==Page.General }
34
32
privateval noSwingDelay by setting("No Swing Delay", false, "Removes the delay between swings") { page ==Page.General }
35
33
val mainSwingProgress by setting("Main Swing Progress", 0.0f, 0.0f..1.0f, 0.025f, "Renders as if the players main hand was this progress through the swing animation") { page ==Page.General }
36
34
val offhandSwingProgress by setting("Offhand Swing Progress", 0.0f, 0.0f..1.0f, 0.025f, "Renders as if the players offhand was this progress through the swing animation") { page ==Page.General }
37
35
val oldAnimations by setting("Old Animations", false, "Adjusts the animations to look like they did in 1.8") { page ==Page.General }
38
-
val swapAnimation by setting("Swap Animation", true, "If disabled, it removes the drop down animation when swapping item") { page ==Page.General&& oldAnimations }
39
-
val shadow by setting("Shadows", true, "If disabled, it removes shadows on the model") { page ==Page.General }
40
-
41
-
privateval linkedScale by setting("Linked Scale", true, "Links both hands scale settings") { page ==Page.Scale }
42
-
privateval leftXScale by setting("Left X Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale }.apply { onValueChange { _, to ->if (linkedScale) rightXScale = to } }
43
-
privateval leftYScale by setting("Left Y Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale }.apply { onValueChange { _, to ->if (linkedScale) rightYScale = to } }
44
-
privateval leftZScale by setting("Left Z Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale }.apply { onValueChange { _, to ->if (linkedScale) rightZScale = to } }
45
-
privatevar rightXScale by setting("Right X Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&&!linkedScale }
46
-
privatevar rightYScale by setting("Right Y Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&&!linkedScale }
47
-
privatevar rightZScale by setting("Right Z Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&&!linkedScale }
48
-
49
-
privateval linkedPosition by setting("Linked Position", true, "Links both hands position settings") { page ==Page.Position }
50
-
privateval leftXPosition by setting("Left X Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position }.apply { onValueChange { _, to ->if (linkedPosition) rightXPosition = to } }
51
-
privateval leftYPosition by setting("Left Y Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position }.apply { onValueChange { _, to ->if (linkedPosition) rightYPosition = to } }
52
-
privateval leftZPosition by setting("Left Z Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position }.apply { onValueChange { _, to ->if (linkedPosition) rightZPosition = to } }
53
-
privatevar rightXPosition by setting("Right X Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&&!linkedPosition }
54
-
privatevar rightYPosition by setting("Right Y Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&&!linkedPosition }
55
-
privatevar rightZPosition by setting("Right Z Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&&!linkedPosition }
56
-
57
-
privateval linkedRotation by setting("Linked Rotation", true, "Links both hands rotation settings") { page ==Page.Rotation }
58
-
privateval leftXRotation by setting("Left X Rotation", 0, -180..180, 1) { page ==Page.Rotation }.apply { onValueChange { _, to ->if (linkedRotation) rightXRotation = to } }
59
-
privateval leftYRotation by setting("Left Y Rotation", 0, -180..180, 1) { page ==Page.Rotation }.apply { onValueChange { _, to ->if (linkedRotation) rightYRotation = to } }
60
-
privateval leftZRotation by setting("Left Z Rotation", 0, -180..180, 1) { page ==Page.Rotation }.apply { onValueChange { _, to ->if (linkedRotation) rightZRotation = to } }
61
-
privatevar rightXRotation by setting("Right X Rotation", 0, -180..180, 1) { page ==Page.Rotation&&!linkedRotation }
62
-
privatevar rightYRotation by setting("Right Y Rotation", 0, -180..180, 1) { page ==Page.Rotation&&!linkedRotation }
63
-
privatevar rightZRotation by setting("Right Z Rotation", 0, -180..180, 1) { page ==Page.Rotation&&!linkedRotation }
64
-
65
-
privateval linkedFOV by setting("Linked FOV", true, "Links both hands FOV settings") { page ==Page.FOV }
66
-
privateval leftFOV by setting("Left FOV", 70, 10..180, 1) { page ==Page.FOV }.apply { onValueChange { _, to ->if (linkedFOV) rightFOV = to } }
67
-
privatevar leftFOVAnchorDistance by setting("Left FOV Anchor Distance", 0.5f, 0.0f..1.0f, 0.01f, "The distance to anchor the left hands fov transformation from") { page ==Page.FOV }.apply { onValueChange { _, to ->if (linkedFOV) rightFOVAnchorDistance = to } }
privatevar rightFOVAnchorDistance by setting("Right FOV Anchor Distance", 0.5f, 0.0f..1.0f, 0.01f, "The distance to anchor the right hands fov transformation from") { page ==Page.FOV&&!linkedFOV }
36
+
val swapAnimation by setting("Swap Animation", true, "If disabled, removes the drop down animation when swapping item") { page ==Page.General&& oldAnimations }
37
+
val shadow by setting("Shadows", true, "If disabled, removes shadows on the model") { page ==Page.General }
38
+
39
+
privateval splitScale by setting("Split Scale", false, "Splits left and right hand scale settings") { page ==Page.Scale }
40
+
privateval xScale by setting("X Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&&!splitScale }.apply { onValueChange { _, to -> leftXScale = to; rightXScale = to } }
41
+
privateval yScale by setting("Y Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&&!splitScale }.apply { onValueChange { _, to -> leftYScale = to; rightYScale = to } }
42
+
privateval zScale by setting("Z Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&&!splitScale }.apply { onValueChange { _, to -> leftZScale = to; rightZScale = to } }
43
+
privatevar leftXScale by setting("Left X Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&& splitScale }
44
+
privatevar leftYScale by setting("Left Y Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&& splitScale }
45
+
privatevar leftZScale by setting("Left Z Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&& splitScale }
46
+
privatevar rightXScale by setting("Right X Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&& splitScale }
47
+
privatevar rightYScale by setting("Right Y Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&& splitScale }
48
+
privatevar rightZScale by setting("Right Z Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Scale&& splitScale }
49
+
50
+
privateval splitPosition by setting("Split Position", false, "Splits left and right position settings") { page ==Page.Position }
51
+
privateval xPosition by setting("X Position", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&&!splitPosition }.apply { onValueChange { _, to -> leftXPosition = to; rightXPosition = to } }
52
+
privateval yPosition by setting("Y Position", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&&!splitPosition }.apply { onValueChange { _, to -> leftYPosition = to; rightYPosition = to } }
53
+
privateval zPosition by setting("Z Position", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&&!splitPosition }.apply { onValueChange { _, to -> leftZPosition = to; rightZPosition = to } }
54
+
privatevar leftXPosition by setting("Left X Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&& splitPosition }
55
+
privatevar leftYPosition by setting("Left Y Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&& splitPosition }
56
+
privatevar leftZPosition by setting("Left Z Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&& splitPosition }
57
+
privatevar rightXPosition by setting("Right X Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&& splitPosition }
58
+
privatevar rightYPosition by setting("Right Y Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&& splitPosition }
59
+
privatevar rightZPosition by setting("Right Z Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Position&& splitPosition }
60
+
61
+
privateval splitRotation by setting("Split Rotation", false, "Splits left and right rotation settings") { page ==Page.Rotation }
62
+
privateval xRotation by setting("X Rotation", 0, -180..180, 1) { page ==Page.Rotation&&!splitRotation }.apply { onValueChange { _, to -> leftXRotation = to; rightXRotation = to } }
63
+
privateval yRotation by setting("Y Rotation", 0, -180..180, 1) { page ==Page.Rotation&&!splitRotation }.apply { onValueChange { _, to -> leftYRotation = to; rightYRotation = to } }
64
+
privateval zRotation by setting("Z Rotation", 0, -180..180, 1) { page ==Page.Rotation&&!splitRotation }.apply { onValueChange { _, to -> leftZRotation = to; rightZRotation = to } }
65
+
privatevar leftXRotation by setting("Left X Rotation", 0, -180..180, 1) { page ==Page.Rotation&& splitRotation }
66
+
privatevar leftYRotation by setting("Left Y Rotation", 0, -180..180, 1) { page ==Page.Rotation&& splitRotation }
67
+
privatevar leftZRotation by setting("Left Z Rotation", 0, -180..180, 1) { page ==Page.Rotation&& splitRotation }
68
+
privatevar rightXRotation by setting("Right X Rotation", 0, -180..180, 1) { page ==Page.Rotation&& splitRotation }
69
+
privatevar rightYRotation by setting("Right Y Rotation", 0, -180..180, 1) { page ==Page.Rotation&& splitRotation }
70
+
privatevar rightZRotation by setting("Right Z Rotation", 0, -180..180, 1) { page ==Page.Rotation&& splitRotation }
71
+
72
+
privateval splitFov by setting("Split FOV", false, "Splits left and right Fov settings") { page ==Page.Fov }
73
+
privateval fov by setting("FOV", 70, 10..180, 1) { page ==Page.Fov&&!splitFov }.apply { onValueChange { _, to -> leftFov = to; rightFov = to } }
74
+
privateval fovAnchorDistance by setting("Anchor Distance", 0.5f, 0.0f..1.0f, 0.01f, "The distance to anchor the FOV transformation from") { page ==Page.Fov&&!splitFov }.apply { onValueChange { _, to -> leftFovAnchorDistance = to; rightFovAnchorDistance = to } }
privatevar leftFovAnchorDistance by setting("Left Anchor Distance", 0.5f, 0.0f..1.0f, 0.01f, "The distance to anchor the left FOV transformation from") { page ==Page.Fov&& splitFov }
privatevar rightFovAnchorDistance by setting("Right Anchor Distance", 0.5f, 0.0f..1.0f, 0.01f, "The distance to anchor the right FOV transformation from") { page ==Page.Fov&& splitFov }
70
79
71
80
privateval handXScale by setting("Hand X Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Hand }
72
81
privateval handYScale by setting("Hand Y Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Hand }
73
82
privateval handZScale by setting("Hand Z Scale", 1.0f, -1.0f..1.0f, 0.025f) { page ==Page.Hand }
74
83
privateval handXPosition by setting("Hand X Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Hand }
75
84
privateval handYPosition by setting("Hand Y Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Hand }
76
85
privateval handZPosition by setting("Hand Z Position", 0.0f, -1.0f..1.0f, 0.025f) { page ==Page.Hand }
77
-
privatevar handXRotation by setting("Hand X Rotation", 0, -180..180, 1) { page ==Page.Hand }
78
-
privatevar handYRotation by setting("Hand Y Rotation", 0, -180..180, 1) { page ==Page.Hand }
79
-
privatevar handZRotation by setting("Hand Z Rotation", 0, -180..180, 1) { page ==Page.Hand }
0 commit comments