mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
Dynamic footsteps
This commit is contained in:
parent
21450179c6
commit
49e9f81953
2 changed files with 14 additions and 6 deletions
|
|
@ -16,8 +16,8 @@ FOOTSTEP_SFX = [
|
|||
['step_grass',
|
||||
'step_tile'],
|
||||
# Red
|
||||
['step_metal',
|
||||
'step_metal_light'],
|
||||
['step_grate',
|
||||
'step_metal'],
|
||||
# Red Interior
|
||||
['step_tile',
|
||||
'step_wood'],
|
||||
|
|
@ -28,14 +28,18 @@ FOOTSTEP_SFX = [
|
|||
# Blank
|
||||
[],
|
||||
# Blue Factory Interior
|
||||
['step_metal_light'],
|
||||
['step_metal'],
|
||||
# Red Ground
|
||||
[],
|
||||
# Red Factory
|
||||
[],
|
||||
# Red Factory Interior
|
||||
['step_metal_light'],
|
||||
['step_metal'],
|
||||
# Red observation deck
|
||||
['step_metal_light',
|
||||
['step_metal',
|
||||
'step_tile'],
|
||||
]
|
||||
|
||||
FOOTSTEP_AMT = {
|
||||
'step_metal' => 4
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,7 +264,11 @@ class Game_Player < Game_Character
|
|||
return unless $game_temp.footstep_sfx
|
||||
tag = $game_map.terrain_tag(@x, @y) - 1
|
||||
if tag >= 0 && tag < $game_temp.footstep_sfx.size
|
||||
Audio.se_play("Audio/SE/#{$game_temp.footstep_sfx[tag]}.wav", 50)
|
||||
name = $game_temp.footstep_sfx[tag]
|
||||
if FOOTSTEP_AMT.include? name
|
||||
name += '%02d' % [rand(FOOTSTEP_AMT[name]) + 1]
|
||||
end
|
||||
Audio.se_play("Audio/SE/#{name}.wav", 80)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue