User Tools

Site Tools


arch:arch_attributes:k

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
arch:arch_attributes:k [2018/04/11 14:10] – created karlarch:arch_attributes:k [2025/04/18 13:08] (current) – external edit 127.0.0.1
Line 4: Line 4:
 Taken from the (unsorted) wholepage [[:dev:Object Fields]] . Taken from the (unsorted) wholepage [[:dev:Object Fields]] .
  
-===== List ==+===== List of attributes == 
 +None known yet.
  
 +
 +----
 +
 +====== Server struct obj {} object ==
 +These are not archetype attributes, but server internal variables. \\
 +Read more on the [[:dev:object_fields]] page.
 + 
  
 ===== Key/value fields ===== ===== Key/value fields =====
-Those fields are not part of the ''object'' or ''Stats'' structures, but used through the key/value mechanism.+Those fields are not part of the Object or Stats structures, but used through the key / value mechanism. \\ 
 +It seems to be a fallback handler for new and unknown attributes listed in .arc archetype files.  
 + 
 +File [[:server:include:object.h|server/include/object.h]] : 
 +<code c> 
 +/** 
 + * Each object (this also means archetypes!) could have a few of these 
 + * "dangling" from it; this could also end up containing 'parse errors'
 + * 
 + * key and value are shared-strings. 
 + * 
 + * Please use object_get_value(), object_set_value() from object.c rather than 
 + * accessing the list directly. 
 + * Exception is if you want to walk this list for some reason. 
 + */ 
 +typedef struct _key_value { 
 +    const char *key; 
 +    const char *value; 
 +    struct _key_value *next; 
 +} key_value; 
 + 
 +typedef struct obj { 
 +/* lots of lines here */ 
 +  key_value   *key_values;    /**< Fields not explicitly known by the loader. */ 
 +} object; 
 +</code>
  
 ==== key_values ==== ==== key_values ====
arch/arch_attributes/k.1523473853.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki