; A Barrel Extender for the 5.45 Groza (Tunder)
;
; Replace the [wpn_groza_m1] section in config\misc\unique_items.ltx with the two sections below.
; Either spawn the 'wpn_addon_extender' with a ZSU spawn utility or add it to the game with 
; this line in scripts\_custom_ext.script on the line after 'function on_add_actor()':
;    alife():create("wpn_addon_extender", vector():set(-2.6,-5.167521,200.1744),96188,2195)
; Save, run the game, load a save, make a new save, then remove or comment out the spawn instruction.
; Then go find it in the game

[wpn_addon_extender]:identity_immunities
GroupControlSection	= spawn_group
discovery_dependency = 
$spawn			= "weapons\addons\silencer" ; option for Level Editor
class			= W_SILENC
cform           = skeleton
visual          = weapons\upgrade\wpn_silencer.ogf
; description		= enc_weapons1_wpn-addon-silencer
description		= Barrel_extender
$prefetch 		= 32

cost			= 2200 ;150
inv_name		= Barrel_extender
inv_name_short	= Barrel_extender
inv_weight		= .1

inv_grid_width		= 1
inv_grid_height		= 1
inv_grid_x			= 16
inv_grid_y			= 29

bullet_hit_power_k	= 1.0
bullet_speed_k	 	= 1.0
fire_dispersion_base_k = 0.2; much more accurate
cam_dispersion_k	= 0.8

[wpn_groza_m1]:wpn_groza	;Гроза генерала Воронина
$spawn             				= "weapons\uniq\wpn_groza_m1"
description						= enc_weapons1_wpn-groza_m1
inv_name	        			= wpn-groza_m1
inv_name_short					= wpn-groza_m1
ammo_class						= ammo_5.45x39_fmj, ammo_5.45x39_ap

; enable to let grenade launcher use all types
; grenade_class			= ammo_vog-25, ammo_vog-25p, ammo_m209

; enable to prevent Groza/Tunder from deteriorating
; condition_shot_dec 		= 0.0000

inv_grid_x						= 5
inv_grid_y						= 29

; extender uses original values except for dispersion
silencer_hit_impulse	 	= 150 ;120
silencer_fire_distance   	= 400 ;250
silencer_bullet_speed	 	= 310 ;280

grenade_vel			= 152 ; this is much faster than default; comment out if not desired

; enable these for silencer/scope support
scope_status					= 2
silencer_status					= 2
snd_silncer_shot 				= weapons\groza_shoot ; weapons\silencer4a
silencer_name  					= wpn_addon_extender ; section name for the attachable silencer
