diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 899f74069a6..f250c550ddb 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -156,6 +156,9 @@ #define COMSIG_ATOM_ORBIT_BEGIN "atom_orbit_begin" ///called when an atom stops orbiting another atom: (atom) #define COMSIG_ATOM_ORBIT_STOP "atom_orbit_stop" +///from base of atom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) +#define COMSIG_ATOM_HITBY "atom_hitby" + ///////////////// ///from base of atom/attack_ghost(): (mob/dead/observer/ghost) #define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index e77c140e78f..a68646224cf 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -110,22 +110,21 @@ #define NO_RUINS 4 //ITEM INVENTORY SLOT BITMASKS -#define SLOT_OCLOTHING 1 -#define SLOT_ICLOTHING 2 -#define SLOT_GLOVES 4 -#define SLOT_EYES 8 -#define SLOT_EARS 16 -#define SLOT_MASK 32 -#define SLOT_HEAD 64 -#define SLOT_FEET 128 -#define SLOT_ID 256 -#define SLOT_BELT 512 -#define SLOT_BACK 1024 -#define SLOT_POCKET 2048 //this is to allow items with a w_class of 3 or 4 to fit in pockets. -#define SLOT_DENYPOCKET 4096 //this is to deny items with a w_class of 2 or 1 to fit in pockets. -#define SLOT_TWOEARS 8192 -#define SLOT_PDA 16384 -#define SLOT_TIE 32768 +#define SLOT_OCLOTHING (1<<0) +#define SLOT_ICLOTHING (1<<1) +#define SLOT_GLOVES (1<<2) +#define SLOT_EYES (1<<3) +#define SLOT_EARS (1<<4) +#define SLOT_MASK (1<<5) +#define SLOT_HEAD (1<<6) +#define SLOT_FEET (1<<7) +#define SLOT_ID (1<<8) +#define SLOT_BELT (1<<9) +#define SLOT_BACK (1<<10) +#define SLOT_POCKET (1<<11) //this is to allow items with a w_class of 3 or 4 to fit in pockets. +#define SLOT_TWOEARS (1<<12) +#define SLOT_PDA (1<<13) +#define SLOT_TIE (1<<14) //ORGAN TYPE FLAGS #define AFFECT_ROBOTIC_ORGAN 1 diff --git a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm index e18cb4b3212..6f4a3dd2de6 100644 --- a/code/__DEFINES/sound.dm +++ b/code/__DEFINES/sound.dm @@ -17,6 +17,11 @@ #define SOUND_MINIMUM_PRESSURE 10 #define FALLOFF_SOUNDS 0.5 +#define EQUIP_SOUND_VOLUME 30 +#define PICKUP_SOUND_VOLUME 15 +#define DROP_SOUND_VOLUME 20 +#define YEET_SOUND_VOLUME 90 + //Ambience types #define GENERIC_SOUNDS list('sound/ambience/ambigen1.ogg', 'sound/ambience/ambigen3.ogg',\ diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 31c78535322..623b70db351 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -2093,3 +2093,30 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) )) query_accesslog.warn_execute() qdel(query_accesslog) + +/proc/slot_bitfield_to_slot(input_slot_flags) // Kill off this garbage ASAP; slot flags and clothing flags should be IDENTICAL. GOSH DARN IT. Doesn't work with ears or pockets, either. + switch(input_slot_flags) + if(SLOT_OCLOTHING) + return slot_wear_suit + if(SLOT_ICLOTHING) + return slot_w_uniform + if(SLOT_GLOVES) + return slot_gloves + if(SLOT_EYES) + return slot_glasses + if(SLOT_MASK) + return slot_wear_mask + if(SLOT_HEAD) + return slot_head + if(SLOT_FEET) + return slot_shoes + if(SLOT_ID) + return slot_wear_id + if(SLOT_BELT) + return slot_belt + if(SLOT_BACK) + return slot_back + if(SLOT_PDA) + return slot_wear_pda + if(SLOT_TIE) + return slot_tie diff --git a/code/datums/looping_sounds/item_sounds.dm b/code/datums/looping_sounds/item_sounds.dm index ba174c706b6..54c6a196c02 100644 --- a/code/datums/looping_sounds/item_sounds.dm +++ b/code/datums/looping_sounds/item_sounds.dm @@ -35,3 +35,8 @@ #undef RAD_GEIGER_LOW #undef RAD_GEIGER_MEDIUM #undef RAD_GEIGER_HIGH + +/datum/looping_sound/tape_recorder_hiss + mid_sounds = list('sound/items/taperecorder/taperecorder_hiss_mid.ogg') + start_sound = list('sound/items/taperecorder/taperecorder_hiss_start.ogg') + volume = 10 diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index 416c4f9c02d..d8b253c58b0 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -44,9 +44,9 @@ /datum/outfit/proc/equip_item(mob/living/carbon/human/H, path, slot) var/obj/item/I = new path(H) if(collect_not_del) - H.equip_or_collect(I, slot) + H.equip_or_collect(I, slot, TRUE) else - H.equip_to_slot_or_del(I, slot) + H.equip_to_slot_or_del(I, slot, TRUE) /datum/outfit/proc/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) //to be overriden for toggling internals, id binding, access etc diff --git a/code/game/gamemodes/devil/true_devil/inventory.dm b/code/game/gamemodes/devil/true_devil/inventory.dm index 3f5446d88bc..7b6d6fb3013 100644 --- a/code/game/gamemodes/devil/true_devil/inventory.dm +++ b/code/game/gamemodes/devil/true_devil/inventory.dm @@ -1,5 +1,5 @@ -/mob/living/carbon/true_devil/unEquip(obj/item/I, force) - if(..(I,force)) +/mob/living/carbon/true_devil/unEquip(obj/item/I, force, silent = FALSE) + if(..()) update_inv_r_hand() update_inv_l_hand() return 1 diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index d5c5089c8af..fd3e1a0442b 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -190,7 +190,7 @@ continue if(G.slot) - if(H.equip_to_slot_or_del(G.spawn_item(H), G.slot)) + if(H.equip_to_slot_or_del(G.spawn_item(H), G.slot, TRUE)) to_chat(H, "Equipping you with [gear]!") else gear_leftovers += G diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 287adba2ffa..5535c8bbe90 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -673,6 +673,6 @@ phaseout() return ..() -/obj/machinery/shieldwall/syndicate/hitby(AM as mob|obj) +/obj/machinery/shieldwall/syndicate/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) phaseout() return ..() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 138d156040a..ddf8c6f3aca 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -21,10 +21,20 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect can_be_hit = FALSE suicidal_hands = TRUE - var/hitsound = null - var/usesound = null + ///Sound played when you hit something with the item + var/hitsound + ///Played when the item is used, for example tools + var/usesound + ///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/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" - var/throwhitsound var/w_class = WEIGHT_CLASS_NORMAL var/slot_flags = 0 //This is used to determine on which slots an item can fit. pass_flags = PASSTABLE @@ -273,7 +283,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect if(throwing) throwing.finalize(FALSE) if(loc == user) - if(!user.unEquip(src)) + if(!user.unEquip(src, silent = TRUE)) return 0 else @@ -377,7 +387,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect /obj/item/proc/talk_into(mob/M, var/text, var/channel=null) return -/obj/item/proc/dropped(mob/user) +/obj/item/proc/dropped(mob/user, silent = FALSE) for(var/X in actions) var/datum/action/A = X A.Remove(user) @@ -387,6 +397,8 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect flags &= ~NODROP in_inventory = FALSE 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) @@ -414,14 +426,19 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect // user is mob that equipped it // slot uses the slot_X defines found in setup.dm // for items that can be placed in multiple slots -// note this isn't called during the initial dressing of a player -/obj/item/proc/equipped(var/mob/user, var/slot) +// Initial is used to indicate whether or not this is the initial equipment (job datums etc) or just a player doing it +/obj/item/proc/equipped(mob/user, slot, initial = FALSE) SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot) for(var/X in actions) var/datum/action/A = X if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot. A.Grant(user) in_inventory = TRUE + if(!initial) + if(equip_sound && slot == slot_bitfield_to_slot(slot_flags)) + playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE) + else if(slot == slot_l_hand || slot == slot_r_hand) + playsound(src, pickup_sound, PICKUP_SOUND_VOLUME, ignore_walls = FALSE) /obj/item/proc/item_action_slot_check(slot, mob/user) return 1 @@ -564,13 +581,30 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect else return -/obj/item/throw_impact(atom/A) - if(A && !QDELETED(A)) - SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, A) - var/itempush = 1 +/obj/item/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) + if(hit_atom && !QDELETED(hit_atom)) + SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum) + var/itempush = TRUE if(w_class < WEIGHT_CLASS_BULKY) - itempush = 0 // too light to push anything - return A.hitby(src, 0, itempush) + itempush = FALSE //too light to push anything + if(isliving(hit_atom)) //Living mobs handle hit sounds differently. + if(is_hot(src)) + var/mob/living/L = hit_atom + L.IgniteMob() + 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', volume, TRUE, -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) thrownby = thrower @@ -619,7 +653,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect return I == src /obj/item/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) - return + return SEND_SIGNAL(src, COMSIG_ATOM_HITBY, AM, skipcatch, hitpush, blocked, throwingdatum) /obj/item/attack_hulk(mob/living/carbon/human/user) return FALSE diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index f66756e55dc..63c8e404b89 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -9,6 +9,8 @@ materials = list(MAT_METAL=60, MAT_GLASS=30) force = 2 throwforce = 0 + drop_sound = 'sound/items/handling/taperecorder_drop.ogg' + pickup_sound = 'sound/items/handling/taperecorder_pickup.ogg' var/recording = 0 var/playing = 0 var/playsleepseconds = 0 @@ -16,6 +18,8 @@ var/open_panel = 0 var/canprint = 1 var/starts_with_tape = TRUE + ///Sound loop that plays when recording or playing back. + var/datum/looping_sound/tape_recorder_hiss/soundloop /obj/item/taperecorder/New() @@ -23,9 +27,11 @@ if(starts_with_tape) mytape = new /obj/item/tape/random(src) update_icon() + soundloop = new(list(src)) /obj/item/taperecorder/Destroy() QDEL_NULL(mytape) + QDEL_NULL(soundloop) return ..() /obj/item/taperecorder/examine(mob/user) @@ -34,16 +40,24 @@ . += "The wire panel is [open_panel ? "opened" : "closed"]." +/obj/item/taperecorder/proc/update_sound() + if(!playing && !recording) + soundloop.stop() + else + soundloop.start() + /obj/item/taperecorder/attackby(obj/item/I, mob/user) if(!mytape && istype(I, /obj/item/tape)) - user.drop_item() - I.loc = src - mytape = I - to_chat(user, "You insert [I] into [src].") - update_icon() + if(user.drop_item()) + I.forceMove(src) + mytape = I + to_chat(user, "You insert [I] into [src].") + playsound(src, 'sound/items/taperecorder/taperecorder_close.ogg', 50, FALSE) + update_icon() /obj/item/taperecorder/proc/eject(mob/user) if(mytape) + playsound(src, 'sound/items/taperecorder/taperecorder_open.ogg', 50, FALSE) to_chat(user, "You remove [mytape] from [src].") stop() user.put_in_hands(mytape) @@ -52,7 +66,7 @@ /obj/item/taperecorder/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) - mytape.ruin() //Fires destroy the tape + mytape?.ruin() //Fires destroy the tape return ..() /obj/item/taperecorder/attack_hand(mob/user) @@ -70,7 +84,7 @@ set name = "Eject Tape" set category = "Object" - if(usr.stat) + if(usr.incapacitated()) return if(!mytape) return @@ -117,7 +131,7 @@ set name = "Start Recording" set category = "Object" - if(usr.stat) + if(usr.incapacitated()) return if(!mytape || mytape.ruined) return @@ -126,9 +140,12 @@ if(playing) return + playsound(src, 'sound/items/taperecorder/taperecorder_play.ogg', 50, FALSE) + if(mytape.used_capacity < mytape.max_capacity) - to_chat(usr, "Recording started.") - recording = 1 + recording = TRUE + atom_say("Recording started.") + update_sound() update_icon() mytape.timestamp += mytape.used_capacity mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording started." @@ -140,36 +157,38 @@ mytape.used_capacity++ used++ sleep(10) - recording = 0 - update_icon() + stop() else - to_chat(usr, "The tape is full.") + atom_say("The tape is full!") + playsound(src, 'sound/items/taperecorder/taperecorder_stop.ogg', 50, FALSE) /obj/item/taperecorder/verb/stop() set name = "Stop" set category = "Object" - if(usr.stat) + if(usr.incapacitated()) return if(recording) - recording = 0 mytape.timestamp += mytape.used_capacity mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording stopped." - to_chat(usr, "Recording stopped.") - return + playsound(src, 'sound/items/taperecorder/taperecorder_stop.ogg', 50, FALSE) + atom_say("Recording stopped.") + recording = FALSE else if(playing) - playing = 0 + playsound(src, 'sound/items/taperecorder/taperecorder_stop.ogg', 50, FALSE) atom_say("Playback stopped.") + playing = FALSE update_icon() + update_sound() /obj/item/taperecorder/verb/play() set name = "Play Tape" set category = "Object" - if(usr.stat) + if(usr.incapacitated()) return if(!mytape || mytape.ruined) return @@ -178,9 +197,11 @@ if(playing) return - playing = 1 + playing = TRUE update_icon() - to_chat(usr, "Playing started.") + update_sound() + atom_say("Playback started.") + playsound(src, 'sound/items/taperecorder/taperecorder_play.ogg', 50, FALSE) var/used = mytape.used_capacity //to stop runtimes when you eject the tape var/max = mytape.max_capacity for(var/i = 1, used < max, sleep(10 * playsleepseconds)) @@ -189,6 +210,7 @@ if(playing == 0) break if(mytape.storedinfo.len < i) + atom_say("End of recording.") break atom_say("[mytape.storedinfo[i]]") if(mytape.storedinfo.len < i + 1) @@ -203,8 +225,7 @@ playsleepseconds = 1 i++ - playing = 0 - update_icon() + stop() /obj/item/taperecorder/attack_self(mob/user) @@ -220,7 +241,7 @@ set name = "Print Transcript" set category = "Object" - if(usr.stat) + if(usr.incapacitated()) return if(!mytape) return @@ -230,7 +251,7 @@ if(recording || playing) return - to_chat(usr, "Transcript printed.") + atom_say("Transcript printed.") playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1) var/obj/item/paper/P = new /obj/item/paper(get_turf(src)) var/t1 = "Transcript:

