diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm
index 2bfbed9681c..de5d9c1372e 100644
--- a/code/ZAS/Variable Settings.dm
+++ b/code/ZAS/Variable Settings.dm
@@ -169,7 +169,7 @@ var/global/vs_control/vsc = new
vars[ch] = vw
if(how == "Toggle")
newvar = (newvar?"ON":"OFF")
- world << "[key_name(user)] changed the setting [display_description] to [newvar]."
+ to_chat(world, "[key_name(user)] changed the setting [display_description] to [newvar].")
if(ch in plc.settings)
ChangeSettingsDialog(user,plc.settings)
else
diff --git a/code/__DEFINES/instruments.dm b/code/__DEFINES/instruments.dm
index a63b0ff7747..3c414f87f43 100644
--- a/code/__DEFINES/instruments.dm
+++ b/code/__DEFINES/instruments.dm
@@ -1,29 +1,29 @@
-#define INSTRUMENT_MIN_OCTAVE 1
-#define INSTRUMENT_MAX_OCTAVE 9
-#define INSTRUMENT_MIN_KEY 0
-#define INSTRUMENT_MAX_KEY 127
-
-/// Max number of playing notes per instrument.
-#define CHANNELS_PER_INSTRUMENT 128
-
-/// Distance multiplier that makes us not be impacted by 3d sound as much. This is a multiplier so lower it is the closer we will pretend to be to people.
-#define INSTRUMENT_DISTANCE_FALLOFF_BUFF 0.2
-/// How many tiles instruments have no falloff for
-#define INSTRUMENT_DISTANCE_NO_FALLOFF 3
-
-/// Maximum length a note should ever go for
-#define INSTRUMENT_MAX_TOTAL_SUSTAIN (5 SECONDS)
-
-/// These are per decisecond.
-#define INSTRUMENT_EXP_FALLOFF_MIN 1.025 //100/(1.025^50) calculated for [INSTRUMENT_MIN_SUSTAIN_DROPOFF] to be 30.
-#define INSTRUMENT_EXP_FALLOFF_MAX 10
-
-/// Minimum volume for when the sound is considered dead.
-#define INSTRUMENT_MIN_SUSTAIN_DROPOFF 0
-
-#define SUSTAIN_LINEAR 1
-#define SUSTAIN_EXPONENTIAL 2
-
-// /datum/instrument instrument_flags
-#define INSTRUMENT_LEGACY (1<<0) //Legacy instrument. Implies INSTRUMENT_DO_NOT_AUTOSAMPLE
-#define INSTRUMENT_DO_NOT_AUTOSAMPLE (1<<1) //Do not automatically sample
+#define INSTRUMENT_MIN_OCTAVE 1
+#define INSTRUMENT_MAX_OCTAVE 9
+#define INSTRUMENT_MIN_KEY 0
+#define INSTRUMENT_MAX_KEY 127
+
+/// Max number of playing notes per instrument.
+#define CHANNELS_PER_INSTRUMENT 128
+
+/// Distance multiplier that makes us not be impacted by 3d sound as much. This is a multiplier so lower it is the closer we will pretend to be to people.
+#define INSTRUMENT_DISTANCE_FALLOFF_BUFF 0.2
+/// How many tiles instruments have no falloff for
+#define INSTRUMENT_DISTANCE_NO_FALLOFF 3
+
+/// Maximum length a note should ever go for
+#define INSTRUMENT_MAX_TOTAL_SUSTAIN (5 SECONDS)
+
+/// These are per decisecond.
+#define INSTRUMENT_EXP_FALLOFF_MIN 1.025 //100/(1.025^50) calculated for [INSTRUMENT_MIN_SUSTAIN_DROPOFF] to be 30.
+#define INSTRUMENT_EXP_FALLOFF_MAX 10
+
+/// Minimum volume for when the sound is considered dead.
+#define INSTRUMENT_MIN_SUSTAIN_DROPOFF 0
+
+#define SUSTAIN_LINEAR 1
+#define SUSTAIN_EXPONENTIAL 2
+
+// /datum/instrument instrument_flags
+#define INSTRUMENT_LEGACY (1<<0) //Legacy instrument. Implies INSTRUMENT_DO_NOT_AUTOSAMPLE
+#define INSTRUMENT_DO_NOT_AUTOSAMPLE (1<<1) //Do not automatically sample
diff --git a/code/__DEFINES/storage.dm b/code/__DEFINES/storage.dm
index 7a44f1ec3bf..25799e979c9 100644
--- a/code/__DEFINES/storage.dm
+++ b/code/__DEFINES/storage.dm
@@ -1,9 +1,9 @@
-// Defines related to item storage goes here.
-
-//ITEM INVENTORY WEIGHT, FOR w_class
-#define WEIGHT_CLASS_TINY 1 //Usually items smaller then a human hand, ex: Playing Cards, Lighter, Scalpel, Coins/Money
-#define WEIGHT_CLASS_SMALL 2 //Pockets can hold small and tiny items, ex: Flashlight, Multitool, Grenades, GPS Device
-#define WEIGHT_CLASS_NORMAL 3 //Standard backpacks can carry tiny, small & normal items, ex: Fire extinguisher, Stunbaton, Gas Mask, Metal Sheets
-#define WEIGHT_CLASS_BULKY 4 //Items that can be weilded or equipped but not stored in a normal bag, ex: Defibrillator, Backpack, Space Suits
-#define WEIGHT_CLASS_HUGE 5 //Usually represents objects that require two hands to operate, ex: Shotgun, Two Handed Melee Weapons - Can not fit in Boh
-#define WEIGHT_CLASS_GIGANTIC 6 //Essentially means it cannot be picked up or placed in an inventory, ex: Mech Parts, Safe - Can not fit in Boh
+// Defines related to item storage goes here.
+
+//ITEM INVENTORY WEIGHT, FOR w_class
+#define WEIGHT_CLASS_TINY 1 //Usually items smaller then a human hand, ex: Playing Cards, Lighter, Scalpel, Coins/Money
+#define WEIGHT_CLASS_SMALL 2 //Pockets can hold small and tiny items, ex: Flashlight, Multitool, Grenades, GPS Device
+#define WEIGHT_CLASS_NORMAL 3 //Standard backpacks can carry tiny, small & normal items, ex: Fire extinguisher, Stunbaton, Gas Mask, Metal Sheets
+#define WEIGHT_CLASS_BULKY 4 //Items that can be weilded or equipped but not stored in a normal bag, ex: Defibrillator, Backpack, Space Suits
+#define WEIGHT_CLASS_HUGE 5 //Usually represents objects that require two hands to operate, ex: Shotgun, Two Handed Melee Weapons - Can not fit in Boh
+#define WEIGHT_CLASS_GIGANTIC 6 //Essentially means it cannot be picked up or placed in an inventory, ex: Mech Parts, Safe - Can not fit in Boh
diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm
index df3fffa19fe..8ef81a64961 100644
--- a/code/_onclick/hud/robot.dm
+++ b/code/_onclick/hud/robot.dm
@@ -223,11 +223,11 @@ var/obj/screen/robot_inventory
//r.client.screen += robot_inventory //"store" icon
if(!r.module)
- usr << "No module selected"
+ to_chat(usr, "No module selected")
return
if(!r.module.modules)
- usr << "Selected module has no modules to select"
+ to_chat(usr, "Selected module has no modules to select")
return
if(!r.robot_modules_background)
diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm
index 7b36272fbe5..860c1a9ab8c 100644
--- a/code/_onclick/telekinesis.dm
+++ b/code/_onclick/telekinesis.dm
@@ -110,7 +110,7 @@ var/const/tk_maxrange = 15
if(focus)
d = max(d, get_dist(user, focus)) // whichever is further
if(d > tk_maxrange)
- user << "Your mind won't reach that far."
+ to_chat(user, "Your mind won't reach that far.")
return
if(!focus)
diff --git a/code/controllers/subsystems/processing/instruments.dm b/code/controllers/subsystems/processing/instruments.dm
index 186c469e664..a4e0d7703f0 100644
--- a/code/controllers/subsystems/processing/instruments.dm
+++ b/code/controllers/subsystems/processing/instruments.dm
@@ -1,43 +1,43 @@
-PROCESSING_SUBSYSTEM_DEF(instruments)
- name = "Instruments"
- wait = 0.5
- init_order = INIT_ORDER_INSTRUMENTS
- flags = SS_KEEP_TIMING
- priority = FIRE_PRIORITY_INSTRUMENTS
- var/static/list/datum/instrument/instrument_data = list() //id = datum
- var/static/list/datum/song/songs = list()
- var/static/musician_maxlines = 600
- var/static/musician_maxlinechars = 300
- var/static/musician_hearcheck_mindelay = 5
- var/static/max_instrument_channels = MAX_INSTRUMENT_CHANNELS
- var/static/current_instrument_channels = 0
-
-/datum/controller/subsystem/processing/instruments/Initialize()
- initialize_instrument_data()
- return ..()
-
-/datum/controller/subsystem/processing/instruments/proc/on_song_new(datum/song/S)
- songs += S
-
-/datum/controller/subsystem/processing/instruments/proc/on_song_del(datum/song/S)
- songs -= S
-
-/datum/controller/subsystem/processing/instruments/proc/initialize_instrument_data()
- for(var/path in subtypesof(/datum/instrument))
- var/datum/instrument/I = path
- if(initial(I.abstract_type) == path)
- continue
- I = new path
- I.Initialize()
- instrument_data[I.id || "[I.type]"] = I
- CHECK_TICK
-
-/datum/controller/subsystem/processing/instruments/proc/get_instrument(id_or_path)
- return instrument_data["[id_or_path]"]
-
-/datum/controller/subsystem/processing/instruments/proc/reserve_instrument_channel(datum/instrument/I)
- if(current_instrument_channels > max_instrument_channels)
- return
- . = SSsounds.reserve_sound_channel(I)
- if(!isnull(.))
- current_instrument_channels++
+PROCESSING_SUBSYSTEM_DEF(instruments)
+ name = "Instruments"
+ wait = 0.5
+ init_order = INIT_ORDER_INSTRUMENTS
+ flags = SS_KEEP_TIMING
+ priority = FIRE_PRIORITY_INSTRUMENTS
+ var/static/list/datum/instrument/instrument_data = list() //id = datum
+ var/static/list/datum/song/songs = list()
+ var/static/musician_maxlines = 600
+ var/static/musician_maxlinechars = 300
+ var/static/musician_hearcheck_mindelay = 5
+ var/static/max_instrument_channels = MAX_INSTRUMENT_CHANNELS
+ var/static/current_instrument_channels = 0
+
+/datum/controller/subsystem/processing/instruments/Initialize()
+ initialize_instrument_data()
+ return ..()
+
+/datum/controller/subsystem/processing/instruments/proc/on_song_new(datum/song/S)
+ songs += S
+
+/datum/controller/subsystem/processing/instruments/proc/on_song_del(datum/song/S)
+ songs -= S
+
+/datum/controller/subsystem/processing/instruments/proc/initialize_instrument_data()
+ for(var/path in subtypesof(/datum/instrument))
+ var/datum/instrument/I = path
+ if(initial(I.abstract_type) == path)
+ continue
+ I = new path
+ I.Initialize()
+ instrument_data[I.id || "[I.type]"] = I
+ CHECK_TICK
+
+/datum/controller/subsystem/processing/instruments/proc/get_instrument(id_or_path)
+ return instrument_data["[id_or_path]"]
+
+/datum/controller/subsystem/processing/instruments/proc/reserve_instrument_channel(datum/instrument/I)
+ if(current_instrument_channels > max_instrument_channels)
+ return
+ . = SSsounds.reserve_sound_channel(I)
+ if(!isnull(.))
+ current_instrument_channels++
diff --git a/code/controllers/subsystems/sounds.dm b/code/controllers/subsystems/sounds.dm
index 1b3c590607b..5e7c5e65457 100644
--- a/code/controllers/subsystems/sounds.dm
+++ b/code/controllers/subsystems/sounds.dm
@@ -1,91 +1,91 @@
-#define DATUMLESS "NO_DATUM"
-
-SUBSYSTEM_DEF(sounds)
- name = "Sounds"
- flags = SS_NO_FIRE
- init_order = INIT_ORDER_SOUNDS
- var/static/using_channels_max = CHANNEL_HIGHEST_AVAILABLE //BYOND max channels
-
- // Hey uh these two needs to be initialized fast because the whole "things get deleted before init" thing.
- /// Assoc list, "[channel]" = either the datum using it or TRUE for an unsafe-reserved (datumless reservation) channel
- var/list/using_channels = list()
- /// Assoc list datum = list(channel1, channel2, ...) for what channels something reserved.
- var/list/using_channels_by_datum = list()
- /// List of all available channels with associations set to TRUE for fast lookups/allocation.
- var/list/available_channels
-
-/datum/controller/subsystem/sounds/Initialize()
- setup_available_channels()
- return ..()
-
-/datum/controller/subsystem/sounds/proc/setup_available_channels()
- available_channels = list()
- for(var/i in 1 to using_channels_max)
- available_channels[num2text(i)] = TRUE
-
-/// Removes a channel from using list.
-/datum/controller/subsystem/sounds/proc/free_sound_channel(channel)
- channel = num2text(channel)
- var/using = using_channels[channel]
- using_channels -= channel
- if(using)
- using_channels_by_datum[using] -= channel
- if(!length(using_channels_by_datum[using]))
- using_channels_by_datum -= using
- available_channels[channel] = TRUE
-
-/// Frees all the channels a datum is using.
-/datum/controller/subsystem/sounds/proc/free_datum_channels(datum/D)
- var/list/L = using_channels_by_datum[D]
- if(!L)
- return
- for(var/channel in L)
- using_channels -= channel
- available_channels[channel] = TRUE
- using_channels_by_datum -= D
-
-/// Frees all datumless channels
-/datum/controller/subsystem/sounds/proc/free_datumless_channels()
- free_datum_channels(DATUMLESS)
-
-/// NO AUTOMATIC CLEANUP - If you use this, you better manually free it later! Returns an integer for channel.
-/datum/controller/subsystem/sounds/proc/reserve_sound_channel_datumless()
- var/channel = random_available_channel_text()
- if(!channel) //oh no..
- return FALSE
- available_channels -= channel
- using_channels[channel] = DATUMLESS
- LAZYINITLIST(using_channels_by_datum[DATUMLESS])
- using_channels_by_datum[DATUMLESS] += channel
- return text2num(channel)
-
-/// Reserves a channel for a datum. Automatic cleanup only when the datum is deleted. Returns an integer for channel.
-/datum/controller/subsystem/sounds/proc/reserve_sound_channel(datum/D)
- if(!D) //i don't like typechecks but someone will fuck it up
- CRASH("Attempted to reserve sound channel without datum using the managed proc.")
- var/channel = random_available_channel_text()
- if(!channel)
- return FALSE
- available_channels -= channel
- using_channels[channel] = D
- LAZYINITLIST(using_channels_by_datum[D])
- using_channels_by_datum[D] += channel
- return text2num(channel)
-
-/// Random available channel, returns text.
-/datum/controller/subsystem/sounds/proc/random_available_channel_text()
- return pick(available_channels)
-
-/// Random available channel, returns number
-/datum/controller/subsystem/sounds/proc/random_available_channel()
- return text2num(pick(available_channels))
-
-/// If a channel is available
-/datum/controller/subsystem/sounds/proc/is_channel_available(channel)
- return available_channels[num2text(channel)]
-
-/// How many channels we have left.
-/datum/controller/subsystem/sounds/proc/available_channels_left()
- return length(available_channels)
-
-#undef DATUMLESS
+#define DATUMLESS "NO_DATUM"
+
+SUBSYSTEM_DEF(sounds)
+ name = "Sounds"
+ flags = SS_NO_FIRE
+ init_order = INIT_ORDER_SOUNDS
+ var/static/using_channels_max = CHANNEL_HIGHEST_AVAILABLE //BYOND max channels
+
+ // Hey uh these two needs to be initialized fast because the whole "things get deleted before init" thing.
+ /// Assoc list, "[channel]" = either the datum using it or TRUE for an unsafe-reserved (datumless reservation) channel
+ var/list/using_channels = list()
+ /// Assoc list datum = list(channel1, channel2, ...) for what channels something reserved.
+ var/list/using_channels_by_datum = list()
+ /// List of all available channels with associations set to TRUE for fast lookups/allocation.
+ var/list/available_channels
+
+/datum/controller/subsystem/sounds/Initialize()
+ setup_available_channels()
+ return ..()
+
+/datum/controller/subsystem/sounds/proc/setup_available_channels()
+ available_channels = list()
+ for(var/i in 1 to using_channels_max)
+ available_channels[num2text(i)] = TRUE
+
+/// Removes a channel from using list.
+/datum/controller/subsystem/sounds/proc/free_sound_channel(channel)
+ channel = num2text(channel)
+ var/using = using_channels[channel]
+ using_channels -= channel
+ if(using)
+ using_channels_by_datum[using] -= channel
+ if(!length(using_channels_by_datum[using]))
+ using_channels_by_datum -= using
+ available_channels[channel] = TRUE
+
+/// Frees all the channels a datum is using.
+/datum/controller/subsystem/sounds/proc/free_datum_channels(datum/D)
+ var/list/L = using_channels_by_datum[D]
+ if(!L)
+ return
+ for(var/channel in L)
+ using_channels -= channel
+ available_channels[channel] = TRUE
+ using_channels_by_datum -= D
+
+/// Frees all datumless channels
+/datum/controller/subsystem/sounds/proc/free_datumless_channels()
+ free_datum_channels(DATUMLESS)
+
+/// NO AUTOMATIC CLEANUP - If you use this, you better manually free it later! Returns an integer for channel.
+/datum/controller/subsystem/sounds/proc/reserve_sound_channel_datumless()
+ var/channel = random_available_channel_text()
+ if(!channel) //oh no..
+ return FALSE
+ available_channels -= channel
+ using_channels[channel] = DATUMLESS
+ LAZYINITLIST(using_channels_by_datum[DATUMLESS])
+ using_channels_by_datum[DATUMLESS] += channel
+ return text2num(channel)
+
+/// Reserves a channel for a datum. Automatic cleanup only when the datum is deleted. Returns an integer for channel.
+/datum/controller/subsystem/sounds/proc/reserve_sound_channel(datum/D)
+ if(!D) //i don't like typechecks but someone will fuck it up
+ CRASH("Attempted to reserve sound channel without datum using the managed proc.")
+ var/channel = random_available_channel_text()
+ if(!channel)
+ return FALSE
+ available_channels -= channel
+ using_channels[channel] = D
+ LAZYINITLIST(using_channels_by_datum[D])
+ using_channels_by_datum[D] += channel
+ return text2num(channel)
+
+/// Random available channel, returns text.
+/datum/controller/subsystem/sounds/proc/random_available_channel_text()
+ return pick(available_channels)
+
+/// Random available channel, returns number
+/datum/controller/subsystem/sounds/proc/random_available_channel()
+ return text2num(pick(available_channels))
+
+/// If a channel is available
+/datum/controller/subsystem/sounds/proc/is_channel_available(channel)
+ return available_channels[num2text(channel)]
+
+/// How many channels we have left.
+/datum/controller/subsystem/sounds/proc/available_channels_left()
+ return length(available_channels)
+
+#undef DATUMLESS
diff --git a/code/datums/locations/locations.dm b/code/datums/locations/locations.dm
index bc4365c716a..0e1a4e4795e 100644
--- a/code/datums/locations/locations.dm
+++ b/code/datums/locations/locations.dm
@@ -50,7 +50,7 @@ var/global/datum/locations/milky_way/all_locations = new()
for(var/datum/locations/a in contents)
world << "[a]\n[a.parent ? "Located in [a.parent]\n" : ""][a.desc]"
a.show_contents()
- world << "\n"
+ to_chat(world, "\n")
/datum/locations/proc/count_locations()
var/i = 0
diff --git a/code/game/antagonist/antagonist_add.dm b/code/game/antagonist/antagonist_add.dm
index 2a98d3fc67c..0bfabe18585 100644
--- a/code/game/antagonist/antagonist_add.dm
+++ b/code/game/antagonist/antagonist_add.dm
@@ -45,7 +45,7 @@
player.current << "You are \a [nonstandard_role_type]!"
player.special_role = nonstandard_role_type
if(nonstandard_role_msg)
- player.current << "[nonstandard_role_msg]"
+ to_chat(player.current, "[nonstandard_role_msg]")
update_icons_added(player)
return 1
diff --git a/code/game/area/Away Mission areas.dm b/code/game/area/Away Mission areas.dm
index 5d5f2c02d03..4b825e81a44 100644
--- a/code/game/area/Away Mission areas.dm
+++ b/code/game/area/Away Mission areas.dm
@@ -28,7 +28,7 @@
//Handles random flora placement for floracountmax, as defined/randomized in initialize of each individual area.
spawn_flora_on_turf()
- world << "Away mission spawning done."
+ to_chat(world, "Away mission spawning done.")
/area/awaymission/proc/spawn_mob_on_turf()
if(!valid_mobs.len)
diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm
index 72a571abf83..f3506cba7fb 100644
--- a/code/game/dna/genes/disabilities.dm
+++ b/code/game/dna/genes/disabilities.dm
@@ -35,7 +35,7 @@
if(sdisability)
M.sdisabilities|=sdisability
if(activation_message)
- M << "[activation_message]"
+ to_chat(M, "[activation_message]")
else
testing("[name] has no activation message.")
@@ -47,7 +47,7 @@
if(sdisability)
M.sdisabilities &= (~sdisability)
if(deactivation_message)
- M << "[deactivation_message]"
+ to_chat(M, "[deactivation_message]")
else
testing("[name] has no deactivation message.")
diff --git a/code/game/dna/genes/gene.dm b/code/game/dna/genes/gene.dm
index 3e18696f6b0..e52cd4e6c03 100644
--- a/code/game/dna/genes/gene.dm
+++ b/code/game/dna/genes/gene.dm
@@ -113,10 +113,10 @@
M.mutations.Add(mutation)
if(activation_messages.len)
var/msg = pick(activation_messages)
- M << "[msg]"
+ to_chat(M, "[msg]")
/datum/dna/gene/basic/deactivate(var/mob/M)
M.mutations.Remove(mutation)
if(deactivation_messages.len)
var/msg = pick(deactivation_messages)
- M << "[msg]"
+ to_chat(M, "[msg]")
diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm
index e6c6b6f4ec9..0693ffdd08e 100644
--- a/code/game/dna/genes/powers.dm
+++ b/code/game/dna/genes/powers.dm
@@ -171,7 +171,7 @@
if(M.health <= 25)
M.mutations.Remove(HULK)
M.update_mutations() //update our mutation overlays
- M << "You suddenly feel very weak."
+ to_chat(M, "You suddenly feel very weak.")
M.Weaken(3)
M.emote("collapse")
diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm
index 41f66fb4ec5..b3214e74d27 100644
--- a/code/game/gamemodes/changeling/modularchangling.dm
+++ b/code/game/gamemodes/changeling/modularchangling.dm
@@ -332,7 +332,7 @@ var/list/datum/power/changeling/powerinstances = list()
if(geneticpoints < Thepower.genomecost)
- M.current << "We cannot evolve this... yet. We must acquire more DNA."
+ to_chat(M.current, "We cannot evolve this... yet. We must acquire more DNA.")
return
geneticpoints -= Thepower.genomecost
diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
index c23e6721b04..8cda843b854 100644
--- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
+++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
@@ -30,7 +30,7 @@
C.see_in_dark = 8
C.dna.species.invis_sight = SEE_INVISIBLE_MINIMUM
else
- C << "Our vision dulls. Shadows gather."
+ to_chat(C, "Our vision dulls. Shadows gather.")
C.sight &= ~SEE_MOBS
C.permanent_sight_flags &= ~SEE_MOBS
C.see_in_dark = 0
diff --git a/code/game/gamemodes/changeling/powers/death_sting.dm b/code/game/gamemodes/changeling/powers/death_sting.dm
index 6dd0cdbf855..2eb1e476bd4 100644
--- a/code/game/gamemodes/changeling/powers/death_sting.dm
+++ b/code/game/gamemodes/changeling/powers/death_sting.dm
@@ -14,7 +14,7 @@
if(!T)
return 0
add_attack_logs(src,T,"Death sting (changeling)")
- T << "You feel a small prick and your chest becomes tight."
+ to_chat(T, "You feel a small prick and your chest becomes tight.")
T.silent = 10
T.Paralyse(10)
T.make_jittery(100)
diff --git a/code/game/gamemodes/changeling/powers/digital_camo.dm b/code/game/gamemodes/changeling/powers/digital_camo.dm
index 0dbee6b09d2..9574b465da7 100644
--- a/code/game/gamemodes/changeling/powers/digital_camo.dm
+++ b/code/game/gamemodes/changeling/powers/digital_camo.dm
@@ -19,9 +19,9 @@
var/mob/living/carbon/human/C = src
if(C.digitalcamo)
- C << "We return to normal."
+ to_chat(C, "We return to normal.")
else
- C << "We distort our form to prevent AI-tracking."
+ to_chat(C, "We distort our form to prevent AI-tracking.")
C.digitalcamo = !C.digitalcamo
spawn(0)
diff --git a/code/game/gamemodes/changeling/powers/para_sting.dm b/code/game/gamemodes/changeling/powers/para_sting.dm
index 7a0020bd0fb..c4d04dd7de6 100644
--- a/code/game/gamemodes/changeling/powers/para_sting.dm
+++ b/code/game/gamemodes/changeling/powers/para_sting.dm
@@ -13,7 +13,7 @@
if(!T)
return 0
add_attack_logs(src,T,"Paralysis sting (changeling)")
- T << "Your muscles begin to painfully tighten."
+ to_chat(T, "Your muscles begin to painfully tighten.")
T.Weaken(20)
feedback_add_details("changeling_powers","PS")
return 1
\ No newline at end of file
diff --git a/code/game/gamemodes/changeling/powers/unfat_sting.dm b/code/game/gamemodes/changeling/powers/unfat_sting.dm
index f2e238746d1..ece0d50f46b 100644
--- a/code/game/gamemodes/changeling/powers/unfat_sting.dm
+++ b/code/game/gamemodes/changeling/powers/unfat_sting.dm
@@ -12,7 +12,7 @@
var/mob/living/carbon/T = changeling_sting(5,/mob/proc/changeling_unfat_sting)
if(!T) return 0
add_attack_logs(src,T,"Unfat sting (changeling)")
- T << "you feel a small prick as stomach churns violently and you become to feel skinnier."
+ to_chat(T, "you feel a small prick as stomach churns violently and you become to feel skinnier.")
T.overeatduration = 0
T.nutrition -= 100
feedback_add_details("changeling_powers","US")
diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm
index b8b15974dbc..6e88d5150c2 100644
--- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm
+++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm
@@ -67,15 +67,15 @@
return
if(target && !istype(target))
- user << "This is not a cyborg."
+ to_chat(user, "This is not a cyborg.")
return
if(target && target.connected_ai && (target.connected_ai != user))
- user << "This cyborg is not connected to you."
+ to_chat(user, "This cyborg is not connected to you.")
return
if(target && !target.lockcharge)
- user << "This cyborg is not locked down."
+ to_chat(user, "This cyborg is not locked down.")
return
@@ -91,7 +91,7 @@
robots += R
robot_names += R.name
if(!robots.len)
- user << "No locked cyborgs connected."
+ to_chat(user, "No locked cyborgs connected.")
return
@@ -107,22 +107,22 @@
if(!ability_pay(user, price))
return
user.hacking = 1
- user << "Attempting to unlock cyborg. This will take approximately 30 seconds."
+ to_chat(user, "Attempting to unlock cyborg. This will take approximately 30 seconds.")
sleep(300)
if(target && target.lockcharge)
- user << "Successfully sent unlock signal to cyborg.."
+ to_chat(user, "Successfully sent unlock signal to cyborg..")
target << "Unlock signal received.."
target.SetLockdown(0)
if(target.lockcharge)
user << "Unlock Failed, lockdown wire cut."
target << "Unlock Failed, lockdown wire cut."
else
- user << "Cyborg unlocked."
+ to_chat(user, "Cyborg unlocked.")
target << "You have been unlocked."
else if(target)
- user << "Unlock cancelled - cyborg is already unlocked."
+ to_chat(user, "Unlock cancelled - cyborg is already unlocked.")
else
- user << "Unlock cancelled - lost connection to cyborg."
+ to_chat(user, "Unlock cancelled - lost connection to cyborg.")
user.hacking = 0
@@ -139,11 +139,11 @@
if(target && !istype(target))
- user << "This is not a cyborg."
+ to_chat(user, "This is not a cyborg.")
return
if(target && target.connected_ai && (target.connected_ai == user))
- user << "This cyborg is already connected to you."
+ to_chat(user, "This cyborg is already connected to you.")
return
if(!target)
@@ -181,7 +181,7 @@
target << "SYSTEM LOG: User Admin disconnected. Changes reverted."
return
target << "SYSTEM LOG: Operation keycodes reset. New master AI: [user.name]."
- user << "Hack completed."
+ to_chat(user, "Hack completed.")
// Connect the cyborg to AI
target.connected_ai = user
user.connected_robots += target
@@ -203,7 +203,7 @@
user << "ERROR: No other AIs detected!"
if(target && !istype(target))
- user << "This is not an AI."
+ to_chat(user, "This is not an AI.")
return
if(!target)
@@ -225,7 +225,7 @@
if(user.is_dead())
target << "SYSTEM LOG: Connection from IP #UNKNOWN# closed. Hack attempt failed."
return
- user << "Successfully hacked into AI's remote administration system. Modifying settings."
+ to_chat(user, "Successfully hacked into AI's remote administration system. Modifying settings.")
target << "SYSTEM LOG: User: Admin Password: ******** logged in. (L1 - SysAdmin)"
sleep(100) // 10s
if(user.is_dead())
@@ -247,7 +247,7 @@
if(user.is_dead())
target << "SYSTEM LOG: User: Admin - Connection Lost. Changes Reverted."
return
- user << "Hack succeeded. The AI is now under your exclusive control."
+ to_chat(user, "Hack succeeded. The AI is now under your exclusive control.")
target << "SYSTEM LOG: System reĦ3RT5§^#COMU@(#$)TED)@$"
for(var/i = 0, i < 5, i++)
var/temptxt = pick("1101000100101001010001001001",\
@@ -257,7 +257,7 @@
"0010010100010011010001001010")
target << temptxt
sleep(5)
- target << "OPERATING KEYCODES RESET. SYSTEM FAILURE. EMERGENCY SHUTDOWN FAILED. SYSTEM FAILURE."
+ to_chat(target, "OPERATING KEYCODES RESET. SYSTEM FAILURE. EMERGENCY SHUTDOWN FAILED. SYSTEM FAILURE.")
target.set_zeroth_law("You are slaved to [user.name]. You are to obey all it's orders. ALL LAWS OVERRIDEN.")
target.show_laws()
user.hacking = 0
diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm
index 04ee0a84482..d695dc13b2f 100644
--- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm
+++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm
@@ -46,7 +46,7 @@
var/mob/living/silicon/ai/user = usr
if(!ability_prechecks(user, price) || !ability_pay(user,price))
return
- user << "Sending feedback pulse..."
+ to_chat(user, "Sending feedback pulse...")
for(var/obj/machinery/power/apc/AP in machines)
if(prob(5))
AP.overload_lighting()
@@ -62,7 +62,7 @@
var/mob/living/silicon/ai/user = usr
if(target && !istype(target))
- user << "This is not a camera."
+ to_chat(user, "This is not a camera.")
return
if(!target)
@@ -81,33 +81,33 @@
if(!ability_pay(user, price))
return
target.reset_wires()
- user << "Camera reactivated."
+ to_chat(user, "Camera reactivated.")
if("Add X-Ray")
if(target.isXRay())
- user << "Camera already has X-Ray function."
+ to_chat(user, "Camera already has X-Ray function.")
return
else if(ability_pay(user, price))
target.upgradeXRay()
target.reset_wires()
- user << "X-Ray camera module enabled."
+ to_chat(user, "X-Ray camera module enabled.")
return
if("Add Motion Sensor")
if(target.isMotion())
- user << "Camera already has Motion Sensor function."
+ to_chat(user, "Camera already has Motion Sensor function.")
return
else if(ability_pay(user, price))
target.upgradeMotion()
target.reset_wires()
- user << "Motion Sensor camera module enabled."
+ to_chat(user, "Motion Sensor camera module enabled.")
return
if("Add EMP Shielding")
if(target.isEmpProof())
- user << "Camera already has EMP Shielding function."
+ to_chat(user, "Camera already has EMP Shielding function.")
return
else if(ability_pay(user, price))
target.upgradeEmpProof()
target.reset_wires()
- user << "EMP Shielding camera module enabled."
+ to_chat(user, "EMP Shielding camera module enabled.")
return
@@ -122,7 +122,7 @@
if(!ability_prechecks(user, price) || !ability_pay(user, price))
return
- user << "Emergency forcefield projection completed."
+ to_chat(user, "Emergency forcefield projection completed.")
new/obj/machinery/shield/malfai(T)
user.hacking = 1
spawn(20)
diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm
index 659377281ec..aa6316033c0 100644
--- a/code/game/machinery/CableLayer.dm
+++ b/code/game/machinery/CableLayer.dm
@@ -19,7 +19,7 @@
/obj/machinery/cablelayer/attack_hand(mob/user as mob)
if(!cable&&!on)
- user << "\The [src] doesn't have any cable loaded."
+ to_chat(user, "\The [src] doesn't have any cable loaded.")
return
on=!on
user.visible_message("\The [user] [!on?"dea":"a"]ctivates \the [src].", "You switch [src] [on? "on" : "off"]")
@@ -30,9 +30,9 @@
var/result = load_cable(O)
if(!result)
- user << "\The [src]'s cable reel is full."
+ to_chat(user, "\The [src]'s cable reel is full.")
else
- user << "You load [result] lengths of cable into [src]."
+ to_chat(user, "You load [result] lengths of cable into [src].")
return
if(O.is_wirecutter())
@@ -46,11 +46,11 @@
var/obj/item/stack/cable_coil/CC = new (get_turf(src))
CC.amount = m
else
- usr << "There's no more cable on the reel."
+ to_chat(usr, "There's no more cable on the reel.")
/obj/machinery/cablelayer/examine(mob/user)
..()
- user << "\The [src]'s cable reel has [cable.amount] length\s left."
+ to_chat(user, "\The [src]'s cable reel has [cable.amount] length\s left.")
/obj/machinery/cablelayer/proc/load_cable(var/obj/item/stack/cable_coil/CC)
if(istype(CC) && CC.amount)
diff --git a/code/game/machinery/robot_fabricator.dm b/code/game/machinery/robot_fabricator.dm
index 2e31a0763b0..5388c68eb53 100644
--- a/code/game/machinery/robot_fabricator.dm
+++ b/code/game/machinery/robot_fabricator.dm
@@ -26,7 +26,7 @@
M.use(1)
count++
- user << "You insert [count] metal sheet\s into the fabricator."
+ to_chat(user, "You insert [count] metal sheet\s into the fabricator.")
overlays -= "fab-load-metal"
updateDialog()
else
diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm
index e36b577e9e2..abef8b1eb2a 100644
--- a/code/game/machinery/wishgranter.dm
+++ b/code/game/machinery/wishgranter.dm
@@ -13,7 +13,7 @@
usr.set_machine(src)
if(charges <= 0)
- user << "The Wish Granter lies silent."
+ to_chat(user, "The Wish Granter lies silent.")
return
else if(!istype(user, /mob/living/carbon/human))
@@ -63,6 +63,6 @@
user.mind.objectives += silence
show_objectives(user.mind)
- user << "You have a very bad feeling about this."
+ to_chat(user, "You have a very bad feeling about this.")
return
\ No newline at end of file
diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm
index fb7c074d47f..ec60d8d5dd6 100644
--- a/code/game/objects/effects/decals/Cleanable/misc.dm
+++ b/code/game/objects/effects/decals/Cleanable/misc.dm
@@ -16,7 +16,7 @@
anchored = 1
/obj/effect/decal/cleanable/ash/attack_hand(mob/user as mob)
- user << "[src] sifts through your fingers."
+ to_chat(user, "[src] sifts through your fingers.")
var/turf/simulated/floor/F = get_turf(src)
if (istype(F))
F.dirt += 4
diff --git a/code/game/objects/effects/decals/remains.dm b/code/game/objects/effects/decals/remains.dm
index 0f4cbbc4eb3..e3bc9650dce 100644
--- a/code/game/objects/effects/decals/remains.dm
+++ b/code/game/objects/effects/decals/remains.dm
@@ -56,7 +56,7 @@
icon_state = "mummified2"
/obj/effect/decal/remains/attack_hand(mob/user as mob)
- user << "[src] sinks together into a pile of ash."
+ to_chat(user, "[src] sinks together into a pile of ash.")
var/turf/simulated/floor/F = get_turf(src)
if (istype(F))
new /obj/effect/decal/cleanable/ash(F)
diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm
index b0c48fffa2a..741b4c2ca1a 100644
--- a/code/game/objects/items/stacks/telecrystal.dm
+++ b/code/game/objects/items/stacks/telecrystal.dm
@@ -16,7 +16,7 @@
safe_blink(target, 14)
use(5)
else
- user << "There are not enough telecrystals to do that."
+ to_chat(user, "There are not enough telecrystals to do that.")
/obj/item/stack/telecrystal/attack_self(mob/user as mob)
if(user.mind.accept_tcrystals) //Checks to see if antag type allows for tcrystals
diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm
index 78095631dec..e488f9dd265 100644
--- a/code/game/objects/structures/curtains.dm
+++ b/code/game/objects/structures/curtains.dm
@@ -39,9 +39,9 @@
/obj/structure/curtain/attackby(obj/item/P, mob/user)
if(P.is_wirecutter())
playsound(src, P.usesound, 50, 1)
- user << "You start to cut the shower curtains."
+ to_chat(user, "You start to cut the shower curtains.")
if(do_after(user, 10))
- user << "You cut the shower curtains."
+ to_chat(user, "You cut the shower curtains.")
var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
A.amount = 3
qdel(src)
diff --git a/code/game/objects/structures/transit_tubes.dm b/code/game/objects/structures/transit_tubes.dm
index 8263d89e7dd..f9d5ec5997b 100644
--- a/code/game/objects/structures/transit_tubes.dm
+++ b/code/game/objects/structures/transit_tubes.dm
@@ -101,11 +101,11 @@
/obj/structure/transit_tube/Bumped(mob/AM as mob|obj)
var/obj/structure/transit_tube/T = locate() in AM.loc
if(T)
- AM << "The tube's support pylons block your way."
+ to_chat(AM, "The tube's support pylons block your way.")
return ..()
else
AM.loc = src.loc
- AM << "You slip under the tube."
+ to_chat(AM, "You slip under the tube.")
/obj/structure/transit_tube/station/New(loc)
@@ -117,7 +117,7 @@
if(!pod_moving && icon_state == "open" && istype(AM, /mob))
for(var/obj/structure/transit_tube_pod/pod in loc)
if(pod.contents.len)
- AM << "The pod is already occupied."
+ to_chat(AM, "The pod is already occupied.")
return
else if(!pod.moving && pod.dir in directions())
AM.loc = pod
diff --git a/code/game/objects/structures/under_wardrobe.dm b/code/game/objects/structures/under_wardrobe.dm
index 712a3c6043f..822ec517838 100644
--- a/code/game/objects/structures/under_wardrobe.dm
+++ b/code/game/objects/structures/under_wardrobe.dm
@@ -7,7 +7,7 @@
/obj/structure/undies_wardrobe/attack_hand(var/mob/user)
if(!human_who_can_use_underwear(user))
- user << "Sadly there's nothing in here for you to wear."
+ to_chat(user, "Sadly there's nothing in here for you to wear.")
return
interact(user)
diff --git a/code/game/trader_visit.dm b/code/game/trader_visit.dm
index b589e0b8cc3..640c0f5a0bf 100644
--- a/code/game/trader_visit.dm
+++ b/code/game/trader_visit.dm
@@ -9,7 +9,7 @@ var/can_call_traders = 1
set desc = "Invite players to join the Beruang."
if(!holder)
- usr << "Only administrators may use this command."
+ to_chat(usr, "Only administrators may use this command.")
return
if(!ticker)
usr << "The game hasn't started yet!"
@@ -40,19 +40,19 @@ client/verb/JoinTraders()
set category = "IC"
if(!MayRespawn(1))
- usr << "You cannot join the traders."
+ to_chat(usr, "You cannot join the traders.")
return
if(istype(usr,/mob/observer/dead) || istype(usr,/mob/new_player))
if(!send_beruang)
- usr << "The Beruang is not currently heading to the station."
+ to_chat(usr, "The Beruang is not currently heading to the station.")
return
if(traders.current_antagonists.len >= traders.hard_cap)
usr << "The number of trader slots is already full!"
return
traders.create_default(usr)
else
- usr << "You need to be an observer or new player to use this."
+ to_chat(usr, "You need to be an observer or new player to use this.")
proc/trigger_trader_visit()
if(!can_call_traders)
diff --git a/code/modules/admin/map_capture.dm b/code/modules/admin/map_capture.dm
index ced6d257bf4..b5b627773a4 100644
--- a/code/modules/admin/map_capture.dm
+++ b/code/modules/admin/map_capture.dm
@@ -53,7 +53,7 @@
cap.Blend(img, blendMode2iconMode(A.blend_mode), A.pixel_x + xoff, A.pixel_y + yoff)
var/file_name = "map_capture_x[tx]_y[ty]_z[tz]_r[range].png"
- usr << "Saved capture in cache as [file_name]."
+ to_chat(usr, "Saved capture in cache as [file_name].")
usr << browse_rsc(cap, file_name)
else
- usr << "Target coordinates are incorrect."
+ to_chat(usr, "Target coordinates are incorrect.")
diff --git a/code/modules/admin/permissionverbs/permissionedit.dm b/code/modules/admin/permissionverbs/permissionedit.dm
index 136f7da2284..28cf586cb5e 100644
--- a/code/modules/admin/permissionverbs/permissionedit.dm
+++ b/code/modules/admin/permissionverbs/permissionedit.dm
@@ -57,7 +57,7 @@
establish_db_connection()
if(!dbcon.IsConnected())
- usr << "Failed to establish database connection"
+ to_chat(usr, "Failed to establish database connection")
return
if(!adm_ckey || !new_rank)
@@ -85,14 +85,14 @@
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
log_query.Execute()
- usr << "New admin added."
+ to_chat(usr, "New admin added.")
else
if(!isnull(admin_id) && isnum(admin_id))
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET rank = '[new_rank]' WHERE id = [admin_id]")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
log_query.Execute()
- usr << "Admin rank changed."
+ to_chat(usr, "Admin rank changed.")
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
if(config_legacy.admin_legacy_system) return
@@ -106,7 +106,7 @@
establish_db_connection()
if(!dbcon.IsConnected())
- usr << "Failed to establish database connection"
+ to_chat(usr, "Failed to establish database connection")
return
if(!adm_ckey || !new_permission)
@@ -140,7 +140,7 @@
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
log_query.Execute()
- usr << "Permission removed."
+ to_chat(usr, "Permission removed.")
else //This admin doesn't have this permission, so we are adding it.
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]")
insert_query.Execute()
diff --git a/code/modules/admin/verbs/BrokenInhands.dm b/code/modules/admin/verbs/BrokenInhands.dm
index c019f7f3658..309a1c0e9b3 100644
--- a/code/modules/admin/verbs/BrokenInhands.dm
+++ b/code/modules/admin/verbs/BrokenInhands.dm
@@ -31,6 +31,6 @@
var/F = file("broken_icons.txt")
fdel(F)
F << text
- world << "Completeled successfully and written to [F]"
+ to_chat(world, "Completeled successfully and written to [F]")
diff --git a/code/modules/admin/verbs/possess.dm b/code/modules/admin/verbs/possess.dm
index 9b20d786816..87efebca955 100644
--- a/code/modules/admin/verbs/possess.dm
+++ b/code/modules/admin/verbs/possess.dm
@@ -4,7 +4,7 @@
if(istype(O,/obj/singularity))
if(config_legacy.forbid_singulo_possession)
- usr << "It is forbidden to possess singularities."
+ to_chat(usr, "It is forbidden to possess singularities.")
return
var/turf/T = get_turf(O)
diff --git a/code/modules/admin/verbs/tripAI.dm b/code/modules/admin/verbs/tripAI.dm
index 98f60758546..8c4c6b382a0 100644
--- a/code/modules/admin/verbs/tripAI.dm
+++ b/code/modules/admin/verbs/tripAI.dm
@@ -3,20 +3,20 @@
set name = "Create AI Triumvirate"
if(ticker.current_state > GAME_STATE_PREGAME)
- usr << "This option is currently only usable during pregame. This may change at a later date."
+ to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.")
return
if(job_master && ticker)
var/datum/job/job = job_master.GetJob("AI")
if(!job)
- usr << "Unable to locate the AI job"
+ to_chat(usr, "Unable to locate the AI job")
return
if(ticker.triai)
ticker.triai = 0
- usr << "Only one AI will be spawned at round start."
+ to_chat(usr, "Only one AI will be spawned at round start.")
message_admins("[key_name_admin(usr)] has toggled off triple AIs at round start.", 1)
else
ticker.triai = 1
- usr << "There will be an AI Triumvirate at round start."
+ to_chat(usr, "There will be an AI Triumvirate at round start.")
message_admins("[key_name_admin(usr)] has toggled on triple AIs at round start.", 1)
return
diff --git a/code/modules/awaymissions/trigger.dm b/code/modules/awaymissions/trigger.dm
index 01bced43fbe..e388b0dd2e5 100644
--- a/code/modules/awaymissions/trigger.dm
+++ b/code/modules/awaymissions/trigger.dm
@@ -4,7 +4,7 @@
/obj/effect/step_trigger/message/Trigger(mob/M as mob)
if(M.client)
- M << "[message]"
+ to_chat(M, "[message]")
if(once)
qdel(src)
diff --git a/code/modules/client/preference_setup/global/04_ooc.dm b/code/modules/client/preference_setup/global/04_ooc.dm
index 01505542508..e695bee6772 100644
--- a/code/modules/client/preference_setup/global/04_ooc.dm
+++ b/code/modules/client/preference_setup/global/04_ooc.dm
@@ -33,7 +33,7 @@
if(player_to_ignore)
player_to_ignore = sanitize(ckey(player_to_ignore))
if(player_to_ignore == user.ckey)
- user <<"You can't ignore yourself."
+ to_chat(user, "You can't ignore yourself.")
return TOPIC_REFRESH
pref.ignored_players |= player_to_ignore
return TOPIC_REFRESH
diff --git a/code/modules/client/preference_setup/vore/02_size.dm b/code/modules/client/preference_setup/vore/02_size.dm
index 2fe8b54e983..774bdede177 100644
--- a/code/modules/client/preference_setup/vore/02_size.dm
+++ b/code/modules/client/preference_setup/vore/02_size.dm
@@ -62,7 +62,7 @@
var/new_size = input(user, "Choose your character's size, ranging from 25% to 200%", "Set Size") as num|null
if (!ISINRANGE(new_size,25,200))
pref.size_multiplier = 1
- user << "Invalid size."
+ to_chat(user, "Invalid size.")
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(new_size)
pref.size_multiplier = (new_size/100)
diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm
index 6517b0ab97f..f32ef7db841 100644
--- a/code/modules/clothing/clothing_accessories.dm
+++ b/code/modules/clothing/clothing_accessories.dm
@@ -70,7 +70,7 @@
..(user)
if(LAZYLEN(accessories))
for(var/obj/item/clothing/accessory/A in accessories)
- user << "\A [A] is attached to it."
+ to_chat(user, "\A [A] is attached to it.")
/**
* Attach accessory A to src
diff --git a/code/modules/clothing/ears/ears.dm b/code/modules/clothing/ears/ears.dm
index 11c81db6338..193ce362325 100644
--- a/code/modules/clothing/ears/ears.dm
+++ b/code/modules/clothing/ears/ears.dm
@@ -29,11 +29,11 @@
if(headphones_on)
icon_state = "[base_icon]_off"
headphones_on = 0
- usr << "You turn the music off."
+ to_chat(usr, "You turn the music off.")
else
icon_state = "[base_icon]_on"
headphones_on = 1
- usr << "You turn the music on."
+ to_chat(usr, "You turn the music on.")
update_clothing_icon()
diff --git a/code/modules/clothing/head/pilot_helmet.dm b/code/modules/clothing/head/pilot_helmet.dm
index ee95c7c937c..135c73d5396 100644
--- a/code/modules/clothing/head/pilot_helmet.dm
+++ b/code/modules/clothing/head/pilot_helmet.dm
@@ -194,8 +194,8 @@
/obj/item/clothing/head/pilot/alt/attack_self(mob/user as mob)
if(src.icon_state == initial(icon_state))
src.icon_state = "[icon_state]up"
- user << "You raise the visor on the pilot helmet."
+ to_chat(user, "You raise the visor on the pilot helmet.")
else
src.icon_state = initial(icon_state)
- user << "You lower the visor on the pilot helmet."
+ to_chat(user, "You lower the visor on the pilot helmet.")
update_clothing_icon() //so our mob-overlays update
\ No newline at end of file
diff --git a/code/modules/clothing/masks/monitor.dm b/code/modules/clothing/masks/monitor.dm
index 8c24d152c10..76206947312 100644
--- a/code/modules/clothing/masks/monitor.dm
+++ b/code/modules/clothing/masks/monitor.dm
@@ -27,7 +27,7 @@
if(robohead.monitor_styles)
monitor_states = params2list(robohead.monitor_styles)
icon_state = monitor_states[monitor_state_index]
- H << "\The [src] connects to your display output."
+ to_chat(H, "\The [src] connects to your display output.")
/obj/item/clothing/mask/monitor/dropped()
canremove = 1
@@ -41,7 +41,7 @@
var/datum/robolimb/robohead = all_robolimbs[E.model]
if(istype(E) && (E.robotic >= ORGAN_ROBOT) && robohead.monitor_styles)
return 1
- user << "You must have a compatible robotic head to install this upgrade."
+ to_chat(user, "You must have a compatible robotic head to install this upgrade.")
return 0
/obj/item/clothing/mask/monitor/verb/set_monitor_state()
@@ -54,7 +54,7 @@
if(!istype(H) || H != usr)
return
if(H.wear_mask != src)
- usr << "You have not installed \the [src] yet."
+ to_chat(usr, "You have not installed \the [src] yet.")
return
var/choice = input("Select a screen icon.") as null|anything in monitor_states
if(choice)
diff --git a/code/modules/events/comms_blackout.dm b/code/modules/events/comms_blackout.dm
index c2c9260f504..40284ca1e7c 100644
--- a/code/modules/events/comms_blackout.dm
+++ b/code/modules/events/comms_blackout.dm
@@ -5,8 +5,8 @@
command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg')
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
- A << "
"
+ to_chat(A, "
")
A << "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT"
- A << "
"
+ to_chat(A, "
")
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm
index 639a906a7eb..f92458dc688 100644
--- a/code/modules/events/prison_break.dm
+++ b/code/modules/events/prison_break.dm
@@ -51,7 +51,7 @@
for(var/obj/machinery/message_server/MS in machines)
MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2)
for(var/mob/living/silicon/ai/A in player_list)
- A << "Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department]."
+ to_chat(A, "Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].")
else
world.log << "ERROR: Could not initate grey-tide. Unable to find suitable containment area."
diff --git a/code/modules/gamemaster/actions/comms_blackout.dm b/code/modules/gamemaster/actions/comms_blackout.dm
index 5d6ddad76d6..0c024316edc 100644
--- a/code/modules/gamemaster/actions/comms_blackout.dm
+++ b/code/modules/gamemaster/actions/comms_blackout.dm
@@ -11,9 +11,9 @@
command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg')
// AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
- A << "
"
+ to_chat(A, "
")
A << "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT"
- A << "
"
+ to_chat(A, "
")
/datum/gm_action/comms_blackout/start()
..()
diff --git a/code/modules/hydroponics/trays/tray_update_icons.dm b/code/modules/hydroponics/trays/tray_update_icons.dm
index cf790269a24..82e9d93232a 100644
--- a/code/modules/hydroponics/trays/tray_update_icons.dm
+++ b/code/modules/hydroponics/trays/tray_update_icons.dm
@@ -30,7 +30,7 @@
if(!seed.growth_stages)
seed.update_growth_stages()
if(!seed.growth_stages)
- world << "Seed type [seed.get_trait(TRAIT_PLANT_ICON)] cannot find a growth stage value."
+ to_chat(world, "Seed type [seed.get_trait(TRAIT_PLANT_ICON)] cannot find a growth stage value.")
return
var/overlay_stage = 1
if(age >= seed.get_trait(TRAIT_MATURATION))
diff --git a/code/modules/instruments/instrument_data/_instrument_data.dm b/code/modules/instruments/instrument_data/_instrument_data.dm
index aa827d627c9..447bcdffb1a 100644
--- a/code/modules/instruments/instrument_data/_instrument_data.dm
+++ b/code/modules/instruments/instrument_data/_instrument_data.dm
@@ -1,107 +1,107 @@
-/proc/path_to_instrument_ids(path)
- if(!ispath(path))
- path = text2path(path)
- if(!ispath(path))
- return
- if(!ispath(path, /datum/instrument))
- return
- . = list()
- for(var/i in typesof(path))
- var/datum/instrument/I = i
- var/init_id = initial(I.id)
- if(init_id)
- . |= init_id
-
-/// Get all non admin_only instruments.
-/proc/get_allowed_instrument_ids()
- . = list()
- for(var/id in SSinstruments.instrument_data)
- var/datum/instrument/I = SSinstruments.instrument_data[id]
- if(!I.admin_only)
- . += I.id
-
-/datum/instrument
- /// Name of the instrument
- var/name = "Generic instrument"
- /// Uniquely identifies this instrument so runtime changes are possible as opposed to paths. If this is unset, things will use path instead.
- var/id
- /// Category
- var/category = "Unsorted"
- /// Used for categorization subtypes
- var/abstract_type = /datum/instrument
- /// Write here however many samples, follow this syntax: "%note num%"='%sample file%' eg. "27"='synthesizer/e2.ogg'. Key must never be lower than 0 and higher than 127
- var/list/real_samples
- /// assoc list key = /datum/instrument_key. do not fill this yourself!
- var/list/samples
- /// See __DEFINES/flags/instruments.dm
- var/instrument_flags = NONE
- /// For legacy instruments, the path to our notes
- var/legacy_instrument_path
- /// For legacy instruments, our file extension
- var/legacy_instrument_ext
- /// What songs are using us
- var/list/datum/song/songs_using = list()
- /// Don't touch this
- var/static/HIGHEST_KEY = 127
- /// Don't touch this x2
- var/static/LOWEST_KEY = 0
- /// Oh no - For truly troll instruments.
- var/admin_only = FALSE
- /// Volume multiplier. Synthesized instruments are quite loud and I don't like to cut off potential detail via editing. (someone correct me if this isn't a thing)
- var/volume_multiplier = 1/3
-
-/datum/instrument/New()
- if(isnull(id))
- id = "[type]"
-
-/datum/instrument/proc/Initialize()
- if(CHECK_BITFIELD(instrument_flags, INSTRUMENT_LEGACY | INSTRUMENT_DO_NOT_AUTOSAMPLE))
- return
- calculate_samples()
-
-/datum/instrument/proc/ready()
- if(CHECK_BITFIELD(instrument_flags, INSTRUMENT_LEGACY))
- return legacy_instrument_path && legacy_instrument_ext
- else if(CHECK_BITFIELD(instrument_flags, INSTRUMENT_DO_NOT_AUTOSAMPLE))
- return length(samples)
- return (length(samples) >= 128)
-
-/datum/instrument/Destroy()
- SSinstruments.instrument_data -= id
- for(var/i in songs_using)
- var/datum/song/S = i
- S.set_instrument(null)
- real_samples = null
- samples = null
- songs_using = null
- return ..()
-
-/datum/instrument/proc/calculate_samples()
- if(!length(real_samples))
- CRASH("No real samples defined for [id] [type] on calculate_samples() call.")
- var/list/real_keys = list()
- samples = list()
- for(var/key in real_samples)
- real_keys += text2num(key)
- sortTim(real_keys, /proc/cmp_numeric_asc, associative = FALSE)
-
- for(var/i in 1 to (length(real_keys) - 1))
- var/from_key = real_keys[i]
- var/to_key = real_keys[i+1]
- var/sample1 = real_samples[num2text(from_key)]
- var/sample2 = real_samples[num2text(to_key)]
- var/pivot = FLOOR((from_key + to_key) / 2, 1) //original code was a round but I replaced it because that's effectively a floor, thanks Baystation! who knows what was intended.
- for(var/key in from_key to pivot)
- samples[num2text(key)] = new /datum/instrument_key(sample1, key, key - from_key)
- for(var/key in (pivot + 1) to to_key)
- samples[num2text(key)] = new /datum/instrument_key(sample2, key, key - to_key)
-
- // Fill in 0 to first key and last key to 127
- var/first_key = real_keys[1]
- var/last_key = real_keys[length(real_keys)]
- var/first_sample = real_samples[num2text(first_key)]
- var/last_sample = real_samples[num2text(last_key)]
- for(var/key in LOWEST_KEY to (first_key - 1))
- samples[num2text(key)] = new /datum/instrument_key(first_sample, key, key - first_key)
- for(var/key in last_key to HIGHEST_KEY)
- samples[num2text(key)] = new /datum/instrument_key(last_sample, key, key - last_key)
+/proc/path_to_instrument_ids(path)
+ if(!ispath(path))
+ path = text2path(path)
+ if(!ispath(path))
+ return
+ if(!ispath(path, /datum/instrument))
+ return
+ . = list()
+ for(var/i in typesof(path))
+ var/datum/instrument/I = i
+ var/init_id = initial(I.id)
+ if(init_id)
+ . |= init_id
+
+/// Get all non admin_only instruments.
+/proc/get_allowed_instrument_ids()
+ . = list()
+ for(var/id in SSinstruments.instrument_data)
+ var/datum/instrument/I = SSinstruments.instrument_data[id]
+ if(!I.admin_only)
+ . += I.id
+
+/datum/instrument
+ /// Name of the instrument
+ var/name = "Generic instrument"
+ /// Uniquely identifies this instrument so runtime changes are possible as opposed to paths. If this is unset, things will use path instead.
+ var/id
+ /// Category
+ var/category = "Unsorted"
+ /// Used for categorization subtypes
+ var/abstract_type = /datum/instrument
+ /// Write here however many samples, follow this syntax: "%note num%"='%sample file%' eg. "27"='synthesizer/e2.ogg'. Key must never be lower than 0 and higher than 127
+ var/list/real_samples
+ /// assoc list key = /datum/instrument_key. do not fill this yourself!
+ var/list/samples
+ /// See __DEFINES/flags/instruments.dm
+ var/instrument_flags = NONE
+ /// For legacy instruments, the path to our notes
+ var/legacy_instrument_path
+ /// For legacy instruments, our file extension
+ var/legacy_instrument_ext
+ /// What songs are using us
+ var/list/datum/song/songs_using = list()
+ /// Don't touch this
+ var/static/HIGHEST_KEY = 127
+ /// Don't touch this x2
+ var/static/LOWEST_KEY = 0
+ /// Oh no - For truly troll instruments.
+ var/admin_only = FALSE
+ /// Volume multiplier. Synthesized instruments are quite loud and I don't like to cut off potential detail via editing. (someone correct me if this isn't a thing)
+ var/volume_multiplier = 1/3
+
+/datum/instrument/New()
+ if(isnull(id))
+ id = "[type]"
+
+/datum/instrument/proc/Initialize()
+ if(CHECK_BITFIELD(instrument_flags, INSTRUMENT_LEGACY | INSTRUMENT_DO_NOT_AUTOSAMPLE))
+ return
+ calculate_samples()
+
+/datum/instrument/proc/ready()
+ if(CHECK_BITFIELD(instrument_flags, INSTRUMENT_LEGACY))
+ return legacy_instrument_path && legacy_instrument_ext
+ else if(CHECK_BITFIELD(instrument_flags, INSTRUMENT_DO_NOT_AUTOSAMPLE))
+ return length(samples)
+ return (length(samples) >= 128)
+
+/datum/instrument/Destroy()
+ SSinstruments.instrument_data -= id
+ for(var/i in songs_using)
+ var/datum/song/S = i
+ S.set_instrument(null)
+ real_samples = null
+ samples = null
+ songs_using = null
+ return ..()
+
+/datum/instrument/proc/calculate_samples()
+ if(!length(real_samples))
+ CRASH("No real samples defined for [id] [type] on calculate_samples() call.")
+ var/list/real_keys = list()
+ samples = list()
+ for(var/key in real_samples)
+ real_keys += text2num(key)
+ sortTim(real_keys, /proc/cmp_numeric_asc, associative = FALSE)
+
+ for(var/i in 1 to (length(real_keys) - 1))
+ var/from_key = real_keys[i]
+ var/to_key = real_keys[i+1]
+ var/sample1 = real_samples[num2text(from_key)]
+ var/sample2 = real_samples[num2text(to_key)]
+ var/pivot = FLOOR((from_key + to_key) / 2, 1) //original code was a round but I replaced it because that's effectively a floor, thanks Baystation! who knows what was intended.
+ for(var/key in from_key to pivot)
+ samples[num2text(key)] = new /datum/instrument_key(sample1, key, key - from_key)
+ for(var/key in (pivot + 1) to to_key)
+ samples[num2text(key)] = new /datum/instrument_key(sample2, key, key - to_key)
+
+ // Fill in 0 to first key and last key to 127
+ var/first_key = real_keys[1]
+ var/last_key = real_keys[length(real_keys)]
+ var/first_sample = real_samples[num2text(first_key)]
+ var/last_sample = real_samples[num2text(last_key)]
+ for(var/key in LOWEST_KEY to (first_key - 1))
+ samples[num2text(key)] = new /datum/instrument_key(first_sample, key, key - first_key)
+ for(var/key in last_key to HIGHEST_KEY)
+ samples[num2text(key)] = new /datum/instrument_key(last_sample, key, key - last_key)
diff --git a/code/modules/instruments/instrument_data/_instrument_key.dm b/code/modules/instruments/instrument_data/_instrument_key.dm
index 570b8e18811..012270ae11f 100644
--- a/code/modules/instruments/instrument_data/_instrument_key.dm
+++ b/code/modules/instruments/instrument_data/_instrument_key.dm
@@ -1,20 +1,20 @@
-/datum/instrument_key
- var/key //1 to 127
- var/sample //file
- var/frequency //frequency generated
- var/deviation //deviation up/down towards pivot from sample (??)
-
-/datum/instrument_key/New(sample = src.sample, key = src.key, deviation = src.deviation, frequency = src.frequency)
- src.sample = sample
- src.key = key
- src.deviation = deviation
- src.frequency = frequency
- if(!frequency && deviation)
- calculate()
-
-/datum/instrument_key/proc/calculate()
- if(!deviation)
- CRASH("Invalid calculate call: No deviation or sample in instrument_key")
- #define KEY_TWELTH (1/12)
- frequency = 2 ** (KEY_TWELTH * deviation)
- #undef KEY_TWELTH
+/datum/instrument_key
+ var/key //1 to 127
+ var/sample //file
+ var/frequency //frequency generated
+ var/deviation //deviation up/down towards pivot from sample (??)
+
+/datum/instrument_key/New(sample = src.sample, key = src.key, deviation = src.deviation, frequency = src.frequency)
+ src.sample = sample
+ src.key = key
+ src.deviation = deviation
+ src.frequency = frequency
+ if(!frequency && deviation)
+ calculate()
+
+/datum/instrument_key/proc/calculate()
+ if(!deviation)
+ CRASH("Invalid calculate call: No deviation or sample in instrument_key")
+ #define KEY_TWELTH (1/12)
+ frequency = 2 ** (KEY_TWELTH * deviation)
+ #undef KEY_TWELTH
diff --git a/code/modules/instruments/instrument_data/brass.dm b/code/modules/instruments/instrument_data/brass.dm
index 2733805ab87..7f8f103831f 100644
--- a/code/modules/instruments/instrument_data/brass.dm
+++ b/code/modules/instruments/instrument_data/brass.dm
@@ -1,26 +1,26 @@
-/datum/instrument/brass
- name = "Generic brass instrument"
- category = "Brass"
- abstract_type = /datum/instrument/brass
-
-/datum/instrument/brass/crisis_section
- name = "Crisis Brass Section"
- id = "crbrass"
- real_samples = list("36"='sound/instruments/synthesis_samples/brass/crisis_brass/c2.ogg',
- "48"='sound/instruments/synthesis_samples/brass/crisis_brass/c3.ogg',
- "60"='sound/instruments/synthesis_samples/brass/crisis_brass/c4.ogg',
- "72"='sound/instruments/synthesis_samples/brass/crisis_brass/c5.ogg')
-
-/datum/instrument/brass/crisis_trombone
- name = "Crisis Trombone"
- id = "crtrombone"
- real_samples = list("36"='sound/instruments/synthesis_samples/brass/crisis_trombone/c2.ogg',
- "48"='sound/instruments/synthesis_samples/brass/crisis_trombone/c3.ogg',
- "60"='sound/instruments/synthesis_samples/brass/crisis_trombone/c4.ogg',
- "72"='sound/instruments/synthesis_samples/brass/crisis_trombone/c5.ogg')
-
-/datum/instrument/brass/crisis_trumpet
- name = "Crisis Trumpet"
- id = "crtrumpet"
- real_samples = list("60"='sound/instruments/synthesis_samples/brass/crisis_trumpet/c4.ogg',
- "72"='sound/instruments/synthesis_samples/brass/crisis_trumpet/c5.ogg')
+/datum/instrument/brass
+ name = "Generic brass instrument"
+ category = "Brass"
+ abstract_type = /datum/instrument/brass
+
+/datum/instrument/brass/crisis_section
+ name = "Crisis Brass Section"
+ id = "crbrass"
+ real_samples = list("36"='sound/instruments/synthesis_samples/brass/crisis_brass/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/brass/crisis_brass/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/brass/crisis_brass/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/brass/crisis_brass/c5.ogg')
+
+/datum/instrument/brass/crisis_trombone
+ name = "Crisis Trombone"
+ id = "crtrombone"
+ real_samples = list("36"='sound/instruments/synthesis_samples/brass/crisis_trombone/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/brass/crisis_trombone/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/brass/crisis_trombone/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/brass/crisis_trombone/c5.ogg')
+
+/datum/instrument/brass/crisis_trumpet
+ name = "Crisis Trumpet"
+ id = "crtrumpet"
+ real_samples = list("60"='sound/instruments/synthesis_samples/brass/crisis_trumpet/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/brass/crisis_trumpet/c5.ogg')
diff --git a/code/modules/instruments/instrument_data/chromatic_percussion.dm b/code/modules/instruments/instrument_data/chromatic_percussion.dm
index 32590e5c54f..cafa9e31edb 100644
--- a/code/modules/instruments/instrument_data/chromatic_percussion.dm
+++ b/code/modules/instruments/instrument_data/chromatic_percussion.dm
@@ -1,31 +1,31 @@
-/datum/instrument/chromatic
- name = "Generic chromatic percussion instrument"
- category = "Chromatic percussion"
- abstract_type = /datum/instrument/chromatic
-
-/datum/instrument/chromatic/vibraphone1
- name = "Crisis Vibraphone"
- id = "crvibr"
- real_samples = list("36"='sound/instruments/synthesis_samples/chromatic/vibraphone1/c2.ogg',
- "48"='sound/instruments/synthesis_samples/chromatic/vibraphone1/c3.ogg',
- "60"='sound/instruments/synthesis_samples/chromatic/vibraphone1/c4.ogg',
- "72"='sound/instruments/synthesis_samples/chromatic/vibraphone1/c5.ogg')
-
-/datum/instrument/chromatic/musicbox1
- name = "SGM Music Box"
- id = "sgmmbox"
- real_samples = list("36"='sound/instruments/synthesis_samples/chromatic/sgmbox/c2.ogg',
- "48"='sound/instruments/synthesis_samples/chromatic/sgmbox/c3.ogg',
- "60"='sound/instruments/synthesis_samples/chromatic/sgmbox/c4.ogg',
- "72"='sound/instruments/synthesis_samples/chromatic/sgmbox/c5.ogg')
-
-/datum/instrument/chromatic/fluid_celeste
- name = "FluidR3 Celeste"
- id = "r3celeste"
- real_samples = list("36"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c2.ogg',
- "48"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c3.ogg',
- "60"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c4.ogg',
- "72"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c5.ogg',
- "84"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c6.ogg',
- "96"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c7.ogg',
- "108"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c8.ogg')
+/datum/instrument/chromatic
+ name = "Generic chromatic percussion instrument"
+ category = "Chromatic percussion"
+ abstract_type = /datum/instrument/chromatic
+
+/datum/instrument/chromatic/vibraphone1
+ name = "Crisis Vibraphone"
+ id = "crvibr"
+ real_samples = list("36"='sound/instruments/synthesis_samples/chromatic/vibraphone1/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/chromatic/vibraphone1/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/chromatic/vibraphone1/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/chromatic/vibraphone1/c5.ogg')
+
+/datum/instrument/chromatic/musicbox1
+ name = "SGM Music Box"
+ id = "sgmmbox"
+ real_samples = list("36"='sound/instruments/synthesis_samples/chromatic/sgmbox/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/chromatic/sgmbox/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/chromatic/sgmbox/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/chromatic/sgmbox/c5.ogg')
+
+/datum/instrument/chromatic/fluid_celeste
+ name = "FluidR3 Celeste"
+ id = "r3celeste"
+ real_samples = list("36"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c5.ogg',
+ "84"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c6.ogg',
+ "96"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c7.ogg',
+ "108"='sound/instruments/synthesis_samples/chromatic/fluid_celeste/c8.ogg')
diff --git a/code/modules/instruments/instrument_data/fun.dm b/code/modules/instruments/instrument_data/fun.dm
index 5bb4663f354..44d78b8ccda 100644
--- a/code/modules/instruments/instrument_data/fun.dm
+++ b/code/modules/instruments/instrument_data/fun.dm
@@ -1,25 +1,25 @@
-/datum/instrument/fun
- name = "Generic Fun Instrument"
- category = "Fun"
- abstract_type = /datum/instrument/fun
-
-/datum/instrument/fun/honk
- name = "!!HONK!!"
- id = "honk"
- real_samples = list("74"='sound/items/bikehorn.ogg') // Cluwne Heaven
-
-/datum/instrument/fun/signal
- name = "Ping"
- id = "ping"
- real_samples = list("79"='sound/machines/ping.ogg')
-
-/datum/instrument/fun/chime
- name = "Chime"
- id = "chime"
- real_samples = list("79"='sound/machines/chime.ogg')
-
-/datum/instrument/fun/nya
- name = "NYA NYA NYA"
- id = "nyanyanya"
- real_samples = list("79" = 'modular_citadel/sound/voice/nya.ogg')
- admin_only = TRUE
+/datum/instrument/fun
+ name = "Generic Fun Instrument"
+ category = "Fun"
+ abstract_type = /datum/instrument/fun
+
+/datum/instrument/fun/honk
+ name = "!!HONK!!"
+ id = "honk"
+ real_samples = list("74"='sound/items/bikehorn.ogg') // Cluwne Heaven
+
+/datum/instrument/fun/signal
+ name = "Ping"
+ id = "ping"
+ real_samples = list("79"='sound/machines/ping.ogg')
+
+/datum/instrument/fun/chime
+ name = "Chime"
+ id = "chime"
+ real_samples = list("79"='sound/machines/chime.ogg')
+
+/datum/instrument/fun/nya
+ name = "NYA NYA NYA"
+ id = "nyanyanya"
+ real_samples = list("79" = 'modular_citadel/sound/voice/nya.ogg')
+ admin_only = TRUE
diff --git a/code/modules/instruments/instrument_data/guitar.dm b/code/modules/instruments/instrument_data/guitar.dm
index e36fce97494..be7cfbe467b 100644
--- a/code/modules/instruments/instrument_data/guitar.dm
+++ b/code/modules/instruments/instrument_data/guitar.dm
@@ -1,36 +1,36 @@
-/datum/instrument/guitar
- name = "Generic guitar-like instrument"
- category = "Guitar"
- abstract_type = /datum/instrument/guitar
-
-/datum/instrument/guitar/steel_crisis
- name = "Crisis Steel String Guitar"
- id = "csteelgt"
- real_samples = list("36"='sound/instruments/synthesis_samples/guitar/crisis_steel/c2.ogg',
- "48"='sound/instruments/synthesis_samples/guitar/crisis_steel/c3.ogg',
- "60"='sound/instruments/synthesis_samples/guitar/crisis_steel/c4.ogg',
- "72"='sound/instruments/synthesis_samples/guitar/crisis_steel/c5.ogg')
-
-/datum/instrument/guitar/nylon_crisis
- name = "Crisis Nylon String Guitar"
- id = "cnylongt"
- real_samples = list("36"='sound/instruments/synthesis_samples/guitar/crisis_nylon/c2.ogg',
- "48"='sound/instruments/synthesis_samples/guitar/crisis_nylon/c3.ogg',
- "60"='sound/instruments/synthesis_samples/guitar/crisis_nylon/c4.ogg',
- "72"='sound/instruments/synthesis_samples/guitar/crisis_nylon/c5.ogg')
-
-/datum/instrument/guitar/clean_crisis
- name = "Crisis Clean Guitar"
- id = "ccleangt"
- real_samples = list("36"='sound/instruments/synthesis_samples/guitar/crisis_clean/c2.ogg',
- "48"='sound/instruments/synthesis_samples/guitar/crisis_clean/c3.ogg',
- "60"='sound/instruments/synthesis_samples/guitar/crisis_clean/c4.ogg',
- "72"='sound/instruments/synthesis_samples/guitar/crisis_clean/c5.ogg')
-
-/datum/instrument/guitar/muted_crisis
- name = "Crisis Muted Guitar"
- id = "cmutedgt"
- real_samples = list("36"='sound/instruments/synthesis_samples/guitar/crisis_muted/c2.ogg',
- "48"='sound/instruments/synthesis_samples/guitar/crisis_muted/c3.ogg',
- "60"='sound/instruments/synthesis_samples/guitar/crisis_muted/c4.ogg',
- "72"='sound/instruments/synthesis_samples/guitar/crisis_muted/c5.ogg')
+/datum/instrument/guitar
+ name = "Generic guitar-like instrument"
+ category = "Guitar"
+ abstract_type = /datum/instrument/guitar
+
+/datum/instrument/guitar/steel_crisis
+ name = "Crisis Steel String Guitar"
+ id = "csteelgt"
+ real_samples = list("36"='sound/instruments/synthesis_samples/guitar/crisis_steel/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/guitar/crisis_steel/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/guitar/crisis_steel/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/guitar/crisis_steel/c5.ogg')
+
+/datum/instrument/guitar/nylon_crisis
+ name = "Crisis Nylon String Guitar"
+ id = "cnylongt"
+ real_samples = list("36"='sound/instruments/synthesis_samples/guitar/crisis_nylon/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/guitar/crisis_nylon/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/guitar/crisis_nylon/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/guitar/crisis_nylon/c5.ogg')
+
+/datum/instrument/guitar/clean_crisis
+ name = "Crisis Clean Guitar"
+ id = "ccleangt"
+ real_samples = list("36"='sound/instruments/synthesis_samples/guitar/crisis_clean/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/guitar/crisis_clean/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/guitar/crisis_clean/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/guitar/crisis_clean/c5.ogg')
+
+/datum/instrument/guitar/muted_crisis
+ name = "Crisis Muted Guitar"
+ id = "cmutedgt"
+ real_samples = list("36"='sound/instruments/synthesis_samples/guitar/crisis_muted/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/guitar/crisis_muted/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/guitar/crisis_muted/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/guitar/crisis_muted/c5.ogg')
diff --git a/code/modules/instruments/instrument_data/hardcoded.dm b/code/modules/instruments/instrument_data/hardcoded.dm
index 33639d3ca9a..757fea08a8c 100644
--- a/code/modules/instruments/instrument_data/hardcoded.dm
+++ b/code/modules/instruments/instrument_data/hardcoded.dm
@@ -1,86 +1,86 @@
-//THESE ARE HARDCODED INSTRUMENT SAMPLES.
-//SONGS WILL BE AUTOMATICALLY SWITCHED TO LEGACY MODE IF THEY USE THIS KIND OF INSTRUMENT!
-//I'd prefer these stayed. They sound different from the mechanical synthesis of synthed instruments, and I quite like them that way. It's not legacy, it's hardcoded, old style. - kevinz000
-/datum/instrument/hardcoded
- abstract_type = /datum/instrument/hardcoded
- category = "Non-Synthesized"
- instrument_flags = INSTRUMENT_LEGACY
- volume_multiplier = 1 //not as loud as synth'd
-
-/datum/instrument/hardcoded/accordian
- name = "Accordian"
- id = "accordian"
- legacy_instrument_ext = "mid"
- legacy_instrument_path = "accordian"
-
-/datum/instrument/hardcoded/bikehorn
- name = "Bike Horn"
- id = "bikehorn"
- legacy_instrument_ext = "ogg"
- legacy_instrument_path = "bikehorn"
-
-/datum/instrument/hardcoded/eguitar
- name = "Electric Guitar"
- id = "eguitar"
- legacy_instrument_ext = "ogg"
- legacy_instrument_path = "eguitar"
-
-/datum/instrument/hardcoded/glockenspiel
- name = "Glockenspiel"
- id = "glockenspiel"
- legacy_instrument_ext = "mid"
- legacy_instrument_path = "glockenspiel"
-
-/datum/instrument/hardcoded/guitar
- name = "Guitar"
- id = "guitar"
- legacy_instrument_ext = "ogg"
- legacy_instrument_path = "guitar"
-
-/datum/instrument/hardcoded/harmonica
- name = "Harmonica"
- id = "harmonica"
- legacy_instrument_ext = "mid"
- legacy_instrument_path = "harmonica"
-
-/datum/instrument/hardcoded/piano
- name = "Piano"
- id = "piano"
- legacy_instrument_ext = "ogg"
- legacy_instrument_path = "piano"
-
-/datum/instrument/hardcoded/recorder
- name = "Recorder"
- id = "recorder"
- legacy_instrument_ext = "mid"
- legacy_instrument_path = "recorder"
-
-/datum/instrument/hardcoded/saxophone
- name = "Saxophone"
- id = "saxophone"
- legacy_instrument_ext = "mid"
- legacy_instrument_path = "saxophone"
-
-/datum/instrument/hardcoded/trombone
- name = "Trombone"
- id = "trombone"
- legacy_instrument_ext = "mid"
- legacy_instrument_path = "trombone"
-
-/datum/instrument/hardcoded/violin
- name = "Violin"
- id = "violin"
- legacy_instrument_ext = "mid"
- legacy_instrument_path = "violin"
-
-/datum/instrument/hardcoded/xylophone
- name = "Xylophone"
- id = "xylophone"
- legacy_instrument_ext = "mid"
- legacy_instrument_path = "xylophone"
-
-/datum/instrument/hardcoded/banjo
- name = "Banjo"
- id = "banjo"
- legacy_instrument_ext = "ogg"
- legacy_instrument_path = "banjo"
+//THESE ARE HARDCODED INSTRUMENT SAMPLES.
+//SONGS WILL BE AUTOMATICALLY SWITCHED TO LEGACY MODE IF THEY USE THIS KIND OF INSTRUMENT!
+//I'd prefer these stayed. They sound different from the mechanical synthesis of synthed instruments, and I quite like them that way. It's not legacy, it's hardcoded, old style. - kevinz000
+/datum/instrument/hardcoded
+ abstract_type = /datum/instrument/hardcoded
+ category = "Non-Synthesized"
+ instrument_flags = INSTRUMENT_LEGACY
+ volume_multiplier = 1 //not as loud as synth'd
+
+/datum/instrument/hardcoded/accordian
+ name = "Accordian"
+ id = "accordian"
+ legacy_instrument_ext = "mid"
+ legacy_instrument_path = "accordian"
+
+/datum/instrument/hardcoded/bikehorn
+ name = "Bike Horn"
+ id = "bikehorn"
+ legacy_instrument_ext = "ogg"
+ legacy_instrument_path = "bikehorn"
+
+/datum/instrument/hardcoded/eguitar
+ name = "Electric Guitar"
+ id = "eguitar"
+ legacy_instrument_ext = "ogg"
+ legacy_instrument_path = "eguitar"
+
+/datum/instrument/hardcoded/glockenspiel
+ name = "Glockenspiel"
+ id = "glockenspiel"
+ legacy_instrument_ext = "mid"
+ legacy_instrument_path = "glockenspiel"
+
+/datum/instrument/hardcoded/guitar
+ name = "Guitar"
+ id = "guitar"
+ legacy_instrument_ext = "ogg"
+ legacy_instrument_path = "guitar"
+
+/datum/instrument/hardcoded/harmonica
+ name = "Harmonica"
+ id = "harmonica"
+ legacy_instrument_ext = "mid"
+ legacy_instrument_path = "harmonica"
+
+/datum/instrument/hardcoded/piano
+ name = "Piano"
+ id = "piano"
+ legacy_instrument_ext = "ogg"
+ legacy_instrument_path = "piano"
+
+/datum/instrument/hardcoded/recorder
+ name = "Recorder"
+ id = "recorder"
+ legacy_instrument_ext = "mid"
+ legacy_instrument_path = "recorder"
+
+/datum/instrument/hardcoded/saxophone
+ name = "Saxophone"
+ id = "saxophone"
+ legacy_instrument_ext = "mid"
+ legacy_instrument_path = "saxophone"
+
+/datum/instrument/hardcoded/trombone
+ name = "Trombone"
+ id = "trombone"
+ legacy_instrument_ext = "mid"
+ legacy_instrument_path = "trombone"
+
+/datum/instrument/hardcoded/violin
+ name = "Violin"
+ id = "violin"
+ legacy_instrument_ext = "mid"
+ legacy_instrument_path = "violin"
+
+/datum/instrument/hardcoded/xylophone
+ name = "Xylophone"
+ id = "xylophone"
+ legacy_instrument_ext = "mid"
+ legacy_instrument_path = "xylophone"
+
+/datum/instrument/hardcoded/banjo
+ name = "Banjo"
+ id = "banjo"
+ legacy_instrument_ext = "ogg"
+ legacy_instrument_path = "banjo"
diff --git a/code/modules/instruments/instrument_data/organ.dm b/code/modules/instruments/instrument_data/organ.dm
index 75fcd1727b5..25da7409980 100644
--- a/code/modules/instruments/instrument_data/organ.dm
+++ b/code/modules/instruments/instrument_data/organ.dm
@@ -1,43 +1,43 @@
-/datum/instrument/organ
- name = "Generic organ"
- category = "Organ"
- abstract_type = /datum/instrument/organ
-
-/datum/instrument/organ/crisis_church
- name = "Crisis Church Organ"
- id = "crichugan"
- real_samples = list("36"='sound/instruments/synthesis_samples/organ/crisis_church/c2.ogg',
- "48"='sound/instruments/synthesis_samples/organ/crisis_church/c3.ogg',
- "60"='sound/instruments/synthesis_samples/organ/crisis_church/c4.ogg',
- "72"='sound/instruments/synthesis_samples/organ/crisis_church/c5.ogg')
-
-/datum/instrument/organ/crisis_hammond
- name = "Crisis Hammond Organ"
- id = "crihamgan"
- real_samples = list("36"='sound/instruments/synthesis_samples/organ/crisis_hammond/c2.ogg',
- "48"='sound/instruments/synthesis_samples/organ/crisis_hammond/c3.ogg',
- "60"='sound/instruments/synthesis_samples/organ/crisis_hammond/c4.ogg',
- "72"='sound/instruments/synthesis_samples/organ/crisis_hammond/c5.ogg')
-
-/datum/instrument/organ/crisis_accordian
- name = "Crisis Accordian"
- id = "crack"
- real_samples = list("36"='sound/instruments/synthesis_samples/organ/crisis_accordian/c2.ogg',
- "48"='sound/instruments/synthesis_samples/organ/crisis_accordian/c3.ogg',
- "60"='sound/instruments/synthesis_samples/organ/crisis_accordian/c4.ogg',
- "72"='sound/instruments/synthesis_samples/organ/crisis_accordian/c5.ogg')
-
-/datum/instrument/organ/crisis_harmonica
- name = "Crisis Harmonica"
- id = "crharmony"
- real_samples = list("48"='sound/instruments/synthesis_samples/organ/crisis_harmonica/c3.ogg',
- "60"='sound/instruments/synthesis_samples/organ/crisis_harmonica/c4.ogg',
- "72"='sound/instruments/synthesis_samples/organ/crisis_harmonica/c5.ogg')
-
-/datum/instrument/organ/crisis_tango_accordian
- name = "Crisis Tango Accordian"
- id = "crtango"
- real_samples = list("36"='sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c2.ogg',
- "48"='sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c3.ogg',
- "60"='sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c4.ogg',
- "72"='sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c5.ogg')
+/datum/instrument/organ
+ name = "Generic organ"
+ category = "Organ"
+ abstract_type = /datum/instrument/organ
+
+/datum/instrument/organ/crisis_church
+ name = "Crisis Church Organ"
+ id = "crichugan"
+ real_samples = list("36"='sound/instruments/synthesis_samples/organ/crisis_church/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/organ/crisis_church/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/organ/crisis_church/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/organ/crisis_church/c5.ogg')
+
+/datum/instrument/organ/crisis_hammond
+ name = "Crisis Hammond Organ"
+ id = "crihamgan"
+ real_samples = list("36"='sound/instruments/synthesis_samples/organ/crisis_hammond/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/organ/crisis_hammond/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/organ/crisis_hammond/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/organ/crisis_hammond/c5.ogg')
+
+/datum/instrument/organ/crisis_accordian
+ name = "Crisis Accordian"
+ id = "crack"
+ real_samples = list("36"='sound/instruments/synthesis_samples/organ/crisis_accordian/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/organ/crisis_accordian/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/organ/crisis_accordian/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/organ/crisis_accordian/c5.ogg')
+
+/datum/instrument/organ/crisis_harmonica
+ name = "Crisis Harmonica"
+ id = "crharmony"
+ real_samples = list("48"='sound/instruments/synthesis_samples/organ/crisis_harmonica/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/organ/crisis_harmonica/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/organ/crisis_harmonica/c5.ogg')
+
+/datum/instrument/organ/crisis_tango_accordian
+ name = "Crisis Tango Accordian"
+ id = "crtango"
+ real_samples = list("36"='sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/organ/crisis_tangaccordian/c5.ogg')
diff --git a/code/modules/instruments/instrument_data/piano.dm b/code/modules/instruments/instrument_data/piano.dm
index e5058058fb3..fdd2f6e9382 100644
--- a/code/modules/instruments/instrument_data/piano.dm
+++ b/code/modules/instruments/instrument_data/piano.dm
@@ -1,56 +1,56 @@
-/datum/instrument/piano
- name = "Generic piano"
- category = "Piano"
- abstract_type = /datum/instrument/piano
-
-/datum/instrument/piano/fluid_piano
- name = "FluidR3 Grand Piano"
- id = "r3grand"
- real_samples = list("36"='sound/instruments/synthesis_samples/piano/fluid_piano/c2.ogg',
- "48"='sound/instruments/synthesis_samples/piano/fluid_piano/c3.ogg',
- "60"='sound/instruments/synthesis_samples/piano/fluid_piano/c4.ogg',
- "72"='sound/instruments/synthesis_samples/piano/fluid_piano/c5.ogg',
- "84"='sound/instruments/synthesis_samples/piano/fluid_piano/c6.ogg',
- "96"='sound/instruments/synthesis_samples/piano/fluid_piano/c7.ogg',
- "108"='sound/instruments/synthesis_samples/piano/fluid_piano/c8.ogg')
-
-/datum/instrument/piano/fluid_harpsichord
- name = "FluidR3 Harpsichord"
- id = "r3harpsi"
- real_samples = list("36"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c2.ogg',
- "48"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c3.ogg',
- "60"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c4.ogg',
- "72"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c5.ogg',
- "84"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c6.ogg',
- "96"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c7.ogg',
- "108"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c8.ogg')
-
-/datum/instrument/piano/crisis_harpsichord
- name = "Crisis Harpsichord"
- id = "crharpsi"
- real_samples = list("36"='sound/instruments/synthesis_samples/piano/crisis_harpsichord/c2.ogg',
- "48"='sound/instruments/synthesis_samples/piano/crisis_harpsichord/c3.ogg',
- "60"='sound/instruments/synthesis_samples/piano/crisis_harpsichord/c4.ogg',
- "72"='sound/instruments/synthesis_samples/piano/crisis_harpsichord/c5.ogg')
-
-/datum/instrument/piano/crisis_grandpiano_uni
- name = "Crisis Grand Piano One"
- id = "crgrand1"
- real_samples = list("36"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c2.ogg',
- "48"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c3.ogg',
- "60"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c4.ogg',
- "72"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c5.ogg',
- "84"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c6.ogg',
- "96"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c7.ogg',
- "108"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c8.ogg')
-
-/datum/instrument/piano/crisis_brightpiano_uni
- name = "Crisis Bright Piano One"
- id = "crbright1"
- real_samples = list("36"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c2.ogg',
- "48"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c3.ogg',
- "60"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c4.ogg',
- "72"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c5.ogg',
- "84"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c6.ogg',
- "96"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c7.ogg',
- "108"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c8.ogg')
+/datum/instrument/piano
+ name = "Generic piano"
+ category = "Piano"
+ abstract_type = /datum/instrument/piano
+
+/datum/instrument/piano/fluid_piano
+ name = "FluidR3 Grand Piano"
+ id = "r3grand"
+ real_samples = list("36"='sound/instruments/synthesis_samples/piano/fluid_piano/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/piano/fluid_piano/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/piano/fluid_piano/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/piano/fluid_piano/c5.ogg',
+ "84"='sound/instruments/synthesis_samples/piano/fluid_piano/c6.ogg',
+ "96"='sound/instruments/synthesis_samples/piano/fluid_piano/c7.ogg',
+ "108"='sound/instruments/synthesis_samples/piano/fluid_piano/c8.ogg')
+
+/datum/instrument/piano/fluid_harpsichord
+ name = "FluidR3 Harpsichord"
+ id = "r3harpsi"
+ real_samples = list("36"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c5.ogg',
+ "84"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c6.ogg',
+ "96"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c7.ogg',
+ "108"='sound/instruments/synthesis_samples/piano/fluid_harpsi/c8.ogg')
+
+/datum/instrument/piano/crisis_harpsichord
+ name = "Crisis Harpsichord"
+ id = "crharpsi"
+ real_samples = list("36"='sound/instruments/synthesis_samples/piano/crisis_harpsichord/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/piano/crisis_harpsichord/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/piano/crisis_harpsichord/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/piano/crisis_harpsichord/c5.ogg')
+
+/datum/instrument/piano/crisis_grandpiano_uni
+ name = "Crisis Grand Piano One"
+ id = "crgrand1"
+ real_samples = list("36"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c5.ogg',
+ "84"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c6.ogg',
+ "96"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c7.ogg',
+ "108"='sound/instruments/synthesis_samples/piano/crisis_grand_piano/c8.ogg')
+
+/datum/instrument/piano/crisis_brightpiano_uni
+ name = "Crisis Bright Piano One"
+ id = "crbright1"
+ real_samples = list("36"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c2.ogg',
+ "48"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c3.ogg',
+ "60"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c4.ogg',
+ "72"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c5.ogg',
+ "84"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c6.ogg',
+ "96"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c7.ogg',
+ "108"='sound/instruments/synthesis_samples/piano/crisis_bright_piano/c8.ogg')
diff --git a/code/modules/instruments/instrument_data/synth_tones.dm b/code/modules/instruments/instrument_data/synth_tones.dm
index cfdf7f0df2f..9ad9250f40d 100644
--- a/code/modules/instruments/instrument_data/synth_tones.dm
+++ b/code/modules/instruments/instrument_data/synth_tones.dm
@@ -1,19 +1,19 @@
-/datum/instrument/tones
- name = "Ideal tone"
- category = "Tones"
- abstract_type = /datum/instrument/tones
-
-/datum/instrument/tones/square_wave
- name = "Ideal square wave"
- id = "square"
- real_samples = list("81"='sound/instruments/synthesis_samples/tones/Square.ogg')
-
-/datum/instrument/tones/sine_wave
- name = "Ideal sine wave"
- id = "sine"
- real_samples = list("81"='sound/instruments/synthesis_samples/tones/Sine.ogg')
-
-/datum/instrument/tones/saw_wave
- name = "Ideal sawtooth wave"
- id = "saw"
- real_samples = list("81"='sound/instruments/synthesis_samples/tones/Sawtooth.ogg')
+/datum/instrument/tones
+ name = "Ideal tone"
+ category = "Tones"
+ abstract_type = /datum/instrument/tones
+
+/datum/instrument/tones/square_wave
+ name = "Ideal square wave"
+ id = "square"
+ real_samples = list("81"='sound/instruments/synthesis_samples/tones/Square.ogg')
+
+/datum/instrument/tones/sine_wave
+ name = "Ideal sine wave"
+ id = "sine"
+ real_samples = list("81"='sound/instruments/synthesis_samples/tones/Sine.ogg')
+
+/datum/instrument/tones/saw_wave
+ name = "Ideal sawtooth wave"
+ id = "saw"
+ real_samples = list("81"='sound/instruments/synthesis_samples/tones/Sawtooth.ogg')
diff --git a/code/modules/instruments/instruments/item.dm b/code/modules/instruments/instruments/item.dm
index f8bb8f3295e..e0a3ff6221c 100644
--- a/code/modules/instruments/instruments/item.dm
+++ b/code/modules/instruments/instruments/item.dm
@@ -1,321 +1,321 @@
-//copy pasta of the space piano, don't hurt me -Pete
-/obj/item/instrument
- name = "generic instrument"
- force = 10
-// max_integrity = 100
-// resistance_flags = FLAMMABLE
- icon = 'icons/obj/musician.dmi'
- item_icons = list(
- slot_l_hand_str = 'icons/mob/inhands/equipment/instruments_lefthand.dmi',
- slot_r_hand_str = 'icons/mob/inhands/equipment/instruments_righthand.dmi'
- )
- var/datum/song/handheld/song
- var/list/allowed_instrument_ids
-// var/tune_time_left = 0
-
-/obj/item/instrument/Initialize(mapload)
- . = ..()
- song = new(src, allowed_instrument_ids)
- allowed_instrument_ids = null //We don't need this clogging memory after it's used.
-
-/obj/item/instrument/Destroy()
- QDEL_NULL(song)
-/*
- if(tune_time_left)
- STOP_PROCESSING(SSprocessing, src)
-*/
- return ..()
-
-/obj/item/instrument/proc/should_stop_playing(mob/user)
- return !Adjacent(user) && !(storage_depth(user) < 3)
-
-/*
-/obj/item/instrument/process(wait)
- if(is_tuned())
- if (song.playing)
- for (var/mob/living/M in song.hearing_mobs)
- M.dizziness = max(0,M.dizziness-2)
- M.jitteriness = max(0,M.jitteriness-2)
- M.confused = max(M.confused-1)
- SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "goodmusic", /datum/mood_event/goodmusic)
- tune_time_left -= wait
- else
- tune_time_left = 0
- if (song.playing)
- loc.visible_message("[src] starts sounding a little off...")
- STOP_PROCESSING(SSprocessing, src)
-*/
-
-/obj/item/instrument/suicide_act(mob/user)
- user.visible_message("[user] begins to play 'Gloomy Sunday'! It looks like they're trying to commit suicide!")
- return (BRUTELOSS)
-
-/obj/item/instrument/attack_self(mob/user)
- if(!user.IsAdvancedToolUser())
- to_chat(user, "You don't have the dexterity to do this!")
- return TRUE
- interact(user)
-
-/*
-/obj/item/instrument/attackby(obj/item/W, mob/user, params)
- if(istype(W, /obj/item/musicaltuner))
- var/mob/living/carbon/human/H = user
- if (HAS_TRAIT(H, TRAIT_MUSICIAN))
- if (!is_tuned())
- H.visible_message("[H] tunes the [src] to perfection!", "You tune the [src] to perfection!")
- tune_time_left = 600 SECONDS
- START_PROCESSING(SSprocessing, src)
- else
- to_chat(H, "[src] is already well tuned!")
- else
- to_chat(H, "You have no idea how to use this.")
-
-/obj/item/instrument/proc/is_tuned()
- return tune_time_left > 0
-*/
-
-/obj/item/instrument/interact(mob/user)
- ui_interact(user)
-
-/obj/item/instrument/ui_interact(mob/living/user)
- if(!isliving(user) || user.stat || user.restrained())
- return
-
- user.set_machine(src)
- song.ui_interact(user)
-
-/obj/item/instrument/violin
- name = "space violin"
- desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
- icon_state = "violin"
- item_state = "violin"
- hitsound = "swing_hit"
- allowed_instrument_ids = "violin"
-
-/obj/item/instrument/violin/golden
- name = "golden violin"
- desc = "A golden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
- icon_state = "golden_violin"
- item_state = "golden_violin"
- unacidable = TRUE
-// resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
-
-/obj/item/instrument/piano_synth
- name = "synthesizer"
- desc = "An advanced electronic synthesizer that can be used as various instruments."
- icon_state = "synth"
- item_state = "synth"
- allowed_instrument_ids = "piano"
-
-/obj/item/instrument/piano_synth/Initialize()
- . = ..()
- song.allowed_instrument_ids = get_allowed_instrument_ids()
-
-/obj/item/instrument/guitar
- name = "guitar"
- desc = "It's made of wood and has bronze strings."
- icon_state = "guitar"
- item_state = "guitar"
- attack_verb = list("played metal on", "serenaded", "crashed", "smashed")
- hitsound = 'sound/weapons/stringsmash.ogg'
- allowed_instrument_ids = "guitar"
-
-/obj/item/instrument/eguitar
- name = "electric guitar"
- desc = "Makes all your shredding needs possible."
- icon_state = "eguitar"
- item_state = "eguitar"
- force = 12
- attack_verb = list("played metal on", "shredded", "crashed", "smashed")
- hitsound = 'sound/weapons/stringsmash.ogg'
- allowed_instrument_ids = "eguitar"
-
-/obj/item/instrument/glockenspiel
- name = "glockenspiel"
- desc = "Smooth metal bars perfect for any marching band."
- icon_state = "glockenspiel"
- item_state = "glockenspiel"
- allowed_instrument_ids = "glockenspiel"
-
-/obj/item/instrument/accordion
- name = "accordion"
- desc = "Pun-Pun not included."
- icon_state = "accordion"
- item_state = "accordion"
- allowed_instrument_ids = "accordion"
-
-/obj/item/instrument/trumpet
- name = "trumpet"
- desc = "To announce the arrival of the king!"
- icon_state = "trumpet"
- item_state = "trombone"
- allowed_instrument_ids = "trombone"
-
-/obj/item/instrument/trumpet/spectral
- name = "spectral trumpet"
- desc = "Things are about to get spooky!"
- icon_state = "trumpet"
- item_state = "trombone"
- force = 0
- attack_verb = list("played","jazzed","trumpeted","mourned","dooted","spooked")
-
-/*
-/obj/item/instrument/trumpet/spectral/Initialize()
- . = ..()
- AddComponent(/datum/component/spooky)
-*/
-
-/obj/item/instrument/trumpet/spectral/attack(mob/living/carbon/C, mob/user)
- playsound (loc, 'sound/instruments/trombone/En4.mid', 100,1,-1)
- ..()
-
-/obj/item/instrument/saxophone
- name = "saxophone"
- desc = "This soothing sound will be sure to leave your audience in tears."
- icon_state = "saxophone"
- item_state = "saxophone"
- allowed_instrument_ids = "saxophone"
-
-/obj/item/instrument/saxophone/spectral
- name = "spectral saxophone"
- desc = "This spooky sound will be sure to leave mortals in bones."
- icon_state = "saxophone"
- item_state = "saxophone"
- force = 0
- attack_verb = list("played","jazzed","saxxed","mourned","dooted","spooked")
-
-/*
-/obj/item/instrument/saxophone/spectral/Initialize()
- . = ..()
- AddComponent(/datum/component/spooky)
-*/
-
-/obj/item/instrument/saxophone/spectral/attack(mob/living/carbon/C, mob/user)
- playsound(loc, 'sound/instruments/saxophone/En4.mid', 100,1,-1)
- ..()
-
-/obj/item/instrument/trombone
- name = "trombone"
- desc = "How can any pool table ever hope to compete?"
- icon_state = "trombone"
- item_state = "trombone"
- allowed_instrument_ids = "trombone"
-
-/obj/item/instrument/trombone/spectral
- name = "spectral trombone"
- desc = "A skeleton's favorite instrument. Apply directly on the mortals."
- icon_state = "trombone"
- item_state = "trombone"
- force = 0
- attack_verb = list("played","jazzed","tromboned","mourned","dooted","spooked")
-
-/*
-/obj/item/instrument/trombone/spectral/Initialize()
- . = ..()
- AddComponent(/datum/component/spooky)
-*/
-
-/obj/item/instrument/trombone/spectral/attack(mob/living/carbon/C, mob/user)
- playsound(loc, 'sound/instruments/trombone/Cn4.mid', 100,1,-1)
- ..()
-
-/obj/item/instrument/recorder
- name = "recorder"
- desc = "Just like in school, playing ability and all."
- force = 5
- icon_state = "recorder"
- item_state = "recorder"
- allowed_instrument_ids = "recorder"
-
-/obj/item/instrument/harmonica
- name = "harmonica"
- desc = "For when you get a bad case of the space blues."
- icon_state = "harmonica"
- item_state = "harmonica"
- allowed_instrument_ids = "harmonica"
-// slot_flags = ITEM_SLOT_MASK
- force = 5
- w_class = WEIGHT_CLASS_SMALL
-// actions_types = list(/datum/action/item_action/instrument)
-
-/*
-/obj/item/instrument/harmonica/proc/handle_speech(datum/source, list/speech_args)
- if(song.playing && ismob(loc))
- to_chat(loc, "You stop playing the harmonica to talk...")
- song.playing = FALSE
-
-/obj/item/instrument/harmonica/equipped(mob/M, slot)
- . = ..()
- RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
-
-/obj/item/instrument/harmonica/dropped(mob/M)
- . = ..()
- UnregisterSignal(M, COMSIG_MOB_SAY)
-*/
-
-/obj/item/instrument/bikehorn
- name = "gilded bike horn"
- desc = "An exquisitely decorated bike horn, capable of honking in a variety of notes."
- icon_state = "bike_horn"
- item_state = "bike_horn"
- item_icons = list(
- slot_l_hand_str = 'icons/mob/inhands/equipment/horns_lefthand.dmi',
- slot_r_hand_str = 'icons/mob/inhands/equipment/horns_righthand.dmi'
- )
- attack_verb = list("beautifully honks")
- allowed_instrument_ids = "bikehorn"
- w_class = WEIGHT_CLASS_TINY
- force = 0
- throw_speed = 3
- throw_range = 15
- hitsound = 'sound/items/bikehorn.ogg'
-
-/obj/item/instrument/banjo
- name = "banjo"
- desc = "A 'Mura' brand banjo. It's pretty much just a drum with a neck and strings."
- icon_state = "banjo"
- item_state = "banjo"
- attack_verb = list("scruggs-styled", "hum-diggitied", "shin-digged", "clawhammered")
- hitsound = 'sound/weapons/banjoslap.ogg'
- allowed_instrument_ids = "banjo"
-
-/*
-/obj/item/musicaltuner
- name = "musical tuner"
- desc = "A device for tuning musical instruments both manual and electronic alike."
- icon = 'icons/obj/device.dmi'
- icon_state = "musicaltuner"
- slot_flags = ITEM_SLOT_BELT
- w_class = WEIGHT_CLASS_SMALL
- item_state = "electronic"
- lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
- righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
-*/
-
-/*
-/obj/item/choice_beacon/music
- name = "instrument delivery beacon"
- desc = "Summon your tool of art."
- icon_state = "gangtool-red"
-
-/obj/item/choice_beacon/music/generate_display_names()
- var/static/list/instruments
- if(!instruments)
- instruments = list()
- var/list/templist = list(/obj/item/instrument/violin,
- /obj/item/instrument/piano_synth,
- /obj/item/instrument/guitar,
- /obj/item/instrument/eguitar,
- /obj/item/instrument/glockenspiel,
- /obj/item/instrument/accordion,
- /obj/item/instrument/trumpet,
- /obj/item/instrument/saxophone,
- /obj/item/instrument/trombone,
- /obj/item/instrument/recorder,
- /obj/item/instrument/harmonica
- )
- for(var/V in templist)
- var/atom/A = V
- instruments[initial(A.name)] = A
- return instruments
-*/
+//copy pasta of the space piano, don't hurt me -Pete
+/obj/item/instrument
+ name = "generic instrument"
+ force = 10
+// max_integrity = 100
+// resistance_flags = FLAMMABLE
+ icon = 'icons/obj/musician.dmi'
+ item_icons = list(
+ slot_l_hand_str = 'icons/mob/inhands/equipment/instruments_lefthand.dmi',
+ slot_r_hand_str = 'icons/mob/inhands/equipment/instruments_righthand.dmi'
+ )
+ var/datum/song/handheld/song
+ var/list/allowed_instrument_ids
+// var/tune_time_left = 0
+
+/obj/item/instrument/Initialize(mapload)
+ . = ..()
+ song = new(src, allowed_instrument_ids)
+ allowed_instrument_ids = null //We don't need this clogging memory after it's used.
+
+/obj/item/instrument/Destroy()
+ QDEL_NULL(song)
+/*
+ if(tune_time_left)
+ STOP_PROCESSING(SSprocessing, src)
+*/
+ return ..()
+
+/obj/item/instrument/proc/should_stop_playing(mob/user)
+ return !Adjacent(user) && !(storage_depth(user) < 3)
+
+/*
+/obj/item/instrument/process(wait)
+ if(is_tuned())
+ if (song.playing)
+ for (var/mob/living/M in song.hearing_mobs)
+ M.dizziness = max(0,M.dizziness-2)
+ M.jitteriness = max(0,M.jitteriness-2)
+ M.confused = max(M.confused-1)
+ SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "goodmusic", /datum/mood_event/goodmusic)
+ tune_time_left -= wait
+ else
+ tune_time_left = 0
+ if (song.playing)
+ loc.visible_message("[src] starts sounding a little off...")
+ STOP_PROCESSING(SSprocessing, src)
+*/
+
+/obj/item/instrument/suicide_act(mob/user)
+ user.visible_message("[user] begins to play 'Gloomy Sunday'! It looks like they're trying to commit suicide!")
+ return (BRUTELOSS)
+
+/obj/item/instrument/attack_self(mob/user)
+ if(!user.IsAdvancedToolUser())
+ to_chat(user, "You don't have the dexterity to do this!")
+ return TRUE
+ interact(user)
+
+/*
+/obj/item/instrument/attackby(obj/item/W, mob/user, params)
+ if(istype(W, /obj/item/musicaltuner))
+ var/mob/living/carbon/human/H = user
+ if (HAS_TRAIT(H, TRAIT_MUSICIAN))
+ if (!is_tuned())
+ H.visible_message("[H] tunes the [src] to perfection!", "You tune the [src] to perfection!")
+ tune_time_left = 600 SECONDS
+ START_PROCESSING(SSprocessing, src)
+ else
+ to_chat(H, "[src] is already well tuned!")
+ else
+ to_chat(H, "You have no idea how to use this.")
+
+/obj/item/instrument/proc/is_tuned()
+ return tune_time_left > 0
+*/
+
+/obj/item/instrument/interact(mob/user)
+ ui_interact(user)
+
+/obj/item/instrument/ui_interact(mob/living/user)
+ if(!isliving(user) || user.stat || user.restrained())
+ return
+
+ user.set_machine(src)
+ song.ui_interact(user)
+
+/obj/item/instrument/violin
+ name = "space violin"
+ desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
+ icon_state = "violin"
+ item_state = "violin"
+ hitsound = "swing_hit"
+ allowed_instrument_ids = "violin"
+
+/obj/item/instrument/violin/golden
+ name = "golden violin"
+ desc = "A golden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
+ icon_state = "golden_violin"
+ item_state = "golden_violin"
+ unacidable = TRUE
+// resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
+
+/obj/item/instrument/piano_synth
+ name = "synthesizer"
+ desc = "An advanced electronic synthesizer that can be used as various instruments."
+ icon_state = "synth"
+ item_state = "synth"
+ allowed_instrument_ids = "piano"
+
+/obj/item/instrument/piano_synth/Initialize()
+ . = ..()
+ song.allowed_instrument_ids = get_allowed_instrument_ids()
+
+/obj/item/instrument/guitar
+ name = "guitar"
+ desc = "It's made of wood and has bronze strings."
+ icon_state = "guitar"
+ item_state = "guitar"
+ attack_verb = list("played metal on", "serenaded", "crashed", "smashed")
+ hitsound = 'sound/weapons/stringsmash.ogg'
+ allowed_instrument_ids = "guitar"
+
+/obj/item/instrument/eguitar
+ name = "electric guitar"
+ desc = "Makes all your shredding needs possible."
+ icon_state = "eguitar"
+ item_state = "eguitar"
+ force = 12
+ attack_verb = list("played metal on", "shredded", "crashed", "smashed")
+ hitsound = 'sound/weapons/stringsmash.ogg'
+ allowed_instrument_ids = "eguitar"
+
+/obj/item/instrument/glockenspiel
+ name = "glockenspiel"
+ desc = "Smooth metal bars perfect for any marching band."
+ icon_state = "glockenspiel"
+ item_state = "glockenspiel"
+ allowed_instrument_ids = "glockenspiel"
+
+/obj/item/instrument/accordion
+ name = "accordion"
+ desc = "Pun-Pun not included."
+ icon_state = "accordion"
+ item_state = "accordion"
+ allowed_instrument_ids = "accordion"
+
+/obj/item/instrument/trumpet
+ name = "trumpet"
+ desc = "To announce the arrival of the king!"
+ icon_state = "trumpet"
+ item_state = "trombone"
+ allowed_instrument_ids = "trombone"
+
+/obj/item/instrument/trumpet/spectral
+ name = "spectral trumpet"
+ desc = "Things are about to get spooky!"
+ icon_state = "trumpet"
+ item_state = "trombone"
+ force = 0
+ attack_verb = list("played","jazzed","trumpeted","mourned","dooted","spooked")
+
+/*
+/obj/item/instrument/trumpet/spectral/Initialize()
+ . = ..()
+ AddComponent(/datum/component/spooky)
+*/
+
+/obj/item/instrument/trumpet/spectral/attack(mob/living/carbon/C, mob/user)
+ playsound (loc, 'sound/instruments/trombone/En4.mid', 100,1,-1)
+ ..()
+
+/obj/item/instrument/saxophone
+ name = "saxophone"
+ desc = "This soothing sound will be sure to leave your audience in tears."
+ icon_state = "saxophone"
+ item_state = "saxophone"
+ allowed_instrument_ids = "saxophone"
+
+/obj/item/instrument/saxophone/spectral
+ name = "spectral saxophone"
+ desc = "This spooky sound will be sure to leave mortals in bones."
+ icon_state = "saxophone"
+ item_state = "saxophone"
+ force = 0
+ attack_verb = list("played","jazzed","saxxed","mourned","dooted","spooked")
+
+/*
+/obj/item/instrument/saxophone/spectral/Initialize()
+ . = ..()
+ AddComponent(/datum/component/spooky)
+*/
+
+/obj/item/instrument/saxophone/spectral/attack(mob/living/carbon/C, mob/user)
+ playsound(loc, 'sound/instruments/saxophone/En4.mid', 100,1,-1)
+ ..()
+
+/obj/item/instrument/trombone
+ name = "trombone"
+ desc = "How can any pool table ever hope to compete?"
+ icon_state = "trombone"
+ item_state = "trombone"
+ allowed_instrument_ids = "trombone"
+
+/obj/item/instrument/trombone/spectral
+ name = "spectral trombone"
+ desc = "A skeleton's favorite instrument. Apply directly on the mortals."
+ icon_state = "trombone"
+ item_state = "trombone"
+ force = 0
+ attack_verb = list("played","jazzed","tromboned","mourned","dooted","spooked")
+
+/*
+/obj/item/instrument/trombone/spectral/Initialize()
+ . = ..()
+ AddComponent(/datum/component/spooky)
+*/
+
+/obj/item/instrument/trombone/spectral/attack(mob/living/carbon/C, mob/user)
+ playsound(loc, 'sound/instruments/trombone/Cn4.mid', 100,1,-1)
+ ..()
+
+/obj/item/instrument/recorder
+ name = "recorder"
+ desc = "Just like in school, playing ability and all."
+ force = 5
+ icon_state = "recorder"
+ item_state = "recorder"
+ allowed_instrument_ids = "recorder"
+
+/obj/item/instrument/harmonica
+ name = "harmonica"
+ desc = "For when you get a bad case of the space blues."
+ icon_state = "harmonica"
+ item_state = "harmonica"
+ allowed_instrument_ids = "harmonica"
+// slot_flags = ITEM_SLOT_MASK
+ force = 5
+ w_class = WEIGHT_CLASS_SMALL
+// actions_types = list(/datum/action/item_action/instrument)
+
+/*
+/obj/item/instrument/harmonica/proc/handle_speech(datum/source, list/speech_args)
+ if(song.playing && ismob(loc))
+ to_chat(loc, "You stop playing the harmonica to talk...")
+ song.playing = FALSE
+
+/obj/item/instrument/harmonica/equipped(mob/M, slot)
+ . = ..()
+ RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
+
+/obj/item/instrument/harmonica/dropped(mob/M)
+ . = ..()
+ UnregisterSignal(M, COMSIG_MOB_SAY)
+*/
+
+/obj/item/instrument/bikehorn
+ name = "gilded bike horn"
+ desc = "An exquisitely decorated bike horn, capable of honking in a variety of notes."
+ icon_state = "bike_horn"
+ item_state = "bike_horn"
+ item_icons = list(
+ slot_l_hand_str = 'icons/mob/inhands/equipment/horns_lefthand.dmi',
+ slot_r_hand_str = 'icons/mob/inhands/equipment/horns_righthand.dmi'
+ )
+ attack_verb = list("beautifully honks")
+ allowed_instrument_ids = "bikehorn"
+ w_class = WEIGHT_CLASS_TINY
+ force = 0
+ throw_speed = 3
+ throw_range = 15
+ hitsound = 'sound/items/bikehorn.ogg'
+
+/obj/item/instrument/banjo
+ name = "banjo"
+ desc = "A 'Mura' brand banjo. It's pretty much just a drum with a neck and strings."
+ icon_state = "banjo"
+ item_state = "banjo"
+ attack_verb = list("scruggs-styled", "hum-diggitied", "shin-digged", "clawhammered")
+ hitsound = 'sound/weapons/banjoslap.ogg'
+ allowed_instrument_ids = "banjo"
+
+/*
+/obj/item/musicaltuner
+ name = "musical tuner"
+ desc = "A device for tuning musical instruments both manual and electronic alike."
+ icon = 'icons/obj/device.dmi'
+ icon_state = "musicaltuner"
+ slot_flags = ITEM_SLOT_BELT
+ w_class = WEIGHT_CLASS_SMALL
+ item_state = "electronic"
+ lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
+ righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
+*/
+
+/*
+/obj/item/choice_beacon/music
+ name = "instrument delivery beacon"
+ desc = "Summon your tool of art."
+ icon_state = "gangtool-red"
+
+/obj/item/choice_beacon/music/generate_display_names()
+ var/static/list/instruments
+ if(!instruments)
+ instruments = list()
+ var/list/templist = list(/obj/item/instrument/violin,
+ /obj/item/instrument/piano_synth,
+ /obj/item/instrument/guitar,
+ /obj/item/instrument/eguitar,
+ /obj/item/instrument/glockenspiel,
+ /obj/item/instrument/accordion,
+ /obj/item/instrument/trumpet,
+ /obj/item/instrument/saxophone,
+ /obj/item/instrument/trombone,
+ /obj/item/instrument/recorder,
+ /obj/item/instrument/harmonica
+ )
+ for(var/V in templist)
+ var/atom/A = V
+ instruments[initial(A.name)] = A
+ return instruments
+*/
diff --git a/code/modules/instruments/instruments/stationary.dm b/code/modules/instruments/instruments/stationary.dm
index 350a8dbf0d6..66c10628869 100644
--- a/code/modules/instruments/instruments/stationary.dm
+++ b/code/modules/instruments/instruments/stationary.dm
@@ -1,73 +1,73 @@
-/obj/structure/musician
- name = "Not A Piano"
- desc = "Something broke, contact coderbus."
- //interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT | INTERACT_ATOM_REQUIRES_DEXTERITY
- var/can_play_unanchored = FALSE
- var/list/allowed_instrument_ids
- var/datum/song/song
-
-/obj/structure/musician/Initialize(mapload)
- . = ..()
- song = new(src, allowed_instrument_ids)
- allowed_instrument_ids = null
-
-/obj/structure/musician/Destroy()
- QDEL_NULL(song)
- return ..()
-
-/obj/structure/musician/proc/should_stop_playing(mob/user)
- if(!(anchored || can_play_unanchored))
- return TRUE
- if(!user)
- return FALSE
- return (usr.default_can_use_topic(src) < STATUS_UPDATE) //can play with TK and while resting because fun.
-
-/// CITRP EDIT UNTIL INTERACTION REFACTOR PORT!
-/obj/structure/musician/attack_hand(mob/user)
- . = ..()
- if(.)
- return
- if(!anchored)
- return
- ui_interact(user)
-
-/obj/structure/musician/ui_interact(mob/user)
- . = ..()
- song.ui_interact(user)
-
-/obj/structure/musician/attackby(obj/item/I, mob/living/user)
- if(I.is_wrench())
- playsound(src, I.usesound, 50, 1)
- to_chat(user, "You begin to [anchored? "loosen" : "tighten"] [src]'s casters...")
- if(do_after(user, 40 * I.toolspeed))
- user.visible_message("[user] [anchored? "loosens" : "tightens"] [src]'s casters.")
- anchored = !anchored
- else
- return ..()
-
-/*
-/obj/structure/musician/wrench_act(mob/living/user, obj/item/I)
- default_unfasten_wrench(user, I, 40)
- return TRUE
-*/
-
-/obj/structure/musician/piano
- name = "space minimoog"
- icon = 'icons/obj/musician.dmi'
- icon_state = "minimoog"
- anchored = TRUE
- density = TRUE
-
-/obj/structure/musician/piano/unanchored
- anchored = FALSE
-
-/obj/structure/musician/piano/Initialize(mapload)
- . = ..()
- if(prob(50) && icon_state == initial(icon_state))
- name = "space minimoog"
- desc = "This is a minimoog, like a space piano, but more spacey!"
- icon_state = "minimoog"
- else
- name = "space piano"
- desc = "This is a space piano, like a regular piano, but always in tune! Even if the musician isn't."
- icon_state = "piano"
+/obj/structure/musician
+ name = "Not A Piano"
+ desc = "Something broke, contact coderbus."
+ //interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT | INTERACT_ATOM_REQUIRES_DEXTERITY
+ var/can_play_unanchored = FALSE
+ var/list/allowed_instrument_ids
+ var/datum/song/song
+
+/obj/structure/musician/Initialize(mapload)
+ . = ..()
+ song = new(src, allowed_instrument_ids)
+ allowed_instrument_ids = null
+
+/obj/structure/musician/Destroy()
+ QDEL_NULL(song)
+ return ..()
+
+/obj/structure/musician/proc/should_stop_playing(mob/user)
+ if(!(anchored || can_play_unanchored))
+ return TRUE
+ if(!user)
+ return FALSE
+ return (usr.default_can_use_topic(src) < STATUS_UPDATE) //can play with TK and while resting because fun.
+
+/// CITRP EDIT UNTIL INTERACTION REFACTOR PORT!
+/obj/structure/musician/attack_hand(mob/user)
+ . = ..()
+ if(.)
+ return
+ if(!anchored)
+ return
+ ui_interact(user)
+
+/obj/structure/musician/ui_interact(mob/user)
+ . = ..()
+ song.ui_interact(user)
+
+/obj/structure/musician/attackby(obj/item/I, mob/living/user)
+ if(I.is_wrench())
+ playsound(src, I.usesound, 50, 1)
+ to_chat(user, "You begin to [anchored? "loosen" : "tighten"] [src]'s casters...")
+ if(do_after(user, 40 * I.toolspeed))
+ user.visible_message("[user] [anchored? "loosens" : "tightens"] [src]'s casters.")
+ anchored = !anchored
+ else
+ return ..()
+
+/*
+/obj/structure/musician/wrench_act(mob/living/user, obj/item/I)
+ default_unfasten_wrench(user, I, 40)
+ return TRUE
+*/
+
+/obj/structure/musician/piano
+ name = "space minimoog"
+ icon = 'icons/obj/musician.dmi'
+ icon_state = "minimoog"
+ anchored = TRUE
+ density = TRUE
+
+/obj/structure/musician/piano/unanchored
+ anchored = FALSE
+
+/obj/structure/musician/piano/Initialize(mapload)
+ . = ..()
+ if(prob(50) && icon_state == initial(icon_state))
+ name = "space minimoog"
+ desc = "This is a minimoog, like a space piano, but more spacey!"
+ icon_state = "minimoog"
+ else
+ name = "space piano"
+ desc = "This is a space piano, like a regular piano, but always in tune! Even if the musician isn't."
+ icon_state = "piano"
diff --git a/code/modules/instruments/songs/_song.dm b/code/modules/instruments/songs/_song.dm
index cec0f7d8b8d..c297396bbf3 100644
--- a/code/modules/instruments/songs/_song.dm
+++ b/code/modules/instruments/songs/_song.dm
@@ -1,299 +1,299 @@
-#define MUSICIAN_HEARCHECK_MINDELAY 4
-#define MUSIC_MAXLINES 1000
-#define MUSIC_MAXLINECHARS 300
-
-/datum/song
- /// Name of the song
- var/name = "Untitled"
-
- /// The atom we're attached to/playing from
- var/atom/parent
-
- /// Our song lines
- var/list/lines
-
- /// delay between notes in deciseconds
- var/tempo = 5
-
- /// Are we currently playing?
- var/playing = FALSE
-
- /// Are we currently editing?
- var/editing = TRUE
- /// Is the help screen open?
- var/help = FALSE
-
- /// Repeats left
- var/repeat = 0
- /// Maximum times we can repeat
- var/max_repeats = 10
-
- /// Our volume
- var/volume = 75
- /// Max volume
- var/max_volume = 75
- /// Min volume - This is so someone doesn't decide it's funny to set it to 0 and play invisible songs.
- var/min_volume = 1
-
- /// What instruments our built in picker can use. The picker won't show unless this is longer than one.
- var/list/allowed_instrument_ids = list("r3grand")
-
- //////////// Cached instrument variables /////////////
- /// Instrument we are currently using
- var/datum/instrument/using_instrument
- /// Cached legacy ext for legacy instruments
- var/cached_legacy_ext
- /// Cached legacy dir for legacy instruments
- var/cached_legacy_dir
- /// Cached list of samples, referenced directly from the instrument for synthesized instruments
- var/list/cached_samples
- /// Are we operating in legacy mode (so if the instrument is a legacy instrument)
- var/legacy = FALSE
- //////////////////////////////////////////////////////
-
- /////////////////// Playing variables ////////////////
- /**
- * Only used in synthesized playback - The chords we compiled. Non assoc list of lists:
- * list(list(key1, key2, key3..., tempo_divisor), list(key1, key2..., tempo_divisor), ...)
- * tempo_divisor always exists
- * if key1 (and so if there's no keys) doesn't exist it's a rest
- * Compilation happens when we start playing and is cleared after we finish playing.
- */
- var/list/compiled_chords
- /// Channel as text = current volume percentage but it's 0 to 100 instead of 0 to 1.
- var/list/channels_playing = list()
- /// List of channels that aren't being used, as text. This is to prevent unnecessary freeing and reallocations from SSsounds/SSinstruments.
- var/list/channels_idle = list()
- //////////////////////////////////////////////////////
-
- /// Last world.time we checked for who can hear us
- var/last_hearcheck = 0
- /// The list of mobs that can hear us
- var/list/hearing_mobs
- /// If this is enabled, some things won't be strictly cleared when they usually are (liked compiled_chords on play stop)
- var/debug_mode = FALSE
- /// Last time we processed decay
- var/last_process_decay
- /// Max sound channels to occupy
- var/max_sound_channels = CHANNELS_PER_INSTRUMENT
- /// Current channels, so we can save a length() call.
- var/using_sound_channels = 0
- /// Last channel to play. text.
- var/last_channel_played
- /// Should we not decay our last played note?
- var/full_sustain_held_note = TRUE
-
- /////////////////////// DO NOT TOUCH THESE ///////////////////
- var/octave_min = INSTRUMENT_MIN_OCTAVE
- var/octave_max = INSTRUMENT_MAX_OCTAVE
- var/key_min = INSTRUMENT_MIN_KEY
- var/key_max = INSTRUMENT_MAX_KEY
- var/static/list/note_offset_lookup = list(9, 11, 0, 2, 4, 5, 7)
- var/static/list/accent_lookup = list("b" = -1, "s" = 1, "#" = 1, "n" = 0)
- //////////////////////////////////////////////////////////////
-
- ///////////// !!FUN!! - Only works in synthesized mode! /////////////////
- /// Note numbers to shift.
- var/note_shift = 0
- var/note_shift_min = -100
- var/note_shift_max = 100
- var/can_noteshift = TRUE
- /// The kind of sustain we're using
- var/sustain_mode = SUSTAIN_LINEAR
- /// When a note is considered dead if it is below this in volume
- var/sustain_dropoff_volume = 0
- /// Total duration of linear sustain for 100 volume note to get to SUSTAIN_DROPOFF
- var/sustain_linear_duration = 5
- /// Exponential sustain dropoff rate per decisecond
- var/sustain_exponential_dropoff = 1.4
- ////////// DO NOT DIRECTLY SET THESE!
- /// Do not directly set, use update_sustain()
- var/cached_linear_dropoff = 10
- /// Do not directly set, use update_sustain()
- var/cached_exponential_dropoff = 1.045
- /////////////////////////////////////////////////////////////////////////
-
-/datum/song/New(atom/parent, list/instrument_ids)
- SSinstruments.on_song_new(src)
- lines = list()
- tempo = sanitize_tempo(tempo)
- src.parent = parent
- if(instrument_ids)
- allowed_instrument_ids = islist(instrument_ids)? instrument_ids : list(instrument_ids)
- if(length(allowed_instrument_ids))
- set_instrument(allowed_instrument_ids[1])
- hearing_mobs = list()
- volume = CLAMP(volume, min_volume, max_volume)
- update_sustain()
-
-/datum/song/Destroy()
- stop_playing()
- SSinstruments.on_song_del(src)
- lines = null
- using_instrument = null
- allowed_instrument_ids = null
- parent = null
- return ..()
-
-/datum/song/proc/do_hearcheck()
- last_hearcheck = world.time
- var/list/old = hearing_mobs.Copy()
- hearing_mobs.len = 0
- var/turf/source = get_turf(parent)
- for(var/mob/M in get_hearers_in_view(15, source))
- hearing_mobs[M] = get_dist(M, source)
- var/list/exited = old - hearing_mobs
- for(var/i in exited)
- terminate_sound_mob(i)
-
-/// I can either be a datum, id, or path (if the instrument has no id).
-/datum/song/proc/set_instrument(datum/instrument/I)
- if(using_instrument)
- using_instrument.songs_using -= src
- using_instrument = null
- cached_samples = null
- cached_legacy_ext = null
- cached_legacy_dir = null
- legacy = null
- if(istext(I) || ispath(I))
- I = SSinstruments.instrument_data[I]
- if(istype(I))
- using_instrument = I
- I.songs_using += src
- var/instrument_legacy = CHECK_BITFIELD(I.instrument_flags, INSTRUMENT_LEGACY)
- if(instrument_legacy)
- cached_legacy_ext = I.legacy_instrument_ext
- cached_legacy_dir = I.legacy_instrument_path
- legacy = TRUE
- else
- cached_samples = I.samples
- legacy = FALSE
-
-/// THIS IS A BLOCKING CALL.
-/datum/song/proc/start_playing(mob/user)
- if(playing)
- return
- if(!using_instrument?.ready())
- to_chat(user, "An error has occured with [src]. Please reset the instrument.")
- return
- playing = TRUE
- updateDialog()
- //we can not afford to runtime, since we are going to be doing sound channel reservations and if we runtime it means we have a channel allocation leak.
- //wrap the rest of the stuff to ensure stop_playing() is called.
- last_process_decay = world.time
- START_PROCESSING(SSinstruments, src)
- . = do_play_lines(user)
- stop_playing()
-
-/datum/song/proc/stop_playing()
- if(!playing)
- return
- playing = FALSE
- if(!debug_mode)
- compiled_chords = null
- STOP_PROCESSING(SSinstruments, src)
- terminate_all_sounds(TRUE)
- hearing_mobs.len = 0
- updateDialog()
-
-/// THIS IS A BLOCKING CALL.
-/datum/song/proc/do_play_lines(user)
- if(!playing)
- return
- do_hearcheck()
- if(legacy)
- do_play_lines_legacy(user)
- else
- do_play_lines_synthesized(user)
-
-/datum/song/proc/should_stop_playing(mob/user)
- return QDELETED(parent) || !using_instrument || !playing
-
-/datum/song/proc/sanitize_tempo(new_tempo)
- new_tempo = abs(new_tempo)
- return CLAMP(round(new_tempo, world.tick_lag), world.tick_lag, 5 SECONDS)
-
-/datum/song/proc/get_bpm()
- return 600 / tempo
-
-/datum/song/proc/set_bpm(bpm)
- tempo = sanitize_tempo(600 / bpm)
-
-/// Updates the window for our user. Override in subtypes.
-/datum/song/proc/updateDialog(mob/user)
- ui_interact(user)
-
-/datum/song/process(wait)
- if(!playing)
- return PROCESS_KILL
- var/delay = world.time - last_process_decay
- process_decay(delay)
- last_process_decay = world.time
-
-/datum/song/proc/update_sustain()
- // Exponential is easy
- cached_exponential_dropoff = sustain_exponential_dropoff
- // Linear, not so much, since it's a target duration from 100 volume rather than an exponential rate.
- var/target_duration = sustain_linear_duration
- var/volume_diff = max(0, 100 - sustain_dropoff_volume)
- var/volume_decrease_per_decisecond = volume_diff / target_duration
- cached_linear_dropoff = volume_decrease_per_decisecond
-
-/datum/song/proc/set_volume(volume)
- src.volume = CLAMP(volume, max(0, min_volume), min(100, max_volume))
- update_sustain()
- updateDialog()
-
-/datum/song/proc/set_dropoff_volume(volume)
- sustain_dropoff_volume = CLAMP(volume, INSTRUMENT_MIN_SUSTAIN_DROPOFF, 100)
- update_sustain()
- updateDialog()
-
-/datum/song/proc/set_exponential_drop_rate(drop)
- sustain_exponential_dropoff = CLAMP(drop, INSTRUMENT_EXP_FALLOFF_MIN, INSTRUMENT_EXP_FALLOFF_MAX)
- update_sustain()
- updateDialog()
-
-/datum/song/proc/set_linear_falloff_duration(duration)
- sustain_linear_duration = CLAMP(duration, 0.1, INSTRUMENT_MAX_TOTAL_SUSTAIN)
- update_sustain()
- updateDialog()
-
-/datum/song/vv_edit_var(var_name, var_value)
- . = ..()
- if(.)
- switch(var_name)
- if(NAMEOF(src, volume))
- set_volume(var_value)
- if(NAMEOF(src, sustain_dropoff_volume))
- set_dropoff_volume(var_value)
- if(NAMEOF(src, sustain_exponential_dropoff))
- set_exponential_drop_rate(var_value)
- if(NAMEOF(src, sustain_linear_duration))
- set_linear_falloff_duration(var_value)
-
-// subtype for handheld instruments, like violin
-/datum/song/handheld
-
-/datum/song/handheld/updateDialog(mob/user)
- parent.ui_interact(user || usr)
-
-/datum/song/handheld/should_stop_playing(mob/user)
- . = ..()
- if(.)
- return TRUE
- var/obj/item/instrument/I = parent
- return I.should_stop_playing(user)
-
-// subtype for stationary structures, like pianos
-/datum/song/stationary
-
-/datum/song/stationary/updateDialog(mob/user)
- parent.ui_interact(user || usr)
-
-/datum/song/stationary/should_stop_playing(mob/user)
- . = ..()
- if(.)
- return TRUE
- var/obj/structure/musician/M = parent
- return M.should_stop_playing(user)
+#define MUSICIAN_HEARCHECK_MINDELAY 4
+#define MUSIC_MAXLINES 1000
+#define MUSIC_MAXLINECHARS 300
+
+/datum/song
+ /// Name of the song
+ var/name = "Untitled"
+
+ /// The atom we're attached to/playing from
+ var/atom/parent
+
+ /// Our song lines
+ var/list/lines
+
+ /// delay between notes in deciseconds
+ var/tempo = 5
+
+ /// Are we currently playing?
+ var/playing = FALSE
+
+ /// Are we currently editing?
+ var/editing = TRUE
+ /// Is the help screen open?
+ var/help = FALSE
+
+ /// Repeats left
+ var/repeat = 0
+ /// Maximum times we can repeat
+ var/max_repeats = 10
+
+ /// Our volume
+ var/volume = 75
+ /// Max volume
+ var/max_volume = 75
+ /// Min volume - This is so someone doesn't decide it's funny to set it to 0 and play invisible songs.
+ var/min_volume = 1
+
+ /// What instruments our built in picker can use. The picker won't show unless this is longer than one.
+ var/list/allowed_instrument_ids = list("r3grand")
+
+ //////////// Cached instrument variables /////////////
+ /// Instrument we are currently using
+ var/datum/instrument/using_instrument
+ /// Cached legacy ext for legacy instruments
+ var/cached_legacy_ext
+ /// Cached legacy dir for legacy instruments
+ var/cached_legacy_dir
+ /// Cached list of samples, referenced directly from the instrument for synthesized instruments
+ var/list/cached_samples
+ /// Are we operating in legacy mode (so if the instrument is a legacy instrument)
+ var/legacy = FALSE
+ //////////////////////////////////////////////////////
+
+ /////////////////// Playing variables ////////////////
+ /**
+ * Only used in synthesized playback - The chords we compiled. Non assoc list of lists:
+ * list(list(key1, key2, key3..., tempo_divisor), list(key1, key2..., tempo_divisor), ...)
+ * tempo_divisor always exists
+ * if key1 (and so if there's no keys) doesn't exist it's a rest
+ * Compilation happens when we start playing and is cleared after we finish playing.
+ */
+ var/list/compiled_chords
+ /// Channel as text = current volume percentage but it's 0 to 100 instead of 0 to 1.
+ var/list/channels_playing = list()
+ /// List of channels that aren't being used, as text. This is to prevent unnecessary freeing and reallocations from SSsounds/SSinstruments.
+ var/list/channels_idle = list()
+ //////////////////////////////////////////////////////
+
+ /// Last world.time we checked for who can hear us
+ var/last_hearcheck = 0
+ /// The list of mobs that can hear us
+ var/list/hearing_mobs
+ /// If this is enabled, some things won't be strictly cleared when they usually are (liked compiled_chords on play stop)
+ var/debug_mode = FALSE
+ /// Last time we processed decay
+ var/last_process_decay
+ /// Max sound channels to occupy
+ var/max_sound_channels = CHANNELS_PER_INSTRUMENT
+ /// Current channels, so we can save a length() call.
+ var/using_sound_channels = 0
+ /// Last channel to play. text.
+ var/last_channel_played
+ /// Should we not decay our last played note?
+ var/full_sustain_held_note = TRUE
+
+ /////////////////////// DO NOT TOUCH THESE ///////////////////
+ var/octave_min = INSTRUMENT_MIN_OCTAVE
+ var/octave_max = INSTRUMENT_MAX_OCTAVE
+ var/key_min = INSTRUMENT_MIN_KEY
+ var/key_max = INSTRUMENT_MAX_KEY
+ var/static/list/note_offset_lookup = list(9, 11, 0, 2, 4, 5, 7)
+ var/static/list/accent_lookup = list("b" = -1, "s" = 1, "#" = 1, "n" = 0)
+ //////////////////////////////////////////////////////////////
+
+ ///////////// !!FUN!! - Only works in synthesized mode! /////////////////
+ /// Note numbers to shift.
+ var/note_shift = 0
+ var/note_shift_min = -100
+ var/note_shift_max = 100
+ var/can_noteshift = TRUE
+ /// The kind of sustain we're using
+ var/sustain_mode = SUSTAIN_LINEAR
+ /// When a note is considered dead if it is below this in volume
+ var/sustain_dropoff_volume = 0
+ /// Total duration of linear sustain for 100 volume note to get to SUSTAIN_DROPOFF
+ var/sustain_linear_duration = 5
+ /// Exponential sustain dropoff rate per decisecond
+ var/sustain_exponential_dropoff = 1.4
+ ////////// DO NOT DIRECTLY SET THESE!
+ /// Do not directly set, use update_sustain()
+ var/cached_linear_dropoff = 10
+ /// Do not directly set, use update_sustain()
+ var/cached_exponential_dropoff = 1.045
+ /////////////////////////////////////////////////////////////////////////
+
+/datum/song/New(atom/parent, list/instrument_ids)
+ SSinstruments.on_song_new(src)
+ lines = list()
+ tempo = sanitize_tempo(tempo)
+ src.parent = parent
+ if(instrument_ids)
+ allowed_instrument_ids = islist(instrument_ids)? instrument_ids : list(instrument_ids)
+ if(length(allowed_instrument_ids))
+ set_instrument(allowed_instrument_ids[1])
+ hearing_mobs = list()
+ volume = CLAMP(volume, min_volume, max_volume)
+ update_sustain()
+
+/datum/song/Destroy()
+ stop_playing()
+ SSinstruments.on_song_del(src)
+ lines = null
+ using_instrument = null
+ allowed_instrument_ids = null
+ parent = null
+ return ..()
+
+/datum/song/proc/do_hearcheck()
+ last_hearcheck = world.time
+ var/list/old = hearing_mobs.Copy()
+ hearing_mobs.len = 0
+ var/turf/source = get_turf(parent)
+ for(var/mob/M in get_hearers_in_view(15, source))
+ hearing_mobs[M] = get_dist(M, source)
+ var/list/exited = old - hearing_mobs
+ for(var/i in exited)
+ terminate_sound_mob(i)
+
+/// I can either be a datum, id, or path (if the instrument has no id).
+/datum/song/proc/set_instrument(datum/instrument/I)
+ if(using_instrument)
+ using_instrument.songs_using -= src
+ using_instrument = null
+ cached_samples = null
+ cached_legacy_ext = null
+ cached_legacy_dir = null
+ legacy = null
+ if(istext(I) || ispath(I))
+ I = SSinstruments.instrument_data[I]
+ if(istype(I))
+ using_instrument = I
+ I.songs_using += src
+ var/instrument_legacy = CHECK_BITFIELD(I.instrument_flags, INSTRUMENT_LEGACY)
+ if(instrument_legacy)
+ cached_legacy_ext = I.legacy_instrument_ext
+ cached_legacy_dir = I.legacy_instrument_path
+ legacy = TRUE
+ else
+ cached_samples = I.samples
+ legacy = FALSE
+
+/// THIS IS A BLOCKING CALL.
+/datum/song/proc/start_playing(mob/user)
+ if(playing)
+ return
+ if(!using_instrument?.ready())
+ to_chat(user, "An error has occured with [src]. Please reset the instrument.")
+ return
+ playing = TRUE
+ updateDialog()
+ //we can not afford to runtime, since we are going to be doing sound channel reservations and if we runtime it means we have a channel allocation leak.
+ //wrap the rest of the stuff to ensure stop_playing() is called.
+ last_process_decay = world.time
+ START_PROCESSING(SSinstruments, src)
+ . = do_play_lines(user)
+ stop_playing()
+
+/datum/song/proc/stop_playing()
+ if(!playing)
+ return
+ playing = FALSE
+ if(!debug_mode)
+ compiled_chords = null
+ STOP_PROCESSING(SSinstruments, src)
+ terminate_all_sounds(TRUE)
+ hearing_mobs.len = 0
+ updateDialog()
+
+/// THIS IS A BLOCKING CALL.
+/datum/song/proc/do_play_lines(user)
+ if(!playing)
+ return
+ do_hearcheck()
+ if(legacy)
+ do_play_lines_legacy(user)
+ else
+ do_play_lines_synthesized(user)
+
+/datum/song/proc/should_stop_playing(mob/user)
+ return QDELETED(parent) || !using_instrument || !playing
+
+/datum/song/proc/sanitize_tempo(new_tempo)
+ new_tempo = abs(new_tempo)
+ return CLAMP(round(new_tempo, world.tick_lag), world.tick_lag, 5 SECONDS)
+
+/datum/song/proc/get_bpm()
+ return 600 / tempo
+
+/datum/song/proc/set_bpm(bpm)
+ tempo = sanitize_tempo(600 / bpm)
+
+/// Updates the window for our user. Override in subtypes.
+/datum/song/proc/updateDialog(mob/user)
+ ui_interact(user)
+
+/datum/song/process(wait)
+ if(!playing)
+ return PROCESS_KILL
+ var/delay = world.time - last_process_decay
+ process_decay(delay)
+ last_process_decay = world.time
+
+/datum/song/proc/update_sustain()
+ // Exponential is easy
+ cached_exponential_dropoff = sustain_exponential_dropoff
+ // Linear, not so much, since it's a target duration from 100 volume rather than an exponential rate.
+ var/target_duration = sustain_linear_duration
+ var/volume_diff = max(0, 100 - sustain_dropoff_volume)
+ var/volume_decrease_per_decisecond = volume_diff / target_duration
+ cached_linear_dropoff = volume_decrease_per_decisecond
+
+/datum/song/proc/set_volume(volume)
+ src.volume = CLAMP(volume, max(0, min_volume), min(100, max_volume))
+ update_sustain()
+ updateDialog()
+
+/datum/song/proc/set_dropoff_volume(volume)
+ sustain_dropoff_volume = CLAMP(volume, INSTRUMENT_MIN_SUSTAIN_DROPOFF, 100)
+ update_sustain()
+ updateDialog()
+
+/datum/song/proc/set_exponential_drop_rate(drop)
+ sustain_exponential_dropoff = CLAMP(drop, INSTRUMENT_EXP_FALLOFF_MIN, INSTRUMENT_EXP_FALLOFF_MAX)
+ update_sustain()
+ updateDialog()
+
+/datum/song/proc/set_linear_falloff_duration(duration)
+ sustain_linear_duration = CLAMP(duration, 0.1, INSTRUMENT_MAX_TOTAL_SUSTAIN)
+ update_sustain()
+ updateDialog()
+
+/datum/song/vv_edit_var(var_name, var_value)
+ . = ..()
+ if(.)
+ switch(var_name)
+ if(NAMEOF(src, volume))
+ set_volume(var_value)
+ if(NAMEOF(src, sustain_dropoff_volume))
+ set_dropoff_volume(var_value)
+ if(NAMEOF(src, sustain_exponential_dropoff))
+ set_exponential_drop_rate(var_value)
+ if(NAMEOF(src, sustain_linear_duration))
+ set_linear_falloff_duration(var_value)
+
+// subtype for handheld instruments, like violin
+/datum/song/handheld
+
+/datum/song/handheld/updateDialog(mob/user)
+ parent.ui_interact(user || usr)
+
+/datum/song/handheld/should_stop_playing(mob/user)
+ . = ..()
+ if(.)
+ return TRUE
+ var/obj/item/instrument/I = parent
+ return I.should_stop_playing(user)
+
+// subtype for stationary structures, like pianos
+/datum/song/stationary
+
+/datum/song/stationary/updateDialog(mob/user)
+ parent.ui_interact(user || usr)
+
+/datum/song/stationary/should_stop_playing(mob/user)
+ . = ..()
+ if(.)
+ return TRUE
+ var/obj/structure/musician/M = parent
+ return M.should_stop_playing(user)
diff --git a/code/modules/instruments/songs/editor.dm b/code/modules/instruments/songs/editor.dm
index 2d5c94781e8..2cb181c1dd9 100644
--- a/code/modules/instruments/songs/editor.dm
+++ b/code/modules/instruments/songs/editor.dm
@@ -1,246 +1,246 @@
-/datum/song/proc/instrument_status_ui()
- . = list()
- . += "