--- deliantra/server/include/object.h 2007/08/30 05:37:58 1.147 +++ deliantra/server/include/object.h 2007/09/12 11:10:10 1.150 @@ -133,6 +133,7 @@ shstr ACC (RW, race); /* human, goblin, dragon, etc */ shstr ACC (RW, slaying); /* Which race to do double damage to */ /* If this is an exit, this is the filename */ + shstr ACC (RW, tag); // a tag used to tracking this object shstr ACC (RW, skill); /* Name of the skill this object uses/grants */ shstr ACC (RW, msg); /* If this is a book/sign/magic mouth/etc */ shstr ACC (RW, lore); /* Obscure information about this object, */ @@ -272,7 +273,7 @@ key_value *key_values; /* Fields not explictly known by the loader. */ bool parse_kv (object_thawer &f); // parse kv pairs, (ab-)used by archetypes, which should not exist at all - void post_load_check (); // do some adjustments after parsing + MTH void post_load_check (); // do some adjustments after parsing static object *read (object_thawer &f, maptile *map = 0); // map argument due to toal design bogosity, must go. bool write (object_freezer &f); @@ -298,6 +299,8 @@ do_remove (); } + MTH bool blocked (maptile *m, int x, int y) const; + void move_to (const mapxy &pos) { remove (); @@ -506,6 +509,9 @@ void statusmsg (const char *msg, int color = NDI_BLACK); void failmsg (const char *msg, int color = NDI_RED); + MTH const_octet_string ref () const; // creates and returns a consistent persistent object reference + static object *deref (const_octet_string ref); // returns the object from the generated refreence, if possible + protected: void link (); void unlink (); @@ -567,11 +573,12 @@ void gather_callbacks (AV *&callbacks, event_type event) const; static archetype *read (object_thawer &f); - static archetype *get (const char *name); // find or create - static archetype *find (const char *name); - void link (); - void unlink (); + MTH static archetype *get (const_utf8_string name); // find or create + MTH static archetype *find (const_utf8_string name); + + MTH void link (); + MTH void unlink (); object_vector_index ACC (RW, archid); // index in archvector shstr ACC (RW, archname); /* More definite name, like "generate_kobold" */