diff --git a/code/datums/wires/jukebox_vr.dm b/code/datums/wires/jukebox_vr.dm new file mode 100644 index 00000000000..bfe62be2bd7 --- /dev/null +++ b/code/datums/wires/jukebox_vr.dm @@ -0,0 +1,66 @@ +/datum/wires/jukebox + random = 1 + holder_type = /obj/machinery/media/jukebox/vore + wire_count = 7 + +var/const/WIRE_POWER = 1 +var/const/WIRE_HACK = 2 +var/const/WIRE_SPEEDUP = 4 +var/const/WIRE_SPEEDDOWN = 8 +var/const/WIRE_REVERSE = 16 +var/const/WIRE_NOTHING1 = 32 +var/const/WIRE_NOTHING2 = 64 + +/datum/wires/jukebox/CanUse(var/mob/living/L) + var/obj/machinery/media/jukebox/A = holder + if(A.panel_open) + return 1 + return 0 + +// Show the status of lights as a hint to the current state +/datum/wires/jukebox/GetInteractWindow() + var/obj/machinery/media/jukebox/vore/A = holder + . += ..() + . += "
The power light is [(A.stat & (BROKEN|NOPOWER)) ? "off" : "on"].
" + . += "The parental guidance light is [A.hacked ? "off" : "on"].
" + . += "The data light is [IsIndexCut(WIRE_REVERSE) ? "hauntingly dark" : "glowing sloftly"].
" + +// Give a hint as to what each wire does +/datum/wires/jukebox/UpdatePulsed(var/index) + var/obj/machinery/media/jukebox/vore/A = holder + switch(index) + if(WIRE_POWER) + holder.visible_message("\icon[holder] The power light flickers.") + A.shock(usr, 90) + if(WIRE_HACK) + holder.visible_message("\icon[holder] The parental guidance light flickers.") + if(WIRE_REVERSE) + holder.visible_message("\icon[holder] The data light blinks ominously.") + if(WIRE_SPEEDUP) + holder.visible_message("\icon[holder] The speakers squeaks.") + if(WIRE_SPEEDDOWN) + holder.visible_message("\icon[holder] The speakers rumble.") + else + A.shock(usr, 10) // The nothing wires give a chance to shock just for fun + +/datum/wires/jukebox/UpdateCut(var/index, var/mended) + var/obj/machinery/media/jukebox/vore/A = holder + + switch(index) + if(WIRE_POWER) + // TODO - Actually make machine electrified or something. + A.shock(usr, 90) + + if(WIRE_HACK) + if(mended) + A.set_hacked(0) + else + A.set_hacked(1) + + if(WIRE_SPEEDUP, WIRE_SPEEDDOWN, WIRE_REVERSE) + var/newfreq = IsIndexCut(WIRE_REVERSE) ? -1 : 1; + if (IsIndexCut(WIRE_SPEEDUP)) + newfreq *= 2 + if (IsIndexCut(WIRE_SPEEDDOWN)) + newfreq *= 0.5 + A.freq = newfreq diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 1c420728ba5..caa6e78a7f4 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -257,7 +257,10 @@ var/list/mob/living/forced_ambiance_list = new if(forced_ambience) if(forced_ambience.len) forced_ambiance_list |= L - L << sound(pick(forced_ambience), repeat = 1, wait = 0, volume = 25, channel = 1) + var/sound/chosen_ambiance = pick(forced_ambience) + if(!istype(chosen_ambiance)) + chosen_ambiance = sound(chosen_ambiance, repeat = 1, wait = 0, volume = 25, channel = 1) + L << chosen_ambiance else L << sound(null, channel = 1) else if(src.ambience.len && prob(35)) diff --git a/code/game/machinery/jukebox_vr.dm b/code/game/machinery/jukebox_vr.dm new file mode 100644 index 00000000000..90eb4de98c0 --- /dev/null +++ b/code/game/machinery/jukebox_vr.dm @@ -0,0 +1,101 @@ +// The improved, hackable jukebox for vorestation! + +/obj/machinery/media/jukebox/vore + name = "space jukebox" + icon = 'icons/obj/jukebox_vr.dmi' + + // Vars for hacking + var/datum/wires/jukebox/wires = null + var/hacked = 0 // Whether to show the hidden songs or not + var/freq = 0 + + // Only visible if hacked + var/list/datum/track/secret_tracks = list( + new/datum/track("Bandit Radio", 'sound/music/jukebox/bandit_radio.ogg'), + new/datum/track("Ghost Fight (Toby Fox)", 'sound/music/jukebox/TobyFoxGhostFight.mid'), + new/datum/track("Space Asshole", 'sound/music/space_asshole.ogg'), + new/datum/track("THUNDERDOME", 'sound/music/THUNDERDOME.ogg'), + ) + + // Normally visible tracks + tracks = list( + // AND WE DO NOT CARE~! AND WE DO NOT CARE~! + new/datum/track("A Song About Hares", 'sound/music/jukebox/SongAboutHares.ogg'), + new/datum/track("Below The Asteroids", 'sound/music/jukebox/BelowTheAsteroids.ogg'), + new/datum/track("Beyond", 'sound/ambience/ambispace.ogg'), + new/datum/track("Clouds of Fire", 'sound/music/clouds.s3m'), + new/datum/track("D`Bert", 'sound/music/title2.ogg'), + new/datum/track("D`Fort", 'sound/ambience/song_game.ogg'), + new/datum/track("Duck Tales - Moon", 'sound/music/jukebox/DuckTalesMoon.mid'), + new/datum/track("Endless Space", 'sound/music/space.ogg'), + new/datum/track("Floating", 'sound/music/main.ogg'), + new/datum/track("Fly Me To The Moon", 'sound/music/jukebox/Fly_Me_To_The_Moon.ogg'), + new/datum/track("Mad About Me", 'sound/music/jukebox/Cantina.ogg'), + new/datum/track("Minor Turbulence", 'sound/music/jukebox/MinorTurbulenceFull.ogg'), + new/datum/track("Ode to Greed", 'sound/music/jukebox/OdeToGreed.ogg'), + new/datum/track("Part A", 'sound/misc/TestLoop1.ogg'), + new/datum/track("Ransacked", 'sound/music/jukebox/Ransacked.ogg'), + // EVEN THOUGH THE STATION IS FULL OF HUNGRY WOLVES + new/datum/track("Russkiy rep Diskoteka", 'sound/music/jukebox/russianrapdisco.ogg'), + new/datum/track("Scratch", 'sound/music/title1.ogg'), + new/datum/track("Space Oddity", 'sound/music/space_oddity.ogg'), + new/datum/track("Trai`Tor", 'sound/music/traitor.ogg'), + new/datum/track("Welcome To Jurassic Park", 'sound/music/jukebox/WelcomeToJurassicPark.mid') + ) + +/obj/machinery/media/jukebox/vore/New() + ..() + wires = new/datum/wires/jukebox(src) + +/obj/machinery/media/jukebox/vore/Destroy() + ..() + qdel(wires) + wires = null + +/obj/machinery/media/jukebox/vore/update_icon() + ..() + if (panel_open) + overlays += "panel_open" + + +/obj/machinery/media/jukebox/vore/proc/set_hacked(var/newhacked) + if (hacked == newhacked) return + hacked = newhacked + if (hacked) + tracks.Add(secret_tracks) + else + tracks.Remove(secret_tracks) + updateDialog() + + +/obj/machinery/media/jukebox/vore/attackby(obj/item/W as obj, mob/user as mob) + src.add_fingerprint(user) + if (default_deconstruction_screwdriver(user, W)) + return + if(istype(W, /obj/item/weapon/wirecutters)) + return wires.Interact(user) + if(istype(W, /obj/item/device/multitool)) + return wires.Interact(user) + return ..() + + +/obj/machinery/media/jukebox/vore/StartPlaying() + StopPlaying() + if(!current_track) + return + + var/area/main_area = get_area(src) + if(freq) + var/sound/new_song = sound(current_track.sound, channel = 1, repeat = 1, volume = 25) + new_song.frequency = freq + main_area.forced_ambience = list(new_song) + else + main_area.forced_ambience = list(current_track.sound) + + for(var/mob/living/M in mobs_in_area(main_area)) + if(M.mind) + main_area.play_ambience(M) + + playing = 1 + update_use_power(2) + update_icon() diff --git a/icons/obj/jukebox_vr.dmi b/icons/obj/jukebox_vr.dmi new file mode 100644 index 00000000000..52386940e98 Binary files /dev/null and b/icons/obj/jukebox_vr.dmi differ diff --git a/maps/virgo-1.dmm b/maps/virgo-1.dmm index 1a1189f9681..7c7f24790a9 100644 --- a/maps/virgo-1.dmm +++ b/maps/virgo-1.dmm @@ -2892,7 +2892,7 @@ "bdF" = (/obj/structure/cable/green,/obj/structure/flora/pottedplant,/obj/machinery/power/apc{dir = 2; name = "south bump"; pixel_y = -24},/obj/effect/floor_decal/corner/brown/full,/turf/simulated/floor/tiled/white,/area/crew_quarters/coffee_shop) "bdG" = (/obj/structure/table/woodentable,/obj/machinery/alarm{dir = 1; icon_state = "alarm0"; pixel_y = -22},/obj/item/weapon/reagent_containers/food/condiment/small/sugar,/obj/effect/floor_decal/corner/brown{dir = 10},/turf/simulated/floor/tiled/white,/area/crew_quarters/coffee_shop) "bdH" = (/obj/machinery/camera/network/northern_star{c_tag = "Hall - Recreation Aft"; dir = 4},/obj/machinery/light{dir = 8; icon_state = "tube1"; pixel_y = 0},/turf/simulated/floor/tiled,/area/crew_quarters/recreation_area_hallway) -"bdI" = (/obj/machinery/camera/network/civilian{c_tag = "CIV - Cafe"; dir = 1},/obj/machinery/atmospherics/unary/vent_scrubber/on{dir = 1},/obj/machinery/media/jukebox,/obj/effect/floor_decal/corner/brown{dir = 10},/turf/simulated/floor/tiled/white,/area/crew_quarters/coffee_shop) +"bdI" = (/obj/machinery/camera/network/civilian{c_tag = "CIV - Cafe"; dir = 1},/obj/machinery/atmospherics/unary/vent_scrubber/on{dir = 1},/obj/machinery/media/jukebox/vore,/obj/effect/floor_decal/corner/brown{dir = 10},/turf/simulated/floor/tiled/white,/area/crew_quarters/coffee_shop) "bdJ" = (/obj/structure/closet/crate/freezer,/turf/simulated/floor/tiled/freezer,/area/medical/surgery_storage) "bdK" = (/obj/structure/closet/crate/freezer,/obj/machinery/light/small{dir = 1},/turf/simulated/floor/tiled/freezer,/area/medical/surgery_storage) "bdL" = (/obj/machinery/iv_drip,/turf/simulated/floor/tiled/freezer,/area/medical/surgery_storage) @@ -5582,7 +5582,7 @@ "cdr" = (/obj/machinery/computer/rcon,/obj/structure/window/reinforced{dir = 4},/obj/effect/floor_decal/corner/yellow/full{dir = 1},/obj/machinery/light{dir = 1},/turf/simulated/floor/tiled,/area/bridge) "cds" = (/obj/machinery/computer/shuttle_control/mining,/obj/effect/floor_decal/corner/brown/full{dir = 8},/obj/machinery/camera/network/command{c_tag = "COM - Bridge Port"},/turf/simulated/floor/tiled,/area/bridge) "cdt" = (/obj/machinery/computer/shuttle_control/research,/obj/structure/window/reinforced{dir = 4},/obj/effect/floor_decal/corner/purple/full{dir = 1},/turf/simulated/floor/tiled,/area/bridge) -"cdu" = (/obj/machinery/media/jukebox,/turf/simulated/floor/wood,/area/crew_quarters/bar) +"cdu" = (/obj/machinery/media/jukebox/vore,/turf/simulated/floor/wood,/area/crew_quarters/bar) "cdv" = (/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/effect/floor_decal/corner/blue{dir = 1},/turf/simulated/floor/tiled,/area/bridge) "cdw" = (/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/tiled,/area/bridge) "cdx" = (/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable/green{d1 = 1; d2 = 8; icon_state = "1-8"},/obj/structure/disposalpipe/junction{icon_state = "pipe-j2"; dir = 2},/turf/simulated/floor/tiled,/area/bridge) diff --git a/sound/music/jukebox/BelowTheAsteroids.ogg b/sound/music/jukebox/BelowTheAsteroids.ogg new file mode 100644 index 00000000000..121b4b7ceb9 Binary files /dev/null and b/sound/music/jukebox/BelowTheAsteroids.ogg differ diff --git a/sound/music/jukebox/Cantina.ogg b/sound/music/jukebox/Cantina.ogg new file mode 100644 index 00000000000..e07191f018d Binary files /dev/null and b/sound/music/jukebox/Cantina.ogg differ diff --git a/sound/music/jukebox/DuckTalesMoon.mid b/sound/music/jukebox/DuckTalesMoon.mid new file mode 100644 index 00000000000..878c6834b40 Binary files /dev/null and b/sound/music/jukebox/DuckTalesMoon.mid differ diff --git a/sound/music/jukebox/Fly_Me_To_The_Moon.ogg b/sound/music/jukebox/Fly_Me_To_The_Moon.ogg new file mode 100644 index 00000000000..ccfe03e4063 Binary files /dev/null and b/sound/music/jukebox/Fly_Me_To_The_Moon.ogg differ diff --git a/sound/music/jukebox/MinorTurbulenceFull.ogg b/sound/music/jukebox/MinorTurbulenceFull.ogg new file mode 100644 index 00000000000..3826cbd1327 Binary files /dev/null and b/sound/music/jukebox/MinorTurbulenceFull.ogg differ diff --git a/sound/music/jukebox/OdeToGreed.ogg b/sound/music/jukebox/OdeToGreed.ogg new file mode 100644 index 00000000000..eb632529451 Binary files /dev/null and b/sound/music/jukebox/OdeToGreed.ogg differ diff --git a/sound/music/jukebox/Ransacked.ogg b/sound/music/jukebox/Ransacked.ogg new file mode 100644 index 00000000000..4b8edf3583f Binary files /dev/null and b/sound/music/jukebox/Ransacked.ogg differ diff --git a/sound/music/jukebox/SongAboutHares.ogg b/sound/music/jukebox/SongAboutHares.ogg new file mode 100644 index 00000000000..1013f50c852 Binary files /dev/null and b/sound/music/jukebox/SongAboutHares.ogg differ diff --git a/sound/music/jukebox/TobyFoxGhostFight.mid b/sound/music/jukebox/TobyFoxGhostFight.mid new file mode 100644 index 00000000000..7a832c56d02 Binary files /dev/null and b/sound/music/jukebox/TobyFoxGhostFight.mid differ diff --git a/sound/music/jukebox/WelcomeToJurassicPark.mid b/sound/music/jukebox/WelcomeToJurassicPark.mid new file mode 100644 index 00000000000..57fd9082fb7 Binary files /dev/null and b/sound/music/jukebox/WelcomeToJurassicPark.mid differ diff --git a/sound/music/jukebox/bandit_radio.ogg b/sound/music/jukebox/bandit_radio.ogg new file mode 100644 index 00000000000..9057dfda73c Binary files /dev/null and b/sound/music/jukebox/bandit_radio.ogg differ diff --git a/sound/music/jukebox/russianrapdisco.ogg b/sound/music/jukebox/russianrapdisco.ogg new file mode 100644 index 00000000000..6c749817499 Binary files /dev/null and b/sound/music/jukebox/russianrapdisco.ogg differ diff --git a/vorestation.dme b/vorestation.dme index e446ba7d88c..b600bc8fa02 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -195,6 +195,7 @@ #include "code\datums\wires\autolathe.dm" #include "code\datums\wires\camera.dm" #include "code\datums\wires\explosive.dm" +#include "code\datums\wires\jukebox_vr.dm" #include "code\datums\wires\particle_accelerator.dm" #include "code\datums\wires\radio.dm" #include "code\datums\wires\robot.dm" @@ -403,6 +404,7 @@ #include "code\game\machinery\igniter.dm" #include "code\game\machinery\iv_drip.dm" #include "code\game\machinery\jukebox.dm" +#include "code\game\machinery\jukebox_vr.dm" #include "code\game\machinery\lightswitch.dm" #include "code\game\machinery\machinery.dm" #include "code\game\machinery\magnet.dm" @@ -1895,11 +1897,11 @@ #include "code\modules\vore\eating\vore_vr.dm" #include "code\modules\vore\eating\vorehooks_vr.dm" #include "code\modules\vore\eating\vorepanel_vr.dm" -#include "code\modules\vore\weight\fitness_machines_vr.dm" #include "code\modules\vore\resizing\grav_pull_vr.dm" #include "code\modules\vore\resizing\holder_micro_vr.dm" #include "code\modules\vore\resizing\resize_vr.dm" #include "code\modules\vore\resizing\sizegun_vr.dm" +#include "code\modules\vore\weight\fitness_machines_vr.dm" #include "code\modules\xgm\xgm_gas_data.dm" #include "code\modules\xgm\xgm_gas_mixture.dm" #include "code\unit_tests\loadout_tests.dm"