sticker ![code/datums/components/sticker.dm 7](git.png)
Sticker component
Component that draws supplied atom's icon over parent object with specified offset, icon centering is handled inside.
Vars | |
examine_text | Text added to the atom's examine when stickered. |
---|---|
listening_turf | Either turf or null , used to connect to COMSIG_TURF_EXPOSE signal when parent is a turf. |
our_sticker | Refernce to a "stickered" atom. |
peel_callback | Callback invoked when sticker is peeled (not removed) from the parent. |
stick_callback | Callback invoked when sticker is applied to the parent. |
sticker_overlay | Reference to the created overlay, used during component deletion. |
Procs | |
peel | Moves stickered atom from the nullspace, deletes component. |
register_turf_signals | Subscribes to COMSIG_TURF_EXPOSE if parent atom is a turf. If turf is closed - subscribes to signal |
stick | Handles overlay creation from supplied atom, adds created icon to the parent object, moves source atom to the nullspace. |
unregister_turf_signals | Unsubscribes from COMSIG_TURF_EXPOSE if listening_turf is not null . |
Var Details
examine_text ![code/datums/components/sticker.dm 23](git.png)
Text added to the atom's examine when stickered.
listening_turf ![code/datums/components/sticker.dm 11](git.png)
Either turf
or null
, used to connect to COMSIG_TURF_EXPOSE
signal when parent is a turf.
our_sticker ![code/datums/components/sticker.dm 13](git.png)
Refernce to a "stickered" atom.
peel_callback ![code/datums/components/sticker.dm 19](git.png)
Callback invoked when sticker is peeled (not removed) from the parent.
stick_callback ![code/datums/components/sticker.dm 17](git.png)
Callback invoked when sticker is applied to the parent.
sticker_overlay ![code/datums/components/sticker.dm 15](git.png)
Reference to the created overlay, used during component deletion.
Proc Details
peel
Moves stickered atom from the nullspace, deletes component.
register_turf_signals
Subscribes to COMSIG_TURF_EXPOSE
if parent atom is a turf. If turf is closed - subscribes to signal
stick
Handles overlay creation from supplied atom, adds created icon to the parent object, moves source atom to the nullspace.
unregister_turf_signals
Unsubscribes from COMSIG_TURF_EXPOSE
if listening_turf
is not null
.