Reverts datum outputs

reverts #43038
reverts #41535
This commit is contained in:
ninjanomnom
2019-06-13 20:09:10 -04:00
parent 085e03f2cd
commit 56196df9c6
20 changed files with 45 additions and 255 deletions

View File

@@ -1,10 +0,0 @@
SUBSYSTEM_DEF(outputs)
name = "Outputs"
init_order = INIT_ORDER_OUTPUTS
flags = SS_NO_FIRE
var/list/outputs = list()
/datum/controller/subsystem/outputs/Initialize(timeofday)
for(var/A in subtypesof(/datum/outputs))
outputs[A] = new A
return ..()

View File

@@ -165,5 +165,5 @@
/datum/fantasy_affix/fool/apply(datum/component/fantasy/comp, newName) /datum/fantasy_affix/fool/apply(datum/component/fantasy/comp, newName)
. = ..() . = ..()
var/obj/item/master = comp.parent var/obj/item/master = comp.parent
comp.appliedComponents += master.AddComponent(/datum/component/squeak/bikehorn) comp.appliedComponents += master.AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
return "[newName] of the fool" return "[newName] of the fool"

View File

@@ -1,4 +1,7 @@
/datum/component/squeak /datum/component/squeak
var/static/list/default_squeak_sounds = list('sound/items/toysqueak1.ogg'=1, 'sound/items/toysqueak2.ogg'=1, 'sound/items/toysqueak3.ogg'=1)
var/list/override_squeak_sounds
var/squeak_chance = 100 var/squeak_chance = 100
var/volume = 30 var/volume = 30
@@ -10,10 +13,7 @@
var/last_use = 0 var/last_use = 0
var/use_delay = 20 var/use_delay = 20
/datum/component/squeak/Initialize(volume_override, chance_override, step_delay_override, use_delay_override) /datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override)
if(datum_outputs)
for(var/i in 1 to length(datum_outputs))
datum_outputs[i] = SSoutputs.outputs[datum_outputs[i]]
if(!isatom(parent)) if(!isatom(parent))
return COMPONENT_INCOMPATIBLE return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak) RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak)
@@ -29,6 +29,7 @@
if(istype(parent, /obj/item/clothing/shoes)) if(istype(parent, /obj/item/clothing/shoes))
RegisterSignal(parent, COMSIG_SHOES_STEP_ACTION, .proc/step_squeak) RegisterSignal(parent, COMSIG_SHOES_STEP_ACTION, .proc/step_squeak)
override_squeak_sounds = custom_sounds
if(chance_override) if(chance_override)
squeak_chance = chance_override squeak_chance = chance_override
if(volume_override) if(volume_override)
@@ -40,10 +41,10 @@
/datum/component/squeak/proc/play_squeak() /datum/component/squeak/proc/play_squeak()
if(prob(squeak_chance)) if(prob(squeak_chance))
if(!datum_outputs) if(!override_squeak_sounds)
CRASH("Squeak datum attempted to play missing datum") playsound(parent, pickweight(default_squeak_sounds), volume, 1, -1)
else else
playsound(parent, datum_outputs[1], volume, 1, -1, , , , , , src) playsound(parent, pickweight(override_squeak_sounds), volume, 1, -1)
/datum/component/squeak/proc/step_squeak() /datum/component/squeak/proc/step_squeak()
if(steps > step_delay) if(steps > step_delay)
@@ -87,36 +88,3 @@
//If the dir changes it means we're going through a bend in the pipes, let's pretend we bumped the wall //If the dir changes it means we're going through a bend in the pipes, let's pretend we bumped the wall
if(old_dir != new_dir) if(old_dir != new_dir)
play_squeak() play_squeak()
/datum/component/squeak/carp
datum_outputs = list(/datum/outputs/bite)
/datum/component/squeak/bubbleplush
datum_outputs = list(/datum/outputs/demonattack)
/datum/component/squeak/lizardplushie
datum_outputs = list(/datum/outputs/slash)
/datum/component/squeak/snakeplushie
datum_outputs = list(/datum/outputs/bite)
/datum/component/squeak/nukeplushie
datum_outputs = list(/datum/outputs/punch)
/datum/component/squeak/slimeplushie
datum_outputs = list(/datum/outputs/squelch)
/datum/component/squeak/beeplushie
datum_outputs = list(/datum/outputs/bee)
/datum/component/squeak/mouse
datum_outputs = list(/datum/outputs/squeak)
/datum/component/squeak/clownstep
datum_outputs = list(/datum/outputs/clownstep)
/datum/component/squeak/bikehorn
datum_outputs = list(/datum/outputs/bikehorn)
/datum/component/squeak/airhorn
datum_outputs = list(/datum/outputs/airhorn)

