mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-22 05:17:38 +01:00
7d058fc613
V2 of [previous music playing PR](https://github.com/Aurorastation/Aurora.3/pull/21466). TLDR no longer uses the connect_range component for implementation because it turned out a bit too inflexible for overlapping music players. Removes a NanoUI template for the [TGUI update](https://github.com/Aurorastation/Aurora.3/pull/21046). New changelog: - refactor: "Ported Jukebox's NanoUI interface to TGUI." - refactor: "Ported Jukebox audio playing functionality to a component." - refactor: "Sound keys refactored from singletons to datums, along with larger breakout of sound.dm to allow for easier SFX updates in future." - code_imp: "Expanded track datums to include track lengths." - code_imp: "Reorganized music file folders for more intuitive access." - rscadd: "Earphone status feedback text now includes track length." - rscadd: "Added autoplay functionality to earphones." - bugfix: "Fixed earphones' 'Previous Song' verb not sending you to the end of the playlist when used while the first track is selected." - bugfix: "Fixed gain adjustment for 'Konyang-1' (-23 dB -> standard -9.8 dB)." - bugfix: "Fixed y-offset of audioconsole-running overlay animation to line up with the actual screen." --------- Co-authored-by: VMSolidus <evilexecutive@gmail.com>
58 lines
2.0 KiB
Plaintext
58 lines
2.0 KiB
Plaintext
/obj/item/base_planning_blueprints
|
|
name = "base planning schematics"
|
|
desc = "A blueprint, detailing the structure plans for off-site operations."
|
|
icon = 'icons/obj/item/base_planning_blueprints.dmi'
|
|
icon_state = "blueprints"
|
|
attack_verb = list("attacked", "bapped", "hit")
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
drop_sound = 'sound/items/drop/wrapper.ogg'
|
|
pickup_sound = 'sound/items/pickup/wrapper.ogg'
|
|
|
|
/// Whether the object is folded or not.
|
|
var/folded = TRUE
|
|
/// Z-levels that this object not allowed to function at, mainship Z-levels by default.
|
|
var/list/invalid_z_levels = list()
|
|
|
|
/obj/item/base_planning_blueprints/mechanics_hints()
|
|
. += ..()
|
|
. += "You can Alt-Click this item on a table to unfold it."
|
|
. += "These schematics can be used to plan away base structures, comes with pre-made room templates."
|
|
|
|
/obj/item/base_planning_blueprints/Initialize()
|
|
. = ..()
|
|
return INITIALIZE_HINT_LATELOAD
|
|
|
|
/obj/item/base_planning_blueprints/LateInitialize()
|
|
invalid_z_levels = SSmapping.levels_by_trait(ZTRAIT_STATION)
|
|
AddComponent(/datum/component/eye/base_planner)
|
|
|
|
/obj/item/base_planning_blueprints/AltClick(mob/user)
|
|
if(folded)
|
|
if(loc == user || !locate(/obj/structure/table) in get_turf(src))
|
|
to_chat(user, SPAN_WARNING("\The [src] needs to be placed on top of a table in order to be unfolded!"))
|
|
return
|
|
|
|
folded = FALSE
|
|
anchored = TRUE
|
|
icon_state = "blueprints_unfolded"
|
|
else
|
|
folded = TRUE
|
|
anchored = FALSE
|
|
icon_state = "blueprints"
|
|
|
|
playsound(loc, 'sound/items/bureaucracy/paperfold.ogg', 50, TRUE)
|
|
|
|
/obj/item/base_planning_blueprints/attack_hand(mob/user)
|
|
if(folded)
|
|
return ..()
|
|
|
|
if(user.z in invalid_z_levels)
|
|
to_chat(user, SPAN_WARNING("Upon inspection, these schematics contain only groundside architectural designs, which aren't useful for your whereabouts!"))
|
|
return
|
|
|
|
var/datum/component/eye/blueprints = GetComponent(/datum/component/eye)
|
|
if(blueprints)
|
|
if(blueprints.look(user))
|
|
to_chat(user, SPAN_NOTICE("You lean forward, inspecting \the [src] attentively."))
|
|
return
|