mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Ports TG Pickup, Equip, and Drop Sounds (#15572)
* Ports TG Pickup, Equip, and Drop Sounds * really
This commit is contained in:
@@ -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"
|
||||
|
||||
+15
-16
@@ -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
|
||||
|
||||
@@ -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',\
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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, "<span class='notice'>Equipping you with [gear]!</span>")
|
||||
else
|
||||
gear_leftovers += G
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
+48
-14
@@ -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
|
||||
|
||||
@@ -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, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
update_icon()
|
||||
if(user.drop_item())
|
||||
I.forceMove(src)
|
||||
mytape = I
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
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, "<span class='notice'>You remove [mytape] from [src].</span>")
|
||||
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, "<span class='notice'>Recording started.</span>")
|
||||
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, "<span class='notice'>The tape is full.</span>")
|
||||
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, "<span class='notice'>Recording stopped.</span>")
|
||||
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, "<span class='notice'>Playing started.</span>")
|
||||
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, "<span class='notice'>Transcript printed.</span>")
|
||||
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 = "<B>Transcript:</B><BR><BR>"
|
||||
@@ -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()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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, "<span class='notice'>You set [I] down gently on the ground.</span>")
|
||||
@@ -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
|
||||
|
||||
@@ -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("<span class='danger'>[I] embeds itself in [src]'s [L.name]!</span>","<span class='userdanger'>[I] embeds itself in your [L.name]!</span>")
|
||||
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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -692,8 +692,6 @@
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='alert'>You need a jumpsuit before you can attach this [I.name].</span>")
|
||||
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, "<span class='alert'>You need a jumpsuit before you can attach this [I.name].</span>")
|
||||
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)
|
||||
|
||||
|
||||
@@ -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("<span class='danger'>[src] has been hit by [I].</span>",
|
||||
"<span class='userdanger'>[src] has been hit by [I].</span>")
|
||||
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("<span class='danger'>[src] is hit by [thrown_item]!</span>", "<span class='userdanger'>You're hit by [thrown_item]!</span>")
|
||||
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)
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
+7
-11
@@ -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, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
|
||||
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, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
|
||||
return 0
|
||||
if(slot_flags & SLOT_DENYPOCKET)
|
||||
return 0
|
||||
if( w_class <= WEIGHT_CLASS_SMALL || (slot_flags & SLOT_POCKET) )
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user