View File

@@ -8,7 +8,6 @@
var/signal_enabled = FALSE var/signal_enabled = FALSE
var/datum_flags = NONE var/datum_flags = NONE
var/datum/weakref/weak_reference var/datum/weakref/weak_reference
var/list/datum_outputs
#ifdef TESTING #ifdef TESTING
var/running_find_references var/running_find_references

View File

@@ -1,118 +0,0 @@
//NOTE: When adding new sounds here, check to make sure they haven't been added already via CTRL + F.
/datum/outputs
var/text = ""
var/list/sounds = 'sound/items/airhorn.ogg' //can be either a sound path or a WEIGHTED list, put multiple for random selection between sounds
var/mutable_appearance/vfx = list('icons/sound_icon.dmi',"circle", HUD_LAYER) //syntax: icon, icon_state, layer
var/cooldown = 100 //ms
/datum/outputs/New()
vfx = mutable_appearance(vfx[1],vfx[2],vfx[3])
/datum/outputs/proc/send_info(mob/receiver, turf/turf_source, vol as num, vary, frequency, falloff, channel = 0, pressure_affected = TRUE, last_played_time)
var/sound/sound_output
//Pick sound
if(islist(sounds))
if(sounds.len)
var/soundin = pickweight(sounds)
sound_output = sound(get_sfx(soundin))
else
sound_output = sound(get_sfx(sounds))
//Process sound
if(sound_output)
sound_output.wait = 0 //No queue
sound_output.channel = channel || open_sound_channel()
sound_output.volume = vol
if(vary)
if(frequency)
sound_output.frequency = frequency
else
sound_output.frequency = get_rand_frequency()
if(isturf(turf_source))
var/turf/T = get_turf(receiver)
//sound volume falloff with distance
var/distance = get_dist(T, turf_source)
sound_output.volume -= max(distance - world.view, 0) * 2 //multiplicative falloff to add on top of natural audio falloff.
if(pressure_affected)
//Atmosphere affects sound
var/pressure_factor = 1
var/datum/gas_mixture/hearer_env = T.return_air()
var/datum/gas_mixture/source_env = turf_source.return_air()
if(hearer_env && source_env)
var/pressure = min(hearer_env.return_pressure(), source_env.return_pressure())
if(pressure < ONE_ATMOSPHERE)
pressure_factor = max((pressure - SOUND_MINIMUM_PRESSURE)/(ONE_ATMOSPHERE - SOUND_MINIMUM_PRESSURE), 0)
else //space
pressure_factor = 0
if(distance <= 1)
pressure_factor = max(pressure_factor, 0.15) //touching the source of the sound
sound_output.volume *= pressure_factor
//End Atmosphere affecting sound
if(sound_output.volume <= 0)
return //No sound
var/dx = turf_source.x - T.x // Hearing from the right/left
sound_output.x = dx
var/dz = turf_source.y - T.y // Hearing from infront/behind
sound_output.z = dz
// The y value is for above your head, but there is no ceiling in 2d spessmens.
sound_output.y = 1
sound_output.falloff = (falloff ? falloff : FALLOFF_SOUNDS)
if(world.time >= last_played_time + cooldown)
receiver.display_output(sound_output, vfx, text, turf_source, vol, vary, frequency, falloff, channel, pressure_affected)
. = TRUE //start cooling down text
else
receiver.display_output(sound_output, vfx, , turf_source, vol, vary, frequency, falloff, channel, pressure_affected) //changing the text takes more cpu time than a single if check
/datum/outputs/bikehorn
text = "You hear a HONK."
sounds = 'sound/items/bikehorn.ogg'
/datum/outputs/airhorn
text = "You hear the violent blaring of an airhorn."
sounds = 'sound/items/airhorn2.ogg'
/datum/outputs/alarm
text = "You hear a blaring alarm."
sounds = 'sound/machines/alarm.ogg'
/datum/outputs/squeak
text = "You hear a squeak."
sounds = 'sound/effects/mousesqueek.ogg'
/datum/outputs/clownstep
sounds = list('sound/effects/clownstep1.ogg' = 1,'sound/effects/clownstep2.ogg' = 1)
/datum/outputs/bite
text = "You hear ravenous biting."
sounds = 'sound/weapons/bite.ogg'
/datum/outputs/demonattack
text = "You hear a terrifying, unholy noise."
sounds = 'sound/magic/demon_attack1.ogg'
/datum/outputs/slash
text = "You hear a slashing noise."
sounds = 'sound/weapons/slash.ogg'
/datum/outputs/punch
text = "You hear a punch."
sounds = 'sound/effects/hit_punch.ogg'
/datum/outputs/squelch
text = "You hear a horrendous squelching sound."
sounds = 'sound/effects/blobattack.ogg'
/datum/outputs/bee
text = "You hear a buzzing noise."
sounds = 'sound/voice/moth/scream_moth.ogg'

