Comments (8)
Can break this down into three tasks:
-
The inventory data structure itself (just a GList of picked up objects -- GList because, if we drop an object, we need to be able to quickly dump it from the list; don't use GArray!)
-
Fill in pick up command so that it removes the object from the room and places it in the user's inventory
-
Create commands to interact with objects (looking, dropping -- putting back in room, etc.)
from trogdor.
I've got the data structures implemented.
from trogdor.
Finished writing code to disambiguate between objects with the same names (due to synonyms.) I now have a stub function which will soon handle removing the object from the room when we pick it up.
from trogdor.
looking at object should operate on both inventory and room items. Dropping an item should only operate on inventory items. Taking an item has already been implemented (almost) and only operates on objects in the room.
from trogdor.
Dropping objects is a success!
from trogdor.
Added command to list objects in a user's inventory.
from trogdor.
All i have left before I can close this ticket is to implement the look command for objects (look currently only works for rooms.)
from trogdor.
Done with actionLook. Closing this out!
from trogdor.
Related Issues (20)
- Global synonyms for objects in room HOT 1
- Global synonyms for objects and creatures HOT 1
- Override creature's allegiance per player HOT 1
- Creature Combat (Part 1. Investigate) HOT 1
- Creature Combat (2. Bare Bones) HOT 1
- New event handler HOT 4
- Add events to attack
- Player and creature health system
- Remember last command entered
- Move default values to defines and/or enums HOT 1
- Make damage done by bare hands configurable HOT 1
- Creatures using weapons HOT 1
- Creature counter-attack
- Creature auto-attack HOT 3
- Make attributes configurable
- Custom messages for combat and health HOT 1
- Valgrind struct in object.h HOT 1
- Friendly and neutral creatures should NOT attack back by default HOT 1
- Add creature's location to creature->location in construct.c HOT 1
- Accessor/setter methods for various types of entities HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trogdor.