" @@ -258,6 +279,8 @@ materials = list(MAT_METAL=20, MAT_GLASS=5) force = 1 throwforce = 0 + drop_sound = 'sound/items/handling/tape_drop.ogg' + pickup_sound = 'sound/items/handling/tape_pickup.ogg' var/max_capacity = 600 var/used_capacity = 0 var/list/storedinfo = list() diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 8c1f5826d66..f9d02c8f515 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -218,7 +218,13 @@ color = "#378C61" stop_bleeding = 0 heal_brute = 12 + drop_sound = 'sound/misc/moist_impact.ogg' + mob_throw_hit_sound = 'sound/misc/moist_impact.ogg' + hitsound = 'sound/misc/moist_impact.ogg' +/obj/item/stack/medical/bruise_pack/comfrey/heal(mob/living/M, mob/user) + playsound(src, 'sound/misc/soggy.ogg', 30, TRUE) + return ..() /obj/item/stack/medical/ointment/aloe name = "\improper Aloe Vera leaf" diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index ad798e781eb..a707ff0b39f 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -247,6 +247,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/New(loc, amount=null) recipes = GLOB.cloth_recipes @@ -272,6 +274,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/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index 134194bf4a7..c90315ffbeb 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -12,6 +12,8 @@ item_state = "crowbar" w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=50) + drop_sound = 'sound/items/handling/crowbar_drop.ogg' + pickup_sound = 'sound/items/handling/crowbar_pickup.ogg' origin_tech = "engineering=1;combat=1" attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") toolspeed = 1 diff --git a/code/game/objects/items/tools/multitool.dm b/code/game/objects/items/tools/multitool.dm index db7194c00db..bad1a325b26 100644 --- a/code/game/objects/items/tools/multitool.dm +++ b/code/game/objects/items/tools/multitool.dm @@ -17,6 +17,8 @@ throwforce = 0 throw_range = 7 throw_speed = 3 + drop_sound = 'sound/items/handling/multitool_drop.ogg' + pickup_sound = 'sound/items/handling/multitool_pickup.ogg' materials = list(MAT_METAL=50, MAT_GLASS=20) origin_tech = "magnets=1;engineering=2" toolspeed = 1 diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index dcebcacf954..dd117b85c73 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -17,6 +17,8 @@ usesound = 'sound/items/screwdriver.ogg' 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' tool_behaviour = TOOL_SCREWDRIVER var/random_color = TRUE //if the screwdriver uses random coloring diff --git a/code/game/objects/items/tools/welder.dm b/code/game/objects/items/tools/welder.dm index 4ac934462a0..41801fe0287 100644 --- a/code/game/objects/items/tools/welder.dm +++ b/code/game/objects/items/tools/welder.dm @@ -22,6 +22,8 @@ toolspeed = 1 tool_enabled = FALSE usesound = 'sound/items/welder.ogg' + drop_sound = 'sound/items/handling/weldingtool_drop.ogg' + pickup_sound = 'sound/items/handling/weldingtool_pickup.ogg' var/maximum_fuel = 20 var/requires_fuel = TRUE //Set to FALSE if it doesn't need fuel, but serves equally well as a cost modifier var/refills_over_time = FALSE //Do we regenerate fuel? diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index 939139ce0b8..12da212f4f3 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -14,6 +14,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' sharp = 1 toolspeed = 1 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) diff --git a/code/game/objects/items/tools/wrench.dm b/code/game/objects/items/tools/wrench.dm index 5af1185e90b..d204ca683e6 100644 --- a/code/game/objects/items/tools/wrench.dm +++ b/code/game/objects/items/tools/wrench.dm @@ -11,6 +11,8 @@ usesound = 'sound/items/ratchet.ogg' w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=150) + drop_sound = 'sound/items/handling/wrench_drop.ogg' + pickup_sound = 'sound/items/handling/wrench_pickup.ogg' origin_tech = "materials=1;engineering=1" attack_verb = list("bashed", "battered", "bludgeoned", "whacked") toolspeed = 1 diff --git a/code/game/objects/items/weapons/disks.dm b/code/game/objects/items/weapons/disks.dm index 0f8806461ea..50f6c04919c 100644 --- a/code/game/objects/items/weapons/disks.dm +++ b/code/game/objects/items/weapons/disks.dm @@ -3,3 +3,5 @@ w_class = WEIGHT_CLASS_TINY item_state = "card-id" icon_state = "datadisk0" + drop_sound = 'sound/items/handling/disk_drop.ogg' + pickup_sound = 'sound/items/handling/disk_pickup.ogg' diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index ab52435ffcb..c4db289130f 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -9,6 +9,7 @@ slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") max_integrity = 300 + equip_sound = 'sound/items/equip/toolbelt_equip.ogg' var/use_item_overlays = 0 // Do we have overlays for items held inside the belt? /obj/item/storage/belt/update_icon() @@ -29,10 +30,10 @@ if(!M.restrained() && !M.stat && can_use()) switch(over_object.name) if("r_hand") - M.unEquip(src) + M.unEquip(src, silent = TRUE) M.put_in_r_hand(src) if("l_hand") - M.unEquip(src) + M.unEquip(src, silent = TRUE) M.put_in_l_hand(src) src.add_fingerprint(usr) return @@ -47,6 +48,8 @@ icon_state = "utilitybelt" item_state = "utility" use_item_overlays = 1 + drop_sound = 'sound/items/handling/toolbelt_drop.ogg' + pickup_sound = 'sound/items/handling/toolbelt_pickup.ogg' can_hold = list( /obj/item/crowbar, /obj/item/screwdriver, diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index a954369e933..34be0a58fa9 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -6,6 +6,8 @@ throw_range = 5 w_class = WEIGHT_CLASS_NORMAL resistance_flags = FIRE_PROOF + drop_sound = 'sound/items/handling/book_drop.ogg' + pickup_sound = 'sound/items/handling/book_pickup.ogg' var/mob/affecting = null var/deity_name = "Christ" /// Is the sprite of this bible customisable diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 2f3d6a3e7cd..390e78f5d5e 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -25,6 +25,8 @@ icon_state = "box" item_state = "syringe_kit" resistance_flags = FLAMMABLE + drop_sound = 'sound/items/handling/cardboardbox_drop.ogg' + pickup_sound = 'sound/items/handling/cardboardbox_pickup.ogg' foldable = /obj/item/stack/sheet/cardboard foldable_amt = 1 @@ -828,6 +830,8 @@ w_class = WEIGHT_CLASS_TINY max_w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_BELT + drop_sound = 'sound/items/handling/matchbox_drop.ogg' + pickup_sound = 'sound/items/handling/matchbox_pickup.ogg' can_hold = list(/obj/item/match) /obj/item/storage/box/matches/New() diff --git a/code/game/objects/items/weapons/storage/internal.dm b/code/game/objects/items/weapons/storage/internal.dm index 293157cb375..317655eeca1 100644 --- a/code/game/objects/items/weapons/storage/internal.dm +++ b/code/game/objects/items/weapons/storage/internal.dm @@ -50,10 +50,10 @@ if(!( user.restrained() ) && !( user.stat )) switch(over_object.name) if("r_hand") - user.unEquip(master_item) + user.unEquip(master_item, silent = TRUE) user.put_in_r_hand(master_item) if("l_hand") - user.unEquip(master_item) + user.unEquip(master_item, silent = TRUE) user.put_in_l_hand(master_item) master_item.add_fingerprint(user) return 0 diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index f709a9496a4..00dbe81a6ee 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -71,11 +71,11 @@ if(!(M.restrained()) && !(M.stat)) switch(over_object.name) if("r_hand") - if(!M.unEquip(src)) + if(!M.unEquip(src, silent = TRUE)) return M.put_in_r_hand(src) if("l_hand") - if(!M.unEquip(src)) + if(!M.unEquip(src, silent = TRUE)) return M.put_in_l_hand(src) add_fingerprint(usr) @@ -297,7 +297,7 @@ if(!istype(W)) return FALSE if(usr) - if(!usr.unEquip(W)) + if(!usr.unEquip(W, silent = TRUE)) return FALSE usr.update_icons() //update our overlays if(silent) @@ -307,7 +307,7 @@ if(usr) if(usr.client && usr.s_active != src) usr.client.screen -= W - W.dropped(usr) + W.dropped(usr, TRUE) add_fingerprint(usr) if(!prevent_warning && !istype(W, /obj/item/gun/energy/kinetic_accelerator/crossbow)) @@ -343,7 +343,7 @@ if(new_location) if(ismob(loc)) - W.dropped(usr) + W.dropped(usr, TRUE) if(ismob(new_location)) W.layer = ABOVE_HUD_LAYER W.plane = ABOVE_HUD_PLANE diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index c95e61cbf14..2d96f7ef947 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -14,6 +14,8 @@ origin_tech = "combat=1;engineering=1" 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' /obj/item/storage/toolbox/emergency name = "emergency toolbox" diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 6567dd62ede..2e198be45c5 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -18,6 +18,8 @@ origin_tech = "magnets=1;engineering=1" toolspeed = 1 usesound = 'sound/items/deconstruct.ogg' + drop_sound = 'sound/items/handling/component_drop.ogg' + pickup_sound = 'sound/items/handling/component_pickup.ogg' var/bomb_name = "bomb" // used for naming bombs / mines diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 6567a71642b..9a8fe19fa03 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -514,6 +514,8 @@ BLIND // can't see anything var/fire_resist = T0C+100 allowed = list(/obj/item/tank/internals/emergency_oxygen) 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 = SLOT_OCLOTHING var/blood_overlay_type = "suit" var/suittoggled = FALSE @@ -649,6 +651,9 @@ BLIND // can't see anything permeability_coefficient = 0.90 slot_flags = 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' sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi', diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm index 8313b967722..448e784590f 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 @@ materials = list(MAT_GLASS=500) max_integrity = 20 resistance_flags = ACID_PROOF + drop_sound = 'sound/items/handling/drinkglass_drop.ogg' + pickup_sound = 'sound/items/handling/drinkglass_pickup.ogg' /obj/item/reagent_containers/food/drinks/set_APTFT() set hidden = FALSE diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index d5c7744eb4a..e9d57b0dbad 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -227,7 +227,7 @@ container_type = OPENCONTAINER volume = 80 hitsound = 'sound/weapons/jug_empty_impact.ogg' - throwhitsound = 'sound/weapons/jug_empty_impact.ogg' + mob_throw_hit_sound = 'sound/weapons/jug_empty_impact.ogg' force = 0.2 throwforce = 0.2 @@ -242,10 +242,10 @@ update_icon() if(reagents.total_volume) hitsound = 'sound/weapons/jug_filled_impact.ogg' - throwhitsound = 'sound/weapons/jug_filled_impact.ogg' + mob_throw_hit_sound = 'sound/weapons/jug_filled_impact.ogg' else hitsound = 'sound/weapons/jug_empty_impact.ogg' - throwhitsound = 'sound/weapons/jug_empty_impact.ogg' + mob_throw_hit_sound = 'sound/weapons/jug_empty_impact.ogg' /obj/item/reagent_containers/glass/bottle/nutrient/update_icon() cut_overlays() diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 9973e9abbd1..1c794256292 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -140,7 +140,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") 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 f61e04ba064..5dfbe7102e7 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -125,7 +125,7 @@ return 0 return 1 -/mob/proc/unEquip(obj/item/I, force) //Force overrides NODROP for things like wizarditis and admin undress. +/mob/proc/unEquip(obj/item/I, force, silent = FALSE) //Force overrides NODROP for things like wizarditis and admin undress. if(!I) //If there's nothing to drop, the drop is automatically succesfull. If(unEquip) should generally be used to check for NODROP. return 1 @@ -146,7 +146,7 @@ if(client) client.screen -= I I.forceMove(drop_location()) - I.dropped(src) + I.dropped(src, silent) if(I) I.layer = initial(I.layer) I.plane = initial(I.plane) diff --git a/code/modules/mob/living/carbon/alien/humanoid/inventory.dm b/code/modules/mob/living/carbon/alien/humanoid/inventory.dm index e015cc7c9a6..64696c21664 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/inventory.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/inventory.dm @@ -1,5 +1,5 @@ //unequip -/mob/living/carbon/alien/humanoid/unEquip(var/obj/item/I, var/force) +/mob/living/carbon/alien/humanoid/unEquip(obj/item/I, force, silent = FALSE) . = ..(I, force) 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 3ccc62cee6c..fc5acb63fd0 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/unEquip(obj/item/W as obj, force) +/mob/living/carbon/alien/larva/unEquip(obj/item/I, force, silent = FALSE) return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 2cf1b8116a0..c8155691d9a 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -619,7 +619,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven else if(!(I.flags & ABSTRACT)) //can't throw abstract items thrown_thing = I - unEquip(I) + unEquip(I, silent = TRUE) if(HAS_TRAIT(src, TRAIT_PACIFISM) && I.throwforce) to_chat(src, "You set [I] down gently on the ground.") @@ -645,7 +645,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven /mob/living/carbon/get_restraining_item() return handcuffed -/mob/living/carbon/unEquip(obj/item/I, force) //THIS PROC DID NOT CALL ..() +/mob/living/carbon/unEquip(obj/item/I, force, silent = FALSE) //THIS PROC DID NOT CALL ..() . = ..() //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/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 96226b8d697..59855472786 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -504,6 +504,9 @@ emp_act //this proc handles being hit by a thrown atom /mob/living/carbon/human/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) + var/spec_return = dna.species.spec_hitby(AM, src) + if(spec_return) + return spec_return var/obj/item/I var/throwpower = 30 if(istype(AM, /obj/item)) @@ -528,8 +531,6 @@ emp_act visible_message("[I] embeds itself in [src]'s [L.name]!","[I] embeds itself in your [L.name]!") hitpush = FALSE skipcatch = TRUE //can't catch the now embedded item - if(!blocked) - dna.species.spec_hitby(AM, src) return ..() /mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 954d4e8fa55..56bed537c20 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -74,7 +74,7 @@ if(istype(O) && O.owner == src) . = 0 // keep a good grip on your heart -/mob/living/carbon/human/unEquip(obj/item/I, force) +/mob/living/carbon/human/unEquip(obj/item/I, force, silent = FALSE) . = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should. if(!. || !I) return @@ -178,7 +178,8 @@ //This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible() -/mob/living/carbon/human/equip_to_slot(obj/item/I, slot) +// Initial is used to indicate whether or not this is the initial equipment (job datums etc) or just a player doing it +/mob/living/carbon/human/equip_to_slot(obj/item/I, slot, initial = FALSE) if(!slot) return if(!istype(I)) @@ -195,7 +196,7 @@ I.screen_loc = null I.forceMove(src) - I.equipped(src, slot) + I.equipped(src, slot, initial) I.layer = ABOVE_HUD_LAYER I.plane = ABOVE_HUD_PLANE diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 59f94ad2408..bb721aba59b 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -692,8 +692,6 @@ if(!disable_warning) to_chat(H, "You need a jumpsuit before you can attach this [I.name].") return FALSE - if(I.slot_flags & SLOT_DENYPOCKET) - return if(I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & SLOT_POCKET)) return TRUE if(slot_r_store) @@ -707,8 +705,6 @@ if(!disable_warning) to_chat(H, "You need a jumpsuit before you can attach this [I.name].") return FALSE - if(I.slot_flags & SLOT_DENYPOCKET) - return FALSE if(I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & SLOT_POCKET)) return TRUE return FALSE @@ -905,6 +901,7 @@ It'll return null if the organ doesn't correspond, so include null checks when u return TRUE /datum/species/proc/spec_hitby(atom/movable/AM, mob/living/carbon/human/H) + return /datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/organ/external/affecting, intent, mob/living/carbon/human/H) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index d10208c00dc..e6e80fc163b 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -100,38 +100,32 @@ //this proc handles being hit by a thrown atom /mob/living/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) - if(istype(AM, /obj/item)) - var/obj/item/I = AM + if(isitem(AM)) + var/obj/item/thrown_item = AM var/zone = ran_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 + var/nosell_hit = SEND_SIGNAL(thrown_item, COMSIG_MOVABLE_IMPACT_ZONE, src, zone, throwingdatum) // TODO: find a better way to handle hitpush and skipcatch for humans + if(nosell_hit) + skipcatch = TRUE + hitpush = FALSE - 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. + if(blocked) + return TRUE - 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/genhit1.ogg', volume, 1, -1)//...play genhit1.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] has been hit by [I].", - "[src] has been hit by [I].") - var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].", I.armour_penetration) - apply_damage(I.throwforce, dtype, zone, armor, is_sharp(I), I) - if(I.thrownby) - add_attack_logs(I.thrownby, src, "Hit with thrown [I]", !I.throwforce ? ATKLOG_ALMOSTALL : null) // Only message if the person gets damages - else - return 1 - else - playsound(loc, 'sound/weapons/genhit.ogg', 50, TRUE, -1) - ..() + if(thrown_item.thrownby) + add_attack_logs(thrown_item.thrownby, src, "Hit with thrown [thrown_item]", !thrown_item.throwforce ? ATKLOG_ALMOSTALL : null) // Only message if the person gets damages + if(nosell_hit) + return ..() + visible_message("[src] is hit by [thrown_item]!", "You're hit by [thrown_item]!") + if(!thrown_item.throwforce) + return + var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].", thrown_item.armour_penetration) + apply_damage(thrown_item.throwforce, thrown_item.damtype, zone, armor, is_sharp(thrown_item), thrown_item) + if(QDELETED(src)) //Damage can delete the mob. + return + return ..() + + playsound(loc, 'sound/weapons/genhit.ogg', 50, TRUE, -1) //Item sounds are handled in the item itself + return ..() /mob/living/mech_melee_attack(obj/mecha/M) diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index f5b7048c3a8..6cfa2e3b904 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -243,7 +243,7 @@ return -/mob/living/silicon/robot/unEquip(obj/item/I, force) +/mob/living/silicon/robot/unEquip(obj/item/I, force, silent = FALSE) if(I == module_active) uneq_active(I) return ..() diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index bf2090d44b9..80d07801b9e 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -167,7 +167,7 @@ if(M.a_intent == INTENT_HARM) Bruise() -/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) +/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) ..() if(istype(AM, /obj/item)) var/obj/item/T = AM diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 8219c359109..77513e456ad 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -495,7 +495,7 @@ return FALSE return TRUE -/mob/living/simple_animal/equip_to_slot(obj/item/W, slot) +/mob/living/simple_animal/equip_to_slot(obj/item/W, slot, initial = FALSE) if(!istype(W)) return FALSE @@ -509,7 +509,7 @@ if(slot_collar) add_collar(W) -/mob/living/simple_animal/unEquip(obj/item/I, force) +/mob/living/simple_animal/unEquip(obj/item/I, force, silent = FALSE) . = ..() if(!. || !I) return diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 1b67b53119a..6c798f749a6 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -262,7 +262,7 @@ Feedon(Food) return ..() -/mob/living/simple_animal/slime/unEquip(obj/item/I, force) +/mob/living/simple_animal/slime/unEquip(obj/item/I, force, silent = FALSE) return /mob/living/simple_animal/slime/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4bae6316905..9e16a4e0ba3 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -196,7 +196,7 @@ //This is a SAFE proc. Use this instead of equip_to_slot()! //set del_on_fail to have it delete W if it fails to equip //set disable_warning to disable the 'you are unable to equip that' warning. -/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, del_on_fail = 0, disable_warning = 0) +/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, del_on_fail = FALSE, disable_warning = FALSE, initial = FALSE) if(!istype(W)) return 0 if(!W.mob_can_equip(src, slot, disable_warning)) @@ -208,24 +208,24 @@ return 0 - equip_to_slot(W, slot) //This proc should not ever fail. + equip_to_slot(W, slot, initial) //This proc should not ever fail. return 1 //This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't eqip need to be done before! Use mob_can_equip() for that task. //In most cases you will want to use equip_to_slot_if_possible() -/mob/proc/equip_to_slot(obj/item/W, slot) +/mob/proc/equip_to_slot(obj/item/W, slot, initial = FALSE) return //This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such. -/mob/proc/equip_to_slot_or_del(obj/item/W as obj, slot) - return equip_to_slot_if_possible(W, slot, TRUE, TRUE) +/mob/proc/equip_to_slot_or_del(obj/item/W, slot, initial = FALSE) + return equip_to_slot_if_possible(W, slot, TRUE, TRUE, initial) // Convinience proc. Collects crap that fails to equip either onto the mob's back, or drops it. // Used in job equipping so shit doesn't pile up at the start loc. -/mob/living/carbon/human/proc/equip_or_collect(var/obj/item/W, var/slot) +/mob/living/carbon/human/proc/equip_or_collect(obj/item/W, slot, initial = FALSE) if(W.mob_can_equip(src, slot, 1)) //Mob can equip. Equip it. - equip_to_slot_or_del(W, slot) + equip_to_slot_or_del(W, slot, initial) else //Mob can't equip it. Put it their backpack or toss it on the floor if(istype(back, /obj/item/storage)) @@ -419,8 +419,6 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ if(!disable_warning) to_chat(H, "You need a jumpsuit before you can attach this [name].") return 0 - if(slot_flags & SLOT_DENYPOCKET) - return if( w_class <= WEIGHT_CLASS_SMALL || (slot_flags & SLOT_POCKET) ) return 1 if(slot_r_store) @@ -430,8 +428,6 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ if(!disable_warning) to_chat(H, "You need a jumpsuit before you can attach this [name].") return 0 - if(slot_flags & SLOT_DENYPOCKET) - return 0 if( w_class <= WEIGHT_CLASS_SMALL || (slot_flags & SLOT_POCKET) ) return 1 return 0 diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 04f3abc299f..32093135267 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -21,6 +21,8 @@ max_integrity = 50 attack_verb = list("bapped") dog_fashion = /datum/dog_fashion/head + drop_sound = 'sound/items/handling/paper_drop.ogg' + pickup_sound = 'sound/items/handling/paper_pickup.ogg' var/header //Above the main body, displayed at the top var/info //What's actually written on the paper. var/footer //The bottom stuff before the stamp but after the body diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 0938dd7af76..58ba6adba90 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -8,7 +8,7 @@ throwforce = 1 w_class = WEIGHT_CLASS_TINY var/fire_sound = null //What sound should play when this ammo is fired - var/drop_sound = "casingdrop" //What sound should play when this ammo hits the ground + var/casing_drop_sound = "casingdrop" //What sound should play when this ammo hits the ground var/caliber = null //Which kind of guns it can be loaded into var/projectile_type = null //The bullet type to create when New() is called var/obj/item/projectile/BB = null //The loaded bullet diff --git a/code/modules/projectiles/ammunition/ammo_casings.dm b/code/modules/projectiles/ammunition/ammo_casings.dm index 513d2cd5462..6236b8a42ab 100644 --- a/code/modules/projectiles/ammunition/ammo_casings.dm +++ b/code/modules/projectiles/ammunition/ammo_casings.dm @@ -135,7 +135,7 @@ desc = "A 12 gauge lead slug." icon_state = "blshell" caliber = "shotgun" - drop_sound = 'sound/weapons/gun_interactions/shotgun_fall.ogg' + casing_drop_sound = 'sound/weapons/gun_interactions/shotgun_fall.ogg' projectile_type = /obj/item/projectile/bullet materials = list(MAT_METAL=4000) muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_STRONG diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index ca4499c8832..1227d8a073a 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -35,7 +35,7 @@ if(eject_casing) AC.loc = get_turf(src) //Eject casing onto ground. AC.SpinAnimation(10, 1) //next gen special effects - playsound(src, chambered.drop_sound, 100, 1) + playsound(src, chambered.casing_drop_sound, 100, 1) if(empty_chamber) chambered = null chamber_round() diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 8f4640da1bc..248a39f07d4 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -57,7 +57,7 @@ if(chambered)//We have a shell in the chamber chambered.loc = get_turf(src)//Eject casing chambered.SpinAnimation(5, 1) - playsound(src, chambered.drop_sound, 60, 1) + playsound(src, chambered.casing_drop_sound, 60, 1) chambered = null /obj/item/gun/projectile/shotgun/proc/pump_reload(mob/M) diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index 4be4dba9aca..2b969320644 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -138,7 +138,7 @@ icon = 'icons/obj/surgery.dmi' icon_state = "saw3" hitsound = 'sound/weapons/circsawhit.ogg' - throwhitsound = 'sound/weapons/pierce.ogg' + mob_throw_hit_sound = 'sound/weapons/pierce.ogg' flags = CONDUCT force = 15.0 sharp = 1 diff --git a/sound/items/equip/jumpsuit_equip.ogg b/sound/items/equip/jumpsuit_equip.ogg new file mode 100644 index 00000000000..bdcc2bb3a65 Binary files /dev/null and b/sound/items/equip/jumpsuit_equip.ogg differ diff --git a/sound/items/equip/toolbelt_equip.ogg b/sound/items/equip/toolbelt_equip.ogg new file mode 100644 index 00000000000..0ef67a3fd6c Binary files /dev/null and b/sound/items/equip/toolbelt_equip.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/component_drop.ogg b/sound/items/handling/component_drop.ogg new file mode 100644 index 00000000000..093fde7c90c Binary files /dev/null and b/sound/items/handling/component_drop.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..3174b88117f 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..8f67406a5fb 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..fcd1c7d3126 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/tape_drop.ogg b/sound/items/handling/tape_drop.ogg new file mode 100644 index 00000000000..5379a114a77 Binary files /dev/null and b/sound/items/handling/tape_drop.ogg differ diff --git a/sound/items/handling/tape_pickup.ogg b/sound/items/handling/tape_pickup.ogg new file mode 100644 index 00000000000..77f74f19eea Binary files /dev/null and b/sound/items/handling/tape_pickup.ogg differ diff --git a/sound/items/handling/taperecorder_drop.ogg b/sound/items/handling/taperecorder_drop.ogg new file mode 100644 index 00000000000..6e3c151140e Binary files /dev/null and b/sound/items/handling/taperecorder_drop.ogg differ diff --git a/sound/items/handling/taperecorder_pickup.ogg b/sound/items/handling/taperecorder_pickup.ogg new file mode 100644 index 00000000000..941640aefd1 Binary files /dev/null and b/sound/items/handling/taperecorder_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 diff --git a/sound/items/taperecorder/taperecorder_close.ogg b/sound/items/taperecorder/taperecorder_close.ogg new file mode 100644 index 00000000000..ab9f521c5f9 Binary files /dev/null and b/sound/items/taperecorder/taperecorder_close.ogg differ diff --git a/sound/items/taperecorder/taperecorder_hiss_mid.ogg b/sound/items/taperecorder/taperecorder_hiss_mid.ogg new file mode 100644 index 00000000000..50ef4f2171b Binary files /dev/null and b/sound/items/taperecorder/taperecorder_hiss_mid.ogg differ diff --git a/sound/items/taperecorder/taperecorder_hiss_start.ogg b/sound/items/taperecorder/taperecorder_hiss_start.ogg new file mode 100644 index 00000000000..fa57041a722 Binary files /dev/null and b/sound/items/taperecorder/taperecorder_hiss_start.ogg differ diff --git a/sound/items/taperecorder/taperecorder_open.ogg b/sound/items/taperecorder/taperecorder_open.ogg new file mode 100644 index 00000000000..7b7110fa58b Binary files /dev/null and b/sound/items/taperecorder/taperecorder_open.ogg differ diff --git a/sound/items/taperecorder/taperecorder_play.ogg b/sound/items/taperecorder/taperecorder_play.ogg new file mode 100644 index 00000000000..1bf4d7a3bd6 Binary files /dev/null and b/sound/items/taperecorder/taperecorder_play.ogg differ diff --git a/sound/items/taperecorder/taperecorder_stop.ogg b/sound/items/taperecorder/taperecorder_stop.ogg new file mode 100644 index 00000000000..a3b0f659928 Binary files /dev/null and b/sound/items/taperecorder/taperecorder_stop.ogg differ diff --git a/sound/misc/moist_impact.ogg b/sound/misc/moist_impact.ogg new file mode 100644 index 00000000000..6ef27ac3dd2 Binary files /dev/null and b/sound/misc/moist_impact.ogg differ diff --git a/sound/misc/soggy.ogg b/sound/misc/soggy.ogg new file mode 100644 index 00000000000..3e436bd37bf Binary files /dev/null and b/sound/misc/soggy.ogg differ