View File

@@ -74,19 +74,16 @@
if(color) if(color)
add_atom_colour(color, FIXED_COLOUR_PRIORITY) add_atom_colour(color, FIXED_COLOUR_PRIORITY)
if(light_power && light_range) if (light_power && light_range)
update_light() update_light()
if(opacity && isturf(loc)) if (opacity && isturf(loc))
var/turf/T = loc var/turf/T = loc
T.has_opaque_atom = TRUE // No need to recalculate it in this case, it's guaranteed to be on afterwards anyways. T.has_opaque_atom = TRUE // No need to recalculate it in this case, it's guaranteed to be on afterwards anyways.
if(canSmoothWith) if (canSmoothWith)
canSmoothWith = typelist("canSmoothWith", canSmoothWith) canSmoothWith = typelist("canSmoothWith", canSmoothWith)
if(datum_outputs)
for(var/i in 1 to length(datum_outputs))
datum_outputs[i] = SSoutputs.outputs[datum_outputs[i]]
ComponentInitialize() ComponentInitialize()
return INITIALIZE_HINT_NORMAL return INITIALIZE_HINT_NORMAL

View File

@@ -439,4 +439,4 @@
skew *= 2 skew *= 2
animate(src, alpha = 0, transform = skew, time = duration) animate(src, alpha = 0, transform = skew, time = duration)
else else
return INITIALIZE_HINT_QDEL return INITIALIZE_HINT_QDEL

View File

@@ -151,11 +151,10 @@
throw_speed = 3 throw_speed = 3
throw_range = 7 throw_range = 7
attack_verb = list("HONKED") attack_verb = list("HONKED")
var/component = /datum/component/squeak/bikehorn
/obj/item/bikehorn/Initialize() /obj/item/bikehorn/Initialize()
. = ..() . = ..()
AddComponent(component, 50) AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
/obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user) /obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "honk", /datum/mood_event/honk) SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "honk", /datum/mood_event/honk)
@@ -171,7 +170,10 @@
name = "air horn" name = "air horn"
desc = "Damn son, where'd you find this?" desc = "Damn son, where'd you find this?"
icon_state = "air_horn" icon_state = "air_horn"
component = /datum/component/squeak/airhorn
/obj/item/bikehorn/airhorn/Initialize()
. = ..()
AddComponent(/datum/component/squeak, list('sound/items/airhorn2.ogg'=1), 50)
//golden bikehorn //golden bikehorn
/obj/item/bikehorn/golden /obj/item/bikehorn/golden

