Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Movement Troubles #17

Open
Noodels opened this issue Apr 8, 2011 · 2 comments
Open

Movement Troubles #17

Noodels opened this issue Apr 8, 2011 · 2 comments

Comments

@Noodels
Copy link
Owner

Noodels commented Apr 8, 2011

Just thinking aloud here with the latest spectacular calamity to do with moving between rooms. It turned out that puppets were never being removed from the world to begin with as I had wished, so I fixed that. But that broke the game again, this time the server boots up and is happy as Larry until Larry tries to log in, where it crashes and burns.

After a fix to do with storing the puppets then (and a little Room identification bug I spotted with my hawk eyes) the world is troubled by how to retrieve said puppets. What we are trying to do is: self.puppet = self.world.retrieve(puppetID)

That doesn't bode well, since the World.retrieve function takes no arguments. Either there's some kind of design fail at work here or floating around somewhere is the propper retrieval function for specific objects. I'm sure I used to have one of those...

@Noodels
Copy link
Owner Author

Noodels commented Apr 8, 2011

Okay, so upon further inspection it looks like the infrastructure for picking an item by ID out of the database is there with DatabaseBackend.getItem, but such a function isn't called anywhere in the World class. Nowhere at all. It may have been in the past that World.retrieve accepted an item ID, and retrieved that, but it's since been changed, probably on the massive crusade we call issue 7.

A World.justRetrieve function is needed, which receives just the one ID. This will query the database for that item, and create it according to correct type, should all already be compounded into the World.createItem function that I spy using gnu parentheses spacing in the World.retrieve function, and then return a reference to that object.

@Noodels
Copy link
Owner Author

Noodels commented Apr 22, 2011

Now that we have a retrieve function working correctly to load puppets on the fly, unicode's crept back into the item attributes. Because of the type exception problem with the parser, this just makes the mud abusive and conceited (It calls you an idiot when you try to look at the offending room). The issue is duplicate code within database.py, whereby we convert to ascii for a universal retrieval, but not for retrieval of single objects. Hopefully movement should work after that's fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant