diff options
| author | Franklin Wei <git@fwei.tk> | 2016-01-24 16:58:59 -0500 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2016-01-24 16:58:59 -0500 |
| commit | b346e948cb167c18efc33f32f0e7cfb21050fc96 (patch) | |
| tree | 2a6989023690021c15999ce8fc3fefdca3ab7d83 /worlds | |
| parent | e2c2a9878a0fb55923fbd77db1f73085013aa36c (diff) | |
| download | netcosm-b346e948cb167c18efc33f32f0e7cfb21050fc96.zip netcosm-b346e948cb167c18efc33f32f0e7cfb21050fc96.tar.gz netcosm-b346e948cb167c18efc33f32f0e7cfb21050fc96.tar.bz2 netcosm-b346e948cb167c18efc33f32f0e7cfb21050fc96.tar.xz | |
objects partially implemented, fixes some bugs
Diffstat (limited to 'worlds')
| -rw-r--r-- | worlds/test.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/worlds/test.c b/worlds/test.c index b93b795..d31dd11 100644 --- a/worlds/test.c +++ b/worlds/test.c @@ -1,12 +1,26 @@ #include <world_api.h> +const char *sword_desc(struct object_t *obj, user_t *user) +{ + return "It is very shiny."; +} + +static void portal_init(room_id id) +{ + debugf("portal room init.\n"); + struct object_t *new = obj_new(); + new->name = "sword"; + new->hook_desc = sword_desc; + obj_add(id, new); +} + const struct roomdata_t netcosm_world[] = { { "portal_room", "Portal Room", "You stand in the middle of a stone room. In to the east lies a portal to the world. Above it, there is a sign that reads `Alacron, 238 A.B.A.`.", { NONE_N, NONE_NE, "world_start", NONE_SE, NONE_S, NONE_SW, NONE_W, NONE_NW, NONE_UP, NONE_DN, "world_start", NONE_OT }, - NULL, + portal_init, NULL, NULL, }, |