DebianJoe / dungeons

Roguelike Project in Python w/ libtcod
13 stars 5 forks source link

Stackable healing potions (and items in general) #7

Closed Frostlock closed 11 years ago

Frostlock commented 11 years ago

Just to let you know I'm taking a stab at stackable items. To avoid double work ;-)

DebianJoe commented 11 years ago

Be sure to remove/adjust the check at line 297, because it won't cause an error with the stacking until you exceed 26 items. Then, you'll get a message about "inventory full" because I had it tied to to letter indexes...and there's a limit to those on many keyboards.

Frostlock commented 11 years ago

Found that one but thanks for the heads up, it took a bit more tweaking than planned but I think I got it. I'll do a pull request shortly. The main struggle is that I'm used to heavily Object oriented approach. It took me a while to figure how Object, Item and Equipment play together. I'm used to doing that kind of stuff with inheritance :-) Also figuring out what the type of specific variable is proves a bit of a challenge for me being used to more explicitly typed java and .NET stuff. Anyway, a fun evening!

DebianJoe commented 11 years ago

You'll have to excuse the years of C/C++. I tend to use OOP only when I feel that's it's the obviously better option. Still, you seem to have adapted to it pretty well.

Frostlock commented 11 years ago

Always interested to learn! This is me learning how to close issues :-)