Sticker packs/Chief Engineer sticker (#86154)

## About The Pull Request

- Changes sticker container from a generic box to a specialised 'sticker
pack' with label
- Adds a Chief Engineer seal of approval sticker


![image](https://github.com/user-attachments/assets/7b1d8789-6a06-46ec-a2a3-be4272eb5268)

## Why It's Good For The Game

The CE can now quell crew concerns about machinery they find in the
hallway

Before:


![ce_sticker_1](https://github.com/user-attachments/assets/0e7c1752-743f-4b6a-8e5c-8627a3f11d82)

After:


![ce_sticker_2](https://github.com/user-attachments/assets/82f74a09-f007-45ad-8dcd-f70840681ba6)

## Changelog

🆑 LT3
add: Added Chief Engineer SEAL OF APPROVAL sticker
code: Stickers now come in sticker packs, not boxes
code: Stickers can now add examine text to whatever they're stuck on
/🆑
This commit is contained in:
lessthanthree
2024-09-04 12:22:47 +02:00
committed by GitHub
parent 12404cc169
commit d1a37bd047
10 changed files with 81 additions and 31 deletions
+14 -4
View File
@@ -13,18 +13,21 @@
var/atom/movable/our_sticker
/// Reference to the created overlay, used during component deletion.
var/mutable_appearance/sticker_overlay
// Callback invoked when sticker is applied to the parent.
/// Callback invoked when sticker is applied to the parent.
var/datum/callback/stick_callback
// Callback invoked when sticker is peeled (not removed) from the parent.
/// Callback invoked when sticker is peeled (not removed) from the parent.
var/datum/callback/peel_callback
/// Text added to the atom's examine when stickered.
var/examine_text
/datum/component/sticker/Initialize(atom/stickering_atom, dir = NORTH, px = 0, py = 0, datum/callback/stick_callback, datum/callback/peel_callback)
/datum/component/sticker/Initialize(atom/stickering_atom, dir = NORTH, px = 0, py = 0, datum/callback/stick_callback, datum/callback/peel_callback, examine_text)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
src.our_sticker = our_sticker
src.stick_callback = stick_callback
src.peel_callback = peel_callback
src.examine_text = examine_text
stick(stickering_atom, px, py)
register_turf_signals(dir)
@@ -45,9 +48,10 @@
/datum/component/sticker/RegisterWithParent()
RegisterSignal(parent, COMSIG_LIVING_IGNITED, PROC_REF(on_ignite))
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(on_clean))
RegisterSignal(parent, COMSIG_ATOM_EXAMINE, PROC_REF(on_examine))
/datum/component/sticker/UnregisterFromParent()
UnregisterSignal(parent, list(COMSIG_LIVING_IGNITED, COMSIG_COMPONENT_CLEAN_ACT))
UnregisterSignal(parent, list(COMSIG_LIVING_IGNITED, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_ATOM_EXAMINE))
/// Subscribes to `COMSIG_TURF_EXPOSE` if parent atom is a turf. If turf is closed - subscribes to signal
/datum/component/sticker/proc/register_turf_signals(dir)
@@ -116,3 +120,9 @@
if(exposed_temperature >= FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
qdel(our_sticker) // which qdels us
/datum/component/sticker/proc/on_examine(atom/source, mob/user, list/examine_list)
SIGNAL_HANDLER
if(!isnull(examine_text))
examine_list += span_warning(examine_text)