View File

@@ -6,7 +6,7 @@
attack_verb = list("thumped", "whomped", "bumped") attack_verb = list("thumped", "whomped", "bumped")
w_class = WEIGHT_CLASS_SMALL w_class = WEIGHT_CLASS_SMALL
resistance_flags = FLAMMABLE resistance_flags = FLAMMABLE
var/component = /datum/component/squeak var/list/squeak_override //Weighted list; If you want your plush to have different squeak sounds use this
var/stuffed = TRUE //If the plushie has stuffing in it var/stuffed = TRUE //If the plushie has stuffing in it
var/obj/item/grenade/grenade //You can remove the stuffing from a plushie and add a grenade to it for *nefarious uses* var/obj/item/grenade/grenade //You can remove the stuffing from a plushie and add a grenade to it for *nefarious uses*
//--love ~<3-- //--love ~<3--
@@ -33,7 +33,7 @@
/obj/item/toy/plush/Initialize() /obj/item/toy/plush/Initialize()
. = ..() . = ..()
AddComponent(component) AddComponent(/datum/component/squeak, squeak_override)
//have we decided if Pinocchio goes in the blue or pink aisle yet? //have we decided if Pinocchio goes in the blue or pink aisle yet?
if(gender == NEUTER) if(gender == NEUTER)
@@ -87,7 +87,7 @@
scorned_by = null scorned_by = null
//null remaining lists //null remaining lists
datum_outputs = null squeak_override = null
love_message = null love_message = null
partner_message = null partner_message = null
@@ -365,14 +365,14 @@
icon_state = "carpplush" icon_state = "carpplush"
item_state = "carp_plushie" item_state = "carp_plushie"
attack_verb = list("bitten", "eaten", "fin slapped") attack_verb = list("bitten", "eaten", "fin slapped")
component = /datum/component/squeak/carp squeak_override = list('sound/weapons/bite.ogg'=1)
/obj/item/toy/plush/bubbleplush /obj/item/toy/plush/bubbleplush
name = "\improper Bubblegum plushie" name = "\improper Bubblegum plushie"
desc = "The friendly red demon that gives good miners gifts." desc = "The friendly red demon that gives good miners gifts."
icon_state = "bubbleplush" icon_state = "bubbleplush"
attack_verb = list("rent") attack_verb = list("rent")
component = /datum/component/squeak/bubbleplush squeak_override = list('sound/magic/demon_attack1.ogg'=1)
/obj/item/toy/plush/plushvar /obj/item/toy/plush/plushvar
name = "\improper Ratvar plushie" name = "\improper Ratvar plushie"
@@ -455,7 +455,7 @@
say("NO! I will not be banished again...") say("NO! I will not be banished again...")
P.say(pick("Ha.", "Ra'sha fonn dest.", "You fool. To come here.")) P.say(pick("Ha.", "Ra'sha fonn dest.", "You fool. To come here."))
playsound(src, 'sound/magic/clockwork/anima_fragment_death.ogg', 62, TRUE, frequency = 2) playsound(src, 'sound/magic/clockwork/anima_fragment_death.ogg', 62, TRUE, frequency = 2)
playsound(P, /datum/outputs/demonattack, 50, TRUE, frequency = 2) playsound(P, 'sound/magic/demon_attack1.ogg', 50, TRUE, frequency = 2)
explosion(src, 0, 0, 1) explosion(src, 0, 0, 1)
qdel(src) qdel(src)
P.clashing = FALSE P.clashing = FALSE
@@ -484,7 +484,7 @@
icon_state = "plushie_lizard" icon_state = "plushie_lizard"
item_state = "plushie_lizard" item_state = "plushie_lizard"
attack_verb = list("clawed", "hissed", "tail slapped") attack_verb = list("clawed", "hissed", "tail slapped")
component = /datum/component/squeak/lizardplushie squeak_override = list('sound/weapons/slash.ogg' = 1)
/obj/item/toy/plush/snakeplushie /obj/item/toy/plush/snakeplushie
name = "snake plushie" name = "snake plushie"
@@ -492,7 +492,7 @@
icon_state = "plushie_snake" icon_state = "plushie_snake"
item_state = "plushie_snake" item_state = "plushie_snake"
attack_verb = list("bitten", "hissed", "tail slapped") attack_verb = list("bitten", "hissed", "tail slapped")
component = /datum/component/squeak/snakeplushie squeak_override = list('sound/weapons/bite.ogg' = 1)
/obj/item/toy/plush/nukeplushie /obj/item/toy/plush/nukeplushie
name = "operative plushie" name = "operative plushie"
@@ -500,7 +500,7 @@
icon_state = "plushie_nuke" icon_state = "plushie_nuke"
item_state = "plushie_nuke" item_state = "plushie_nuke"
attack_verb = list("shot", "nuked", "detonated") attack_verb = list("shot", "nuked", "detonated")
component = /datum/component/squeak/nukeplushie squeak_override = list('sound/effects/hit_punch.ogg' = 1)
/obj/item/toy/plush/slimeplushie /obj/item/toy/plush/slimeplushie
name = "slime plushie" name = "slime plushie"
@@ -508,8 +508,9 @@
icon_state = "plushie_slime" icon_state = "plushie_slime"
item_state = "plushie_slime" item_state = "plushie_slime"
attack_verb = list("blorbled", "slimed", "absorbed") attack_verb = list("blorbled", "slimed", "absorbed")
squeak_override = list('sound/effects/blobattack.ogg' = 1)
gender = FEMALE //given all the jokes and drawings, I'm not sure the xenobiologists would make a slimeboy gender = FEMALE //given all the jokes and drawings, I'm not sure the xenobiologists would make a slimeboy
component = /datum/component/squeak/slimeplushie squeak_override = list('sound/effects/blobattack.ogg' = 1)
/obj/item/toy/plush/awakenedplushie /obj/item/toy/plush/awakenedplushie
name = "awakened plushie" name = "awakened plushie"
@@ -528,4 +529,4 @@
item_state = "plushie_h" item_state = "plushie_h"
attack_verb = list("stung") attack_verb = list("stung")
gender = FEMALE gender = FEMALE
component = /datum/component/squeak/beeplushie squeak_override = list('sound/voice/moth/scream_moth.ogg'=1)

