diff --git a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm index 93447b6912c..62f548b968f 100644 --- a/code/__DEFINES/sound.dm +++ b/code/__DEFINES/sound.dm @@ -77,3 +77,6 @@ #define INTERACTION_SOUND_RANGE_MODIFIER -3 #define EQUIP_SOUND_VOLUME 30 +#define PICKUP_SOUND_VOLUME 40 +#define DROP_SOUND_VOLUME 50 +#define YEET_SOUND_VOLUME 90 diff --git a/code/datums/components/storage/concrete/_concrete.dm b/code/datums/components/storage/concrete/_concrete.dm index f8ab3a8c8b9..efc4f2eace8 100644 --- a/code/datums/components/storage/concrete/_concrete.dm +++ b/code/datums/components/storage/concrete/_concrete.dm @@ -125,7 +125,7 @@ if(ismob(parent.loc) && isitem(AM)) var/obj/item/I = AM var/mob/M = parent.loc - I.dropped(M) + I.dropped(M, TRUE) I.item_flags &= ~IN_STORAGE if(new_location) //Reset the items values diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 3d8a67c69df..4556382f224 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -83,7 +83,7 @@ var/obj/item/coin/C = I if(paymode == COIN) if(prob(2)) - if(!user.transferItemToLoc(C, drop_location())) + if(!user.transferItemToLoc(C, drop_location(), silent = FALSE)) return C.throw_at(user, 3, 10) if(prob(10)) diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm index 916a6cefac2..e4f54f836d1 100644 --- a/code/game/mecha/mecha_defense.dm +++ b/code/game/mecha/mecha_defense.dm @@ -195,7 +195,7 @@ if(istype(W, /obj/item/stock_parts/cell)) if(construction_state == MECHA_OPEN_HATCH) if(!cell) - if(!user.transferItemToLoc(W, src)) + if(!user.transferItemToLoc(W, src, silent = FALSE)) return var/obj/item/stock_parts/cell/C = W to_chat(user, "You install the power cell.") @@ -383,4 +383,4 @@ WR.crowbar_salvage += internal_tank internal_tank.forceMove(WR) cell = null - . = ..() \ No newline at end of file + . = ..() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 63661178380..f3eb6961da1 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -37,9 +37,14 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/hitsound var/usesound - var/throwhitsound + ///Used when yate into a mob + var/mob_throw_hit_sound ///Sound used when equipping the item into a valid slot var/equip_sound + ///Sound uses when picking the item up (into your hands) + var/pickup_sound + ///Sound uses when dropping the item, or when its thrown. + var/drop_sound var/w_class = WEIGHT_CLASS_NORMAL var/slot_flags = 0 //This is used to determine on which slots an item can fit. @@ -394,7 +399,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) /obj/item/proc/talk_into(mob/M, input, channel, spans, datum/language/language) return ITALICS | REDUCE_RANGE -/obj/item/proc/dropped(mob/user) +/obj/item/proc/dropped(mob/user, silent = FALSE) SHOULD_CALL_PARENT(TRUE) for(var/X in actions) var/datum/action/A = X @@ -403,6 +408,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) qdel(src) item_flags &= ~IN_INVENTORY SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user) + if(!silent) + playsound(src, drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE) + // called just as an item is picked up (loc is not yet changed) /obj/item/proc/pickup(mob/user) @@ -427,8 +435,11 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot. A.Grant(user) item_flags |= IN_INVENTORY - if(equip_sound && !initial &&(slot_flags & slotdefine2slotbit(slot))) - playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE) + if(!initial) + if(equip_sound &&(slot_flags & slotdefine2slotbit(slot))) + playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE) + else if(slot == SLOT_HANDS) + playsound(src, pickup_sound, PICKUP_SOUND_VOLUME, ignore_walls = FALSE) //sometimes we only want to grant the item's action if it's equipped in a specific slot. /obj/item/proc/item_action_slot_check(slot, mob/user) @@ -557,6 +568,20 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/itempush = 1 if(w_class < 4) itempush = 0 //too light to push anything + if(istype(hit_atom, /mob/living)) //Living mobs handle hit sounds differently. + var/volume = get_volume_by_throwforce_and_or_w_class() + if (throwforce > 0) + if (mob_throw_hit_sound) + playsound(hit_atom, mob_throw_hit_sound, volume, TRUE, -1) + else if(hitsound) + playsound(hit_atom, hitsound, volume, TRUE, -1) + else + playsound(hit_atom, 'sound/weapons/genhit.ogg',volume, TRUE, -1) + else + playsound(hit_atom, 'sound/weapons/throwtap.ogg', 1, volume, -1) + + else + playsound(src, drop_sound, YEET_SOUND_VOLUME, ignore_walls = FALSE) return hit_atom.hitby(src, 0, itempush, throwingdatum=throwingdatum) /obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force) @@ -820,7 +845,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) layer = initial(layer) plane = initial(plane) appearance_flags &= ~NO_CLIENT_COLOR - dropped(M) + dropped(M, FALSE) return ..() /obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback) diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index caabf25a55c..e13989ad333 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -25,6 +25,8 @@ throw_range = 7 throw_speed = 3 materials = list(/datum/material/iron=50, /datum/material/glass=20) + drop_sound = 'sound/items/handling/multitool_drop.ogg' + pickup_sound = 'sound/items/handling/multitool_pickup.ogg' var/obj/machinery/buffer // simple machine buffer for device linkage toolspeed = 1 usesound = 'sound/weapons/empty.ogg' diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 720dca9d757..011eada4290 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -308,6 +308,8 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \ force = 0 throwforce = 0 merge_type = /obj/item/stack/sheet/cloth + drop_sound = 'sound/items/handling/cloth_drop.ogg' + pickup_sound = 'sound/items/handling/cloth_pickup.ogg' /obj/item/stack/sheet/cloth/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.cloth_recipes @@ -336,6 +338,8 @@ GLOBAL_LIST_INIT(durathread_recipes, list ( \ force = 0 throwforce = 0 merge_type = /obj/item/stack/sheet/durathread + drop_sound = 'sound/items/handling/cloth_drop.ogg' + pickup_sound = 'sound/items/handling/cloth_pickup.ogg' /obj/item/stack/sheet/durathread/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.durathread_recipes diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index f879fa1d985..15ac6778d2e 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -35,6 +35,8 @@ item_state = "utility" content_overlays = TRUE custom_price = 50 + drop_sound = 'sound/items/handling/toolbelt_drop.ogg' + pickup_sound = 'sound/items/handling/toolbelt_pickup.ogg' /obj/item/storage/belt/utility/ComponentInitialize() . = ..() diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 2eec883934d..93ca8884fe1 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -29,6 +29,8 @@ lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' resistance_flags = FLAMMABLE + drop_sound = 'sound/items/handling/cardboardbox_drop.ogg' + pickup_sound = 'sound/items/handling/cardboardbox_pickup.ogg' var/foldable = /obj/item/stack/sheet/cardboard var/illustration = "writing" @@ -654,6 +656,8 @@ item_state = "zippo" w_class = WEIGHT_CLASS_TINY slot_flags = ITEM_SLOT_BELT + drop_sound = 'sound/items/handling/matchbox_drop.ogg' + pickup_sound = 'sound/items/handling/matchbox_pickup.ogg' /obj/item/storage/box/matches/ComponentInitialize() . = ..() diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index a7a594fcd9f..17978ef5e67 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -14,6 +14,8 @@ materials = list(/datum/material/iron = 500) attack_verb = list("robusted") hitsound = 'sound/weapons/smash.ogg' + drop_sound = 'sound/items/handling/toolbox_drop.ogg' + pickup_sound = 'sound/items/handling/toolbox_pickup.ogg' custom_materials = list(/datum/material/iron = 500) //Toolboxes by default use iron as their core, custom material. var/latches = "single_latch" var/has_latches = TRUE @@ -256,6 +258,8 @@ desc = "It contains a few clips." icon_state = "ammobox" item_state = "ammobox" + drop_sound = 'sound/items/handling/ammobox_drop.ogg' + pickup_sound = 'sound/items/handling/ammobox_pickup.ogg' /obj/item/storage/toolbox/ammo/PopulateContents() new /obj/item/ammo_box/a762(src) diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index bb83335ee7b..9eb8ad53972 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -12,6 +12,8 @@ throwforce = 7 w_class = WEIGHT_CLASS_SMALL materials = list(/datum/material/iron=50) + drop_sound = 'sound/items/handling/crowbar_drop.ogg' + pickup_sound = 'sound/items/handling/crowbar_pickup.ogg' attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") tool_behaviour = TOOL_CROWBAR diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index b42bc14ac88..95831aade49 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -20,6 +20,8 @@ tool_behaviour = TOOL_SCREWDRIVER toolspeed = 1 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) + drop_sound = 'sound/items/handling/screwdriver_drop.ogg' + pickup_sound = 'sound/items/handling/screwdriver_pickup.ogg' var/random_color = TRUE //if the screwdriver uses random coloring var/static/list/screwdriver_colors = list( "blue" = rgb(24, 97, 213), diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 70ff8acc78d..c76a1c3fe8a 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -13,6 +13,8 @@ throwforce = 5 hitsound = "swing_hit" usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg') + drop_sound = 'sound/items/handling/weldingtool_drop.ogg' + pickup_sound = 'sound/items/handling/weldingtool_pickup.ogg' var/acti_sound = 'sound/items/welderactivate.ogg' var/deac_sound = 'sound/items/welderdeactivate.ogg' throw_speed = 3 diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index 80938c68407..a34fae46e16 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -16,6 +16,8 @@ attack_verb = list("pinched", "nipped") hitsound = 'sound/items/wirecutter.ogg' usesound = 'sound/items/wirecutter.ogg' + drop_sound = 'sound/items/handling/wirecutter_drop.ogg' + pickup_sound = 'sound/items/handling/wirecutter_pickup.ogg' tool_behaviour = TOOL_WIRECUTTER toolspeed = 1 diff --git a/code/game/objects/items/tools/wrench.dm b/code/game/objects/items/tools/wrench.dm index 84bb5893560..2ec67d4d8ad 100644 --- a/code/game/objects/items/tools/wrench.dm +++ b/code/game/objects/items/tools/wrench.dm @@ -12,6 +12,8 @@ w_class = WEIGHT_CLASS_SMALL usesound = 'sound/items/ratchet.ogg' materials = list(/datum/material/iron=150) + drop_sound = 'sound/items/handling/wrench_drop.ogg' + pickup_sound = 'sound/items/handling/wrench_pickup.ogg' attack_verb = list("bashed", "battered", "bludgeoned", "whacked") tool_behaviour = TOOL_WRENCH diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 98e6484c0c1..6687fbc1fa1 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -159,7 +159,7 @@ // If the tray IS empty, continue on (tray will be placed on the table like other items) if(user.a_intent != INTENT_HARM && !(I.item_flags & ABSTRACT)) - if(user.transferItemToLoc(I, drop_location())) + if(user.transferItemToLoc(I, drop_location(), silent = FALSE)) var/list/click_params = params2list(params) //Center the icon where the user clicked. if(!click_params || !click_params["icon-x"] || !click_params["icon-y"]) diff --git a/code/modules/antagonists/devil/true_devil/inventory.dm b/code/modules/antagonists/devil/true_devil/inventory.dm index ea9b00644f2..a3d0dbdf582 100644 --- a/code/modules/antagonists/devil/true_devil/inventory.dm +++ b/code/modules/antagonists/devil/true_devil/inventory.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/true_devil/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE) +/mob/living/carbon/true_devil/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) if(..()) update_inv_hands() return 1 diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index 0b7ba59e55f..395a84bf538 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -559,6 +559,8 @@ This is here to make the tiles around the station mininuke change when it's arme lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi' icon_state = "datadisk0" + drop_sound = 'sound/items/handling/disk_drop.ogg' + pickup_sound = 'sound/items/handling/disk_pickup.ogg' /obj/item/disk/nuclear name = "nuclear authentication disk" diff --git a/code/modules/clothing/suits/_suits.dm b/code/modules/clothing/suits/_suits.dm index 8917907910c..09661d5e84a 100644 --- a/code/modules/clothing/suits/_suits.dm +++ b/code/modules/clothing/suits/_suits.dm @@ -4,6 +4,8 @@ var/fire_resist = T0C+100 allowed = list(/obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) + drop_sound = 'sound/items/handling/cloth_drop.ogg' + pickup_sound = 'sound/items/handling/cloth_pickup.ogg' slot_flags = ITEM_SLOT_OCLOTHING var/blood_overlay_type = "suit" var/togglename = null diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index c7bfca14df2..78f3fa1851d 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -7,6 +7,8 @@ slot_flags = ITEM_SLOT_ICLOTHING armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) equip_sound = 'sound/items/equip/jumpsuit_equip.ogg' + drop_sound = 'sound/items/handling/cloth_drop.ogg' + pickup_sound = 'sound/items/handling/cloth_pickup.ogg' var/fitted = FEMALE_UNIFORM_FULL // For use in alternate clothing styles for women var/has_sensor = HAS_SENSORS // For the crew computer var/random_sensor = TRUE diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm index 82fc931b099..c6038a7e723 100644 --- a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm @@ -12,6 +12,8 @@ spillable = TRUE resistance_flags = ACID_PROOF obj_flags = UNIQUE_RENAME + drop_sound = 'sound/items/handling/drinkglass_drop.ogg' + pickup_sound = 'sound/items/handling/drinkglass_pickup.ogg' /obj/item/reagent_containers/food/drinks/drinkingglass/on_reagent_change(changetype) cut_overlays() diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 26083f68b6a..f6f8b557c3f 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -190,6 +190,8 @@ w_class = WEIGHT_CLASS_NORMAL //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever) attack_verb = list("bashed", "whacked", "educated") resistance_flags = FLAMMABLE + drop_sound = 'sound/items/handling/book_drop.ogg' + pickup_sound = 'sound/items/handling/book_pickup.ogg' var/dat //Actual page content var/due_date = 0 //Game time in 1/10th seconds var/author //Who wrote the thing, can be changed by pen or PC. It is not automatically assigned diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 5923179daec..1c41d7d8db7 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -273,25 +273,25 @@ * * Will pass FALSE if the item can not be dropped due to TRAIT_NODROP via doUnEquip() * If the item can be dropped, it will be forceMove()'d to the ground and the turf's Entered() will be called. */ -/mob/proc/dropItemToGround(obj/item/I, force = FALSE) - . = doUnEquip(I, force, drop_location(), FALSE) +/mob/proc/dropItemToGround(obj/item/I, force = FALSE, silent = FALSE) + . = doUnEquip(I, force, drop_location(), FALSE, silent = silent) if(. && I) //ensure the item exists and that it was dropped properly. I.pixel_x = rand(-6,6) I.pixel_y = rand(-6,6) //for when the item will be immediately placed in a loc other than the ground -/mob/proc/transferItemToLoc(obj/item/I, newloc = null, force = FALSE) - return doUnEquip(I, force, newloc, FALSE) +/mob/proc/transferItemToLoc(obj/item/I, newloc = null, force = FALSE, silent = TRUE) + return doUnEquip(I, force, newloc, FALSE, silent = silent) //visibly unequips I but it is NOT MOVED AND REMAINS IN SRC //item MUST BE FORCEMOVE'D OR QDEL'D /mob/proc/temporarilyRemoveItemFromInventory(obj/item/I, force = FALSE, idrop = TRUE) - return doUnEquip(I, force, null, TRUE, idrop) + return doUnEquip(I, force, null, TRUE, idrop, silent = TRUE) //DO NOT CALL THIS PROC //use one of the above 3 helper procs //you may override it, but do not modify the args -/mob/proc/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE) //Force overrides TRAIT_NODROP for things like wizarditis and admin undress. +/mob/proc/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) //Force overrides TRAIT_NODROP for things like wizarditis and admin undress. //Use no_move if the item is just gonna be immediately moved afterward //Invdrop is used to prevent stuff in pockets dropping. only set to false if it's going to immediately be replaced if(!I) //If there's nothing to drop, the drop is automatically succesfull. If(unEquip) should generally be used to check for TRAIT_NODROP. @@ -315,7 +315,7 @@ I.moveToNullspace() else I.forceMove(newloc) - I.dropped(src) + I.dropped(src, silent) return TRUE //Outdated but still in use apparently. This should at least be a human proc. diff --git a/code/modules/mob/living/carbon/alien/humanoid/inventory.dm b/code/modules/mob/living/carbon/alien/humanoid/inventory.dm index d094c9b1b1a..3e864b8c561 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/inventory.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/inventory.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/alien/humanoid/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE) +/mob/living/carbon/alien/humanoid/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) . = ..() if(!. || !I) return diff --git a/code/modules/mob/living/carbon/alien/larva/inventory.dm b/code/modules/mob/living/carbon/alien/larva/inventory.dm index 1c58b28e281..2a27f335117 100644 --- a/code/modules/mob/living/carbon/alien/larva/inventory.dm +++ b/code/modules/mob/living/carbon/alien/larva/inventory.dm @@ -1,3 +1,3 @@ //can't unequip since it can't equip anything -/mob/living/carbon/alien/larva/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE) +/mob/living/carbon/alien/larva/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 48e049a0c6c..437ec644b9a 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -147,7 +147,7 @@ else if(!CHECK_BITFIELD(I.item_flags, ABSTRACT) && !HAS_TRAIT(I, TRAIT_NODROP)) thrown_thing = I - dropItemToGround(I) + dropItemToGround(I, silent = TRUE) if(HAS_TRAIT(src, TRAIT_PACIFISM) && I.throwforce) to_chat(src, "You set [I] down gently on the ground.") diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index cc947a4a98e..04daf73122f 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -144,7 +144,7 @@ return not_handled //For future deeper overrides -/mob/living/carbon/human/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE) +/mob/living/carbon/human/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) var/index = get_held_index_of_item(I) . = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should. if(!. || !I) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index 105d039b17f..7abec8c4bf9 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -85,7 +85,7 @@ return not_handled -/mob/living/carbon/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE) +/mob/living/carbon/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) . = ..() //Sets the default return value to what the parent returns. if(!. || !I) //We don't want to set anything to null if the parent returned 0. return diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 1d2c2107f9a..003cb352a21 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -69,22 +69,8 @@ var/obj/item/I = AM var/zone = ran_zone(BODY_ZONE_CHEST, 65)//Hits a random part of the body, geared towards the chest var/dtype = BRUTE - var/volume = I.get_volume_by_throwforce_and_or_w_class() SEND_SIGNAL(I, COMSIG_MOVABLE_IMPACT_ZONE, src, zone) dtype = I.damtype - - if (I.throwforce > 0) //If the weapon's throwforce is greater than zero... - if (I.throwhitsound) //...and throwhitsound is defined... - playsound(loc, I.throwhitsound, volume, TRUE, -1) //...play the weapon's throwhitsound. - else if(I.hitsound) //Otherwise, if the weapon's hitsound is defined... - playsound(loc, I.hitsound, volume, TRUE, -1) //...play the weapon's hitsound. - else if(!I.throwhitsound) //Otherwise, if throwhitsound isn't defined... - playsound(loc, 'sound/weapons/genhit.ogg',volume, TRUE, -1) //...play genhit.ogg. - - else if(!I.throwhitsound && I.throwforce > 0) //Otherwise, if the item doesn't have a throwhitsound and has a throwforce greater than zero... - playsound(loc, 'sound/weapons/genhit.ogg', volume, TRUE, -1)//...play genhit.ogg - if(!I.throwforce)// Otherwise, if the item's throwforce is 0... - playsound(loc, 'sound/weapons/throwtap.ogg', 1, volume, -1)//...play throwtap.ogg. if(!blocked) visible_message("[src] is hit by [I]!", \ "You're hit by [I]!") @@ -95,10 +81,11 @@ else return 1 else - playsound(loc, 'sound/weapons/genhit.ogg', 50, TRUE, -1) + playsound(loc, 'sound/weapons/genhit.ogg', 50, TRUE, -1) //Item sounds are handled in the item itself ..() + /mob/living/mech_melee_attack(obj/mecha/M) if(M.occupant.a_intent == INTENT_HARM) M.do_attack_animation(src) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm index 6e89f045da0..c9fdc5dcefb 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm @@ -6,7 +6,7 @@ //Drone hands -/mob/living/simple_animal/drone/doUnEquip(obj/item/I, force) +/mob/living/simple_animal/drone/doUnEquip(obj/item/I, force, silent = FALSE) if(..()) update_inv_hands() if(I == head) diff --git a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm index 07d1eae5794..18dace32bb6 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm @@ -40,7 +40,7 @@ ..() //lose items, then return //SLOT HANDLING BULLSHIT FOR INTERNAL STORAGE -/mob/living/simple_animal/hostile/guardian/dextrous/doUnEquip(obj/item/I, force) +/mob/living/simple_animal/hostile/guardian/dextrous/doUnEquip(obj/item/I, force, silent = FALSE) if(..()) update_inv_hands() if(I == internal_storage) diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index f9dcf366f25..dff513f4c61 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -272,7 +272,7 @@ Feedon(Food) return ..() -/mob/living/simple_animal/slime/doUnEquip(obj/item/W) +/mob/living/simple_animal/slime/doUnEquip(obj/item/W, silent = FALSE) return /mob/living/simple_animal/slime/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index c5a3e794e3d..9fc1575199b 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -21,6 +21,8 @@ resistance_flags = FLAMMABLE max_integrity = 50 dog_fashion = /datum/dog_fashion/head + drop_sound = 'sound/items/handling/paper_drop.ogg' + pickup_sound = 'sound/items/handling/paper_pickup.ogg' var/extra_headers //For additional styling or other js features. diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index c6d523e67e9..6ae500d1c1f 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -157,7 +157,7 @@ lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' hitsound = 'sound/weapons/circsawhit.ogg' - throwhitsound = 'sound/weapons/pierce.ogg' + mob_throw_hit_sound = 'sound/weapons/pierce.ogg' flags_1 = CONDUCT_1 item_flags = SURGICAL_TOOL force = 15 @@ -178,8 +178,6 @@ desc = "A small but very fast spinning saw. Edges dulled to prevent accidental cutting inside of the surgeon." icon = 'icons/obj/surgery.dmi' icon_state = "saw" - hitsound = 'sound/weapons/circsawhit.ogg' - throwhitsound = 'sound/weapons/pierce.ogg' force = 10 w_class = WEIGHT_CLASS_SMALL throwforce = 9 diff --git a/sound/items/handling/ammobox_drop.ogg b/sound/items/handling/ammobox_drop.ogg new file mode 100644 index 00000000000..13fce70fe3d Binary files /dev/null and b/sound/items/handling/ammobox_drop.ogg differ diff --git a/sound/items/handling/ammobox_pickup.ogg b/sound/items/handling/ammobox_pickup.ogg new file mode 100644 index 00000000000..9532a7697b9 Binary files /dev/null and b/sound/items/handling/ammobox_pickup.ogg differ diff --git a/sound/items/handling/book_drop.ogg b/sound/items/handling/book_drop.ogg new file mode 100644 index 00000000000..b492b665f59 Binary files /dev/null and b/sound/items/handling/book_drop.ogg differ diff --git a/sound/items/handling/book_pickup.ogg b/sound/items/handling/book_pickup.ogg new file mode 100644 index 00000000000..120a4e4721a Binary files /dev/null and b/sound/items/handling/book_pickup.ogg differ diff --git a/sound/items/handling/cardboardbox_drop.ogg b/sound/items/handling/cardboardbox_drop.ogg new file mode 100644 index 00000000000..7070ba1c342 Binary files /dev/null and b/sound/items/handling/cardboardbox_drop.ogg differ diff --git a/sound/items/handling/cardboardbox_pickup.ogg b/sound/items/handling/cardboardbox_pickup.ogg new file mode 100644 index 00000000000..aa4e72129b0 Binary files /dev/null and b/sound/items/handling/cardboardbox_pickup.ogg differ diff --git a/sound/items/handling/cloth_drop.ogg b/sound/items/handling/cloth_drop.ogg new file mode 100644 index 00000000000..5bf734caba0 Binary files /dev/null and b/sound/items/handling/cloth_drop.ogg differ diff --git a/sound/items/handling/cloth_pickup.ogg b/sound/items/handling/cloth_pickup.ogg new file mode 100644 index 00000000000..f46988887d1 Binary files /dev/null and b/sound/items/handling/cloth_pickup.ogg differ diff --git a/sound/items/handling/crowbar_drop.ogg b/sound/items/handling/crowbar_drop.ogg new file mode 100644 index 00000000000..77464110661 Binary files /dev/null and b/sound/items/handling/crowbar_drop.ogg differ diff --git a/sound/items/handling/crowbar_pickup.ogg b/sound/items/handling/crowbar_pickup.ogg new file mode 100644 index 00000000000..79b276f8451 Binary files /dev/null and b/sound/items/handling/crowbar_pickup.ogg differ diff --git a/sound/items/handling/disk_drop.ogg b/sound/items/handling/disk_drop.ogg new file mode 100644 index 00000000000..1ac589fc0a9 Binary files /dev/null and b/sound/items/handling/disk_drop.ogg differ diff --git a/sound/items/handling/disk_pickup.ogg b/sound/items/handling/disk_pickup.ogg new file mode 100644 index 00000000000..7b2b545add7 Binary files /dev/null and b/sound/items/handling/disk_pickup.ogg differ diff --git a/sound/items/handling/drinkglass_drop.ogg b/sound/items/handling/drinkglass_drop.ogg new file mode 100644 index 00000000000..43bb732db3d Binary files /dev/null and b/sound/items/handling/drinkglass_drop.ogg differ diff --git a/sound/items/handling/drinkglass_pickup.ogg b/sound/items/handling/drinkglass_pickup.ogg new file mode 100644 index 00000000000..5af6fcf053c Binary files /dev/null and b/sound/items/handling/drinkglass_pickup.ogg differ diff --git a/sound/items/handling/matchbox_drop.ogg b/sound/items/handling/matchbox_drop.ogg new file mode 100644 index 00000000000..8e4e276c9e1 Binary files /dev/null and b/sound/items/handling/matchbox_drop.ogg differ diff --git a/sound/items/handling/matchbox_pickup.ogg b/sound/items/handling/matchbox_pickup.ogg new file mode 100644 index 00000000000..82c23410e11 Binary files /dev/null and b/sound/items/handling/matchbox_pickup.ogg differ diff --git a/sound/items/handling/multitool_drop.ogg b/sound/items/handling/multitool_drop.ogg new file mode 100644 index 00000000000..67e0a41042c Binary files /dev/null and b/sound/items/handling/multitool_drop.ogg differ diff --git a/sound/items/handling/multitool_pickup.ogg b/sound/items/handling/multitool_pickup.ogg new file mode 100644 index 00000000000..cbd598ce896 Binary files /dev/null and b/sound/items/handling/multitool_pickup.ogg differ diff --git a/sound/items/handling/paper_drop.ogg b/sound/items/handling/paper_drop.ogg new file mode 100644 index 00000000000..27ce2b3d1a7 Binary files /dev/null and b/sound/items/handling/paper_drop.ogg differ diff --git a/sound/items/handling/paper_pickup.ogg b/sound/items/handling/paper_pickup.ogg new file mode 100644 index 00000000000..55ae2b3d2db Binary files /dev/null and b/sound/items/handling/paper_pickup.ogg differ diff --git a/sound/items/handling/screwdriver_drop.ogg b/sound/items/handling/screwdriver_drop.ogg new file mode 100644 index 00000000000..d460fd0aeda Binary files /dev/null and b/sound/items/handling/screwdriver_drop.ogg differ diff --git a/sound/items/handling/screwdriver_pickup.ogg b/sound/items/handling/screwdriver_pickup.ogg new file mode 100644 index 00000000000..368f1bfd275 Binary files /dev/null and b/sound/items/handling/screwdriver_pickup.ogg differ diff --git a/sound/items/handling/toolbelt_drop.ogg b/sound/items/handling/toolbelt_drop.ogg new file mode 100644 index 00000000000..2a3c4655c49 Binary files /dev/null and b/sound/items/handling/toolbelt_drop.ogg differ diff --git a/sound/items/handling/toolbelt_pickup.ogg b/sound/items/handling/toolbelt_pickup.ogg new file mode 100644 index 00000000000..58e5d25979a Binary files /dev/null and b/sound/items/handling/toolbelt_pickup.ogg differ diff --git a/sound/items/handling/toolbox_drop.ogg b/sound/items/handling/toolbox_drop.ogg new file mode 100644 index 00000000000..abf56946278 Binary files /dev/null and b/sound/items/handling/toolbox_drop.ogg differ diff --git a/sound/items/handling/toolbox_pickup.ogg b/sound/items/handling/toolbox_pickup.ogg new file mode 100644 index 00000000000..01a4ab4b3fa Binary files /dev/null and b/sound/items/handling/toolbox_pickup.ogg differ diff --git a/sound/items/handling/weldingtool_drop.ogg b/sound/items/handling/weldingtool_drop.ogg new file mode 100644 index 00000000000..58b722ad7a7 Binary files /dev/null and b/sound/items/handling/weldingtool_drop.ogg differ diff --git a/sound/items/handling/weldingtool_pickup.ogg b/sound/items/handling/weldingtool_pickup.ogg new file mode 100644 index 00000000000..da78b06b848 Binary files /dev/null and b/sound/items/handling/weldingtool_pickup.ogg differ diff --git a/sound/items/handling/wirecutter_drop.ogg b/sound/items/handling/wirecutter_drop.ogg new file mode 100644 index 00000000000..e099870fc7d Binary files /dev/null and b/sound/items/handling/wirecutter_drop.ogg differ diff --git a/sound/items/handling/wirecutter_pickup.ogg b/sound/items/handling/wirecutter_pickup.ogg new file mode 100644 index 00000000000..078faaf4324 Binary files /dev/null and b/sound/items/handling/wirecutter_pickup.ogg differ diff --git a/sound/items/handling/wrench_drop.ogg b/sound/items/handling/wrench_drop.ogg new file mode 100644 index 00000000000..86020bf822c Binary files /dev/null and b/sound/items/handling/wrench_drop.ogg differ diff --git a/sound/items/handling/wrench_pickup.ogg b/sound/items/handling/wrench_pickup.ogg new file mode 100644 index 00000000000..860e0d70879 Binary files /dev/null and b/sound/items/handling/wrench_pickup.ogg differ