----------------------------------------------------------------------------------------------------------------------
--  Библиотека состояний тела
--  автор: Диденко Руслан (Stohe)
--  TODO: 
----------------------------------------------------------------------------------------------------------------------

states = {
  -- Дефолтовый
  idle = {  weapon = nil,
        movement = nil,
        mental = nil,
        bodystate = nil,
        animstate = "stand",
        animation = nil
      },

  -- Ходячие состояния
  walk = {  weapon = "strapped",
        movement = move.walk,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  run = {   weapon = "strapped",
        movement = move.run,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
			},
	run_p = {		weapon = "strapped",
				movement = move.run,
				mental = anim.panic,
				bodystate = move.standing,
				animstate = "stand",
				animation = nil
			},	
  sprint = {  weapon = "unstrapped",
        movement = move.run,
        mental = anim.panic,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
			},
	sprint_p = {	weapon = "unstrapped",
				movement = move.run,
				mental = anim.panic,
				bodystate = move.standing,
				animstate = "stand",
				animation = nil
			},
  patrol = {  weapon = "unstrapped",
        movement = move.walk,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  patrol_fire = { weapon = "fire",
        movement = move.walk,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
			},
	patrol_sniper_fire = {	weapon = "sniper_fire",
				movement = move.walk,
				mental = anim.free,
				bodystate = move.standing,
				animstate = "stand",
				animation = nil
			},
  raid = {  weapon = "unstrapped",
        movement = move.walk,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  raid_fire = {weapon = "fire",
        movement = move.walk,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  sneak = { weapon = "unstrapped",
        movement = move.walk,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = nil
			},			
	count = {	weapon = "unstrapped",
				movement = move.walk,
				mental = anim.danger,
				bodystate = move.crouch,
				animstate = "stand",
				animation = nil
			},	  
  sneak_run = { weapon = "unstrapped",
        movement = move.run,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = nil
      },      
  sneak_no_wpn = {  weapon = "strapped",
        movement = move.walk,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = nil
			},			
	sneak_run_no_wpn = {	weapon = "strapped",
				movement = move.run,
				mental = anim.danger,
				bodystate = move.crouch,
				animstate = "stand",
				animation = nil
			},  
  sneak_fire = {  weapon = "fire",
        movement = move.walk,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = nil
      },      
  assault = { weapon = "unstrapped",
        movement = move.run,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  assault_fire = {  weapon = "fire",
        movement = move.run,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  rush = {  weapon = "unstrapped",
        movement = move.run,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
			},
	rush_p = {	weapon = "unstrapped",
				movement = move.run,
				mental = anim.panic,
				bodystate = move.standing,
				animstate = "stand",
				animation = nil
			},	

  -- Стоячие состояния
  wait = {  weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "idle"
      },
  wait_trade = {  weapon = "none",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "idle"
      },
  wait_na = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
			},
	wait_fire = {	weapon = "fire",
				movement = move.stand,
				mental = anim.free,
				bodystate = move.standing,
				animstate = "stand",
				animation = nil
			},
	wait_sniper_fire = {	weapon = "sniper_fire",
				movement = move.stand,
				mental = anim.free,
				bodystate = move.standing,
				animstate = "stand",
				animation = nil
			},
  guard = { weapon = "unstrapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "idle"
      },
  guard_na = {weapon = "unstrapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  guard_fire = {  weapon = "fire",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
			},
	guard_sniper_fire = {	weapon = "sniper_fire",
				movement = move.stand,
				mental = anim.free,
				bodystate = move.standing,
				animstate = "stand",
				animation = nil
			},
  threat = {  weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  threat_heli = { weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  threat_na = { weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  threat_fire = { weapon = "fire",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  threat_sniper_fire = {  weapon = "sniper_fire",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  hide = {  weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = "hide"
      },
  count = {  weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = "hide"
      },
  hide_na = { weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = nil
      },
  hide_fire = { weapon = "fire",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = nil
      },
  hide_sniper_fire = {  weapon = "sniper_fire",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = nil
      },
  caution = { weapon = nil,
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "caution"
      },
  choose   = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "choosing"
      },
  press  = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "press"
      },
  ward   = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "warding"
      },
  search  = {weapon = nil,
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "poisk"
      },
  salut  = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "salut"
      },
  salut_free = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "salut_free"
      },
  prisoner = {weapon = "strapped",
        movement = nil,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = "prisoner"
      },

  hide_no_wpn = { weapon = "strapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = "hide"
      },
  -- Сидячие состояния
  stulik = {weapon = "unstrapped",
		movement = nil,
		mental = nil,
		bodystate = nil,
		animstate = nil,
		animation = "stulik"
	  },
  
  sit = {   weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "sit",
        animation = "sit"
      },
  sit_knee = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "sit_knee",
        animation = "sit_knee"
      },
  sit_ass = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "sit_ass",
        animation = "sit_ass"
      },
  sleep = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "sleep",
        animation = "sleeping"
      },
  sleep_sit = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "sit_ass",
        animation = "sleep_sit"
      },
  eat_bread = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "sit_knee",
        animation = "eat_bread"
      },
  eat_vodka = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "sit_ass",
        animation = "eat_vodka"
      },
  eat_energy  = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "sit_ass",
        animation = "eat_energy"
      },
  eat_kolbasa = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "sit_ass",
        animation = "eat_kolbasa"
      },

  guitar  = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "sit_knee",
        animation = "guitar"
      },
  harmonica = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "sit_ass",
        animation = "harmonica"
      },

  hello = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "hello",
        reset = true
      },
  hello_wpn = {weapon = "unstrapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "hello",
        reset = true
      },
      
  refuse = {  weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "refuse",
        reset = true
      },
  claim = { weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = "claim",
        reset = true
      },
  backoff = { weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = "backoff",
        reset = true
      },
  backoff2 = {weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = "backoff",
        reset = true
      },
  suicide = { weapon = "unstrapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "suicide",
        reset = true
      },
  punch = { weapon = nil,
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = "punch",
        reset = true
      },
  hide_s_left = {weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = "hide_s_left",
        reset = true
      },
  hide_s_right = {weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = "hide_s_right",
        reset = true
      },
  dynamite = {weapon = "strapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = "dynamite"
      },

  binocular = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "binocular"
      },
  hide_rac = {weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "stand",
        animation = "cr_raciya"
      },
  wait_rac = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "raciya"
      },
  guard_rac = {weapon = "unstrapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "raciya"
      },
  probe = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "probe"
      },
  probe_1 = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "probe_1"
      },
  probe_2 = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "probe_2"
      },
  probe_3 = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "probe_3"
      },
  mode_shlem  = {weapon = "none",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "mode_shlem"
      },
  hands_up  = {weapon = "none",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "hands_up"
      },
      
      

  -- Раненый
  wounded = { weapon = "strapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        direction = look.cur_dir,
        animstate = "stand",
        animation = "wounded"
      },
  wounded_heavy = { weapon = "drop",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        direction = look.cur_dir,
        animstate = "stand",
        animation = "wounded_heavy_1"
      },
  wounded_heavy_2 = { weapon = "drop",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        direction = look.cur_dir,
        animstate = "stand",
        animation = "wounded_heavy_2"
      },
  wounded_heavy_3 = { weapon = "drop",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        direction = look.cur_dir,
        animstate = "stand",
        animation = "wounded_heavy_3"
      },
  wounded_zombie = {  weapon = "unstrapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        direction = look.cur_dir,
        animstate = "stand",
        animation = "wounded_zombie"
      },
  help_me = { weapon = "strapped",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.crouch,
        animstate = "wounded",
        animation = "help_me"
      },
  trans_0 = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "trans_0"
      },
  trans_1 = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "trans_1"
      },
  trans_zombied = {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "trans_zombied"
      },

  -- Пси раненый
  psy_pain = {weapon = "drop",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "psy_armed"
      },
  psy_armed = {weapon = "unstrapped",
        weapon_slot = 1,
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "psy_armed"
      },
  psy_shoot = {weapon = "fire",
        weapon_slot = 1,
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "psy_shoot"
      },
  -- Псих в баре
  psycho_pain = {weapon = "none",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "psycho_pain"
      },
  psycho_shoot = {weapon = "fire",
        weapon_slot = 1,
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "psycho_shoot"
        },
  -- Бармен
  bar_fas = { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "bar_fas"
      },
  bar_left= { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "bar_left"
      },
  bar_head= { weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "bar_head"
      },
  bar_sleep= {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "bar_sleep"
      },
  bar_right= {weapon = "strapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "bar_right"
      },


  barman_talk_free = {  weapon = "none",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "barman_free_anims"
      },
  
  barman_walk_free = {  weapon = "none",
        movement = move.walk,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },

  barman_tv = { weapon = "none",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "barman_tv"
      },

  barman_wait_free = {  weapon = "none",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "barman_wait"
      },

  barman_walk_danger = {  weapon = "none",
        movement = move.walk,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },

  barman_shock = {  weapon = "none",
        movement = move.walk,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = "barman_shock"
      },

  barman_wait_danger = {  weapon = "none",
        movement = move.stand,
        mental = anim.danger,
        bodystate = move.standing,
        animstate = "stand",
        animation = "barman_talk"
      },

  --  Доктор в мертвом городе
  doctor_wakeup = {weapon = "none",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "doctor_wakeup"
      },
  --  Профессор на Янтаре
  yan_professor_walk = {  weapon = "none",
        movement = move.walk,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = nil
      },
  yan_professor_wait = {  weapon = "none",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "idle"
      },
  help_agr = {weapon = "unstrapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "help_agr"
      },
  oso_flying = {  weapon = "none",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "oso_flying"
      },
  preblow = { weapon = "unstrapped",
        movement = move.stand,
        mental = anim.free,
        bodystate = move.standing,
        animstate = "stand",
        animation = "preblow"
      },
  spetsnaz = {	weapon = "unstrapped",
    			movement = move.stand,
				mental = anim.free,
				bodystate = move.standing,
				animstate = "stand",
				animation = "spetsnaz"
	  },
	checkpda	= {	weapon = "strapped",
				movement = move.stand,
				mental = anim.free,
				bodystate = move.standing,
				animstate = "stand",
				animation = "checkpda"
	  },
	kurit	= {	weapon = "strapped",
				movement = move.stand,
				mental = anim.free,
				bodystate = move.standing,
				animstate = "sit_ass",
				animation = "kurit"
	  },
	kurit_stoya	= {	weapon = "strapped",
				movement = move.stand,
				mental = anim.free,
				bodystate = move.standing,
				animstate = "stand",
				animation = "kurit_stoya"
	  },
	psihuet = {weapon = "strapped",
				movement = move.stand,
				mental = anim.free,
				bodystate = move.standing,
				animstate = "stand",
				animation = "psihuet"
	  },
	alkash = {weapon = "strapped",
				movement = move.stand,
				mental = anim.free,
				bodystate = move.standing,
				animstate = "stand",
				animation = "alkash"
			}
}