View File

@@ -992,7 +992,6 @@
icon = 'icons/obj/toy.dmi' icon = 'icons/obj/toy.dmi'
icon_state = "nuketoyidle" icon_state = "nuketoyidle"
w_class = WEIGHT_CLASS_SMALL w_class = WEIGHT_CLASS_SMALL
datum_outputs = list(/datum/outputs/alarm)
var/cooldown = 0 var/cooldown = 0
/obj/item/toy/nuke/attack_self(mob/user) /obj/item/toy/nuke/attack_self(mob/user)
@@ -1001,7 +1000,7 @@
user.visible_message("<span class='warning'>[user] presses a button on [src].</span>", "<span class='notice'>You activate [src], it plays a loud noise!</span>", "<span class='italics'>You hear the click of a button.</span>") user.visible_message("<span class='warning'>[user] presses a button on [src].</span>", "<span class='notice'>You activate [src], it plays a loud noise!</span>", "<span class='italics'>You hear the click of a button.</span>")
sleep(5) sleep(5)
icon_state = "nuketoy" icon_state = "nuketoy"
playsound(src, datum_outputs[1], 100, 0) playsound(src, 'sound/machines/alarm.ogg', 100, 0)
sleep(135) sleep(135)
icon_state = "nuketoycool" icon_state = "nuketoycool"
sleep(cooldown - world.time) sleep(cooldown - world.time)

