custom 
One tile's custom graffiti: a stack of placed pieces, oldest at the bottom, shown as one composite with its glow.
SSgraffiti owns the placements and their art; the decal keeps the packed placements it shows and what it drew from them. It lasts while the surface it was made on does, a wall, a floor with ground or a full-tile window's glass, and it can't be painted over. A window's graffiti goes with the window, and a floor's stays under one fastened later.
Vars | |
| kind | graffiti_surface_kind() of the tile the decal was made on, which the tile must stay: GRAFFITI_KIND_WALL, GRAFFITI_KIND_FLOOR or GRAFFITI_KIND_WINDOW. |
|---|---|
| render_cache | list("base_art" = every piece but the top one merged, "art" = the whole stack merged, "kind" = its graffiti_art_glow_kind(), "mask" = its glow mask or the sheet holding it), plus "older", whether older paint shows beneath the top piece, once examined. The merges are kept only while someone paints the tile: a stack shown from its sheet, or left by its painters, keeps neither (release_merges()), and stack_merge() and base_merge() make them again. |
| stack | The placements shown here, bottom to top, packed as SSgraffiti keeps them. |
| stack_key | graffiti_art_hash() of the merged stack, which names its sheet state and its drawn icon. |
Procs | |
| Destroy | Drops the decal's placements from the registry for good: its surface was cleaned or is gone. |
| Initialize | Sets the decal up on its surface, untinted and unpaintable. On a window it is drawn over the glass and follows the window: it goes when the window is deleted or leaves the tile, and washes off with it. |
| NeverShouldHaveComeHere | Whether the decal must go when its turf changes: the surface it was made on must still be there. A floor's is the floor itself, which a window fastened over it later leaves, while a wall's or a window's tile must still offer one. |
| add_placement | Puts a placement on top of the stack. Past GRAFFITI_STACK_CAP, the oldest one is buried for good. |
| adopt_stack | Shows the stack under the key and glow kind the map file cached for it, as the load does, without merging it: the merges come once a sheet must be drawn or someone paints the tile (stack_merge(), base_merge()). |
| apply_icon | Shows the merged stack from its sheet, or from an icon of its own when no sheet holds it. |
| base_merge | Returns every piece of the stack but the top one merged, merging them again when the decal keeps no merge of them. |
| check_window | Goes for good once its window has left the tile, as it would with its wall. Unfastening the window alone keeps it. |
| examine | Says it is graffiti, whether it outlasts the shift, and whether older graffiti still shows beneath its top piece. Pieces' names and descriptions stay in their painters' libraries. |
| refresh | Merges the stack again after it changed, then shows it. |
| release_merges | Lets go of the stack's merges once nobody paints on the tile: they are made again for the next painter, and what the decal shows stays. |
| remove_placement | Takes a placement off the stack, and the decal off its tile once nothing is left. |
| stack_arts | Returns the art of each piece in the stack that the registry still holds art for. |
| stack_merge | Returns the whole stack merged, as the decal shows it, merging it again when the decal keeps no merge of it. |
| stack_signature | Returns the stack's signature: its pieces' art hashes, bottom first, under which the map file caches its merge's key and glow kind. |
| update_overlays | Lights the glowing paint and lets the rest block the glow of whatever lies beneath. |
| window_gone | Goes for good with the window it is on, as it would with its wall. |
| window_moved | Checks whether its window left the tile once the move is over: a shuttle moves the decal after its window. |
| window_washed | Washes off with its window. |
Var Details
kind 
graffiti_surface_kind() of the tile the decal was made on, which the tile must stay: GRAFFITI_KIND_WALL, GRAFFITI_KIND_FLOOR or GRAFFITI_KIND_WINDOW.
render_cache 
list("base_art" = every piece but the top one merged, "art" = the whole stack merged, "kind" = its graffiti_art_glow_kind(), "mask" = its glow mask or the sheet holding it), plus "older", whether older paint shows beneath the top piece, once examined. The merges are kept only while someone paints the tile: a stack shown from its sheet, or left by its painters, keeps neither (release_merges()), and stack_merge() and base_merge() make them again.
stack 
The placements shown here, bottom to top, packed as SSgraffiti keeps them.
stack_key 
graffiti_art_hash() of the merged stack, which names its sheet state and its drawn icon.
Proc Details
Destroy
Drops the decal's placements from the registry for good: its surface was cleaned or is gone.
Initialize
Sets the decal up on its surface, untinted and unpaintable. On a window it is drawn over the glass and follows the window: it goes when the window is deleted or leaves the tile, and washes off with it.
Arguments:
- mapload: Whether the map is loading.
NeverShouldHaveComeHere
Whether the decal must go when its turf changes: the surface it was made on must still be there. A floor's is the floor itself, which a window fastened over it later leaves, while a wall's or a window's tile must still offer one.
Arguments:
- here_turf: The turf the decal is on now.
Returns:
- TRUE/FALSE
add_placement
Puts a placement on top of the stack. Past GRAFFITI_STACK_CAP, the oldest one is buried for good.
Arguments:
- packed: The placement, packed as SSgraffiti keeps it.
- deferred: Whether to leave the merge for the caller, which refreshes once it has stacked everything.
adopt_stack
Shows the stack under the key and glow kind the map file cached for it, as the load does, without merging it: the merges come once a sheet must be drawn or someone paints the tile (stack_merge(), base_merge()).
Arguments:
- cached: list(the stack's key, its graffiti_art_glow_kind()), from SSgraffiti's stack_cache.
Returns:
- TRUE/FALSE: Whether it took them. A malformed entry is left for refresh() to merge instead.
apply_icon
Shows the merged stack from its sheet, or from an icon of its own when no sheet holds it.
Arguments:
- decoded: The merged stack's graffiti_art_decode(), when the caller has it.
base_merge
Returns every piece of the stack but the top one merged, merging them again when the decal keeps no merge of them.
Returns:
- list: The merged art.
- null: Nothing shows beneath the top piece.
check_window
Goes for good once its window has left the tile, as it would with its wall. Unfastening the window alone keeps it.
Arguments:
- window: The window it was made on.
examine
Says it is graffiti, whether it outlasts the shift, and whether older graffiti still shows beneath its top piece. Pieces' names and descriptions stay in their painters' libraries.
Arguments:
- user: The examining mob.
Returns:
- list: The examine lines.
refresh
Merges the stack again after it changed, then shows it.
Only the top piece is merged over the cached merge of the ones beneath, unless full asks for the whole stack, as a
change below the top needs, or no merge of them is kept. The merge comes decoded, so its glow and icons never decode
it again.
While the map loads, the arts come decoded from SSgraffiti's decoded as far as it keeps them, and it keeps the merge
decoded for its sheet while its budget allows. Nobody paints during the load, so only the whole stack's merge is kept,
for the sheet.
Arguments:
- full: Whether the pieces beneath the top one changed.
- deferred: Whether to leave the icon for SSgraffiti.build_sheets() to set.
- top_record: The top piece's art decoded, when the caller has it, as a painter's composite does.
release_merges
Lets go of the stack's merges once nobody paints on the tile: they are made again for the next painter, and what the decal shows stays.
remove_placement
Takes a placement off the stack, and the decal off its tile once nothing is left.
Arguments:
- packed: The placement, packed as SSgraffiti keeps it.
- deferred: Whether to leave the merge for the caller, which refreshes once it has removed everything.
stack_arts
Returns the art of each piece in the stack that the registry still holds art for.
Arguments:
- hashes: When given, filled with the hash of each art returned, in the same order.
Returns:
- list: The arts, bottom to top.
stack_merge
Returns the whole stack merged, as the decal shows it, merging it again when the decal keeps no merge of it.
Returns:
- list: The merged art.
- null: The decal shows nothing.
stack_signature
Returns the stack's signature: its pieces' art hashes, bottom first, under which the map file caches its merge's key and glow kind.
Returns:
- text: The signature.
update_overlays
Lights the glowing paint and lets the rest block the glow of whatever lies beneath.
Returns:
- list: The overlays.
window_gone
Goes for good with the window it is on, as it would with its wall.
Arguments:
- source: The window, being deleted.
window_moved
Checks whether its window left the tile once the move is over: a shuttle moves the decal after its window.
Arguments:
- source: The window.
window_washed
Washes off with its window.
Arguments:
- source: The window.
- clean_types: The CLEAN_TYPE_ flags the window is washed with.
Returns:
- The decal's wash() flags, which the window's wash() reports.