Stepsound "BALANCING"

Changes:
 Humans now use the following ranges:
  - range(6) for running + shoes
  - range(5) for running OR shoes
  - range(4) for not running AND no shoes
 Humans use the following volumes:
  - 13 for running + shoes
  - 9 for running OR shoes
  - 5 for not running AND no shoes
 Humans have special modifiers on steps:
  - Shoes being 'silent' = Silent
   - Noslip shoes are silent by default.
   - You can make any shoe silent by tablecrafting shoe wraps with 10
     ducttape and a wirecutter at a table.
  - Species being 'silent' = Silent
   - Currently, shadowlings use this.
  - Buckled, lying, or being thrown = Silent
  - No feet = Silent
  - No gravity = Footsteps every 3 turfs instead of every 2.

 Xenomorphs now use the following ranges:
  - range(4) at all times.
 Xenomorphs use the following volumes:
  - 5 at all times.
 Xenomorphs have special modifiers on steps:
  - Walking = Silent
  - Buckled, lying, being thrown = Silent
  - No gravity = Footsteps every 3 turfs instead of every 2.
This commit is contained in:
Tigercat2000
2015-11-01 19:56:24 -08:00
parent bda1572b30
commit a037bbefdb
7 changed files with 84 additions and 9 deletions
+1
View File
@@ -304,6 +304,7 @@ BLIND // can't see anything
body_parts_covered = FEET
slot_flags = SLOT_FEET
var/silence_steps = 0
permeability_coefficient = 0.50
slowdown = SHOES_SLOWDOWN
@@ -11,6 +11,7 @@
var/list/clothing_choices = list()
siemens_coefficient = 0.8
species_restricted = null
silence_steps = 1
/obj/item/clothing/shoes/mime
name = "mime shoes"
@@ -165,3 +166,25 @@
icon_state = "noble_boot"
item_color = "noble_boot"
item_state = "noble_boot"
/obj/item/clothing/shoes/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/shoe_silencer))
silence_steps = 1
user.unEquip(I)
qdel(I)
else . = ..()
/obj/item/shoe_silencer
name = "shoe rags"
desc = "Looks sneaky."
icon_state = "sheet-cloth"
/datum/table_recipe/shoe_rags
name = "Shoe Rags"
result = /obj/item/shoe_silencer
reqs = list(/obj/item/stack/tape_roll = 10)
tools = list(/obj/item/weapon/wirecutters)
time = 40
+17 -3
View File
@@ -304,7 +304,21 @@ Des: Removes all infected images from the alien.
if(m_intent == "run")
if(!(step_count % 2)) //every other turf makes a sound
return 0
if(leaping)
return 0
playsound(T, S, 6, 1, -(world.view/2)) //xenos are quiet fuckers
var/range = -(world.view - 2)
range -= 0.666 //-(7 - 2) = (-5) = -5 | -5 - (0.666) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
var/volume = 5
if(m_intent == "walk")
return 0 //silent when walking
if(buckled || lying || throwing)
return 0 //people flying, lying down or sitting do not step
if(!has_gravity(src))
if(step_count % 3) //this basically says, every three moves make a noise
return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0
playsound(T, S, volume, 1, range)
return 1
return 0
@@ -91,12 +91,45 @@
if(m_intent == "run")
if(!(step_count % 2)) //every other turf makes a sound
return 0
playsound(T, S, shoes ? 15 : 7, 1, shoes ? 0 : -(world.view/2))
//this looks insane but it actually is quite simple
//play sound at turf T, using sound S
//volume = 15 w/ shoes, volume = 7 w/o shoes
//do use vary
//add negative world.view/2 if not wearing shoes
var/range = -(world.view - 2)
if(m_intent == "walk")
range -= 0.333
if(!shoes)
range -= 0.333
//shoes + running
//-(7 - 2) = -(5) = -5 | -5 - 0 = -5 | (7 + -5) = 2 | 2 * 3 = 6 | range(6) = range(6)
//running OR shoes
//-(7 - 2) = (-5) = -5 | -5 - 0.333 = -5.333 | (7 + -5.333) = 1.667 | 1.667 * 3 = 5.001 | range(5.001) = range(5)
//walking AND no shoes
//-(7 - 2) = (-5) = -5 | -5 - (0.333 * 2) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
var/volume = 13
if(m_intent == "walk")
volume -= 4
if(!shoes)
volume -= 4
if(istype(shoes, /obj/item/clothing/shoes))
var/obj/item/clothing/shoes/shooess = shoes
if(shooess.silence_steps)
return 0 //silent
if(!has_organ("l_foot") && !has_organ("r_foot"))
return 0 //no feet no footsteps
if(buckled || lying || throwing)
return 0 //people flying, lying down or sitting do not step
if(!has_gravity(src))
if(step_count % 3) //this basically says, every three moves make a noise
return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0
if(species.silent_steps)
return 0 //species is silent
playsound(T, S, volume, 1, range)
return 1
return 0
@@ -23,6 +23,7 @@
var/unarmed //For empty hand harm-intent attack
var/unarmed_type = /datum/unarmed_attack
var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
var/silent_steps = 0 // Stops step noises
var/breath_type = "oxygen" // Non-oxygen gas breathed, if any.
var/poison_type = "plasma" // Poisonous air.