View File

@@ -1,4 +1,4 @@
/proc/playsound(atom/source, input, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE, do_owner) /proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE)
if(isarea(source)) if(isarea(source))
CRASH("playsound(): source is an area") CRASH("playsound(): source is an area")
return return
@@ -7,11 +7,12 @@
if (!turf_source) if (!turf_source)
return return
//allocate a channel if necessary now so its the same for everyone //allocate a channel if necessary now so its the same for everyone
channel = channel || open_sound_channel() channel = channel || open_sound_channel()
// Looping through the player list has the added bonus of working for mobs inside containers // Looping through the player list has the added bonus of working for mobs inside containers
var/sound/S = sound(get_sfx(soundin))
var/maxdistance = (world.view + extrarange) var/maxdistance = (world.view + extrarange)
var/z = turf_source.z var/z = turf_source.z
var/list/listeners = SSmobs.clients_by_zlevel[z] var/list/listeners = SSmobs.clients_by_zlevel[z]
@@ -20,30 +21,12 @@
for(var/P in listeners) for(var/P in listeners)
var/mob/M = P var/mob/M = P
if(get_dist(M, turf_source) <= maxdistance) if(get_dist(M, turf_source) <= maxdistance)
sound_or_datum(M, turf_source, source, input, do_owner, vol, vary, frequency, falloff, channel, pressure_affected) M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, channel, pressure_affected, S)
for(var/P in SSmobs.dead_players_by_zlevel[z]) for(var/P in SSmobs.dead_players_by_zlevel[z])
var/mob/M = P var/mob/M = P
if(get_dist(M, turf_source) <= maxdistance) if(get_dist(M, turf_source) <= maxdistance)
sound_or_datum(M, turf_source, source, input, do_owner, vol, vary, frequency, falloff, channel, pressure_affected) M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, channel, pressure_affected, S)
/proc/sound_or_datum(mob/receiver, turf/turf_source, atom/source, input, datum/do_owner, vol as num, vary, frequency, falloff, channel = 0, pressure_affected = TRUE)
if(istype(input, /datum/outputs))
var/last_played_time
if(do_owner)
last_played_time = do_owner.datum_outputs[input]
else
last_played_time = source.datum_outputs[input]
var/datum/outputs/O = input
if(O.send_info(receiver, turf_source, vol, vary, frequency, falloff, channel, pressure_affected, last_played_time))
if(do_owner)
do_owner.datum_outputs[input] = world.time
else
source.datum_outputs[input] = world.time
else
var/sound/S = sound(get_sfx(input))
receiver.playsound_local(turf_source, input, vol, vary, frequency, falloff, channel, pressure_affected, S)
//kept for legacy support and uploaded admin sounds
/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff, channel = 0, pressure_affected = TRUE, sound/S) /mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff, channel = 0, pressure_affected = TRUE, sound/S)
if(!client || !can_hear()) if(!client || !can_hear())
return return
@@ -183,4 +166,4 @@
soundin = pick('sound/items/bikehorn.ogg', 'sound/items/AirHorn2.ogg', 'sound/misc/sadtrombone.ogg', 'sound/items/AirHorn.ogg', 'sound/effects/reee.ogg', 'sound/items/WEEOO1.ogg', 'sound/voice/beepsky/iamthelaw.ogg', 'sound/voice/beepsky/creep.ogg','sound/magic/Fireball.ogg' ,'sound/effects/pray.ogg', 'sound/voice/hiss1.ogg','sound/machines/buzz-sigh.ogg', 'sound/machines/ping.ogg', 'sound/weapons/flashbang.ogg', 'sound/weapons/bladeslice.ogg') soundin = pick('sound/items/bikehorn.ogg', 'sound/items/AirHorn2.ogg', 'sound/misc/sadtrombone.ogg', 'sound/items/AirHorn.ogg', 'sound/effects/reee.ogg', 'sound/items/WEEOO1.ogg', 'sound/voice/beepsky/iamthelaw.ogg', 'sound/voice/beepsky/creep.ogg','sound/magic/Fireball.ogg' ,'sound/effects/pray.ogg', 'sound/voice/hiss1.ogg','sound/machines/buzz-sigh.ogg', 'sound/machines/ping.ogg', 'sound/weapons/flashbang.ogg', 'sound/weapons/bladeslice.ogg')
if("goose") if("goose")
soundin = pick('sound/creatures/goose1.ogg', 'sound/creatures/goose2.ogg', 'sound/creatures/goose3.ogg', 'sound/creatures/goose4.ogg') soundin = pick('sound/creatures/goose1.ogg', 'sound/creatures/goose2.ogg', 'sound/creatures/goose3.ogg', 'sound/creatures/goose4.ogg')
return soundin return soundin

