Skip to content

Commit

Permalink
renables radio (#132)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcus D. Johnston <[email protected]>
  • Loading branch information
xTrainx and Aurrain authored Jun 4, 2024
1 parent a7e45b0 commit c7f6925
Show file tree
Hide file tree
Showing 16 changed files with 111 additions and 50 deletions.
8 changes: 8 additions & 0 deletions code/controllers/subsystem/jukeboxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,12 @@ SUBSYSTEM_DEF(jukeboxes)
if(NS.song_associated_id == RT.song_associated_id)
SSjukeboxes.songs -= NS
return TRUE


/datum/track/cursed
song_name = "Cursed Track"
song_path = 'modular_BD2/general/sound/cursed.ogg'
song_length = 1370
song_beat = 010
song_associated_id = "cursedsong01"
//BIG IRON EDIT -end
2 changes: 1 addition & 1 deletion code/datums/components/armor_plate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var/amount = 0
var/maxamount = 5
var/upgrade_item = /obj/item/stack/crafting/armor_plate
var/datum/armor/added_armor = list("melee" = 2, "bullet" = 2, "laser" = 2)
var/datum/armor/added_armor = list("linemelee" = 2, "linebullet" = 2, "linelaser" = 2)
var/upgrade_name

/datum/component/armor_plate/Initialize(_maxamount,obj/item/_upgrade_item,datum/armor/_added_armor)
Expand Down
84 changes: 56 additions & 28 deletions code/datums/components/crafting/recipes/recipes_explosives.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
result = /obj/item/stack/ore/blackpowder
time = 5
reqs = list(/datum/reagent/blackpowder = 50)
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/explosive/explosive_collar
name = "Explosive Collar"
Expand All @@ -13,7 +14,8 @@
/obj/item/stack/cable_coil = 1,
/obj/item/assembly/igniter = 1,)
time = 30
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/chemical_payload
name = "Chemical Payload (C4)"
Expand All @@ -25,7 +27,8 @@
)
parts = list(/obj/item/stock_parts/matter_bin = 1, /obj/item/grenade/chem_grenade = 2)
time = 30
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/explosive/molotov
name = "Molotov Cocktail (empty)"
Expand All @@ -34,7 +37,8 @@
/obj/item/reagent_containers/food/drinks/bottle = 1,
)
time = 2
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/explosive/dynamite
name = "Stick of Dynamite"
Expand All @@ -43,7 +47,8 @@
/obj/item/paper = 2,
/obj/item/stack/ore/blackpowder = 2)
time = 5
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/explosive/firebomb
name = "Firebomb"
Expand All @@ -53,7 +58,8 @@
/obj/item/assembly/igniter = 1,
/obj/item/reagent_containers/food/drinks/flask = 1)
time = 5
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/explosive/firebomb_2
name = "Firebomb (from scrap)"
Expand All @@ -63,7 +69,8 @@
/obj/item/stack/crafting/metalparts = 2,
/obj/item/stack/sheet/metal = 2)
time = 5
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/explosive/coffeepotbomb
name = "Coffeepot Bomb"
Expand All @@ -73,7 +80,8 @@
/obj/item/stack/cable_coil = 1,
/obj/item/assembly/timer = 1)
time = 5
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/explosive/coffeepotbomb_2
name = "Coffeepot Bomb (from scrap)"
Expand All @@ -84,7 +92,8 @@
/obj/item/stack/crafting/metalparts = 3,
/obj/item/stack/crafting/electronicparts = 3)
time = 5
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/explosive/bottlecap_mine
name = "Bottlecap Mine"
Expand All @@ -95,7 +104,8 @@
/obj/item/stack/cable_coil = 5,
/obj/item/stack/f13Cash/caps = 200)
time = 15
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
/datum/crafting_recipe/explosive/shrapnelmine
name = "Shrapnel Mine"
result = /obj/item/mine/shrapnel/random
Expand All @@ -106,7 +116,8 @@
/obj/item/assembly/prox_sensor = 1,
/obj/item/stack/cable_coil = 5)
time = 15
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
always_available = FALSE

/datum/crafting_recipe/explosive/explomine
Expand All @@ -121,7 +132,8 @@
/obj/item/stack/cable_coil = 5
)
time = 15
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
always_available = FALSE

/datum/crafting_recipe/explosive/stingmine
Expand All @@ -136,7 +148,8 @@
/obj/item/stack/cable_coil = 5
)
time = 15
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
always_available = FALSE

/datum/crafting_recipe/explosive/pulsemine
Expand All @@ -150,7 +163,8 @@
/obj/item/stack/cable_coil = 5
)
time = 15
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
always_available = FALSE

/datum/crafting_recipe/explosive/stunmine
Expand All @@ -163,7 +177,8 @@
/obj/item/stack/cable_coil = 5
)
time = 15
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
always_available = FALSE


Expand All @@ -175,12 +190,14 @@
parts = list(/obj/item/twohanded/spear = 1,
/obj/item/grenade = 1)
time = 15
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/concussion
name = "High Explosive Grenade" //this one has no shrapnel
result = /obj/item/grenade/syndieminibomb/concussion
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
reqs = list(
/obj/item/stack/sheet/metal = 10,
/obj/item/stack/crafting/metalparts = 5,
Expand All @@ -197,7 +214,8 @@
/datum/crafting_recipe/frag_shrapnel
name = "Fragmentation Grenade"
result = /obj/item/grenade/f13/frag
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
reqs = list(
/obj/item/stack/sheet/metal = 10,
/obj/item/stack/crafting/metalparts = 2,
Expand All @@ -214,7 +232,8 @@
/datum/crafting_recipe/incendiary
name = "Incendiary Grenade"
result = /obj/item/grenade/f13/incendiary
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
reqs = list(
/obj/item/stack/sheet/metal = 20,
/obj/item/stack/crafting/metalparts = 15,
Expand All @@ -231,7 +250,8 @@
/datum/crafting_recipe/stinger
name = "Stinger Grenade"
result = /obj/item/grenade/f13/stinger
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
reqs = list(
/obj/item/stack/sheet/metal = 5,
/obj/item/stack/crafting/metalparts = 3,
Expand All @@ -247,7 +267,8 @@
/datum/crafting_recipe/radgrenade
name = "Radiation Grenade"
result = /obj/item/grenade/f13/radiation
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
reqs = list(
/obj/item/stack/sheet/metal = 20,
/obj/item/stack/crafting/metalparts = 10,
Expand All @@ -265,7 +286,8 @@
/datum/crafting_recipe/flashbang
name = "Flashbang"
result = /obj/item/grenade/flashbang
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
reqs = list(
/obj/item/stack/sheet/metal = 10,
/obj/item/stack/crafting/metalparts = 3,
Expand All @@ -281,7 +303,8 @@
/datum/crafting_recipe/smokebomb
name = "Smokebomb"
result = /obj/item/grenade/smokebomb
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
reqs = list(
/obj/item/stack/sheet/metal = 10,
/obj/item/stack/crafting/metalparts = 5,
Expand All @@ -297,7 +320,8 @@
/datum/crafting_recipe/empgrenade
name = "Pulse Grenade"
result = /obj/item/grenade/empgrenade
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
reqs = list(
/obj/item/stack/sheet/metal = 5,
/obj/item/stack/crafting/metalparts = 5,
Expand All @@ -313,7 +337,8 @@
/datum/crafting_recipe/rocket_base
name = "Empty rocket shell"
result = /obj/item/rocketshell
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
reqs = list(
/obj/item/stack/sheet/metal = 10,
/obj/item/stack/crafting/metalparts = 8,
Expand All @@ -327,7 +352,8 @@

/datum/crafting_recipe/weakrocket
name = "Low-yield HE rocket"
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
result = /obj/item/ammo_casing/caseless/rocket
reqs = list(
/obj/item/rocketshell = 1,
Expand All @@ -341,7 +367,8 @@

/datum/crafting_recipe/strongrocket
name = "High-yield HE rocket"
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
result = /obj/item/ammo_casing/caseless/rocket/big
reqs = list(
/obj/item/rocketshell = 1,
Expand All @@ -355,7 +382,8 @@

/datum/crafting_recipe/incendiaryrocket
name = "Incendiary rocket"
category = CAT_AMMO
category = CAT_WEAPONRY
subcategory = CAT_AMMO
result = /obj/item/ammo_casing/caseless/rocket/incendiary
reqs = list(
/obj/item/rocketshell = 1,
Expand Down
7 changes: 4 additions & 3 deletions code/game/machinery/dance_machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@
dance(M)

/obj/item/record_disk //BIG IRON EDIT START- the objets used in the creation o music
name = "record disk" //used to store tracks to add to the jukeboxes
name = "Generic Record disk" //used to store tracks to add to the jukeboxes
desc = "A disk for storing music. Dear god."
icon = 'icons/obj/machines/disk_recorder.dmi'
icon_state = "record_disk"
Expand All @@ -578,7 +578,8 @@

/obj/item/record_disk/Initialize() //moves them a bit so they are not all accumulated on the same pixel
. = ..()
name = "Generic record disk" // the name changes with music
if(R)
name = "[R.song_name] record disk" // the name changes with music
pixel_x = rand(-3, 3)
pixel_y = rand(-3, 3)

Expand Down Expand Up @@ -678,7 +679,7 @@
src.visible_message("<span class='warning'> music library has been updated.")

/obj/machinery/gramophone_recorder/proc/diskProcess() //its an old piece of tech and it takes it's time
addtimer(CALLBACK(src, .proc/burnDisk), 40)
addtimer(CALLBACK(src, PROC_REF(burnDisk)), 40)
inuse = TRUE
src.visible_message("<span class='warning'>your disk is being burned, please stand by.")

Expand Down
9 changes: 4 additions & 5 deletions code/game/objects/items/devices/radio/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -446,19 +446,18 @@
to_chat(user, "<span class='robot'><b>[src]</b> your preferences stopped <i>[music_name]</i> from playing!.' </span>")
return
music_playing = TRUE
playsound(user, music_filepath, music_volume, channel = music_channel) //plays the music to the user
playsound(user, music_filepath, music_volume, channel = music_channel, extrarange = -15) //plays the music to the user
update_icon()

/obj/item/radio/proc/playmusic(music_filepath, name_of_music, music_volume) //Plays music at src using the filepath to the audio file. This proc is directly working with the bluespace radio station at radio_station.dm
radio_music_file = music_filepath

var/atom/loc_layer = loc
while(istype(loc_layer, /atom/movable))
if(istype(loc_layer, /atom/movable))
if(!istype(loc_layer, /mob/living))
loc_layer = loc_layer.loc
else
radio_holder = loc_layer
break
if(!loc_layer) //if loc is null then this proc doesn't need to continue
return
if(!istype(loc_layer, /mob/living)) //doesn't need to continue if not on a mob
Expand All @@ -470,7 +469,7 @@
if(!(wearer.ears == src)) //only want headsets to play music if they're equipped
return
stopmusic(radio_holder) //stop the previously playing song to make way for the new one
addtimer(CALLBACK(src, .proc/avoiding_a_sleep, radio_holder, music_filepath, name_of_music, music_volume), 10)
addtimer(CALLBACK(src, PROC_REF(avoiding_a_sleep), radio_holder, music_filepath, name_of_music, music_volume), 10)

/obj/item/radio/proc/stopmusic(mob/living/user, music_turnoff_message_type)
if(music_playing)
Expand All @@ -490,7 +489,7 @@

/obj/item/radio/dropped(mob/user)
..()
addtimer(CALLBACK(src, .proc/droppedStopMusic, user), 3)
addtimer(CALLBACK(src, PROC_REF(droppedStopMusic), user), 3)

/obj/item/radio/proc/droppedStopMusic(mob/user)
var/i
Expand Down
8 changes: 4 additions & 4 deletions code/modules/mob/living/carbon/carbon_sprint.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
doSprintBufferRegen(FALSE) //first regen.
if(sprint_buffer)
var/use = min(tiles, sprint_buffer)
use *= calc_sprint_stamina_mod_from_special(tiles) // S.P.E.C.I.A.L.
var/special_discount = calc_sprint_stamina_mod_from_special(tiles) // S.P.E.C.I.A.L.
if(HAS_TRAIT(src, TRAIT_SPEED))
sprint_buffer -= use * 0.5
sprint_buffer -= (use * 0.5) * special_discount
else
sprint_buffer -= use
tiles -= use
sprint_buffer -= (use * special_discount)
tiles -= use
update_hud_sprint_bar()
if(!tiles) //we had enough, we're done!
return
Expand Down
Loading

0 comments on commit c7f6925

Please sign in to comment.