MNoya / BuildingHelper

Library for RTS & TD Dota Custom Games

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow trees to be regrown

Septica opened this issue · comments

Since buildinghelper.lua leaves an npc thinker unit on a fallen tree. It blocks the regrowth of the tree. It would be nice to have some way to detect a tree regrowth and destroy the associated npc thinker.

As there is no tree regrow event, there are 4 default API functions it should need to hook to make this transparent:

  • GameRules:SetTreeRegrowTime(time) (Default: 300 seconds)
  • GridNav:RegrowAllTrees()
  • tree:CutDownRegrowAfter(time, team)
  • tree:GrowBack(time)

Done, give it a try and post again if there's any problem