View File

@@ -11,7 +11,7 @@
/obj/item/clothing/shoes/clown_shoes/banana_shoes/Initialize() /obj/item/clothing/shoes/clown_shoes/banana_shoes/Initialize()
. = ..() . = ..()
AddComponent(/datum/component/material_container, list(MAT_BANANIUM), 200000, TRUE, /obj/item/stack) AddComponent(/datum/component/material_container, list(MAT_BANANIUM), 200000, TRUE, /obj/item/stack)
AddComponent(/datum/component/squeak, /datum/outputs/bikehorn, 75) AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 75)
if(always_noslip) if(always_noslip)
clothing_flags |= NOSLIP clothing_flags |= NOSLIP

View File

@@ -81,7 +81,7 @@
/obj/item/clothing/shoes/clown_shoes/Initialize() /obj/item/clothing/shoes/clown_shoes/Initialize()
. = ..() . = ..()
AddComponent(/datum/component/squeak/clownstep, 50) AddComponent(/datum/component/squeak, list('sound/effects/clownstep1.ogg'=1,'sound/effects/clownstep2.ogg'=1), 50)
/obj/item/clothing/shoes/clown_shoes/equipped(mob/user, slot) /obj/item/clothing/shoes/clown_shoes/equipped(mob/user, slot)
. = ..() . = ..()

View File

@@ -123,7 +123,7 @@
/obj/item/clothing/under/rank/clown/Initialize() /obj/item/clothing/under/rank/clown/Initialize()
. = ..() . = ..()
AddComponent(/datum/component/squeak/bikehorn, 50) AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
/obj/item/clothing/under/rank/head_of_personnel /obj/item/clothing/under/rank/head_of_personnel
desc = "It's a jumpsuit worn by someone who works in the position of \"Head of Personnel\"." desc = "It's a jumpsuit worn by someone who works in the position of \"Head of Personnel\"."

View File

@@ -1257,22 +1257,6 @@
mob_pickup(user) mob_pickup(user)
return TRUE return TRUE
/mob/living/display_output(sound/S, mutable_appearance/vfx, text, turf/turf_source, vol as num)
. = ..()
//Process icon
if(vfx && audiolocation)
var/image/sound_icon = image(vfx)
sound_icon.loc = turf_source
if(vol && S)
sound_icon.alpha = sound_icon.alpha * (vol / 100)
client.images += sound_icon
addtimer(CALLBACK(src, .proc/remove_image, sound_icon), 7)
/mob/living/proc/remove_image(sound_image)
if(sound_image && client)
client.images -= sound_image
qdel(sound_image)
/mob/living/proc/get_static_viruses() //used when creating blood and other infective objects /mob/living/proc/get_static_viruses() //used when creating blood and other infective objects
if(!LAZYLEN(diseases)) if(!LAZYLEN(diseases))
return return

View File

