Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Blundir committed Jul 30, 2024
1 parent b4c4ad3 commit f32974a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 4 deletions.
2 changes: 2 additions & 0 deletions code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@
S = pick('sound/items/cane_step_1.ogg', 'sound/items/cane_step_2.ogg', 'sound/items/cane_step_3.ogg', 'sound/items/cane_step_4.ogg', 'sound/items/cane_step_5.ogg', )
if("match")
S = pick('sound/effects/match.ogg')
if("throwing")
S = pick('sound/effects/throwing/swoosh1.ogg', 'sound/effects/throwing/swoosh2.ogg', 'sound/effects/throwing/swoosh3.ogg', 'sound/effects/throwing/swoosh4.ogg')
if("punch")
S = pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')
if("swing_hit")
Expand Down
12 changes: 8 additions & 4 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,17 @@
if(!do_after(src, 1 SECONDS, INTERRUPT_ALL, BUSY_ICON_HOSTILE))
to_chat(src, SPAN_WARNING("You need to set up the high toss!"))
return
animation_attack_on(target)
playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, 7)
animation_attack_on(target, 6)
//The volume of the sound takes the minimum between the distance thrown or the max range an item, but no more than 15. Short throws are quieter. Invisible mobs do no sound.
if(alpha >= 50)
playsound(src, "throwing", min(5*min(get_dist(loc,target),thrown_thing.throw_range), 15), vary = TRUE, sound_range = 6)
drop_inv_item_on_ground(I, TRUE)
thrown_thing.throw_atom(target, thrown_thing.throw_range, SPEED_SLOW, src, spin_throw, HIGH_LAUNCH)
else
animation_attack_on(target)
playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, 7)
animation_attack_on(target, 6)
//The volume of the sound takes the minimum between the distance thrown or the max range an item, but no more than 15. Short throws are quieter. Invisible mobs do no sound.
if(alpha >= 50)
playsound(src, "throwing", min(5*min(get_dist(loc,target),thrown_thing.throw_range), 15), vary = TRUE, sound_range = 6)
drop_inv_item_on_ground(I, TRUE)
thrown_thing.throw_atom(target, thrown_thing.throw_range, thrown_thing.throw_speed, src, spin_throw)

Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,9 @@
if(!M.can_be_pulled_by(src))
return
else if(istype(AM, /obj))
if(recently_grabbed > world.time)
return FALSE
recently_grabbed = world.time + 6
AM.add_fingerprint(src)
animation_attack_on(AM)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/mob_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@

var/recently_pointed_to = 0 //used as cooldown for the pointing verb.

var/recently_grabbed = 0 //used as a cooldown for item grabs

///Color matrices to be applied to the client window. Assoc. list.
var/list/client_color_matrices

Expand Down
Binary file added sound/effects/throwing/swoosh1.ogg
Binary file not shown.
Binary file added sound/effects/throwing/swoosh2.ogg
Binary file not shown.
Binary file added sound/effects/throwing/swoosh3.ogg
Binary file not shown.
Binary file added sound/effects/throwing/swoosh4.ogg
Binary file not shown.

0 comments on commit f32974a

Please sign in to comment.