Inventory system
Reported by Mikael Lind | November 5th, 2008 @ 10:30 AM | in 0.1
Implement an inventory system based on linked lists. Objects with inventories cannot be stacked.
Comments and changes to this ticket
-

Mikael Lind November 5th, 2008 @ 10:41 AM
- Milestone set to 0.1
- Assigned user set to Mikael Lind
Use a circular linked list for inventories. Attributes:
env - The environment of this object.
prev - The previous object in the linked list.
next - The next object in the linked list.
inv - The first object in the inventory of this object. Monsters are always the first objects in rooms. Features could be the last, i.e. room.inv.prev, which is the same thing as room.inv if no other objects are present.
Keep impassable objects such as boulders on top, just below any monsters present.
-

Mikael Lind November 5th, 2008 @ 09:51 PM
- State changed from new to resolved
Done, though the slots are named env, prev_env, next_env, and first_env.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Moonshine is a roguelike computer game written in Lua.