@quenty/rogue-properties 11.28.0 → 11.28.1-canary.97cfa97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/package.json +27 -27
- package/src/Shared/Modifiers/Implementations/RogueAdditive.lua +13 -0
- package/src/Shared/Modifiers/Implementations/RogueMultiplier.lua +13 -0
- package/src/Shared/Modifiers/Implementations/RogueSetter.lua +23 -5
- package/src/Shared/Modifiers/RoguePropertyModifierData.lua +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [11.28.1-canary.97cfa97.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/rogue-properties@11.28.0...@quenty/rogue-properties@11.28.1-canary.97cfa97.0) (2025-10-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Fix formatting ([97cfa97](https://github.com/Quenty/NevermoreEngine/commit/97cfa9787cc2d93e90e6d9a9f1a3c3c57b87a8a5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Can disable rogue modifier ([0570ee2](https://github.com/Quenty/NevermoreEngine/commit/0570ee24eda1bacfe8489165400007f4ffef1374))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [11.28.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/rogue-properties@11.27.0...@quenty/rogue-properties@11.28.0) (2025-10-03)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @quenty/rogue-properties
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/rogue-properties",
|
|
3
|
-
"version": "11.28.0",
|
|
3
|
+
"version": "11.28.1-canary.97cfa97.0",
|
|
4
4
|
"description": "Roguelike properties which can be modified by external provides",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -24,35 +24,35 @@
|
|
|
24
24
|
"Quenty"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@quenty/adorneedata": "
|
|
28
|
-
"@quenty/attributeutils": "
|
|
29
|
-
"@quenty/baseobject": "
|
|
30
|
-
"@quenty/binder": "
|
|
31
|
-
"@quenty/brio": "
|
|
32
|
-
"@quenty/defaultvalueutils": "
|
|
33
|
-
"@quenty/ducktype": "
|
|
34
|
-
"@quenty/instanceutils": "
|
|
35
|
-
"@quenty/jsonutils": "
|
|
36
|
-
"@quenty/linkutils": "
|
|
37
|
-
"@quenty/loader": "
|
|
38
|
-
"@quenty/maid": "
|
|
39
|
-
"@quenty/observablecollection": "
|
|
40
|
-
"@quenty/remoting": "
|
|
41
|
-
"@quenty/rx": "
|
|
42
|
-
"@quenty/rxbinderutils": "
|
|
43
|
-
"@quenty/rxsignal": "
|
|
44
|
-
"@quenty/servicebag": "
|
|
45
|
-
"@quenty/signal": "
|
|
46
|
-
"@quenty/spring": "
|
|
47
|
-
"@quenty/string": "
|
|
48
|
-
"@quenty/table": "
|
|
49
|
-
"@quenty/tie": "
|
|
50
|
-
"@quenty/valuebaseutils": "
|
|
51
|
-
"@quenty/valueobject": "
|
|
27
|
+
"@quenty/adorneedata": "7.21.1-canary.97cfa97.0",
|
|
28
|
+
"@quenty/attributeutils": "14.20.0",
|
|
29
|
+
"@quenty/baseobject": "10.9.0",
|
|
30
|
+
"@quenty/binder": "14.24.1-canary.97cfa97.0",
|
|
31
|
+
"@quenty/brio": "14.20.0",
|
|
32
|
+
"@quenty/defaultvalueutils": "1.2.2",
|
|
33
|
+
"@quenty/ducktype": "5.9.0",
|
|
34
|
+
"@quenty/instanceutils": "13.20.0",
|
|
35
|
+
"@quenty/jsonutils": "10.12.0",
|
|
36
|
+
"@quenty/linkutils": "13.20.0",
|
|
37
|
+
"@quenty/loader": "10.9.0",
|
|
38
|
+
"@quenty/maid": "3.5.0",
|
|
39
|
+
"@quenty/observablecollection": "12.23.1-canary.97cfa97.0",
|
|
40
|
+
"@quenty/remoting": "12.21.0",
|
|
41
|
+
"@quenty/rx": "13.20.0",
|
|
42
|
+
"@quenty/rxbinderutils": "14.24.1-canary.97cfa97.0",
|
|
43
|
+
"@quenty/rxsignal": "7.20.0",
|
|
44
|
+
"@quenty/servicebag": "11.13.1",
|
|
45
|
+
"@quenty/signal": "7.11.1",
|
|
46
|
+
"@quenty/spring": "10.9.0",
|
|
47
|
+
"@quenty/string": "3.3.3",
|
|
48
|
+
"@quenty/table": "3.8.0",
|
|
49
|
+
"@quenty/tie": "10.24.1-canary.97cfa97.0",
|
|
50
|
+
"@quenty/valuebaseutils": "13.20.0",
|
|
51
|
+
"@quenty/valueobject": "13.20.1-canary.97cfa97.0",
|
|
52
52
|
"@quentystudios/t": "^3.0.0"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "97cfa9787cc2d93e90e6d9a9f1a3c3c57b87a8a5"
|
|
58
58
|
}
|
|
@@ -24,6 +24,10 @@ function RogueAdditive.new(valueObject, serviceBag)
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
function RogueAdditive:GetModifiedVersion(value)
|
|
27
|
+
if not self._data.Enabled.Value then
|
|
28
|
+
return value
|
|
29
|
+
end
|
|
30
|
+
|
|
27
31
|
local input = LinearValue.toLinearIfNeeded(value)
|
|
28
32
|
local additive = LinearValue.toLinearIfNeeded(self._obj.Value)
|
|
29
33
|
|
|
@@ -31,6 +35,10 @@ function RogueAdditive:GetModifiedVersion(value)
|
|
|
31
35
|
end
|
|
32
36
|
|
|
33
37
|
function RogueAdditive:GetInvertedVersion(value)
|
|
38
|
+
if not self._data.Enabled.Value then
|
|
39
|
+
return value
|
|
40
|
+
end
|
|
41
|
+
|
|
34
42
|
local input = LinearValue.toLinearIfNeeded(value)
|
|
35
43
|
local additive = LinearValue.toLinearIfNeeded(self._obj.Value)
|
|
36
44
|
|
|
@@ -40,9 +48,14 @@ end
|
|
|
40
48
|
function RogueAdditive:ObserveModifiedVersion(inputValue)
|
|
41
49
|
return Rx.combineLatest({
|
|
42
50
|
inputValue = inputValue,
|
|
51
|
+
enabled = self._data.Enabled:Observe(),
|
|
43
52
|
additive = RxInstanceUtils.observeProperty(self._obj, "Value"),
|
|
44
53
|
}):Pipe({
|
|
45
54
|
Rx.map(function(state)
|
|
55
|
+
if not state.enabled then
|
|
56
|
+
return state.inputValue
|
|
57
|
+
end
|
|
58
|
+
|
|
46
59
|
if state.inputValue and type(state.inputValue) == type(state.additive) then
|
|
47
60
|
local input = LinearValue.toLinearIfNeeded(state.inputValue)
|
|
48
61
|
local additive = LinearValue.toLinearIfNeeded(state.additive)
|
|
@@ -24,6 +24,10 @@ function RogueMultiplier.new(valueObject, serviceBag)
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
function RogueMultiplier:GetModifiedVersion(value)
|
|
27
|
+
if not self._data.Enabled.Value then
|
|
28
|
+
return value
|
|
29
|
+
end
|
|
30
|
+
|
|
27
31
|
local input = LinearValue.toLinearIfNeeded(value)
|
|
28
32
|
local multiplier = LinearValue.toLinearIfNeeded(self._obj.Value)
|
|
29
33
|
|
|
@@ -31,6 +35,10 @@ function RogueMultiplier:GetModifiedVersion(value)
|
|
|
31
35
|
end
|
|
32
36
|
|
|
33
37
|
function RogueMultiplier:GetInvertedVersion(value)
|
|
38
|
+
if not self._data.Enabled.Value then
|
|
39
|
+
return value
|
|
40
|
+
end
|
|
41
|
+
|
|
34
42
|
local input = LinearValue.toLinearIfNeeded(value)
|
|
35
43
|
local multiplier = LinearValue.toLinearIfNeeded(self._obj.Value)
|
|
36
44
|
|
|
@@ -40,9 +48,14 @@ end
|
|
|
40
48
|
function RogueMultiplier:ObserveModifiedVersion(inputValue)
|
|
41
49
|
return Rx.combineLatest({
|
|
42
50
|
inputValue = inputValue,
|
|
51
|
+
enabled = self._data.Enabled:Observe(),
|
|
43
52
|
multiplier = RxInstanceUtils.observeProperty(self._obj, "Value"),
|
|
44
53
|
}):Pipe({
|
|
45
54
|
Rx.map(function(state)
|
|
55
|
+
if not state.enabled then
|
|
56
|
+
return state.inputValue
|
|
57
|
+
end
|
|
58
|
+
|
|
46
59
|
if state.inputValue and type(state.inputValue) == type(state.multiplier) then
|
|
47
60
|
local input = LinearValue.toLinearIfNeeded(state.inputValue)
|
|
48
61
|
local multiplier = LinearValue.toLinearIfNeeded(state.multiplier)
|
|
@@ -7,6 +7,7 @@ local require = require(script.Parent.loader).load(script)
|
|
|
7
7
|
local Binder = require("Binder")
|
|
8
8
|
local RogueModifierBase = require("RogueModifierBase")
|
|
9
9
|
local RogueModifierInterface = require("RogueModifierInterface")
|
|
10
|
+
local Rx = require("Rx")
|
|
10
11
|
local RxValueBaseUtils = require("RxValueBaseUtils")
|
|
11
12
|
|
|
12
13
|
local RogueSetter = setmetatable({}, RogueModifierBase)
|
|
@@ -21,15 +22,32 @@ function RogueSetter.new(valueObject, serviceBag)
|
|
|
21
22
|
return self
|
|
22
23
|
end
|
|
23
24
|
|
|
24
|
-
function RogueSetter:GetModifiedVersion()
|
|
25
|
-
|
|
25
|
+
function RogueSetter:GetModifiedVersion(value)
|
|
26
|
+
if self._data.Enabled.Value then
|
|
27
|
+
return self._obj.Value
|
|
28
|
+
else
|
|
29
|
+
return value
|
|
30
|
+
end
|
|
26
31
|
end
|
|
27
32
|
|
|
28
|
-
function RogueSetter:ObserveModifiedVersion()
|
|
29
|
-
return
|
|
33
|
+
function RogueSetter:ObserveModifiedVersion(inputValue)
|
|
34
|
+
return self._data.Enabled:Observe():Pipe({
|
|
35
|
+
Rx.switchMap(function(enabled)
|
|
36
|
+
if enabled then
|
|
37
|
+
return RxValueBaseUtils.observeValue(self._obj)
|
|
38
|
+
else
|
|
39
|
+
return inputValue
|
|
40
|
+
end
|
|
41
|
+
end),
|
|
42
|
+
Rx.distinct(),
|
|
43
|
+
})
|
|
30
44
|
end
|
|
31
45
|
|
|
32
|
-
function RogueSetter:GetInvertedVersion(
|
|
46
|
+
function RogueSetter:GetInvertedVersion(value, initialValue)
|
|
47
|
+
if not self._data.Enabled.Value then
|
|
48
|
+
return value
|
|
49
|
+
end
|
|
50
|
+
|
|
33
51
|
return initialValue
|
|
34
52
|
end
|
|
35
53
|
|
|
@@ -10,6 +10,7 @@ local ValueBaseValue = require("ValueBaseValue")
|
|
|
10
10
|
local t = require("t")
|
|
11
11
|
|
|
12
12
|
return AdorneeData.new({
|
|
13
|
+
Enabled = true,
|
|
13
14
|
Order = 0,
|
|
14
15
|
RoguePropertySourceLink = AdorneeDataEntry.new(t.optional(t.Instance), function(adornee)
|
|
15
16
|
return ValueBaseValue.new(adornee, "ObjectValue", "RoguePropertySourceLink", nil)
|