@quenty/overriddenproperty 3.1.3-canary.c50dead.0 → 3.2.1
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 +10 -2
- package/LICENSE.md +1 -1
- package/README.md +5 -13
- package/package.json +5 -5
- package/src/Shared/OverriddenProperty.lua +23 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,20 @@
|
|
|
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
|
-
## [3.1
|
|
6
|
+
## [3.2.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/overriddenproperty@3.2.0...@quenty/overriddenproperty@3.2.1) (2021-12-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/overriddenproperty
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/overriddenproperty@3.1.2...@quenty/overriddenproperty@3.2.0) (2021-11-20)
|
|
7
15
|
|
|
8
16
|
|
|
9
17
|
### Bug Fixes
|
|
10
18
|
|
|
11
|
-
* Support MacOS syncing ([
|
|
19
|
+
* Support MacOS syncing ([#225](https://github.com/Quenty/NevermoreEngine/issues/225)) ([03f9183](https://github.com/Quenty/NevermoreEngine/commit/03f918392c6a5bdd33f8a17c38de371d1e06c67a))
|
|
12
20
|
|
|
13
21
|
|
|
14
22
|
|
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
## OverriddenProperty
|
|
2
2
|
<div align="center">
|
|
3
|
-
<a href="http://quenty.github.io/
|
|
4
|
-
<img src="https://
|
|
3
|
+
<a href="http://quenty.github.io/NevermoreEngine/">
|
|
4
|
+
<img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/docs.yml/badge.svg" alt="Documentation status" />
|
|
5
5
|
</a>
|
|
6
6
|
<a href="https://discord.gg/mhtGUS8">
|
|
7
|
-
<img src="https://img.shields.io/
|
|
7
|
+
<img src="https://img.shields.io/discord/385151591524597761?color=5865F2&label=discord&logo=discord&logoColor=white" alt="Discord" />
|
|
8
8
|
</a>
|
|
9
9
|
<a href="https://github.com/Quenty/NevermoreEngine/actions">
|
|
10
10
|
<img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/build.yml/badge.svg" alt="Build and release status" />
|
|
@@ -13,17 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
Sets properties on the client and then replicates them to the server
|
|
15
15
|
|
|
16
|
+
<div align="center"><a href="https://quenty.github.io/NevermoreEngine/api/OverriddenProperty">View docs →</a></div>
|
|
17
|
+
|
|
16
18
|
## Installation
|
|
17
19
|
```
|
|
18
20
|
npm install @quenty/overriddenproperty --save
|
|
19
21
|
```
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
Usage is designed to be simple.
|
|
23
|
-
|
|
24
|
-
### `OverriddenProperty.new(robloxInstance, propertyName, replicateRate, replicateCallback)`
|
|
25
|
-
|
|
26
|
-
### `OverriddenProperty:Set(value)`
|
|
27
|
-
|
|
28
|
-
### `OverriddenProperty:Get()`
|
|
29
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/overriddenproperty",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Sets properties on the client and then replicates them to the server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/baseobject": "3.1
|
|
29
|
-
"@quenty/loader": "3.1.
|
|
30
|
-
"@quenty/throttle": "3.
|
|
28
|
+
"@quenty/baseobject": "^3.2.1",
|
|
29
|
+
"@quenty/loader": "^3.1.2",
|
|
30
|
+
"@quenty/throttle": "^3.2.1"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "d146c77d0a8e452824de0ab0b4b03ba0370bcc1b"
|
|
36
36
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
--[=[
|
|
2
|
+
Sets properties on the client and then replicates them to the server
|
|
3
|
+
@class OverriddenProperty
|
|
4
|
+
]=]
|
|
3
5
|
|
|
4
6
|
local require = require(script.Parent.loader).load(script)
|
|
5
7
|
|
|
@@ -10,9 +12,15 @@ local OverriddenProperty = setmetatable({}, BaseObject)
|
|
|
10
12
|
OverriddenProperty.ClassName = "OverriddenProperty"
|
|
11
13
|
OverriddenProperty.__index = OverriddenProperty
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
--[=[
|
|
16
|
+
Constructs a new OverriddenProperty.
|
|
17
|
+
|
|
18
|
+
@param robloxInstance Instance
|
|
19
|
+
@param propertyName string
|
|
20
|
+
@param replicateRate number? -- Optional replication rate and callback
|
|
21
|
+
@param replicateCallback (T)?
|
|
22
|
+
@return OverriddenProperty
|
|
23
|
+
]=]
|
|
16
24
|
function OverriddenProperty.new(robloxInstance, propertyName, replicateRate, replicateCallback)
|
|
17
25
|
local self = setmetatable(BaseObject.new(robloxInstance), OverriddenProperty)
|
|
18
26
|
|
|
@@ -36,6 +44,11 @@ function OverriddenProperty.new(robloxInstance, propertyName, replicateRate, rep
|
|
|
36
44
|
return self
|
|
37
45
|
end
|
|
38
46
|
|
|
47
|
+
--[=[
|
|
48
|
+
Sets the property
|
|
49
|
+
|
|
50
|
+
@param value T
|
|
51
|
+
]=]
|
|
39
52
|
function OverriddenProperty:Set(value)
|
|
40
53
|
assert(typeof(value) == typeof(self._value), "Bad value")
|
|
41
54
|
|
|
@@ -43,6 +56,11 @@ function OverriddenProperty:Set(value)
|
|
|
43
56
|
self:_executeSet(true)
|
|
44
57
|
end
|
|
45
58
|
|
|
59
|
+
--[=[
|
|
60
|
+
Gets the property
|
|
61
|
+
|
|
62
|
+
@return T
|
|
63
|
+
]=]
|
|
46
64
|
function OverriddenProperty:Get()
|
|
47
65
|
return self._value
|
|
48
66
|
end
|