Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Jukebox Beacons #1548

Merged
merged 3 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
new /obj/item/roulette_wheel_beacon(src)
new /obj/item/storage/fancy/candle_box(src)
new /obj/item/storage/fancy/candle_box(src)
new /obj/item/choice_beacon/jukebox(src) //this line is a monkestation edit!
new /obj/item/jukebox_beacon(src) //monkestation edit
10 changes: 0 additions & 10 deletions monkestation/code/game/objects/items/choice_beacon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,3 @@
return

to_chat(user, span_notice("[uses] use[uses > 1 ? "s" : ""] remain[uses > 1 ? "" : "s"] on [src]."))

/obj/item/choice_beacon/jukebox //this is probably a terrible way to do this, but its the first that worked.
name = "jukebox beacon"
desc = "Deploys a jukebox! Also comes wrenched down to the floor for you on delivery! How convenient!"
/obj/item/choice_beacon/jukebox/interact(mob/user)
to_chat(user, span_hear("You hear a crackle before a message plays through [src]: \"Thank you for picking Dave's Instant Jukebox Shipping! This beacon will now self destruct.\""))
new /obj/machinery/media/jukebox(get_turf(user))
playsound(src, 'sound/weapons/emitter2.ogg', 50, extrarange = SILENCED_SOUND_EXTRARANGE)
do_sparks(3, source = src)
qdel(src)
23 changes: 23 additions & 0 deletions monkestation/code/game/objects/items/jukebox_beacon.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/obj/item/jukebox_beacon
name = "jukebox beacon"
desc = "N.T. jukebox beacon, toss it down and you will have a complementary jukebox delivered to you. It comes with a free wrench to move it after deployment."
icon = 'monkestation/icons/obj/items_and_weapons.dmi'
icon_state = "music_beacon"
var/used = FALSE

/obj/item/jukebox_beacon/attack_self()
if(used)
return
loc.visible_message(span_warning("\The [src] begins to beep loudly!"))
used = TRUE
addtimer(CALLBACK(src, PROC_REF(launch_payload)), 4 SECONDS)

/obj/item/jukebox_beacon/proc/launch_payload()
Noot-Toot marked this conversation as resolved.
Show resolved Hide resolved
if(QDELETED(src))
return
podspawn(list(
"target" = get_turf(src),
"spawn" = list(/obj/item/wrench, /obj/machinery/media/jukebox),
"style" = STYLE_CENTCOM
))
qdel(src)
2 changes: 1 addition & 1 deletion monkestation/code/modules/cargo/crates/service.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
name = "Jukebox Beacon Crate"
desc = "Last one stolen? Broken? Burnt down in an insurance scam? then this crate is for you. Contains one Jukebox Beacon."
cost = CARGO_CRATE_VALUE * 20 //the crew shouldnt be able to just buy 15 jukeboxes all playing among us at the same time
contains = list(/obj/item/choice_beacon/jukebox)
contains = list(/obj/item/jukebox_beacon)
crate_name = "jukebox beacon crate"

/datum/supply_pack/service/cassettes
Expand Down
Binary file modified monkestation/icons/obj/items_and_weapons.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5741,6 +5741,7 @@
#include "monkestation\code\game\objects\items\choice_beacon.dm"
#include "monkestation\code\game\objects\items\cirno_plush.dm"
#include "monkestation\code\game\objects\items\gravity_gun.dm"
#include "monkestation\code\game\objects\items\jukebox_beacon.dm"
#include "monkestation\code\game\objects\items\miningweapons.dm"
#include "monkestation\code\game\objects\items\mothlet_grenade.dm"
#include "monkestation\code\game\objects\items\plushies.dm"
Expand Down
Loading