-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparent_object.lua
74 lines (66 loc) · 3.35 KB
/
parent_object.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---@meta _
--- A `ParentObject` represents a specific group of [GMObjects](https://saturnyoshi.gitlab.io/RoRML-Docs/class/gmObject.html).
---
--- ParentObject inherits all functionality from [GMObjectBase](https://saturnyoshi.gitlab.io/RoRML-Docs/class/gmObjectBase.html).
---
--- Below is a complete list of all `ParentObjects`.
---
--- | Name | Description |
--- |----------------|------------------------------------------------------|
--- | `actors` | All actors, including players, enemies, drones, etc. |
--- | `enemies` | All enemies and bosses. |
--- | `classicEnemies` | All standard physics affected enemies. |
--- | `flyingEnemies` | All flying enemies. |
--- | `bosses` | All bosses. |
--- | `drones` | All drones. |
--- | `mapObjects` | All chests, shrines, etc. |
--- | `droneItems` | All drone map objects. |
--- | `chests` | All chest map objects. |
--- | `items` | All items. |
--- | `artifacts` | All artifact pickups. |
--- | `commandCrates` | All crates from the artifact of command. |
---
---@class ParentObject: GMObjectBase
ParentObject = {}
---@alias ParentObjectName
---| 'actors' All actors, including players, enemies, drones, etc.
---| 'enemies' All enemies and bosses.
---| 'classicEnemies' All standard physics affected enemies.
---| 'flyingEnemies' All flying enemies.
---| 'bosses' All bosses.
---| 'drones' All drones.
---| 'mapObjects' All chests, shrines, etc.
---| 'droneItems' All drone map objects.
---| 'chests' All chest map objects.
---| 'items' All items.
---| 'artifacts' All artifact pickups.
---| 'commandCrates' All crates from the artifact of command.
--[[
---- static functions
--]]
--- Executes a [namespace search](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html) to find an existing Item.
---
--- See the page on [namespace searching](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html#context-find) for more information.
---
---@param name ParentObjectName
---@param namespace? Namespace
---@return ParentObject
function ParentObject.find(name, namespace) end
--- Executes a [namespace search](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html) to find an existing Item.
---
--- See the page on [namespace searching](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html#context-find-all) for more information.
---
---@param namespace? Namespace
---@return ParentObject[]
function ParentObject.findAll(namespace) end
--[[
---- methods
--]]
--- See the page on [namespace searching](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html#context-origin) for more information.
---
---@return Namespace '' The namespace containing the parent object
function ParentObject:getOrigin() end
--- See the page on [namespace searching](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html#context-name) for more information.
---
---@return ParentObjectName '' The name of the parent object
function ParentObject:getName() end