Skip to content

Instantly share code, notes, and snippets.

@RafaelFuchs
Created October 27, 2021 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RafaelFuchs/911052089d1fb139797b90d2c0e91c6f to your computer and use it in GitHub Desktop.
Save RafaelFuchs/911052089d1fb139797b90d2c0e91c6f to your computer and use it in GitHub Desktop.
local anti_material_rifle_shot_sound = {
variations = {
{
filename = "__Krastorio2__/sounds/weapons/advanced-tank-anti-material-rifle-1.ogg",
volume = 0.35,
},
{
filename = "__Krastorio2__/sounds/weapons/advanced-tank-anti-material-rifle-2.ogg",
volume = 0.35,
},
},
aggregation = {
max_count = 2,
remove = false,
count_already_playing = true,
},
}
data:extend({
{
type = "gun",
name = "heli-gun",
icon = "__Krastorio2__/graphics/icons/guns/advanced-tank-machine-gun.png",
icon_size = 64,
flags = {"hidden"},
subgroup = "gun",
order = "a[basic-clips]-b[tank-machine-gun]-c[flamethrower-ammo]",
attack_parameters =
{
type = "projectile",
ammo_category = "anti-material-rifle-ammo",
cooldown = 15,
damage_modifier = settings.startup["heli-gun-damage-modifier"].value,
movement_slow_down_factor = 0.7,
shell_particle =
{
name = "shell-particle",
direction_deviation = 0.1,
speed = 0.1,
speed_deviation = 0.03,
center = {0, 0},
creation_distance = -0.6875,
starting_frame_speed = 0.4,
starting_frame_speed_deviation = 0.1
},
projectile_center = {-0.15625, -0.07812},
projectile_creation_distance = 1,
range = 70,
sound = anti_material_rifle_shot_sound,
},
stack_size = 1
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment