mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Resolves Issue #8 - Making Juke Boxes hackable
* Created new jukebox type with new features. * Adds all of our songs to the repository. * Adds all of our songs to the jukebox. * Makes juke boxes hackable. * Modify areas to enable playing of frequency-altered sounds. * Replaced normal jukeboxes with our nice ones on the map.
This commit is contained in:
66
code/datums/wires/jukebox_vr.dm
Normal file
66
code/datums/wires/jukebox_vr.dm
Normal file
@@ -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
|
||||
. += ..()
|
||||
. += "<BR>The power light is [(A.stat & (BROKEN|NOPOWER)) ? "off" : "on"].<BR>"
|
||||
. += "The parental guidance light is [A.hacked ? "off" : "on"].<BR>"
|
||||
. += "The data light is [IsIndexCut(WIRE_REVERSE) ? "hauntingly dark" : "glowing sloftly"].<BR>"
|
||||
|
||||
// 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("<span class='notice'>\icon[holder] The power light flickers.</span>")
|
||||
A.shock(usr, 90)
|
||||
if(WIRE_HACK)
|
||||
holder.visible_message("<span class='notice'>\icon[holder] The parental guidance light flickers.</span>")
|
||||
if(WIRE_REVERSE)
|
||||
holder.visible_message("<span class='notice'>\icon[holder] The data light blinks ominously.</span>")
|
||||
if(WIRE_SPEEDUP)
|
||||
holder.visible_message("<span class='notice'>\icon[holder] The speakers squeaks.</span>")
|
||||
if(WIRE_SPEEDDOWN)
|
||||
holder.visible_message("<span class='notice'>\icon[holder] The speakers rumble.</span>")
|
||||
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
|
||||
@@ -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))
|
||||
|
||||
101
code/game/machinery/jukebox_vr.dm
Normal file
101
code/game/machinery/jukebox_vr.dm
Normal file
@@ -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()
|
||||
BIN
icons/obj/jukebox_vr.dmi
Normal file
BIN
icons/obj/jukebox_vr.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
@@ -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)
|
||||
|
||||
BIN
sound/music/jukebox/BelowTheAsteroids.ogg
Normal file
BIN
sound/music/jukebox/BelowTheAsteroids.ogg
Normal file
Binary file not shown.
BIN
sound/music/jukebox/Cantina.ogg
Normal file
BIN
sound/music/jukebox/Cantina.ogg
Normal file
Binary file not shown.
BIN
sound/music/jukebox/DuckTalesMoon.mid
Normal file
BIN
sound/music/jukebox/DuckTalesMoon.mid
Normal file
Binary file not shown.
BIN
sound/music/jukebox/Fly_Me_To_The_Moon.ogg
Normal file
BIN
sound/music/jukebox/Fly_Me_To_The_Moon.ogg
Normal file
Binary file not shown.
BIN
sound/music/jukebox/MinorTurbulenceFull.ogg
Normal file
BIN
sound/music/jukebox/MinorTurbulenceFull.ogg
Normal file
Binary file not shown.
BIN
sound/music/jukebox/OdeToGreed.ogg
Normal file
BIN
sound/music/jukebox/OdeToGreed.ogg
Normal file
Binary file not shown.
BIN
sound/music/jukebox/Ransacked.ogg
Normal file
BIN
sound/music/jukebox/Ransacked.ogg
Normal file
Binary file not shown.
BIN
sound/music/jukebox/SongAboutHares.ogg
Normal file
BIN
sound/music/jukebox/SongAboutHares.ogg
Normal file
Binary file not shown.
BIN
sound/music/jukebox/TobyFoxGhostFight.mid
Normal file
BIN
sound/music/jukebox/TobyFoxGhostFight.mid
Normal file
Binary file not shown.
BIN
sound/music/jukebox/WelcomeToJurassicPark.mid
Normal file
BIN
sound/music/jukebox/WelcomeToJurassicPark.mid
Normal file
Binary file not shown.
BIN
sound/music/jukebox/bandit_radio.ogg
Normal file
BIN
sound/music/jukebox/bandit_radio.ogg
Normal file
Binary file not shown.
BIN
sound/music/jukebox/russianrapdisco.ogg
Normal file
BIN
sound/music/jukebox/russianrapdisco.ogg
Normal file
Binary file not shown.
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user