Use FoCAPI GameObjectTypeWrapper Get_Display_Name()
This commit is contained in:
@@ -2,6 +2,7 @@ require("PGBase")
|
||||
|
||||
---@class UnitClass
|
||||
---@field Name string Unit name.
|
||||
---@field DisplayName string The localized display name.
|
||||
---@field OwnerId integer Owner Player ID.
|
||||
---@field BuildCost integer Tactical build cost.
|
||||
---@field CombatRating integer AI combat power rating.
|
||||
@@ -15,12 +16,13 @@ UnitClass = {}
|
||||
UnitClass.__index = UnitClass
|
||||
|
||||
---Constructs a new Unit object.
|
||||
---@param objectType table FoC GameObjectTypeWrapper object
|
||||
---@param objectType GameObjectType FoC GameObjectTypeWrapper object
|
||||
---@param playerId integer The Owner Player ID
|
||||
function UnitClass:New(objectType, playerId)
|
||||
local self = setmetatable({}, UnitClass)
|
||||
|
||||
self.Name = objectType.Get_Name()
|
||||
self.DisplayName = objectType.Get_Display_Name()
|
||||
self.OwnerId = playerId
|
||||
self.BuildCost = objectType.Get_Tactical_Build_Cost()
|
||||
self.CombatRating = objectType.Get_Combat_Rating()
|
||||
|
||||
Reference in New Issue
Block a user