mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
Small instruments fix (#94916)
This commit is contained in:
@@ -216,19 +216,19 @@
|
||||
music_player = user
|
||||
START_PROCESSING(SSinstruments, src)
|
||||
if(id)
|
||||
sync_play()
|
||||
sync_play(user)
|
||||
|
||||
/**
|
||||
* Attempts to find other instruments with the same ID and syncs them to our song.
|
||||
*/
|
||||
/datum/song/proc/sync_play()
|
||||
/datum/song/proc/sync_play(atom/user)
|
||||
for(var/datum/song/other_instrument as anything in SSinstruments.songs)
|
||||
if(other_instrument == src || other_instrument.id != id)
|
||||
continue
|
||||
if(other_instrument.playing)
|
||||
continue
|
||||
var/atom/other_player = other_instrument.find_sync_player()
|
||||
if(isnull(other_player) || !(other_player in view(parent)))
|
||||
if(isnull(other_player) || !(other_player in view(user || parent)))
|
||||
continue
|
||||
// copies the main song info to target songs
|
||||
other_instrument.lines = lines.Copy()
|
||||
@@ -432,7 +432,7 @@
|
||||
/datum/song/stationary/should_stop_playing(atom/player)
|
||||
. = ..()
|
||||
if(. == STOP_PLAYING || . == IGNORE_INSTRUMENT_CHECKS)
|
||||
return TRUE
|
||||
return
|
||||
var/obj/structure/musician/M = parent
|
||||
return M.can_play(player) ? NONE : STOP_PLAYING
|
||||
|
||||
|
||||
Reference in New Issue
Block a user