|I'm trying to find the current fill types and amount in each greenhouse but with no luck. I'm able to get a list of all of the greenhouses that have been placed, but from there I can't figure out which function/property has access to the data of the greenhouse such as the current water amount.
Has anyone got any idea where abouts I need to look to find it?
|Bob Bobster (Bobster82)||04.12.2021 15:58|
This might help in the direction. It might not be the "official" way, but it gets u the info.
local placeables = g_currentMission.placeableSystem.placeables
for _, placeable in pairs(placeables) do
if (placeable.spec_greenhouse) then
for k, v in pairs(placeable.spec_productionPoint.productionPoint.storage.fillLevels) do
print ("K: " ..tostring(k));
print ("V: " .. tostring(v));
2021-12-04 15:48 K: 60
2021-12-04 15:48 V: 9.3100418195936
2021-12-04 15:48 K: 21
2021-12-04 15:48 V: 2344.2175026889
2021-12-04 15:48 K: 61
2021-12-04 15:48 V: 2.3396456922743
2021-12-04 15:48 K: 59
2021-12-04 15:48 V: 99.38334146915
60 is tomatos
21 is water
62 is strawberries
59 is lettuce
|@Bob Bobster (Bobster82)
Thanks! That was exactly what I needed to use, I now have the data I need
Note: Log in to post. Create a new account here.