mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
SFX for RCD, RPD, Plumbing constructor (#85754)
## About The Pull Request Hooked the switch sound on `ui_act`: - RCD - RPD - Plumbing constructor Added pickup and drop sounds for: - RCD - RPD RPD also does the click sound when placing things. https://github.com/user-attachments/assets/e6c2cb76-6a0a-4db9-9c25-961d41b84516 ## Why It's Good For The Game Immersion. ## Changelog 🆑 grungussuss sound: added new sounds for RCD, RPD and Plumbing Constructor. /🆑
This commit is contained in:
@@ -176,5 +176,6 @@ GLOBAL_LIST_INIT(announcer_keys, list(
|
||||
#define SFX_PORTAL_CLOSE "portal_closed"
|
||||
#define SFX_PORTAL_CREATED "portal_created"
|
||||
#define SFX_SCREECH "screech"
|
||||
#define SFX_TOOL_SWITCH "tool_switch"
|
||||
#define SFX_STONE_DROP "stone_drop"
|
||||
#define SFX_STONE_PICKUP "stone_pickup"
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
item_flags = NO_MAT_REDEMPTION | NOBLUDGEON
|
||||
has_ammobar = TRUE
|
||||
actions_types = list(/datum/action/item_action/rcd_scan)
|
||||
drop_sound = 'sound/items/handling/rcd_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/rcd_pickup.ogg'
|
||||
sound_vary = TRUE
|
||||
|
||||
/// main category of currently selected design[Structures, Airlocks, Airlock Access]
|
||||
var/root_category
|
||||
@@ -79,6 +82,10 @@
|
||||
GLOB.rcd_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/construction/rcd/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
. = ..()
|
||||
playsound(src, SFX_TOOL_SWITCH, 20, TRUE)
|
||||
|
||||
/obj/item/construction/rcd/ui_action_click(mob/user, actiontype)
|
||||
if (!COOLDOWN_FINISHED(src, destructive_scan_cooldown))
|
||||
to_chat(user, span_warning("[src] lets out a low buzz."))
|
||||
@@ -105,7 +112,7 @@
|
||||
T.rcd_act(user, src, list(RCD_DESIGN_MODE = RCD_TURF, RCD_DESIGN_PATH = /turf/open/floor/plating/rcd))
|
||||
useResource(16, user)
|
||||
activate()
|
||||
playsound(loc, 'sound/machines/click.ogg', 50, 1)
|
||||
playsound(get_turf(user), SFX_TOOL_SWITCH, 20, TRUE)
|
||||
user.gib(DROP_ALL_REMAINS)
|
||||
return MANUAL_SUICIDE
|
||||
|
||||
@@ -146,7 +153,7 @@
|
||||
|
||||
//check if we can build our window on the grill
|
||||
if(target_turf.is_blocked_turf(exclude_mobs = !is_full_tile, source_atom = null, ignore_atoms = structures_to_ignore, type_list = TRUE))
|
||||
playsound(loc, 'sound/machines/click.ogg', 50, TRUE)
|
||||
playsound(get_turf(user), SFX_TOOL_SWITCH, 20, TRUE)
|
||||
balloon_alert(user, "something is blocking the turf")
|
||||
return FALSE
|
||||
|
||||
@@ -157,7 +164,7 @@
|
||||
else if(rcd_mode == RCD_TURF && rcd_structure == /turf/open/floor/plating/rcd && (!istype(target_turf, /turf/open/floor) || istype(target, /obj/structure/girder)))
|
||||
//if a player builds a wallgirder on top of himself manually with iron sheets he can't finish the wall if he is still on the girder. Exclude the girder itself when checking for other dense objects on the turf
|
||||
if(istype(target, /obj/structure/girder) && target_turf.is_blocked_turf(exclude_mobs = FALSE, source_atom = null, ignore_atoms = list(target)))
|
||||
playsound(loc, 'sound/machines/click.ogg', 50, TRUE)
|
||||
playsound(get_turf(user), SFX_TOOL_SWITCH, 20, TRUE)
|
||||
balloon_alert(user, "something is on the girder!")
|
||||
return FALSE
|
||||
|
||||
@@ -192,7 +199,7 @@
|
||||
|
||||
//check if the structure can fit on this turf
|
||||
if(target_turf.is_blocked_turf(exclude_mobs = ignore_mobs, source_atom = null, ignore_atoms = ignored_types, type_list = TRUE))
|
||||
playsound(loc, 'sound/machines/click.ogg', 50, TRUE)
|
||||
playsound(get_turf(user), SFX_TOOL_SWITCH, 20, TRUE)
|
||||
balloon_alert(user, "something is on the tile!")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -183,6 +183,9 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
custom_materials = list(/datum/material/iron=SHEET_MATERIAL_AMOUNT*37.5, /datum/material/glass=SHEET_MATERIAL_AMOUNT*18.75)
|
||||
armor_type = /datum/armor/item_pipe_dispenser
|
||||
resistance_flags = FIRE_PROOF
|
||||
drop_sound = 'sound/items/handling/rpd_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/rpd_pickup.ogg'
|
||||
sound_vary = TRUE
|
||||
///Sparks system used when changing device in the UI
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
///Direction of the device we are going to spawn, set up in the UI
|
||||
@@ -294,7 +297,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
|
||||
/obj/item/pipe_dispenser/suicide_act(mob/living/user)
|
||||
user.visible_message(span_suicide("[user] points the end of the RPD down [user.p_their()] throat and presses a button! It looks like [user.p_theyre()] trying to commit suicide..."))
|
||||
playsound(get_turf(user), 'sound/machines/click.ogg', 50, TRUE)
|
||||
playsound(get_turf(user), SFX_TOOL_SWITCH, 20, TRUE)
|
||||
playsound(get_turf(user), RPD_USE_SOUND, 50, TRUE)
|
||||
return BRUTELOSS
|
||||
|
||||
@@ -360,6 +363,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
|
||||
/obj/item/pipe_dispenser/ui_act(action, params)
|
||||
. = ..()
|
||||
playsound(src, SFX_TOOL_SWITCH, 20, TRUE)
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -457,7 +461,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
. = TRUE
|
||||
|
||||
if((mode & DESTROY_MODE) && istype(attack_target, /obj/item/pipe) || istype(attack_target, /obj/structure/disposalconstruct) || istype(attack_target, /obj/structure/c_transit_tube) || istype(attack_target, /obj/structure/c_transit_tube_pod) || istype(attack_target, /obj/item/pipe_meter) || istype(attack_target, /obj/structure/disposalpipe/broken))
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE)
|
||||
playsound(get_turf(src), SFX_TOOL_SWITCH, 20, TRUE)
|
||||
playsound(get_turf(src), RPD_USE_SOUND, 50, TRUE)
|
||||
qdel(attack_target)
|
||||
return
|
||||
@@ -479,7 +483,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
balloon_alert(user, "already configured for its directions!")
|
||||
return
|
||||
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE)
|
||||
playsound(get_turf(src), SFX_TOOL_SWITCH, 20, TRUE)
|
||||
|
||||
// Something else could have changed the target's state while we were waiting in do_after
|
||||
// Most of the edge cases don't matter, but atmos components being able to have live connections not described by initializable directions sounds like a headache at best and an exploit at worst
|
||||
@@ -543,7 +547,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
if(isclosedturf(attack_target))
|
||||
balloon_alert(user, "target is blocked!")
|
||||
return
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE)
|
||||
playsound(get_turf(src), SFX_TOOL_SWITCH, 20, TRUE)
|
||||
if(do_after(user, disposal_build_speed, target = attack_target))
|
||||
var/obj/structure/disposalconstruct/new_disposals_segment = new (attack_target, queued_pipe_type, queued_pipe_dir, queued_pipe_flipped)
|
||||
|
||||
@@ -573,7 +577,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
balloon_alert(user, "something in the way!")
|
||||
return
|
||||
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE)
|
||||
playsound(get_turf(src), SFX_TOOL_SWITCH, 20, TRUE)
|
||||
if(do_after(user, transit_build_speed, target = attack_target))
|
||||
playsound(get_turf(src), RPD_USE_SOUND, 50, TRUE)
|
||||
if(queued_pipe_type == /obj/structure/c_transit_tube_pod)
|
||||
@@ -620,7 +624,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
return FALSE
|
||||
if(!can_make_pipe)
|
||||
return FALSE
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, vary = TRUE)
|
||||
playsound(get_turf(src), SFX_TOOL_SWITCH, 20, vary = TRUE)
|
||||
if(!continued_build && !do_after(user, atmos_build_speed, target = atom_to_target))
|
||||
return FALSE
|
||||
if(!recipe.all_layers && (layer_to_build == 1 || layer_to_build == 5))
|
||||
|
||||
@@ -152,6 +152,10 @@
|
||||
|
||||
return data
|
||||
|
||||
/obj/item/construction/plumbing/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
. = ..()
|
||||
playsound(src, SFX_TOOL_SWITCH, 20, TRUE)
|
||||
|
||||
/obj/item/construction/plumbing/handle_ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
switch(action)
|
||||
if("color")
|
||||
@@ -178,8 +182,6 @@
|
||||
blueprint = design
|
||||
blueprint_changed = TRUE
|
||||
|
||||
playsound(src, 'sound/effects/pop.ogg', 50, vary = FALSE)
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
@@ -472,6 +472,8 @@
|
||||
'sound/creatures/monkey/monkey_screech_6.ogg',
|
||||
'sound/creatures/monkey/monkey_screech_7.ogg',
|
||||
)
|
||||
if(SFX_TOOL_SWITCH)
|
||||
soundin = 'sound/items/handling/tool_switch.ogg'
|
||||
if(SFX_STONE_DROP)
|
||||
soundin = pick(
|
||||
'sound/items/stones/stone_drop1.ogg',
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
rcd_drop.ogg - made by sadboysuss - license: CC-by-SA
|
||||
rcd_pickup.ogg - made by sadboysuss - license: CC-by-SA
|
||||
rpd_drop.ogg - made by sadboysuss - license: CC-by-SA
|
||||
rpd_pickup.ogg - made by sadboysuss - license: CC-by-SA
|
||||
tool_switch.ogg - made by sadboysuss - license: CC-by-SA
|
||||
} - edited by sadboysuss
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user