/[drupal]/contributions/modules/rpg/rulesets/rpg_drudge/rpg_drudge.rpg_ruleset.inc
ViewVC logotype

Diff of /contributions/modules/rpg/rulesets/rpg_drudge/rpg_drudge.rpg_ruleset.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Sat Apr 26 00:59:11 2008 UTC revision 1.2, Sat Apr 26 01:31:34 2008 UTC
# Line 40  function rpg_drudge_rpg_type_tangible() Line 40  function rpg_drudge_rpg_type_tangible()
40      '#name' => t('location'),      '#name' => t('location'),
41      '#class' => 'object', // this determines mainly how the attribute tables are created for objects, but may also affect processing      '#class' => 'object', // this determines mainly how the attribute tables are created for objects, but may also affect processing
42      '#description' => t('This attribute keeps track of the object containing this one. Every tangible object is generally located in another object. Some may not be, such as top containing rooms -- they are in a sort of undefined limbo.'),      '#description' => t('This attribute keeps track of the object containing this one. Every tangible object is generally located in another object. Some may not be, such as top containing rooms -- they are in a sort of undefined limbo.'),
43      '#verify' => '_rpg_drudge_location_verify', // this function will be called before setting the attribute, and must return true to continue      '#verify' => '_rpg_drudge_location_verify', // this function will be called before setting the attribute, and must return TRUE to continue
44      '#set' => '_rpg_drudge_location_set', // this function will be called when setting the attribute on an object      '#set' => '_rpg_drudge_location_set', // this function will be called when setting the attribute on an object
45      '#form_display' => '_rpg_drudge_form_display_admin',      '#form_display' => '_rpg_drudge_form_display_admin',
46    );    );
# Line 48  function rpg_drudge_rpg_type_tangible() Line 48  function rpg_drudge_rpg_type_tangible()
48      '#name' => t('contents'),      '#name' => t('contents'),
49      '#class' => 'object_array',      '#class' => 'object_array',
50      '#description' => t('This is an array of all the objects contained directly in this object.'),      '#description' => t('This is an array of all the objects contained directly in this object.'),
51      '#form_display' => '_rpg_drudge_form_display_false',      '#form_display' => '_rpg_drudge_form_display_FALSE',
52    );    );
53    $type['#attributes']['moveable'] = array(    $type['#attributes']['moveable'] = array(
54      '#name' => t('moveable'),      '#name' => t('moveable'),
55      '#class' => 'boolean',      '#class' => 'boolean',
56      '#description' => t('If an object is moveable, then it may be taken by an actor. Objects not moveable are generally fixed, too heavy, or part of the scenery.'),      '#description' => t('If an object is moveable, then it may be taken by an actor. Objects not moveable are generally fixed, too heavy, or part of the scenery.'),
57      '#default_value' => true, // objects of this type will begin with this value for the attribute      '#default_value' => TRUE, // objects of this type will begin with this value for the attribute
58      '#form_display' => '_rpg_drudge_form_display_admin',      '#form_display' => '_rpg_drudge_form_display_admin',
59    );    );
60    $type['#attributes']['visible'] = array(    $type['#attributes']['visible'] = array(
61      '#name' => t('visible'),      '#name' => t('visible'),
62      '#class' => 'boolean',      '#class' => 'boolean',
63      '#description' => t('Can this object be seen in normal circumstances?'),      '#description' => t('Can this object be seen in normal circumstances?'),
64      '#default_value' => true,      '#default_value' => TRUE,
65      '#form_display' => '_rpg_drudge_form_display_admin',      '#form_display' => '_rpg_drudge_form_display_admin',
66    );    );
67    $type['#attributes']['light'] = array(    $type['#attributes']['light'] = array(
# Line 75  function rpg_drudge_rpg_type_tangible() Line 75  function rpg_drudge_rpg_type_tangible()
75      '#name' => t('listable'),      '#name' => t('listable'),
76      '#class' => 'boolean',      '#class' => 'boolean',
77      '#description' => t("Will this object be listed in its location's contents?"),      '#description' => t("Will this object be listed in its location's contents?"),
78      '#default_value' => true,      '#default_value' => TRUE,
79      '#form_display' => '_rpg_drudge_form_display_admin',      '#form_display' => '_rpg_drudge_form_display_admin',
80    );    );
81    $type['#attributes']['listable_contents'] = array(    $type['#attributes']['listable_contents'] = array(
# Line 105  function rpg_drudge_rpg_type_tangible() Line 105  function rpg_drudge_rpg_type_tangible()
105    $type['#attributes']['may_take'] = array(    $type['#attributes']['may_take'] = array(
106      '#name' => t('may take'),      '#name' => t('may take'),
107      '#class' => 'figured', // figured class attributes may not be manually set      '#class' => 'figured', // figured class attributes may not be manually set
108      '#description' => t('May an object be taken by the actor? This will return true if the object is contained within the same room as the actor, is visible, may be touched, is moveable, and is not possessed by another actor.'),      '#description' => t('May an object be taken by the actor? This will return TRUE if the object is contained within the same room as the actor, is visible, may be touched, is moveable, and is not possessed by another actor.'),
109      '#get' => '_rpg_drudge_may_take', // this function will be called to return the value of an attribute.      '#get' => '_rpg_drudge_may_take', // this function will be called to return the value of an attribute.
110    );    );
111    $type['#attributes']['may_attack'] = array(    $type['#attributes']['may_attack'] = array(
# Line 166  function rpg_drudge_rpg_type_tangible() Line 166  function rpg_drudge_rpg_type_tangible()
166    return $type;    return $type;
167  }  }
168    
169    function rpg_drudge_rpg_type_unmoveable() {
170      $type = array();
171      $type['#type'] = 'unmoveable';
172      $type['#name'] = t('Unmoveable');
173      $type['#shortdesc'] = t('An unmoveable object simply may not be moved.');
174      $type['#longdesc'] = $type['#shortdesc'];
175    
176      $type['#parents'] = array('tangible');
177    
178      $type['#attributes'] = array();
179      $type['#attributes']['moveable'] = array(
180        '#name' => t('moveable'),
181        '#class' => 'boolean',
182        '#description' => t('If an object is moveable, then it may be taken by an actor. Objects not moveable are generally fixed, too heavy, or part of the scenery.'),
183        '#default_value' => FALSE,
184        '#form_display' => '_rpg_drudge_form_display_admin',
185      );
186      return $type;
187    }
188    
189  function rpg_drudge_rpg_type_actor() {  function rpg_drudge_rpg_type_actor() {
190    $type = array();    $type = array();
191    $type['#type'] = 'actor';    $type['#type'] = 'actor';
# Line 206  function rpg_drudge_rpg_type_actor() { Line 226  function rpg_drudge_rpg_type_actor() {
226      '#name' => t('moveable'),      '#name' => t('moveable'),
227      '#class' => 'boolean',      '#class' => 'boolean',
228      '#description' => t('Actors are generally unmoveable by other actors, with the exception of small actors such as mice.'),      '#description' => t('Actors are generally unmoveable by other actors, with the exception of small actors such as mice.'),
229      '#default_value' => false, // objects of this type will begin with this value for the attribute      '#default_value' => FALSE, // objects of this type will begin with this value for the attribute
230      '#form_display' => '_rpg_drudge_form_display_admin',      '#form_display' => '_rpg_drudge_form_display_admin',
231    );    );
232    
# Line 273  function rpg_drudge_rpg_type_room() { Line 293  function rpg_drudge_rpg_type_room() {
293    $type['#shortdesc'] = t('Rooms contain objects, including characters, and may be viewed from inside.');    $type['#shortdesc'] = t('Rooms contain objects, including characters, and may be viewed from inside.');
294    $type['#longdesc'] = $type['#shortdesc'];    $type['#longdesc'] = $type['#shortdesc'];
295    
296    $type['#parents'] = array('tangible');    $type['#parents'] = array('tangible', 'unmoveable');
297    
298    $type['#attributes'] = array();    $type['#attributes'] = array();
299    $type['#attributes']['title'] = array(    $type['#attributes']['title'] = array(
# Line 363  function rpg_drudge_rpg_type_exit() { Line 383  function rpg_drudge_rpg_type_exit() {
383    $type['#shortdesc'] = t('Exits connect rooms together, and may be traversed.');    $type['#shortdesc'] = t('Exits connect rooms together, and may be traversed.');
384    $type['#longdesc'] = $type['#shortdesc'];    $type['#longdesc'] = $type['#shortdesc'];
385    
386    $type['#parents'] = array('tangible');    $type['#parents'] = array('tangible', 'unmoveable');
387    
388    $type['#attributes'] = array();    $type['#attributes'] = array();
389    $type['#attributes']['dest'] = array(    $type['#attributes']['dest'] = array(
# Line 465  function rpg_drudge_rpg_type_countable() Line 485  function rpg_drudge_rpg_type_countable()
485      '#name' => t('location'),      '#name' => t('location'),
486      '#class' => 'object', // this determines mainly how the attribute tables are created for objects, but may also affect processing      '#class' => 'object', // this determines mainly how the attribute tables are created for objects, but may also affect processing
487      '#description' => t('When more than one countable objects are in the same location, combine them.'),      '#description' => t('When more than one countable objects are in the same location, combine them.'),
488      '#verify' => '_rpg_drudge_location_verify', // this function will be called before setting the attribute, and must return true to continue      '#verify' => '_rpg_drudge_location_verify', // this function will be called before setting the attribute, and must return TRUE to continue
489      '#set' => '_rpg_drudge_countable_location_set', // this function will be called when setting the attribute on an object      '#set' => '_rpg_drudge_countable_location_set', // this function will be called when setting the attribute on an object
490      '#form_display' => '_rpg_drudge_form_display_admin',      '#form_display' => '_rpg_drudge_form_display_admin',
491    );    );

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2