@@ -29,8 +29,8 @@
var/lying = 0 //number of degrees. DO NOT USE THIS IN CHECKS. CHECK FOR MOBILITY FLAGS INSTEAD!! var/lying = 0 //number of degrees. DO NOT USE THIS IN CHECKS. CHECK FOR MOBILITY FLAGS INSTEAD!!
var/lying_prev = 0 //last value of lying on update_mobility var/lying_prev = 0 //last value of lying on update_mobility
var/audiolocation = FALSE
var/confused = 0 //Makes the mob move in random directions. var/confused = 0 //Makes the mob move in random directions.
var/hallucination = 0 //Directly affects how long a mob will hallucinate for var/hallucination = 0 //Directly affects how long a mob will hallucinate for
var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out. var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out.

View File

@@ -25,11 +25,10 @@
var/body_color //brown, gray and white, leave blank for random var/body_color //brown, gray and white, leave blank for random
gold_core_spawnable = FRIENDLY_SPAWN gold_core_spawnable = FRIENDLY_SPAWN
var/chew_probability = 1 var/chew_probability = 1
datum_outputs = list(/datum/outputs/squeak)
/mob/living/simple_animal/mouse/Initialize() /mob/living/simple_animal/mouse/Initialize()
. = ..() . = ..()
AddComponent(/datum/component/squeak/mouse, 100) AddComponent(/datum/component/squeak, list('sound/effects/mousesqueek.ogg'=1), 100)
if(!body_color) if(!body_color)
body_color = pick( list("brown","gray","white") ) body_color = pick( list("brown","gray","white") )
icon_state = "mouse_[body_color]" icon_state = "mouse_[body_color]"
@@ -126,4 +125,4 @@
return ..() return ..()
/obj/item/reagent_containers/food/snacks/deadmouse/on_grind() /obj/item/reagent_containers/food/snacks/deadmouse/on_grind()
reagents.clear_reagents() reagents.clear_reagents()

View File

@@ -105,18 +105,6 @@
else else
to_chat(src, msg) to_chat(src, msg)
/mob/proc/display_output(sound/S, mutable_appearance/vfx, text, turf/turf_source, vol as num, vary, frequency, falloff, channel = 0, pressure_affected = TRUE)
if(!can_hear())
return
//Process sound
if(S)
SEND_SOUND(src, S)
//Process text
if(text)
to_chat(src, "<span class='italics'>[text]</span>")
//to whoever sees this: icons are handled in living.dm
// Show a message to all player mobs who sees this atom // Show a message to all player mobs who sees this atom
// Show a message to the src mob (if the src is a mob) // Show a message to the src mob (if the src is a mob)
// Use for atoms performing visible actions // Use for atoms performing visible actions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -249,7 +249,6 @@
#include "code\controllers\subsystem\moods.dm" #include "code\controllers\subsystem\moods.dm"
#include "code\controllers\subsystem\nightshift.dm" #include "code\controllers\subsystem\nightshift.dm"
#include "code\controllers\subsystem\npcpool.dm" #include "code\controllers\subsystem\npcpool.dm"
#include "code\controllers\subsystem\outputs.dm"
#include "code\controllers\subsystem\overlays.dm" #include "code\controllers\subsystem\overlays.dm"
#include "code\controllers\subsystem\pai.dm" #include "code\controllers\subsystem\pai.dm"
#include "code\controllers\subsystem\parallax.dm" #include "code\controllers\subsystem\parallax.dm"
@@ -310,7 +309,6 @@
#include "code\datums\mutations.dm" #include "code\datums\mutations.dm"
#include "code\datums\numbered_display.dm" #include "code\datums\numbered_display.dm"
#include "code\datums\outfit.dm" #include "code\datums\outfit.dm"
#include "code\datums\outputs.dm"
#include "code\datums\position_point_vector.dm" #include "code\datums\position_point_vector.dm"
#include "code\datums\profiling.dm" #include "code\datums\profiling.dm"
#include "code\datums\progressbar.dm" #include "code\datums\progressbar.dm"