{"action":"created","issue":{"url":"https://api.github.com/repos/mindstorm8191/danidle/issues/13","repository_url":"https://api.github.com/repos/mindstorm8191/danidle","labels_url":"https://api.github.com/repos/mindstorm8191/danidle/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/mindstorm8191/danidle/issues/13/comments","events_url":"https://api.github.com/repos/mindstorm8191/danidle/issues/13/events","html_url":"https://github.com/mindstorm8191/danidle/issues/13","id":294257846,"number":13,"title":"Todo: Allow workers to consume food","user":{"login":"mindstorm8191","id":12045022,"avatar_url":"https://avatars1.githubusercontent.com/u/12045022?v=4","gravatar_id":"","url":"https://api.github.com/users/mindstorm8191","html_url":"https://github.com/mindstorm8191","followers_url":"https://api.github.com/users/mindstorm8191/followers","following_url":"https://api.github.com/users/mindstorm8191/following{/other_user}","gists_url":"https://api.github.com/users/mindstorm8191/gists{/gist_id}","starred_url":"https://api.github.com/users/mindstorm8191/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mindstorm8191/subscriptions","organizations_url":"https://api.github.com/users/mindstorm8191/orgs","repos_url":"https://api.github.com/users/mindstorm8191/repos","events_url":"https://api.github.com/users/mindstorm8191/events{/privacy}","received_events_url":"https://api.github.com/users/mindstorm8191/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-05T02:38:23Z","updated_at":"2018-02-07T03:31:00Z","closed_at":null,"author_association":"OWNER","body":"The planned rate of food consumption is 1 food for every 2 minutes, per worker.  So if there are 4 workers, 1 food should get consumed every 30 seconds (this is the current output rate of the Foraging Post).  I could set it up to consume X food every 2 minutes, but that doesn't seem to be a very balanced system (especially with storage blocks holding only 10 items, by default).  I would like to set up a system to consume food steadily.\r\n\r\nAdditionally, I would like to have workers pick what food to consume at random.  This would require finding all the food available on the map, and then picking one at random and consuming that.  I'm not sure if setting that up like this would be ideal; maybe some other setup would work.  I am open to fresh ideas on how to manage this."},"comment":{"url":"https://api.github.com/repos/mindstorm8191/danidle/issues/comments/363645445","html_url":"https://github.com/mindstorm8191/danidle/issues/13#issuecomment-363645445","issue_url":"https://api.github.com/repos/mindstorm8191/danidle/issues/13","id":363645445,"user":{"login":"mindstorm8191","id":12045022,"avatar_url":"https://avatars1.githubusercontent.com/u/12045022?v=4","gravatar_id":"","url":"https://api.github.com/users/mindstorm8191","html_url":"https://github.com/mindstorm8191","followers_url":"https://api.github.com/users/mindstorm8191/followers","following_url":"https://api.github.com/users/mindstorm8191/following{/other_user}","gists_url":"https://api.github.com/users/mindstorm8191/gists{/gist_id}","starred_url":"https://api.github.com/users/mindstorm8191/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mindstorm8191/subscriptions","organizations_url":"https://api.github.com/users/mindstorm8191/orgs","repos_url":"https://api.github.com/users/mindstorm8191/repos","events_url":"https://api.github.com/users/mindstorm8191/events{/privacy}","received_events_url":"https://api.github.com/users/mindstorm8191/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T03:31:00Z","updated_at":"2018-02-07T03:31:00Z","author_association":"OWNER","body":"We will need to start using some global variables in order to manage population.  The simplest for food is to make a counter variable. We can do a count-down type thing, so when it hits zero, food is consumed.  At that point we can add to its value, based on how many workers we have on hand.\r\n\r\nAs for selecting a food at random, perhaps we should keep a separate global array of all the food instances we have.  This will make it easier to update food decay until it is rotten.  The food element will also keep track of where it's located.  Even with this, we will need to run special cases when food items are transferred between blocks.  To actually consume a given food, we could randomize the list (on demand) and select the first one of the list."}}
{"actor":{"display_login":"mindstorm8191"}}