--- deliantra/server/include/object.h 2008/04/11 13:59:06 1.156 +++ deliantra/server/include/object.h 2008/04/20 00:44:12 1.160 @@ -103,7 +103,7 @@ bool parse (const char *s) { - return sscanf (s, "<1%*[,.]%" SCNx64 ">", &seq) == 1; + return sscanf (s, "<1.%" SCNx64 ">", &seq) == 1; } const char *c_str (char *buf, int len) const @@ -471,7 +471,7 @@ MTH void activate_recursive (); MTH void deactivate_recursive (); - // set the givne flag on all objects in the inventory recursively + // set the given flag on all objects in the inventory recursively MTH void set_flag_inv (int flag, int value = 1); void enter_exit (object *exit);//Perl @@ -574,7 +574,7 @@ typedef struct oblinkpt { /* Used to link together several object links */ struct oblnk *link; - long value; /* Used as connected value in buttons/gates */ + sint32 value; /* Used as connected value in buttons/gates */ struct oblinkpt *next; } oblinkpt; @@ -594,13 +594,12 @@ INTERFACE_CLASS (archetype) struct archetype : object { + static archetype *empty; // the empty_archetype + archetype (const char *name); ~archetype (); void gather_callbacks (AV *&callbacks, event_type event) const; - static archetype *read (object_thawer &f); - - MTH static archetype *get (const_utf8_string name); // find or create MTH static archetype *find (const_utf8_string name); MTH void link (); @@ -610,10 +609,14 @@ object_vector_index ACC (RW, archid); // index in archvector shstr ACC (RW, archname); /* More definite name, like "generate_kobold" */ - bool ACC (RW, stub); // if true, this is an invalid archetype sint8 ACC (RW, min_x), ACC (RW, min_y); /* extents, compared to the head (min_x, min_y should be zero, but aren't...) */ sint8 ACC (RW, max_x), ACC (RW, max_y); + + // support for archetype loading + static archetype *read (object_thawer &f); + MTH static void commit_load (); // commit any objects loaded, resolves cyclic dependencies and more + static void postpone_arch_ref (arch_ptr &ref, const_utf8_string other_arch); /* postpone other_arch reference */ }; inline void