From a0bbf9f36db30b0c6de3480f525ee69698ba18f9 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 13 Sep 2017 04:40:40 +0200 Subject: > inb4 Multiple generators CloudGenerator now counts only clouds spawned by itself --- not/World.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'not/World.lua') diff --git a/not/World.lua b/not/World.lua index 853d75b..f576fca 100644 --- a/not/World.lua +++ b/not/World.lua @@ -222,6 +222,12 @@ function World:getCloudsCount () end) end +function World:getCloudsCountFrom (generator) + return self:countEntities(function (entity) + return entity:is(Cloud) and entity.generator == generator + end) +end + function World:getNautsAll () return self:getEntities(function (entity) return entity:is(require("not.Hero")) and not entity.body:isDestroyed() -- cgit v1.1