Skip to content

Commit

Permalink
Make bushes mowable
Browse files Browse the repository at this point in the history
Added permanent removal of bushes and foliage with mower
  • Loading branch information
loki79uk committed May 28, 2022
1 parent 6ccb82b commit 724cc34
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 12 additions & 1 deletion GrassMowing.lua
Expand Up @@ -48,6 +48,17 @@ function GrassMowing:update(dt)
end
end

if g_currentMission.foliageSystem ~= nil then
local decoFoliages = g_currentMission.foliageSystem:getDecoFoliages()

for _, decoFoliage in pairs(decoFoliages) do
if decoFoliage.layerName=="decoFoliage" or decoFoliage.layerName=="decoBush" then
decoFoliage.mowable = true
print("MOWABLE: " .. decoFoliage.layerName )
end
end
end

self.initialised = true
end
end
end
4 changes: 2 additions & 2 deletions modDesc.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="61">
<modDesc descVersion="66">
<author>loki_79</author>
<version>1.0.0.0</version>
<version>1.1.0.0</version>
<title>
<en>Grass Mowing</en>
<de>Gras Mähen</de>
Expand Down

0 comments on commit 724cc34

Please sign in to comment.