From 4d1214aa7a7ac20b333f57e126074b49cd58c040 Mon Sep 17 00:00:00 2001 From: MNoya Date: Sat, 21 May 2016 00:56:54 -0300 Subject: [PATCH] Added building:IsUnderConstruction() call --- scripts/vscripts/libraries/buildinghelper.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/vscripts/libraries/buildinghelper.lua b/scripts/vscripts/libraries/buildinghelper.lua index 98ba567..0bce64f 100644 --- a/scripts/vscripts/libraries/buildinghelper.lua +++ b/scripts/vscripts/libraries/buildinghelper.lua @@ -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") @@ -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