mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
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  ## Why It's Good For The Game The CE can now quell crew concerns about machinery they find in the hallway Before:  After:  ## 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user