Skip to content

Commit

Permalink
Added building:IsUnderConstruction() call
Browse files Browse the repository at this point in the history
  • Loading branch information
MNoya committed May 21, 2016
1 parent 05bb423 commit 4d1214a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/vscripts/libraries/buildinghelper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,7 @@ function BuildingHelper:StartBuilding(builder)
building.construction_size = construction_size
building.buildingTable = buildingTable
building.state = "building"
function building:IsUnderConstruction() return true end

-- Adjust the Model Orientation
local yaw = buildingTable:GetVal("ModelRotation", "float")
Expand Down Expand Up @@ -2016,6 +2017,7 @@ function BuildingHelper:AddBuildingToPlayerTable(playerID, building)
local buildingName = building:GetUnitName()
table.insert(BuildingHelper:GetBuildings(playerID), building)
BuildingHelper:SetBuildingCount(playerID, buildingName, BuildingHelper:GetBuildingCount(playerID, buildingName)+1)
function building:IsUnderConstruction() return false end
end

-- Returns "ConstructionSize" value of a unit handle or unit name
Expand Down

0 comments on commit 4d1214a

Please sign in to comment.