 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
121 for (i = strlen(tmpname); i > 0; i--) {
297 object *op, *prev = NULL, *head = NULL;
sstring name_pl
The plural name of the object.
@ llevError
Error, serious thing.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
archetype * more
Next part of a linked object.
archetype * find_archetype_by_object_type_name(int type, const char *name)
This function retrieves an archetype by type and name that appears during the game.
object * create_singularity(const char *name)
Creates a dummy object.
archetype * get_archetype_struct(void)
Allocates, initialises and returns the pointer to an archetype structure.
struct archetype * arch
Pointer to archetype.
StringBuffer * stringbuffer_new(void)
Create a new string buffer.
archetype * head
The main part of a linked object.
void object_copy_with_inv(const object *src_ob, object *dest_ob, bool update_speed)
Copy an object with an inventory, duplicate the inv too.
void free_arch(archetype *at)
Frees archetype.
sstring title
Of foo, etc.
AssetsManager * getManager()
#define FLAG_NO_PICK
Object can't be picked up.
Plugin animator file specs[Config] name
void object_clear(object *op)
Frees everything allocated by an object, and also clears all variables and flags to default settings.
int16_t y
Position in the map for this object.
char * stringbuffer_finish(StringBuffer *sb)
Deallocate the string buffer instance and return the string.
object clone
An object from which to do object_copy()
void object_dump(const object *op, StringBuffer *sb)
Dumps an object.
sstring add_string(const char *str)
This will add 'str' to the hash table.
#define FLAG_FREED
Object is in the list of free objects.
object * object_create_arch(archetype *at)
Create a full object using the given archetype.
archetype * findBySkillNameAndType(const char *skill, int type)
Retrieve an archetype by skill name and type.
void dump_arch(archetype *at, StringBuffer *sb)
Dumps an archetype to buffer.
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
void each(std::function< void(T *)> op)
Apply a function to each asset.
sstring race
Human, goblin, dragon, etc.
struct archetype * other_arch
Pointer used for various things - mostly used for what this objects turns into or what this object cr...
void fatal(enum fatal_error err)
fatal() is meant to be called whenever a fatal signal is intercepted.
archetype * findByTypeSubtype(int type, int subtype)
Retrieve an archetype by type and subtype.
Archetypes * archetypes()
Get archetypes.
#define MAX_BUF
Used for all kinds of things.
object * object_new(void)
Grabs an object from the list of unused objects, makes sure it is initialised, and returns it.
object * head
Points to the main object of a large body.
object * create_archetype(const char *name)
Finds which archetype matches the given name, and returns a new object containing a copy of the arche...
void free_string(sstring str)
This will reduce the refcount, and if it has reached 0, str will be freed.
A buffer that will be expanded as content is added to it.
#define FLAG_REMOVED
Object is not in any map or invenory.
sstring slaying
Which race to do double damage to.
archetype * find_archetype_by_object_name(const char *name)
This function retrieves an archetype given the name that appears during the game (for example,...
sstring name
The name of the object, obviously...
object * create_archetype_by_object_name(const char *name)
Creates an object given the name that appears during the game (for example, "writing pen" instead of ...
sstring msg
If this is a book/sign/magic mouth/etc.
void object_free_key_values(object *op)
Zero the key_values on op, decrementing the shared-string refcounts and freeing the links.
#define CLEAR_FLAG(xyz, p)
object * arch_to_object(archetype *at)
Creates and returns a new object which is a copy of the given archetype.
#define ARCH_SINGULARITY
Archetype for singularity.
archetype * get_archetype_by_type_subtype(int type, int subtype)
Retrieves an archetype by type and subtype.
archetype * try_find_archetype(const char *name)
archetype * findByObjectName(const char *name)
Retrieve an archetype given the name that appears during the game (for example, "writing pen" instead...
archetype * empty_archetype
Nice to have fast access to it.
sstring name
More definite name, like "generate_kobold".
object * more
Pointer to the rest of a large body of objects.
void dump_all_archetypes(void)
Dumps all archetypes to debug-level output.
archetype * findByObjectTypeName(int type, const char *name)
Retrieve an archetype by type and name that appears during the game.
@ llevDebug
Only for debugging purposes.
archetype * get_archetype_by_skill_name(const char *skill, int type)
Retrieves an archetype by skill name and type.