This is an old revision of the document!
Region Repainter
This is a special device that can repaint some or all objects in a room.
Create an object of type 31, “Use” or “Activated Knicknack” (depending on the tool you use.)
Set action_type to 3.
action_menu can be any suitable value to get the menu prompt you want. The default of 0 gives “Use”.
Set colorMap to the colors you wish to apply.
Within the locale, you can place items as normal.
Set common_flags on the item to the usual values, plus 4096. The “Paintable” flag.
When the active object us Used:
- Any objects, with the appropriate flags, in vendos will be repainted.
- If the vendo it is in has the same imageURL/choreState, i.e. it's a self-vendo, that will be repainted too. Normal vendos (unless they have the flags set) will be unaffected.
- Any other objects with the appropriate flags that are glued down/immovable will be repainted.
This allows you to change colors of things available to buy, and objects glued in the room, but not items being held or dropped on the floor.
Bought items will have the paintable flag retained, so they can be placed in a turf and repainted there.
It is intended that future versions of this plugin will allow for saleable consumable objects (set 'charges') for use by turf owners within their turfs much as the turf paint allows painting of walls. Any other suggestions will be welcome.