… | |
… | |
238 | If FLAG_APPLIED is not set the object is destroyed. |
238 | If FLAG_APPLIED is not set the object is destroyed. |
239 | |
239 | |
240 | =item FLAG_CHANGING |
240 | =item FLAG_CHANGING |
241 | |
241 | |
242 | If the I<state> field of the object is 0 the object will be processed periodically |
242 | If the I<state> field of the object is 0 the object will be processed periodically |
243 | (if speed is set). If the I<state> field is 1 it won't be processed. |
243 | (if I<speed> is set). If the I<state> field is 1 it won't be processed. |
|
|
244 | |
|
|
245 | This flag indicates that the object is changing into a different object. |
|
|
246 | The object has to have the I<other_arch> field set. The object the changing object |
|
|
247 | changes into is derived from the archetype in I<other_arch>. |
|
|
248 | |
|
|
249 | When the object does not have FLAG_ALIVE set the I<food> field will be decremented |
|
|
250 | each time the object is processed, and if I<food> reaches 0 one new object will be generated. |
|
|
251 | |
|
|
252 | When the object has FLAG_ALIVE set the I<food> field is the number of objects that |
|
|
253 | will be generated. |
|
|
254 | |
|
|
255 | After the new object is created the I<hp> field from the old object is copied into |
|
|
256 | the new one. |
|
|
257 | |
|
|
258 | When the old object was a B<LAMP> it's I<food> fields value less 1 will be copied |
|
|
259 | to the new object. |
244 | |
260 | |
245 | =item FLAG_IS_A_TEMPLATE (internal use) |
261 | =item FLAG_IS_A_TEMPLATE (internal use) |
246 | |
262 | |
247 | This flag is set on the inventory of generators like B<CREATOR>s and B<CONVERTER>s, |
263 | This flag is set on the inventory of generators like B<CREATOR>s and B<CONVERTER>s, |
248 | or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. |
264 | or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. |
… | |
… | |
1012 | |
1028 | |
1013 | A type for any object that has no special behaviour. |
1029 | A type for any object that has no special behaviour. |
1014 | |
1030 | |
1015 | =head3 B<LAMP> - type 82 - A lamp |
1031 | =head3 B<LAMP> - type 82 - A lamp |
1016 | |
1032 | |
1017 | This object makes light. |
1033 | This object represents a lamp, that can be carried and switched |
|
|
1034 | on and off and has a certain amount of fuel in it. |
|
|
1035 | |
|
|
1036 | A lamp consists of two archetypes: the 'on' archetype and the 'off' archetype. |
|
|
1037 | Each of them should point at the other one with it's I<other_arch> field. |
|
|
1038 | |
|
|
1039 | See the I<other_arch> field for the behaviour of a lamp object when it is applied. |
|
|
1040 | |
|
|
1041 | =over 4 |
|
|
1042 | |
|
|
1043 | =item I<speed> <number> |
|
|
1044 | |
|
|
1045 | If FLAG_CHANGING is set the I<speed> field will indicate how fast the |
|
|
1046 | lamp burns it's fuel (I<food>). |
|
|
1047 | |
|
|
1048 | Setting FLAG_CHANGING makes only sense on the archetype which represents |
|
|
1049 | the 'on' state of the lamp. |
|
|
1050 | |
|
|
1051 | See also the description of FLAG_CHANGING. |
|
|
1052 | |
|
|
1053 | Lamps which have no FLAG_CHANGING set would also make sense and represent |
|
|
1054 | lamps that never burn up. |
|
|
1055 | |
|
|
1056 | =item I<other_arch> <number> |
|
|
1057 | |
|
|
1058 | This is the field that points to the 'other' archetype which represents the |
|
|
1059 | opposite state of the lamp. The newly from I<other_arch> derived object will |
|
|
1060 | replace the current object and will get the value of I<food> of the replaced object. |
|
|
1061 | |
|
|
1062 | Rationale: |
|
|
1063 | |
|
|
1064 | When the lamp (on) is applied a new object is derived from the archetype |
|
|
1065 | in I<other_arch> and the I<food> value is copied to it ('the fuel is |
|
|
1066 | transferred'). The new lamp (off) object has to have a I<other_arch> field |
|
|
1067 | which points to the archetype from which a lamp (on) can be derived. |
|
|
1068 | |
|
|
1069 | =item I<food> <number> |
|
|
1070 | |
|
|
1071 | This fields stands for the fuel of the lamp. |
|
|
1072 | |
|
|
1073 | =back |
1018 | |
1074 | |
1019 | =head3 B<DUPLICATOR> - type 83 - Duplicators or: Multiplicators |
1075 | =head3 B<DUPLICATOR> - type 83 - Duplicators or: Multiplicators |
1020 | |
1076 | |
1021 | This type of objects multiplies objects that are above it when it is activated. |
1077 | This type of objects multiplies objects that are above it when it is activated. |
1022 | You can even multiply by 0, which will destroy the object. |
1078 | You can even multiply by 0, which will destroy the object. |