-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOCS-16: add api reference for features introduced with release 1.3.1
- Loading branch information
1 parent
03a56e9
commit ea749e0
Showing
19 changed files
with
555 additions
and
183 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
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
117 changes: 117 additions & 0 deletions
117
docs/api-reference/noir/built-ins/services/objectservice.md
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,117 @@ | ||
# ObjectService | ||
|
||
**Noir.Services.ObjectService**: `NoirService` | ||
|
||
A service for wrapping SW objects in classes. | ||
|
||
*** | ||
|
||
```lua | ||
Noir.Services.ObjectService:_SaveObjects(objects) | ||
``` | ||
|
||
Overwrite saved objects. | ||
|
||
Used internally. Do not use in your code. | ||
|
||
#### Parameters | ||
|
||
* `objects`: table\<integer, NoirSerializedObject> | ||
|
||
*** | ||
|
||
```lua | ||
Noir.Services.ObjectService:_GetSavedObjects() | ||
``` | ||
|
||
Get saved objects. | ||
|
||
Used internally. Do not use in your code. | ||
|
||
#### Returns | ||
|
||
* `table<integer, NoirSerializedObject>` | ||
|
||
*** | ||
|
||
```lua | ||
Noir.Services.ObjectService:GetObjects() | ||
``` | ||
|
||
Get all objects. | ||
|
||
#### Returns | ||
|
||
* `table<integer, NoirObject>` | ||
|
||
*** | ||
|
||
```lua | ||
Noir.Services.ObjectService:_SaveObjectSavedata(object) | ||
``` | ||
|
||
Save an object to g\_savedata. | ||
|
||
Used internally. Do not use in your code. | ||
|
||
#### Parameters | ||
|
||
* `object`: NoirObject | ||
|
||
*** | ||
|
||
```lua | ||
Noir.Services.ObjectService:_RemoveObjectSavedata(object_id) | ||
``` | ||
|
||
Remove an object from g\_savedata. | ||
|
||
Used internally. Do not use in your code. | ||
|
||
#### Parameters | ||
|
||
* `object_id`: integer | ||
|
||
*** | ||
|
||
```lua | ||
Noir.Services.ObjectService:RegisterObject(object_id) | ||
``` | ||
|
||
Registers an object by ID. | ||
|
||
#### Parameters | ||
|
||
* `object_id`: integer | ||
|
||
#### Returns | ||
|
||
* `NoirObject|nil` | ||
|
||
*** | ||
|
||
```lua | ||
Noir.Services.ObjectService:GetObject(object_id) | ||
``` | ||
|
||
Returns the object with the given ID. | ||
|
||
#### Parameters | ||
|
||
* `object_id`: integer | ||
|
||
#### Returns | ||
|
||
* `NoirObject|nil` | ||
|
||
*** | ||
|
||
```lua | ||
Noir.Services.ObjectService:RemoveObject(object_id) | ||
``` | ||
|
||
Removes the object with the given ID. | ||
|
||
#### Parameters | ||
|
||
* `object_id`: integer |
Oops, something went wrong.