Fixes liquid sloshing for robots (#7012)

This commit is contained in:
TheGreatKitsune
2023-09-20 11:02:03 -05:00
committed by GitHub
parent e765f020ad
commit 991810b852
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
//CHOMP reagent vore belly sloshing
// Handle footstep sounds
/mob/living/silicon/robot/handle_vorefootstep(var/m_intent, var/turf/T)
if(!config.vorefootstep_volume || !T.vorefootstep_sounds || !T.vorefootstep_sounds.len || !vore_footstep_volume)
return
// Future Upgrades - Robot specific support
var/list/vorefootstep_sounds = T.vorefootstep_sounds["human"]
if(!vorefootstep_sounds)
return
var/S = pick(vorefootstep_sounds)
if(!S) return
var/volume = config.vorefootstep_volume * (vore_footstep_volume/100)
volume = config.vorefootstep_volume * (vore_footstep_volume/100)
if(buckled || lying || throwing)
return // people flying, lying down or sitting do not slosh
if(!has_gravity(src) && prob(75))
return // Far less likely to make noise in no gravity
playsound(T, S, volume, FALSE, preference = /datum/client_preference/digestion_noises)
return