BuildingHelper
BuildingHelper copied to clipboard
BuildingHelper:UpgradeBuilding
I just found an error and some suggestions regarding this function.
Error:
function BuildingHelper:BlockPSO(size, location) -- if size == 0 then return end -- size can be nil, when no KV "PathingSize" has been set if size == 0 or size == nil then return end
Suggestions:
- Add Upgrade Duration to the Function
- Add Modifier Copy & Paste from the old Building to the new.
- Make new Building selected by Default
- Remove Building Invulnerable from newly spawned Building
To 3:
directly after
local new_building = BuildingHelper:PlaceBuilding(
-- Remove invulnerability on npc_dota_building baseclass new_building:RemoveModifierByName("modifier_invulnerable")