ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/pod/objects.pod
(Generate patch)

Comparing deliantra/server/pod/objects.pod (file contents):
Revision 1.16 by elmex, Wed Dec 20 21:30:42 2006 UTC vs.
Revision 1.17 by elmex, Wed Dec 20 22:54:59 2006 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines