diff --git a/baystation12.dme b/baystation12.dme index 3f651677205..efd2374b2e8 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1402,6 +1402,7 @@ #include "code\WorkInProgress\ZomgPonies\clothing\civilian.dm" #include "code\WorkInProgress\ZomgPonies\mobs\pony.dm" #include "code\WorkInProgress\ZomgPonies\mobs\metroid\powers.dm" +#include "code\WorkInProgress\ZomgPonies\oldcode\turntable.dm" #include "code\ZAS\Airflow.dm" #include "code\ZAS\Connection.dm" #include "code\ZAS\Debug.dm" diff --git a/code/WorkInProgress/ZomgPonies/oldcode/turntable.dm b/code/WorkInProgress/ZomgPonies/oldcode/turntable.dm new file mode 100644 index 00000000000..2c0b1826a6d --- /dev/null +++ b/code/WorkInProgress/ZomgPonies/oldcode/turntable.dm @@ -0,0 +1,283 @@ +/sound/turntable/test + file = 'sound/turntable/TestLoop1.ogg' + falloff = 2 + repeat = 1 + +/mob/var/music = 0 + +/obj/machinery/party/turntable + name = "turntable" + desc = "A turntable used for parties and shit." + icon = 'icons/effects/lasers2.dmi' + icon_state = "turntable" + var/playing = 0 + anchored = 1 + +/obj/machinery/party/mixer + name = "mixer" + desc = "A mixing board for mixing music" + icon = 'icons/effects/lasers2.dmi' + icon_state = "mixer" + anchored = 1 + + +/obj/machinery/party/turntable/New() + ..() + sleep(2) + new /sound/turntable/test(src) + return + +/obj/machinery/party/turntable/attack_hand(mob/user as mob) + + var/t = "Turntable Interface

" + //t += "On
" + t += "Off

" + t += "One
" + //t += "TestLoop2
" + //t += "TestLoop3
" + + user << browse(t, "window=turntable;size=420x700") + + +/obj/machinery/party/turntable/Topic(href, href_list) + ..() + if( href_list["on1"] ) + if(src.playing == 0) + //world << "Should be working..." + var/sound/S = sound('sound/turntable/TestLoop1.ogg') + S.repeat = 1 + S.channel = 10 + S.falloff = 2 + S.wait = 1 + S.environment = 0 + //for(var/mob/M in world) + // if(M.loc.loc == src.loc.loc && M.music == 0) + // world << "Found the song..." + // M << S + // M.music = 1 + var/area/A = src.loc.loc + + for(var/area/RA in A.related) + for(var/obj/machinery/party/lasermachine/L in RA) + L.turnon() + playing = 1 + while(playing == 1) + for(var/mob/M in world) + if((M.loc.loc in A.related) && M.music == 0) + //world << "Found the song..." + M << S + M.music = 1 + else if(!(M.loc.loc in A.related) && M.music == 1) + var/sound/Soff = sound(null) + Soff.channel = 10 + M << Soff + M.music = 0 + sleep(10) + return + if( href_list["on2"] ) + if(src.playing == 0) + //world << "Should be working..." + var/sound/S = sound('sound/turntable/TestLoop2.ogg') + S.repeat = 1 + S.channel = 10 + S.falloff = 2 + S.wait = 1 + S.environment = 0 + //for(var/mob/M in world) + // if(M.loc.loc == src.loc.loc && M.music == 0) + // world << "Found the song..." + // M << S + // M.music = 1 + var/area/A = src.loc.loc + for(var/obj/machinery/party/lasermachine/L in A) + L.turnon() + playing = 1 + while(playing == 1) + for(var/mob/M in world) + if(M.loc.loc == src.loc.loc && M.music == 0) + //world << "Found the song..." + M << S + M.music = 1 + else if(M.loc.loc != src.loc.loc && M.music == 1) + var/sound/Soff = sound(null) + Soff.channel = 10 + M << Soff + M.music = 0 + sleep(10) + return + if( href_list["on3"] ) + if(src.playing == 0) + //world << "Should be working..." + var/sound/S = sound('sound/turntable/TestLoop3.ogg') + S.repeat = 1 + S.channel = 10 + S.falloff = 2 + S.wait = 1 + S.environment = 0 + //for(var/mob/M in world) + // if(M.loc.loc == src.loc.loc && M.music == 0) + // world << "Found the song..." + // M << S + // M.music = 1 + var/area/A = src.loc.loc + for(var/obj/machinery/party/lasermachine/L in A) + L.turnon() + playing = 1 + while(playing == 1) + for(var/mob/M in world) + if(M.loc.loc == src.loc.loc && M.music == 0) + //world << "Found the song..." + M << S + M.music = 1 + else if(M.loc.loc != src.loc.loc && M.music == 1) + var/sound/Soff = sound(null) + Soff.channel = 10 + M << Soff + M.music = 0 + sleep(10) + return + + + if( href_list["off"] ) + if(src.playing == 1) + var/sound/S = sound(null) + S.channel = 10 + S.wait = 1 + for(var/mob/M in world) + M << S + M.music = 0 + playing = 0 + var/area/A = src.loc.loc + for(var/area/RA in A.related) + for(var/obj/machinery/party/lasermachine/L in RA) + L.turnoff() + + + +/obj/machinery/party/lasermachine + name = "laser machine" + desc = "A laser machine that shoots lasers." + icon = 'icons/effects/lasers2.dmi' + icon_state = "lasermachine" + anchored = 1 + var/mirrored = 0 + +/obj/effects/laser + name = "laser" + desc = "A laser..." + icon = 'icons/effects/lasers2.dmi' + icon_state = "laserred1" + anchored = 1 + layer = 4 + +/obj/item/lasermachine/New() + ..() + +/obj/machinery/party/lasermachine/proc/turnon() + var/wall = 0 + var/cycle = 1 + var/area/A = get_area(src) + var/X = 1 + var/Y = 0 + if(mirrored == 0) + while(wall == 0) + if(cycle == 1) + var/obj/effects/laser/F = new/obj/effects/laser(src) + F.x = src.x+X + F.y = src.y+Y + F.z = src.z + F.icon_state = "laserred1" + var/area/AA = get_area(F) + var/turf/T = get_turf(F) + if(T.density == 1 || AA.name != A.name) + del(F) + return + cycle++ + if(cycle > 3) + cycle = 1 + X++ + if(cycle == 2) + var/obj/effects/laser/F = new/obj/effects/laser(src) + F.x = src.x+X + F.y = src.y+Y + F.z = src.z + F.icon_state = "laserred2" + var/area/AA = get_area(F) + var/turf/T = get_turf(F) + if(T.density == 1 || AA.name != A.name) + del(F) + return + cycle++ + if(cycle > 3) + cycle = 1 + Y++ + if(cycle == 3) + var/obj/effects/laser/F = new/obj/effects/laser(src) + F.x = src.x+X + F.y = src.y+Y + F.z = src.z + F.icon_state = "laserred3" + var/area/AA = get_area(F) + var/turf/T = get_turf(F) + if(T.density == 1 || AA.name != A.name) + del(F) + return + cycle++ + if(cycle > 3) + cycle = 1 + X++ + if(mirrored == 1) + while(wall == 0) + if(cycle == 1) + var/obj/effects/laser/F = new/obj/effects/laser(src) + F.x = src.x+X + F.y = src.y-Y + F.z = src.z + F.icon_state = "laserred1m" + var/area/AA = get_area(F) + var/turf/T = get_turf(F) + if(T.density == 1 || AA.name != A.name) + del(F) + return + cycle++ + if(cycle > 3) + cycle = 1 + Y++ + if(cycle == 2) + var/obj/effects/laser/F = new/obj/effects/laser(src) + F.x = src.x+X + F.y = src.y-Y + F.z = src.z + F.icon_state = "laserred2m" + var/area/AA = get_area(F) + var/turf/T = get_turf(F) + if(T.density == 1 || AA.name != A.name) + del(F) + return + cycle++ + if(cycle > 3) + cycle = 1 + X++ + if(cycle == 3) + var/obj/effects/laser/F = new/obj/effects/laser(src) + F.x = src.x+X + F.y = src.y-Y + F.z = src.z + F.icon_state = "laserred3m" + var/area/AA = get_area(F) + var/turf/T = get_turf(F) + if(T.density == 1 || AA.name != A.name) + del(F) + return + cycle++ + if(cycle > 3) + cycle = 1 + X++ + + + +/obj/machinery/party/lasermachine/proc/turnoff() + var/area/A = src.loc.loc + for(var/area/RA in A.related) + for(var/obj/effects/laser/F in RA) + del(F) diff --git a/icons/effects/lasers2.dmi b/icons/effects/lasers2.dmi new file mode 100644 index 00000000000..28bccaf444d Binary files /dev/null and b/icons/effects/lasers2.dmi differ diff --git a/sound/turntable/TestLoop.ogg b/sound/turntable/TestLoop.ogg new file mode 100644 index 00000000000..453ad568fa2 Binary files /dev/null and b/sound/turntable/TestLoop.ogg differ diff --git a/sound/turntable/TestLoop1.ogg b/sound/turntable/TestLoop1.ogg new file mode 100644 index 00000000000..5e1210bfd06 Binary files /dev/null and b/sound/turntable/TestLoop1.ogg differ diff --git a/sound/turntable/TestLoop2.ogg b/sound/turntable/TestLoop2.ogg new file mode 100644 index 00000000000..5feaa762936 Binary files /dev/null and b/sound/turntable/TestLoop2.ogg differ diff --git a/sound/turntable/TestLoop3.ogg b/sound/turntable/TestLoop3.ogg new file mode 100644 index 00000000000..9ac0e02b773 Binary files /dev/null and b/sound/turntable/TestLoop3.ogg differ