• strict warning: Non-static method view::load() should not be called statically in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/views.module on line 906.
  • strict warning: Declaration of views_handler_field_comment::init() should be compatible with views_handler_field::init(&$view, $options) in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/modules/comment/views_handler_field_comment.inc on line 49.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
  • strict warning: Declaration of views_handler_filter_node_status::operator_form() should be compatible with views_handler_filter::operator_form(&$form, &$form_state) in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/modules/node/views_handler_filter_node_status.inc on line 13.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/plugins/views_plugin_row.inc on line 134.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/plugins/views_plugin_row.inc on line 134.
  • strict warning: Non-static method view::load() should not be called statically in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/views.module on line 906.
  • strict warning: Declaration of views_handler_argument::init() should be compatible with views_handler::init(&$view, $options) in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/handlers/views_handler_argument.inc on line 744.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 159.
  • strict warning: Non-static method view::load() should not be called statically in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/views.module on line 906.
  • strict warning: Non-static method view::load() should not be called statically in /home/ordinal/ordinalmalaprop.com/engine/sites/all/modules/views/views.module on line 906.

A Simple yet Convenient Inventory-Confirming Script

subtitled: "Part the Twenty-Somethingth of Ordinal's Scripting Primer"

When selling Items, I believe that the importance of setting their Permissions is well-known, lest either customers be unable to use the things or able to sell them on willy-nilly, and part of this process is making sure that the contents of an Item also have the correct Permissions. There are numerous instances where this can cause a bother. For instance, a gun containing a No-Copy Transfer bullet will only be able to fire once (this caused me no end of grief a year or two back), and any inventory items inside an object set to Copy Transfer will be able to be extracted using the "Open" command and distributed and resold at will, regardless of whether the basic object itself is not transferrable or not copiable.

This is, I have found, particularly an issue when in an environment where one is working with different people on the same object. It is necessary to pass things back and forward for changes with the contents having full permissions set, but at the point of distribution or sale, these permissions must then be reset appropriately.

The fancy took me this evening to show a simple script that I occasionally use to check that the permissions of the inventory of an item are, in fact, what they should be. One may find the full script here:

Automatic Inventory Permissions Checker

The above may be informative for those wishing to explore the idea of scripts dealing with the inventory of the object they are in. Its behaviour is quite simple: when initially dropped into an item, and thereafter when the inventory changes, it runs through the entire contents and tells the owner which "next owner" permissions each of them has. (So as not to bother any purchaser if it is accidentally left in, it has a "delete self" function which activates when the owner changes.)

As it stands, the script does little else, but it could be modified to, for instance, delete any item upon owner change that was copy/trans, so as to utterly ensure the safety of one's design - this would break the product itself most likely, but a new and corrected version could be distributed, providing that one has some sort of "updated version checker" in one's products, which I'm sure everyone does. ahem

Annechen Lowey's picture
20 Nov200700:19
Annechen Lowey (not verified)

Thank you for sharing this script, it will also be useful for my Boxing Day project, keeping me from absolutely wrecking the box of freebies I build for newcomers.