traverseda / pycraft

A fork of "Minecraft in 500 lines of python" intended to someday be used as a real engine, instead of as a learning example.
MIT License
1.09k stars 96 forks source link

Fixed WeakStone #77

Closed dhalenok closed 8 years ago

dhalenok commented 8 years ago

This fixes #75
Renaming WeakStone class and all its references to Weakstone. Line 30 in block.py: classname = globals()[identifier.capitalize()] Since "weakstone".capitalize() is "Weakstone", but the name of the class is WeakStone, it raised KeyError exception.

nitori commented 8 years ago

The import of the blocks in player.py can be removed (the whole line) since none of them is used in the file anyway.

dhalenok commented 8 years ago

You're right, none of those are used. I didn't remove that line, because I thought it might have something to do with the new features that will be added in future.

traverseda commented 8 years ago

There's also some merge conflicts right now.

dhalenok commented 8 years ago

I'm aware of that, I can't resolve the conflict right now, but to me it looks like the last commit (Merge pull request #73 from Hispar/master) should have resolved the issue. Since in block.py, line 30: classname = globals()[identifier] It doesn't use capitalize anymore. And in player.py, starting in line 14: self.items are now exactly like the names of classes in block.py. I cannot test it right now, but last night I had some troubles with running the app. Can you confirm that the issue #75 was resolved with the last commit?

traverseda commented 8 years ago

Can confirm, it doesn't seem to crash. I'll close this and #75.