powder that makes you say yes

This commit is contained in:
Nadyr
2023-03-17 02:39:24 -04:00
committed by GitHub
parent 6cd9f2bb83
commit d0a72ad572

View File

@@ -16,12 +16,8 @@
direct (bool) If true plays directly to provided atoms instead of from them direct (bool) If true plays directly to provided atoms instead of from them
opacity_check (bool) If true, things behind walls/opaque things won't hear the sounds. opacity_check (bool) If true, things behind walls/opaque things won't hear the sounds.
pref_check (type) If set to a /datum/client_preference type, will check if the hearer has that preference active before playing it to them. pref_check (type) If set to a /datum/client_preference type, will check if the hearer has that preference active before playing it to them.
<<<<<<< HEAD volume_chan (type) If set to a specific volume channel via the incoming argument, we tell the playsound proc to modulate volume based on that channel //CHOMPedit
volume_chan (type) If set to a specific volume channel via the incoming argument, we tell the playsound proc to modulate volume based on that channel
exclusive (bool) If true, only one of this sound is allowed to play.
=======
exclusive (bool) If true, only one of this sound is allowed to play. Relies on if started is true or not. If true, it will not start another loop until it is false. exclusive (bool) If true, only one of this sound is allowed to play. Relies on if started is true or not. If true, it will not start another loop until it is false.
>>>>>>> 01ef59a8fc... Merge pull request #14667 from VOREStation/upstream-merge-9018
*/ */
/datum/looping_sound /datum/looping_sound
var/list/atom/output_atoms var/list/atom/output_atoms
@@ -38,32 +34,20 @@
var/extra_range var/extra_range
var/opacity_check var/opacity_check
var/pref_check var/pref_check
<<<<<<< HEAD var/volume_chan //CHOMPedit
var/volume_chan
=======
>>>>>>> 01ef59a8fc... Merge pull request #14667 from VOREStation/upstream-merge-9018
var/exclusive var/exclusive
var/timerid var/timerid
var/started var/started
<<<<<<< HEAD
/datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, disable_direct=FALSE) // CHOMPEdit: Fixes shitty default _direct forcing all direct sounds to false. Now it is an explicit override
=======
/datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, disable_direct=FALSE) /datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, disable_direct=FALSE)
>>>>>>> 01ef59a8fc... Merge pull request #14667 from VOREStation/upstream-merge-9018
if(!mid_sounds) if(!mid_sounds)
WARNING("A looping sound datum was created without sounds to play.") WARNING("A looping sound datum was created without sounds to play.")
return return
output_atoms = _output_atoms output_atoms = _output_atoms
<<<<<<< HEAD
if(disable_direct) // CHOMPEdit: Fixes shitty default _direct forcing all direct sounds to false. Now it is an explicit override
direct = FALSE // CHOMPEdit: Fixes shitty default _direct forcing all direct sounds to false. Now it is an explicit override
=======
if(disable_direct) if(disable_direct)
direct = FALSE direct = FALSE
>>>>>>> 01ef59a8fc... Merge pull request #14667 from VOREStation/upstream-merge-9018
if(start_immediately) if(start_immediately)
start() start()
@@ -73,26 +57,15 @@
output_atoms = null output_atoms = null
return ..() return ..()
<<<<<<< HEAD
/datum/looping_sound/proc/start(atom/add_thing, skip_start_sound = FALSE) // CHOMPStation Edit: Skip start sounds optionally
=======
/datum/looping_sound/proc/start(atom/add_thing, skip_start_sound = FALSE) /datum/looping_sound/proc/start(atom/add_thing, skip_start_sound = FALSE)
>>>>>>> 01ef59a8fc... Merge pull request #14667 from VOREStation/upstream-merge-9018
if(add_thing) if(add_thing)
output_atoms |= add_thing output_atoms |= add_thing
if(timerid) if(timerid)
return return
<<<<<<< HEAD
if(skip_start_sound && (!exclusive && !started)) // CHOMPStation Edit: Skip start sounds optionally
sound_loop() // CHOMPStation Edit: Skip start sounds optionally
started = TRUE // CHOMPStation Edit: Skip start sounds optionally
return // CHOMPStation Edit: Skip start sounds optionally
=======
if(skip_start_sound && (!exclusive && !started)) // Skip start sounds optionally, check if we're exclusive AND started already if(skip_start_sound && (!exclusive && !started)) // Skip start sounds optionally, check if we're exclusive AND started already
sound_loop() sound_loop()
started = TRUE started = TRUE
return return
>>>>>>> 01ef59a8fc... Merge pull request #14667 from VOREStation/upstream-merge-9018
if(exclusive && started) // Prevents a sound from starting multiple times if(exclusive && started) // Prevents a sound from starting multiple times
return // Don't start this loop. return // Don't start this loop.
on_start() on_start()
@@ -103,13 +76,8 @@
output_atoms -= remove_thing output_atoms -= remove_thing
if(!timerid) if(!timerid)
return return
<<<<<<< HEAD
if(!skip_stop_sound) // CHOMPEdit: Allows skipping the stop sound, should you need to.
on_stop() // CHOMPEdit: Allows skipping the stop sound, should you need to.
=======
if(!skip_stop_sound) if(!skip_stop_sound)
on_stop() on_stop()
>>>>>>> 01ef59a8fc... Merge pull request #14667 from VOREStation/upstream-merge-9018
deltimer(timerid) deltimer(timerid)
timerid = null timerid = null
started = FALSE started = FALSE
@@ -134,11 +102,7 @@
if(direct) if(direct)
if(ismob(thing)) if(ismob(thing))
var/mob/M = thing var/mob/M = thing
<<<<<<< HEAD
if(pref_check && !M.is_preference_enabled(pref_check)) // CHOMPEdit: Fixed this broken check, sent upstream
=======
if(pref_check && !M.is_preference_enabled(pref_check)) if(pref_check && !M.is_preference_enabled(pref_check))
>>>>>>> 01ef59a8fc... Merge pull request #14667 from VOREStation/upstream-merge-9018
continue continue
SEND_SOUND(thing, S) SEND_SOUND(thing, S)
else else