mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
[MDB Ignore] [IDB Ignore] Kills off /obj/item/device (#21774)
This has zero reason to exist in our code base. We have no procs or variables tied to this. I removed it to make future modifications cleaner. --------- Signed-off-by: Cody Brittain <1779662+Generalcamo@users.noreply.github.com>
This commit is contained in:
@@ -5,9 +5,9 @@ Sound player -- used to apply modification to all sounds emitted. Represents the
|
||||
further modify sound more you'd start from here)
|
||||
Synthesized Song - just like /datum/song it's what parses and plays a melody
|
||||
---
|
||||
Real instruments inherit from either /obj/structure/synthesized_instrument (static musical instrument) or /obj/item/device/synthesized_instrument (handheld musical instrument)
|
||||
Real instruments inherit from either /obj/structure/synthesized_instrument (static musical instrument) or /obj/item/synthesized_instrument (handheld musical instrument)
|
||||
---
|
||||
Virtual instruments all inherit from /datum/instrument.
|
||||
Virtual instruments all inherit from /datum/instrument.
|
||||
Virtual instruments should follow this structure: /datum/instrument/category_name/instrument_name.
|
||||
|
||||
Refer to any file in ./instrument_data to see how it's done.
|
||||
@@ -15,4 +15,4 @@ Refer to any file in ./instrument_data to see how it's done.
|
||||
Sound player inherits from /datum/sound_player
|
||||
---
|
||||
For synthesized song only use /datum/synthesized_song
|
||||
---
|
||||
---
|
||||
|
||||
@@ -262,14 +262,14 @@
|
||||
////////////////////////
|
||||
|
||||
|
||||
/obj/item/device/synthesized_instrument
|
||||
/obj/item/synthesized_instrument
|
||||
var/datum/real_instrument/real_instrument
|
||||
icon = 'icons/obj/musician.dmi'
|
||||
var/list/datum/instrument/instruments = list()
|
||||
var/path = /datum/instrument
|
||||
var/sound_player = /datum/sound_player
|
||||
|
||||
/obj/item/device/synthesized_instrument/Initialize()
|
||||
/obj/item/synthesized_instrument/Initialize()
|
||||
. = ..()
|
||||
for (var/type in typesof(path))
|
||||
var/datum/instrument/new_instrument = new type
|
||||
@@ -278,7 +278,7 @@
|
||||
src.instruments[new_instrument.name] = new_instrument
|
||||
src.real_instrument = new /datum/real_instrument(src, new sound_player(src, instruments[pick(instruments)]), instruments)
|
||||
|
||||
/obj/item/device/synthesized_instrument/Destroy()
|
||||
/obj/item/synthesized_instrument/Destroy()
|
||||
QDEL_NULL(src.real_instrument)
|
||||
if (islist(instruments))
|
||||
var/list/as_list = instruments
|
||||
@@ -288,23 +288,23 @@
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/item/device/synthesized_instrument/attack_self(mob/user as mob)
|
||||
/obj/item/synthesized_instrument/attack_self(mob/user as mob)
|
||||
src.interact(user)
|
||||
|
||||
|
||||
/obj/item/device/synthesized_instrument/interact(mob/user) // CONDITIONS ..(user) that shit in subclasses
|
||||
/obj/item/synthesized_instrument/interact(mob/user) // CONDITIONS ..(user) that shit in subclasses
|
||||
src.ui_interact(user)
|
||||
|
||||
|
||||
/obj/item/device/synthesized_instrument/ui_interact(mob/user, ui_key = "instrument", datum/nanoui/ui = null, force_open = 0)
|
||||
/obj/item/synthesized_instrument/ui_interact(mob/user, ui_key = "instrument", datum/nanoui/ui = null, force_open = 0)
|
||||
if (real_instrument)
|
||||
real_instrument.ui_call(user,ui_key,ui,force_open)
|
||||
|
||||
|
||||
/obj/item/device/synthesized_instrument/proc/shouldStopPlaying(mob/user)
|
||||
/obj/item/synthesized_instrument/proc/shouldStopPlaying(mob/user)
|
||||
return !(src && in_range(src, user))
|
||||
|
||||
/obj/item/device/synthesized_instrument/Topic(href, href_list)
|
||||
/obj/item/synthesized_instrument/Topic(href, href_list)
|
||||
if (..())
|
||||
return 1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/device/synthesized_instrument/guitar
|
||||
/obj/item/synthesized_instrument/guitar
|
||||
name = "guitar"
|
||||
desc = "A wooden musical instrument with six strings. This one looks like it may actually work."
|
||||
icon = 'icons/obj/musician.dmi'
|
||||
@@ -9,7 +9,7 @@
|
||||
path = /datum/instrument/guitar/clean_crisis
|
||||
|
||||
|
||||
/obj/item/device/synthesized_instrument/guitar/multi
|
||||
/obj/item/synthesized_instrument/guitar/multi
|
||||
name = "Polyguitar"
|
||||
desc = "An instrument for a more ass-kicking era."
|
||||
icon = 'icons/obj/musician.dmi'
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
//in-hand version
|
||||
/obj/item/device/synthesized_instrument/synthesizer
|
||||
/obj/item/synthesized_instrument/synthesizer
|
||||
name = "Synthesizer Mini"
|
||||
desc = "The power of an entire orchestra in a handy midi keyboard format."
|
||||
icon_state = "h_synthesizer"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/device/synthesized_instrument/trumpet
|
||||
/obj/item/synthesized_instrument/trumpet
|
||||
name = "Omnitrumpet"
|
||||
desc = "The Omnitrumptet series 400 with more than 30 sound samples and fully customizable high fidelity output provides the ultimate means to toot your own horn."
|
||||
icon_state = "trumpet"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
range = 10 //Kinda don't want this horrible thing to be heard from far away
|
||||
|
||||
// This is based on an obsolete violin implementation, but we don't have anything better to use
|
||||
/obj/item/device/synthesized_instrument/violin
|
||||
/obj/item/synthesized_instrument/violin
|
||||
name = "violin"
|
||||
desc = "A wooden musical instrument with four strings and a bow, it is quite old"
|
||||
icon = 'icons/obj/musician.dmi'
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
/datum/sound_player/proc/shouldStopPlaying(mob/user)
|
||||
var/obj/structure/synthesized_instrument/S = actual_instrument
|
||||
var/obj/item/device/synthesized_instrument/D = actual_instrument
|
||||
var/obj/item/synthesized_instrument/D = actual_instrument
|
||||
if(istype(S))
|
||||
return S.shouldStopPlaying(user)
|
||||
if(istype(D))
|
||||
|
||||
Reference in New Issue
Block a user