grab sounds, visual message for pulling (#9908)

This commit is contained in:
Wowzewow (Wezzy)
2020-09-13 10:05:50 +02:00
committed by GitHub
parent 73b9a21274
commit 4ac426adf4
10 changed files with 73 additions and 12 deletions
+9
View File
@@ -584,3 +584,12 @@
'sound/items/trayhit1.ogg',
'sound/items/trayhit2.ogg'
)
/decl/sound_category/grab_sound
sounds = list(
'sound/weapons/grab/grab1.ogg',
'sound/weapons/grab/grab2.ogg',
'sound/weapons/grab/grab3.ogg',
'sound/weapons/grab/grab4.ogg',
'sound/weapons/grab/grab5.ogg'
)
@@ -191,7 +191,7 @@
LAssailant = WEAKREF(M)
H.do_attack_animation(src)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(loc, /decl/sound_category/grab_sound, 50, FALSE, -1)
if(H.gloves && istype(H.gloves,/obj/item/clothing/gloves/force/syndicate)) //only antag gloves can do this for now
G.state = GRAB_AGGRESSIVE
G.icon_state = "grabbed1"
+5
View File
@@ -706,6 +706,11 @@
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
if(H.lying) // If they're on the ground we're probably dragging their arms to move them
visible_message(SPAN_WARNING("\The [src] leans down and grips \the [H]'s arms."), SPAN_NOTICE("You lean down and grip \the [H]'s arms."))
else //Otherwise we're probably just holding their arm to lead them somewhere
visible_message(SPAN_WARNING("\The [src] grips \the [H]'s arm."), SPAN_NOTICE("You grip \the [H]'s arm."))
playsound(loc, /decl/sound_category/grab_sound, 25, FALSE, -1) //Quieter than hugging/grabbing but we still want some audio feedback
if(H.pull_damage())
to_chat(src, "<span class='danger'>Pulling \the [H] in their current condition would probably be a bad idea.</span>")
+16 -11
View File
@@ -47,6 +47,9 @@
item_state = "nothing"
w_class = ITEMSIZE_HUGE
drop_sound = null
pickup_sound = null
equip_sound = null
/obj/item/grab/New(mob/user, mob/victim)
..()
@@ -182,12 +185,12 @@
switch(target_zone)
if(BP_MOUTH)
if(announce)
user.visible_message(SPAN_WARNING("\The [user] covers [target]'s face!"))
user.visible_message(SPAN_WARNING("\The [user] covers [target]'s face!"), SPAN_WARNING("You cover [target]'s face!"))
if(target.silent < 3)
target.silent = 3
if(BP_EYES)
if(announce)
assailant.visible_message(SPAN_WARNING("[assailant] covers [affecting]'s eyes!"))
assailant.visible_message(SPAN_WARNING("[assailant] covers [affecting]'s eyes!"), SPAN_WARNING("You cover [target]'s eyes!"))
if(affecting.eye_blind < 3)
affecting.eye_blind = 3
@@ -267,9 +270,9 @@
if(!allow_upgrade)
return
if(!affecting.lying)
assailant.visible_message(SPAN_WARNING("[assailant] grabs [affecting] aggressively by the hands!"))
assailant.visible_message(SPAN_WARNING("[assailant] grabs [affecting] aggressively by the hands!"), SPAN_WARNING("You grab [affecting] aggressively by the hands!"))
else
assailant.visible_message(SPAN_WARNING("[assailant] pins [affecting] down to the ground by the hands!"))
assailant.visible_message(SPAN_WARNING("[assailant] pins [affecting] down to the ground by the hands!"), SPAN_WARNING("You pin [affecting] down to the ground by the hands!"))
apply_pinning(affecting, assailant)
state = GRAB_AGGRESSIVE
@@ -277,9 +280,10 @@
hud.icon_state = "reinforce1"
else if(state < GRAB_NECK)
if(isslime(affecting))
to_chat(assailant, SPAN_NOTICE("You try to squeeze [affecting], but your hands sink right through!"))
assailant.visible_message(SPAN_WARNING("[assailant] tries to squeeze [affecting], but [assailant.get_pronoun("his")] hands sink right through!"), SPAN_WARNING("You try to squeeze [affecting], but your hands sink right through!"))
return
assailant.visible_message(SPAN_WARNING("[assailant] reinforces [assailant.get_pronoun("his")] grip on [affecting]'s neck'!"))
playsound(loc, /decl/sound_category/grab_sound, 50, FALSE, -1)
assailant.visible_message(SPAN_WARNING("[assailant] reinforces [assailant.get_pronoun("his")] grip on [affecting]'s neck!"), SPAN_WARNING("You reinforce your grip on [affecting]'s neck!"))
state = GRAB_NECK
icon_state = "grabbed+1"
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>"
@@ -292,12 +296,13 @@
if(ishuman(affecting))
var/mob/living/carbon/human/H = affecting
if(H.head && (H.head.item_flags & AIRTIGHT))
to_chat(assailant, SPAN_WARNING("[H]'s headgear prevents you from choking them out!"))
assailant.visible_message(SPAN_WARNING("[affecting]'s headgear prevents [assailant] from choking them out!"), SPAN_WARNING("[affecting]'s headgear prevents you from choking them out!"))
return
hud.icon_state = "kill1"
hud.name = "loosen"
state = GRAB_KILL
assailant.visible_message(SPAN_DANGER("[assailant] starts strangling [affecting]!"))
playsound(loc, /decl/sound_category/grab_sound, 50, FALSE, -1)
assailant.visible_message(SPAN_DANGER("[assailant] starts strangling [affecting]!"), SPAN_DANGER("You start strangling [affecting]!"))
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>is being strangled by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>is strangling [affecting.name] ([affecting.ckey])</font>"
@@ -313,7 +318,7 @@
hud.icon_state = "kill"
hud.name = "kill"
state = GRAB_NECK
assailant.visible_message(SPAN_WARNING("[assailant] stops strangling [affecting]!"))
assailant.visible_message(SPAN_WARNING("[assailant] stops strangling [affecting]!"), SPAN_WARNING("You stop strangling [affecting]!"))
adjust_position()
//This is used to make sure the victim hasn't managed to yackety sax away before using the grab.
@@ -352,7 +357,7 @@
switch(assailant.a_intent)
if(I_HELP)
if(force_down)
to_chat(assailant, SPAN_WARNING("You are no longer pinning [affecting] to the ground."))
assailant.visible_message(SPAN_WARNING("[assailant] is no longer pinning [affecting] to the ground."), SPAN_WARNING("You are no longer pinning [affecting] to the ground."))
force_down = 0
return
inspect_organ(affecting, assailant, hit_zone)
@@ -385,7 +390,7 @@
/obj/item/grab/proc/reset_kill_state()
if(state == GRAB_KILL)
assailant.visible_message(SPAN_DANGER("[assailant] stops strangling [affecting] to move."))
assailant.visible_message(SPAN_DANGER("[assailant] stops strangling [affecting] to move."), SPAN_DANGER("You stop strangling [affecting] to move."))
hud.icon_state = "kill"
state = GRAB_NECK
+42
View File
@@ -0,0 +1,42 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: Wowzewow (Wezzy)
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Adds audiovisual feedback for pulling."
- soundadd: "Adds new sounds for grabbing."
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.