openai / neural-mmo

Code for the paper "Neural MMO: A Massively Multiagent Game Environment for Training and Evaluating Intelligent Agents"
https://openai.com/blog/neural-mmo/
MIT License
1.57k stars 262 forks source link

Issue on file tile.py unreachable return statement #28

Closed DanielTellier closed 5 years ago

DanielTellier commented 5 years ago

Error is at lines 45 through 47 not sure what should be indented.

def harvest(self):
      if self.capacity == 0:
         return False
      elif self.capacity <= 1:
         self.state = self.mat.degen()
      self.capacity -= 1
      return True
      return self.mat.dropTable.roll()
jsuarez5341 commented 5 years ago

Dumb but intended. There are a bunch of backlog content features I plan on implementing in the second patch (first one, which I'm working on now, is around infra, IO, scale, and ethyr API). A lot of these dumb things will go away then -- keeping them as placeholders for now

Edit: to be clear, that line is for resource tiles being able to drop random loot. As that feature is not fully implemented, I just have a dummy return. Could have probably just commented the return, but then it would look even less intentional.