Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AyIong committed Feb 1, 2024
1 parent 8774f47 commit c4d6e59
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
9 changes: 6 additions & 3 deletions modular_ss220/jukebox/code/jukebox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@
update_icon()
return TRUE

/obj/machinery/jukebox/process()
if(!is_operational())
stop_music()
/obj/machinery/jukebox/obj_break()
if(stat & BROKEN)
return
stat |= BROKEN
idle_power_consumption = 0
stop_music()
4 changes: 2 additions & 2 deletions modular_ss220/jukebox/code/jukebox_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
/// Path to music folder
var/songs_path

/datum/jukebox/New(atom/new_parent, songs_path)
/datum/jukebox/New(atom/new_parent, new_songs_path)
if(!ismovable(new_parent) && !isturf(new_parent))
stack_trace("[type] created on non-turf or non-movable: [new_parent ? "[new_parent] ([new_parent.type])" : "null"])")
qdel(src)
return

parent = new_parent
src.songs_path = songs_path
songs_path = new_songs_path

if(isnull(sound_range))
sound_range = world.view
Expand Down
11 changes: 5 additions & 6 deletions modular_ss220/jukebox/code/jukebox_subtypes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,31 @@
/obj/machinery/jukebox/drum_red
name = "\improper красный барабан"
desc = "Крутые барабаны от какой-то группы."
icon_state = "drum_red"
icon_state = "drum_red_unanchored"
base_icon_state = "drum_red"
anchored = FALSE
music_folder = "config/jukebox_music/drum_music/"

/obj/machinery/jukebox/drum_red/wrench_act()
. = ..()
icon_state = "[base_icon_state][anchored ? "_anchored" : null]"
icon_state = "[base_icon_state][anchored ? null : "_unanchored"]"

/obj/machinery/jukebox/drum_red/update_icon_state()
if(stat & (BROKEN))
icon_state = "[base_icon_state]_broken"
else
icon_state = "[base_icon_state]_anchored[music_player.active_song_sound ? "-active" : null]"
icon_state = "[base_icon_state][music_player.active_song_sound ? "-active" : null]"

/obj/machinery/jukebox/drum_red/drum_yellow
name = "\improper желтый барабан"
icon_state = "drum_yellow"
icon_state = "drum_yellow_unanchored"
base_icon_state = "drum_yellow"

/obj/machinery/jukebox/drum_red/drum_blue
name = "\improper синий барабан"
icon_state = "drum_blue"
icon_state = "drum_blue_unanchored"
base_icon_state = "drum_blue"

/datum/supply_packs/misc/bigband/New()
. = ..()

contains |= /obj/machinery/jukebox/drum_red
Binary file modified modular_ss220/jukebox/icons/jukebox.dmi
Binary file not shown.

0 comments on commit c4d6e59

Please sign in to comment.