<?xml version="1.0"?>
<tweaks>
	<!--
		I've put this tweak first because it is the most important.
		This section defines what should happen when particular animation triggers are reached in your reload animations. Generally, this is used for sounds.
		Unlike the other files, simply replacing 'czevo' with your animation ID will likely not work for you, since different animations use different triggers.
	-->
	
	<tweak version="2" name="anims/fps/fps_spawn" extension="animation_states">
		<search>
			<xml/>
			<state name="fps/reload"/>
		</search>
		
		<!--
			Put your tweaks within the <target> section below.
			If you're using an existing animation as a basis for your custom one, you can copy the appropriate reload states from 'anims/fps/fps_spawn.animation_states'.
			Just make sure to edit the 'anim_name' to match yours.
		
			Otherwise, you can manually edit the trigger names and sounds using the code below as reference.
			'trigger' is for the name of the trigger in your animation, 'param1' corresponds to the sound ID. You can safely ignore the other parameters.
			Make sure you keep the 'anim_clbk_stop_weapon_magazine_empty' and 'bullet_show' triggers intact.
		-->
		
		<target mode="append">
			<state name="fps/reload/czevo" type="once" segment="base" speed="1.0">
				<anim name="czevo_reload"/>
					<keys>					
						<key at="trigger" trigger="bullet_show" callback="anim_clbk_check_bullet_object" class_name="base" />
						
						<key at="trigger" trigger="wp_clip_generic_smg_center" callback="play_sound" class_name="base" param1="wp_clip_generic_smg_center"/>
						
						<key at="trigger" trigger="shepheard_start_foley" callback="play_sound" class_name="base" param1="shepheard_start_foley"/>
						<key at="trigger" trigger="shepheard_clip_handle" callback="play_sound" class_name="base" param1="shepheard_clip_handle"/>
						<key at="trigger" trigger="shepheard_end_foley" callback="play_sound" class_name="base" param1="shepheard_end_foley"/>		
						
						<key at="trigger" trigger="shepheard_clip_contact" callback="play_sound" class_name="base" param1="wp_mp5_clip_in_contact"/>	
						<key at="trigger" trigger="shepheard_clip_in" callback="play_sound" class_name="base" param1="wp_mp5_clip_slide_in"/>
						<key at="trigger" trigger="shepheard_bolt_forward" callback="play_sound" class_name="base" param1="wp_mp5_lever_release"/>		
						
						<key at="trigger" trigger="czevo_grab_mag" callback="play_sound" class_name="base" param1="wp_mp5_clip_grab"/>
						<key at="trigger" trigger="shepheard_clip_out" callback="play_sound" class_name="base" param1="wp_mp5_clip_grab_throw"/>
						
						<key at="trigger" trigger="czevo_bolt_back" callback="play_sound" class_name="base" param1="wp_mp5_lever_pull"/>
						<key at="trigger" trigger="czevo_bolt_back_lock" callback="play_sound" class_name="base" param1="wp_mp5_lever_grab"/>
					</keys>
				<exit name="fps/idle"/>
			</state>

			<state name="fps/reload_not_empty/czevo" type="once" segment="base" speed="1.0">
				<anim name="czevo_reload_not_empty"/>
					<keys>		
						<key at="trigger" trigger="bullet_show" callback="anim_clbk_check_bullet_object" class_name="base" />
						
						<key at="trigger" trigger="wp_clip_generic_smg_center" callback="play_sound" class_name="base" param1="wp_clip_generic_smg_center"/>
						
						<key at="trigger" trigger="shepheard_start_foley" callback="play_sound" class_name="base" param1="shepheard_start_foley"/>
						<key at="trigger" trigger="shepheard_clip_handle" callback="play_sound" class_name="base" param1="shepheard_clip_handle"/>
						<key at="trigger" trigger="shepheard_end_foley" callback="play_sound" class_name="base" param1="shepheard_end_foley"/>		
						
						<key at="trigger" trigger="shepheard_clip_contact" callback="play_sound" class_name="base" param1="wp_mp5_clip_in_contact"/>	
						<key at="trigger" trigger="shepheard_clip_in" callback="play_sound" class_name="base" param1="wp_mp5_clip_slide_in"/>
						<key at="trigger" trigger="shepheard_bolt_forward" callback="play_sound" class_name="base" param1="wp_mp5_lever_release"/>		
						
						<key at="trigger" trigger="czevo_grab_mag" callback="play_sound" class_name="base" param1="wp_mp5_clip_grab"/>
						<key at="trigger" trigger="shepheard_clip_out" callback="play_sound" class_name="base" param1="wp_mp5_clip_grab_throw"/>
						
						<key at="trigger" trigger="czevo_bolt_back" callback="play_sound" class_name="base" param1="wp_mp5_lever_pull"/>
						<key at="trigger" trigger="czevo_bolt_back_lock" callback="play_sound" class_name="base" param1="wp_mp5_lever_grab"/>
					</keys>
				<exit name="fps/idle"/>
			</state>
		</target>
		
	</tweak>
	
	<tweak version="2" name="anims/fps/fps_spawn" extension="animation_states">
		<search>
			<xml/>
			<state name="fps"/>
		</search>
		<target mode="attach">
			<to name="reload_czevo" 						redirect="fps/reload/czevo"/>
			<to name="reload_not_empty_czevo" 			redirect="fps/reload_not_empty/czevo"/>
		</target>
	</tweak>
	
</tweaks>