Skip to content

Commit

Permalink
Minor changes and cleanups (#24)
Browse files Browse the repository at this point in the history
* Inherit spawn

* Minor fixes and code syntax changes

* Group member fixes

* Minor cleanup

* Alias cleanup

* Some fixes to TLO datatype fetching

* Fix TLO functions

* Fix to reagent func

* Fix math calc

* Some fixes to character data type

* Fix to fellowship

* Fix missing alias

* Fix doortarget type

* Fix spelling

* Update typedef

* Updates to ground
Some layout changes

* Fixes to typedefs

* Add missing plugin field
  • Loading branch information
projecteon committed Oct 5, 2022
1 parent d92f19f commit cf29546
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 51 deletions.
2 changes: 2 additions & 0 deletions alias.lua
Expand Up @@ -12,7 +12,9 @@
---@alias MQCachedBuff cachedbuff | fun(): string|nil
---@alias MQCharacter character | fun(): string|nil
---@alias MQFellowship fellowship | fun(): "TRUE" | "FASLE"
---@alias MQGround ground | fun(): string|nil
---@alias MQGroupMember groupmember | fun(): string|nil
---@alias MQHeading heading | fun(): string|nil
---@alias MQInvSlot invslot | fun(): string|nil
---@alias MQItem item | fun(): string|nil
---@alias MQMerchant merchant | fun(): string|nil
Expand Down
14 changes: 7 additions & 7 deletions datatype/_character.lua
Expand Up @@ -205,11 +205,11 @@ function character.Ability(index) end

---@diagnostic disable: duplicate-set-field
---@param index integer # Ability button number
---@return boolean
---@return MQBoolean
function character.AbilityReady(index) end

---@param name string
---@return boolean
---@return MQBoolean
function character.AbilityReady(name) end
---@diagnostic enable: duplicate-set-field

Expand All @@ -225,11 +225,11 @@ function character.AltAbility(name) end

---@diagnostic disable: duplicate-set-field
---@param index integer # Alt ability #
---@return boolean
---@return MQBoolean
function character.AltAbilityReady(index) end

---@param name string
---@return boolean
---@return MQBoolean
function character.AltAbilityReady(name) end
---@diagnostic enable: duplicate-set-field

Expand Down Expand Up @@ -362,7 +362,7 @@ function character.Inventory(slotNumber) end
---@diagnostic enable: duplicate-set-field

---@param name string
---@return boolean # True/False on if the item is ready to cast.
---@return MQBoolean # True/False on if the item is ready to cast.
function character.ItemReady(name) end

---@diagnostic disable: duplicate-set-field
Expand Down Expand Up @@ -433,12 +433,12 @@ function character.Song(slotNumber) end
---@diagnostic disable: duplicate-set-field
---Gem with this spell name ready to cast?
---@param name string
---@return boolean
---@return MQBoolean
function character.SpellReady(name) end

---Gem in this gem # ready to cast?
---@param slotNumber integer
---@return boolean
---@return MQBoolean
function character.SpellReady(slotNumber) end
---@diagnostic enable: duplicate-set-field

Expand Down
49 changes: 24 additions & 25 deletions datatype/_ground.lua
@@ -1,27 +1,26 @@
---@meta
---@class ground
---@field public ID number Ground item ID (not the same as item ID, this is like spawn ID)
---@field public Distance number Distance from player to ground item
---@field public X MQFloat X coordinate
---@field public Y MQFloat Y coordinate
---@field public Z MQFloat Z coordinate
---@field public Heading heading Ground item is facing this heading
---@field public Name string Name
---@field public HeadingTo heading Direction player must move to meet this ground item
---@field public LineOfSight boolean Returns TRUE if ground spawn is in line of sight
---@field public Address number ???
---@field public DisplayName MQFloat Displays name of the grounspawn
---@field public Distance3D number Distance from player to ground item
---@field public SubID number ???
---@field public ZoneID number ???
---@field public First MQSpawn
---@field public Last MQSpawn
---@field public Next MQSpawn
---@field public Prev MQSpawn
---@field public DoFace fun() Will cause the toon to face the called for spawn if it exists
---@field public DoTarget fun() Will cause the toon to target the called for spawn if it exists
---@field public Grab fun() Picks up the ground spawn
---@field public W MQFloat X coordinate (Westward-positive)
---@field public N MQFloat Y coordinate (Northward-positive)
---@field public U MQFloat Z coordinate (Upward-positive)
---@field public ToString string Same as ID
---@field public ID MQInt # Ground item ID (not the same as item ID, this is like spawn ID)
---@field public Distance MQFloat # Distance from player to ground item
---@field public X MQFloat # X coordinate
---@field public Y MQFloat # Y coordinate
---@field public Z MQFloat # Z coordinate
---@field public Heading MQHeading # Ground item is facing this heading
---@field public Name MQString # Name
---@field public HeadingTo MQHeading # Direction player must move to meet this ground item
---@field public LineOfSight MQBoolean # Returns TRUE if ground spawn is in line of sight
---@field public DisplayName MQFloat # Displays name of the grounspawn
---@field public Distance3D MQFloat # Distance from player to ground item
---@field public SubID MQInt # ???
---@field public ZoneID MQInt # ID of the zone
---@field public First MQGround
---@field public Last MQGround
---@field public Next MQGround
---@field public Prev MQGround
---@field public DoFace fun() # Will cause the toon to face the called for spawn if it exists
---@field public DoTarget fun() # Will cause the toon to target the called for spawn if it exists
---@field public Grab fun() # Picks up the ground spawn
---@field public W MQFloat # X coordinate (Westward-positive)
---@field public N MQFloat # Y coordinate (Northward-positive)
---@field public U MQFloat # Z coordinate (Upward-positive)
---@field public ToString MQString # Same as ID
7 changes: 4 additions & 3 deletions datatype/_plugin.lua
@@ -1,4 +1,5 @@
--- @class plugin
--- @field public Name MQString #Name of the plugin
--- @field public Version MQFloat Version number of the plugin
--- @field public ToString MQString #Same as Name
--- @field public Name MQString # Name of the plugin
--- @field public Version MQFloat # Version number of the plugin
--- @field public IsLoaded MQBoolean # Is the plugin loaded?
--- @field public ToString MQString # Same as Name
15 changes: 3 additions & 12 deletions mq.lua
Expand Up @@ -3,6 +3,9 @@
---@class Mq
---@field public TLO TLO # Top Level Object (TLO) Binding
---@field public imgui IMGUI # sol2 ImGui Binding
---@field public configDir string # Path to config directory
---@field public luaDir string # Path to lua directory
---@field public moduleDir string # Path to module directory
mq = {}

---Performs an ingame slash action provided as a string. Any arguments passed to it are stringified (in lua), concatenated (with a space delimiter), and sent as part of the command.
Expand Down Expand Up @@ -68,18 +71,6 @@ function mq.getAllSpawns() end
---@return spawn[] # The spawns
function mq.getFilteredSpawns(predicate) end

---Returns path to config directory
---@return string # Path to config directory
function mq.configDir() end

---Returns path to lua directory
---@return string # Path to lua directory
function mq.luaDir() end

---Returns path to module directory
---@return string # Path to module directory
function mq.moduleDir() end

---@param type any # The variable we want to check type of
---@return mqtype
function mq.gettype(type) end
Expand Down
6 changes: 3 additions & 3 deletions tlo/_AdvLoot.lua
@@ -1,9 +1,9 @@
---@class AdvLoot
---@field public Filter fun(itemId:integer): itemfilterdata Inspect the loot filter for a given ItemID
---@field public Filter fun(itemId: integer): itemfilterdata Inspect the loot filter for a given ItemID
---@field public LootInProgress fun(): boolean True/False if looting from AdvLoot is in progress
---@field public PCount MQInt Item count from the Personal list
---@field public PList fun(index:integer): advlootitem Inspect the item at the specified index in the personal loot list
---@field public PList fun(index: integer): advlootitem Inspect the item at the specified index in the personal loot list
---@field public PWantCount MQInt Want cound from the personal list (AN + AG + ND + GD)
---@field public SCount MQInt Item count from the Shared list
---@field public SList fun(index:integer): advlootitem Inspect the item at the specified index in the shared loot list
---@field public SList fun(index: integer): advlootitem Inspect the item at the specified index in the shared loot list
---@field public SWantCount MQInt Want count from the Shared list (AN + AG + ND + GD)
2 changes: 1 addition & 1 deletion tlo/_Ground.lua
Expand Up @@ -2,4 +2,4 @@

---Ground TLO
---@class Ground
---@field public Search fun(filter:string):ground
---@field public Search fun(filter: string): MQGround

0 comments on commit cf29546

Please sign in to comment.