added grenades
This commit is contained in:
parent
dd5fc6174d
commit
1b86da7a78
14 changed files with 398 additions and 3 deletions
1
data.lua
1
data.lua
|
@ -72,6 +72,7 @@ require('prototypes/gravitation/gr_lab')
|
||||||
|
|
||||||
require('prototypes/248k_fluids')
|
require('prototypes/248k_fluids')
|
||||||
require('prototypes/248k_elements')
|
require('prototypes/248k_elements')
|
||||||
|
require('prototypes/grenades')
|
||||||
|
|
||||||
require('prototypes/248k_subgroups')
|
require('prototypes/248k_subgroups')
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,10 @@ gr_materials_stacked_data_item=Stacked deep data
|
||||||
gr_materials_charge_remote=Ultimate bug zapper remote
|
gr_materials_charge_remote=Ultimate bug zapper remote
|
||||||
|
|
||||||
|
|
||||||
|
el_grenade=Charged grenade
|
||||||
|
fi_grenade=Overcharged grenade
|
||||||
|
fu_grenade=Hypercharged grenade
|
||||||
|
|
||||||
#overhaul
|
#overhaul
|
||||||
uranium-fuel-cell-updated=Uranium fuel cell (old)
|
uranium-fuel-cell-updated=Uranium fuel cell (old)
|
||||||
|
|
||||||
|
@ -571,7 +575,9 @@ gr_circuit_tech=High-end circuits
|
||||||
gr_plasma_cube_tech=Plasma containers
|
gr_plasma_cube_tech=Plasma containers
|
||||||
gr_magnet_tech=High-end magnets
|
gr_magnet_tech=High-end magnets
|
||||||
|
|
||||||
|
el_grenade_tech=Charged grenades
|
||||||
|
fi_grenade_tech=Overcharged grenades
|
||||||
|
fu_grenade_tech=Hypercharged grenades
|
||||||
|
|
||||||
#effects
|
#effects
|
||||||
[description]
|
[description]
|
||||||
|
|
|
@ -906,6 +906,27 @@ data:extend({
|
||||||
time = 30,
|
time = 30,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = 'el_grenade_tech',
|
||||||
|
type = 'technology',
|
||||||
|
icon = sprite('el_grenade_tech.png'),
|
||||||
|
icon_size = 128,
|
||||||
|
prerequisites = {'el_charger_tech'},
|
||||||
|
effects = {
|
||||||
|
{
|
||||||
|
type = 'unlock-recipe',
|
||||||
|
recipe = 'el_grenade_recipe',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
unit = {
|
||||||
|
count = '50',
|
||||||
|
ingredients = {
|
||||||
|
{'automation-science-pack',1},
|
||||||
|
{'logistic-science-pack',1},
|
||||||
|
},
|
||||||
|
time = 30,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
--============================================================================================================================================================
|
--============================================================================================================================================================
|
||||||
--fi
|
--fi
|
||||||
|
@ -1780,6 +1801,28 @@ data:extend({
|
||||||
time = 30,
|
time = 30,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = 'fi_grenade_tech',
|
||||||
|
type = 'technology',
|
||||||
|
icon = sprite('fi_grenade_tech.png'),
|
||||||
|
icon_size = 128,
|
||||||
|
prerequisites = {'fi_crystal_tech'},
|
||||||
|
effects = {
|
||||||
|
{
|
||||||
|
type = 'unlock-recipe',
|
||||||
|
recipe = 'fi_grenade_recipe',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
unit = {
|
||||||
|
count = '100',
|
||||||
|
ingredients = {
|
||||||
|
{'chemical-science-pack',1},
|
||||||
|
{'automation-science-pack',1},
|
||||||
|
{'logistic-science-pack',1,},
|
||||||
|
},
|
||||||
|
time = 30,
|
||||||
|
},
|
||||||
|
},
|
||||||
--============================================================================================================================================================
|
--============================================================================================================================================================
|
||||||
--fu
|
--fu
|
||||||
{
|
{
|
||||||
|
@ -2816,6 +2859,29 @@ data:extend({
|
||||||
time = 100,
|
time = 100,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = 'fu_grenade_tech',
|
||||||
|
type = 'technology',
|
||||||
|
icon = sprite('fu_grenade_tech.png'),
|
||||||
|
icon_size = 128,
|
||||||
|
prerequisites = {'fu_crystal_tech'},
|
||||||
|
effects = {
|
||||||
|
{
|
||||||
|
type = 'unlock-recipe',
|
||||||
|
recipe = 'fu_grenade_recipe',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
unit = {
|
||||||
|
count = '200',
|
||||||
|
ingredients = {
|
||||||
|
{'chemical-science-pack',1},
|
||||||
|
{'automation-science-pack',1},
|
||||||
|
{'logistic-science-pack',1},
|
||||||
|
{'utility-science-pack',1}
|
||||||
|
},
|
||||||
|
time = 100,
|
||||||
|
},
|
||||||
|
},
|
||||||
--============================================================================================================================================================
|
--============================================================================================================================================================
|
||||||
--gravitational
|
--gravitational
|
||||||
{
|
{
|
||||||
|
|
|
@ -1462,7 +1462,22 @@ data:extend({
|
||||||
energy_required = 2,
|
energy_required = 2,
|
||||||
always_show_made_in = true,
|
always_show_made_in = true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = 'el_grenade_recipe',
|
||||||
|
type = 'recipe',
|
||||||
|
enabled = 'false',
|
||||||
|
category = 'crafting',
|
||||||
|
main_product = 'el_grenade',
|
||||||
|
ingredients = {
|
||||||
|
{type="item", name="el_energy_crystal_charged_item", amount=1},
|
||||||
|
{type="item", name="grenade", amount=1},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="item", name="el_grenade", amount=1},
|
||||||
|
},
|
||||||
|
result_count = 1,
|
||||||
|
energy_required = 4,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -7,6 +7,35 @@ local function sprite(name)
|
||||||
return '__248k__/ressources/electronic/el_energy_crystal/el_energy_crystal_'..name
|
return '__248k__/ressources/electronic/el_energy_crystal/el_energy_crystal_'..name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
throw_projectile =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
filename = "__base__/sound/fight/throw-projectile-1.ogg",
|
||||||
|
volume = 0.4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filename = "__base__/sound/fight/throw-projectile-2.ogg",
|
||||||
|
volume = 0.4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filename = "__base__/sound/fight/throw-projectile-3.ogg",
|
||||||
|
volume = 0.4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filename = "__base__/sound/fight/throw-projectile-4.ogg",
|
||||||
|
volume = 0.4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filename = "__base__/sound/fight/throw-projectile-5.ogg",
|
||||||
|
volume = 0.4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filename = "__base__/sound/fight/throw-projectile-6.ogg",
|
||||||
|
volume = 0.4
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
--item
|
--item
|
||||||
data:extend({
|
data:extend({
|
||||||
{
|
{
|
||||||
|
@ -39,5 +68,5 @@ data:extend({
|
||||||
fuel_top_speed_multiplier = 1,
|
fuel_top_speed_multiplier = 1,
|
||||||
fuel_value = '20MJ',
|
fuel_value = '20MJ',
|
||||||
burnt_result = 'el_energy_crystal_item',
|
burnt_result = 'el_energy_crystal_item',
|
||||||
},
|
}
|
||||||
})
|
})
|
|
@ -1441,4 +1441,20 @@ data:extend({
|
||||||
subgroup = 'el_item_subgroup_a',
|
subgroup = 'el_item_subgroup_a',
|
||||||
order = 'a-c',
|
order = 'a-c',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = 'fi_grenade_recipe',
|
||||||
|
type = 'recipe',
|
||||||
|
enabled = 'false',
|
||||||
|
category = 'crafting',
|
||||||
|
main_product = 'fi_grenade',
|
||||||
|
ingredients = {
|
||||||
|
{type="item", name="fi_energy_crystal_charged_item", amount=1},
|
||||||
|
{type="item", name="grenade", amount=1},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="item", name="fi_grenade", amount=1},
|
||||||
|
},
|
||||||
|
result_count = 1,
|
||||||
|
energy_required = 4,
|
||||||
|
},
|
||||||
})
|
})
|
|
@ -1875,4 +1875,20 @@ data:extend({
|
||||||
subgroup = 'fu_item_subgroup_e',
|
subgroup = 'fu_item_subgroup_e',
|
||||||
order = 'a-b-d',
|
order = 'a-b-d',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = 'fu_grenade_recipe',
|
||||||
|
type = 'recipe',
|
||||||
|
enabled = 'false',
|
||||||
|
category = 'crafting',
|
||||||
|
main_product = 'fu_grenade',
|
||||||
|
ingredients = {
|
||||||
|
{type="item", name="fu_materials_energy_charged_crystal", amount=1},
|
||||||
|
{type="item", name="grenade", amount=1},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="item", name="fu_grenade", amount=1},
|
||||||
|
},
|
||||||
|
result_count = 1,
|
||||||
|
energy_required = 4,
|
||||||
|
},
|
||||||
})
|
})
|
246
prototypes/grenades.lua
Normal file
246
prototypes/grenades.lua
Normal file
|
@ -0,0 +1,246 @@
|
||||||
|
local function sprite(name)
|
||||||
|
return '__248k__/ressources/grenade/'..name
|
||||||
|
end
|
||||||
|
|
||||||
|
local el_explosion = table.deepcopy(data.raw['explosion']['grenade-explosion'])
|
||||||
|
el_explosion.name = 'el_grenade-explosion'
|
||||||
|
local el_grenade = table.deepcopy(data.raw['projectile']['grenade'])
|
||||||
|
el_grenade.name = 'el_grenade'
|
||||||
|
|
||||||
|
el_grenade.action = {
|
||||||
|
{
|
||||||
|
type = 'direct',
|
||||||
|
action_delivery = {
|
||||||
|
type = 'instant',
|
||||||
|
target_effects = {
|
||||||
|
{
|
||||||
|
type = 'create-entity',
|
||||||
|
entity_name = 'el_grenade-explosion',
|
||||||
|
trigger_created_entity = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
---note here
|
||||||
|
{
|
||||||
|
type = 'cluster',
|
||||||
|
cluster_count = 16,
|
||||||
|
distance = 7.5,
|
||||||
|
distance_deviation = 1,
|
||||||
|
action_delivery = {
|
||||||
|
{
|
||||||
|
type = 'beam',
|
||||||
|
add_to_shooter = false,
|
||||||
|
duration = 15,
|
||||||
|
beam = 'electric-beam-no-sound',
|
||||||
|
max_length = 16,
|
||||||
|
source_offset = {0, -0.5}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = 'area',
|
||||||
|
radius = 7.5,
|
||||||
|
force = 'not-same',
|
||||||
|
action_delivery = {
|
||||||
|
{
|
||||||
|
type = 'instant',
|
||||||
|
target_effects = {
|
||||||
|
{
|
||||||
|
type = 'damage',
|
||||||
|
damage = {
|
||||||
|
amount = 40,
|
||||||
|
type = 'explosion'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = 'create-sticker',
|
||||||
|
sticker = 'stun-sticker'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "push-back",
|
||||||
|
distance = 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
local el_capsule = table.deepcopy(data.raw['capsule']['grenade'])
|
||||||
|
el_capsule.name = 'el_grenade'
|
||||||
|
el_capsule.icon_size = 64
|
||||||
|
el_capsule.icon = sprite("el_grenade.png")
|
||||||
|
|
||||||
|
el_capsule.capsule_action.attack_parameters.ammo_type.action[3] = {
|
||||||
|
type = "direct",
|
||||||
|
action_delivery =
|
||||||
|
{
|
||||||
|
type = "projectile",
|
||||||
|
projectile = "el_grenade",
|
||||||
|
starting_speed = 0.3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data:extend{el_explosion, el_grenade, el_capsule}
|
||||||
|
|
||||||
|
local fi_explosion = table.deepcopy(data.raw['explosion']['grenade-explosion'])
|
||||||
|
fi_explosion.name = 'fi_grenade-explosion'
|
||||||
|
local fi_grenade = table.deepcopy(data.raw['projectile']['grenade'])
|
||||||
|
fi_grenade.name = 'fi_grenade'
|
||||||
|
|
||||||
|
fi_grenade.action = {
|
||||||
|
{
|
||||||
|
type = 'direct',
|
||||||
|
action_delivery = {
|
||||||
|
type = 'instant',
|
||||||
|
target_effects = {
|
||||||
|
{
|
||||||
|
type = 'create-entity',
|
||||||
|
entity_name = 'fi_grenade-explosion',
|
||||||
|
trigger_created_entity = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
---note here
|
||||||
|
{
|
||||||
|
type = 'cluster',
|
||||||
|
cluster_count = 24,
|
||||||
|
distance = 9,
|
||||||
|
distance_deviation = 1,
|
||||||
|
action_delivery = {
|
||||||
|
{
|
||||||
|
type = 'beam',
|
||||||
|
add_to_shooter = false,
|
||||||
|
duration = 15,
|
||||||
|
beam = 'electric-beam-no-sound',
|
||||||
|
max_length = 16,
|
||||||
|
source_offset = {0, -0.5}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = 'area',
|
||||||
|
radius = 9,
|
||||||
|
force = 'not-same',
|
||||||
|
action_delivery = {
|
||||||
|
{
|
||||||
|
type = 'instant',
|
||||||
|
target_effects = {
|
||||||
|
{
|
||||||
|
type = 'damage',
|
||||||
|
damage = {
|
||||||
|
amount = 200,
|
||||||
|
type = 'explosion'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = 'create-sticker',
|
||||||
|
sticker = 'stun-sticker'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "push-back",
|
||||||
|
distance = 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
local fi_capsule = table.deepcopy(data.raw['capsule']['grenade'])
|
||||||
|
fi_capsule.name = 'fi_grenade'
|
||||||
|
fi_capsule.icon_size = 64
|
||||||
|
fi_capsule.icon = sprite("fi_grenade.png")
|
||||||
|
|
||||||
|
fi_capsule.capsule_action.attack_parameters.ammo_type.action[3] = {
|
||||||
|
type = "direct",
|
||||||
|
action_delivery =
|
||||||
|
{
|
||||||
|
type = "projectile",
|
||||||
|
projectile = "fi_grenade",
|
||||||
|
starting_speed = 0.3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data:extend{fi_explosion, fi_grenade, fi_capsule}
|
||||||
|
|
||||||
|
local fu_explosion = table.deepcopy(data.raw['explosion']['grenade-explosion'])
|
||||||
|
fu_explosion.name = 'fu_grenade-explosion'
|
||||||
|
local fu_grenade = table.deepcopy(data.raw['projectile']['grenade'])
|
||||||
|
fu_grenade.name = 'fu_grenade'
|
||||||
|
|
||||||
|
fu_grenade.action = {
|
||||||
|
{
|
||||||
|
type = 'direct',
|
||||||
|
action_delivery = {
|
||||||
|
type = 'instant',
|
||||||
|
target_effects = {
|
||||||
|
{
|
||||||
|
type = 'create-entity',
|
||||||
|
entity_name = 'fu_grenade-explosion',
|
||||||
|
trigger_created_entity = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
---note here
|
||||||
|
{
|
||||||
|
type = 'cluster',
|
||||||
|
cluster_count = 32,
|
||||||
|
distance = 12,
|
||||||
|
distance_deviation = 1,
|
||||||
|
action_delivery = {
|
||||||
|
{
|
||||||
|
type = 'beam',
|
||||||
|
add_to_shooter = false,
|
||||||
|
duration = 15,
|
||||||
|
beam = 'electric-beam-no-sound',
|
||||||
|
max_length = 16,
|
||||||
|
source_offset = {0, -0.5}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = 'area',
|
||||||
|
radius = 12,
|
||||||
|
force = 'not-same',
|
||||||
|
action_delivery = {
|
||||||
|
{
|
||||||
|
type = 'instant',
|
||||||
|
target_effects = {
|
||||||
|
{
|
||||||
|
type = 'damage',
|
||||||
|
damage = {
|
||||||
|
amount = 1000,
|
||||||
|
type = 'explosion'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = 'create-sticker',
|
||||||
|
sticker = 'stun-sticker'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "push-back",
|
||||||
|
distance = 6
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
local fu_capsule = table.deepcopy(data.raw['capsule']['grenade'])
|
||||||
|
fu_capsule.name = 'fu_grenade'
|
||||||
|
fu_capsule.icon_size = 64
|
||||||
|
fu_capsule.icon = sprite("fu_grenade.png")
|
||||||
|
|
||||||
|
fu_capsule.capsule_action.attack_parameters.ammo_type.action[3] = {
|
||||||
|
type = "direct",
|
||||||
|
action_delivery =
|
||||||
|
{
|
||||||
|
type = "projectile",
|
||||||
|
projectile = "fu_grenade",
|
||||||
|
starting_speed = 0.3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data:extend{fu_explosion, fu_grenade, fu_capsule}
|
BIN
ressources/grenade/el_grenade.png
Normal file
BIN
ressources/grenade/el_grenade.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.3 KiB |
BIN
ressources/grenade/fi_grenade.png
Normal file
BIN
ressources/grenade/fi_grenade.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
BIN
ressources/grenade/fu_grenade.png
Normal file
BIN
ressources/grenade/fu_grenade.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
BIN
ressources/techs/el_grenade_tech.png
Normal file
BIN
ressources/techs/el_grenade_tech.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
ressources/techs/fi_grenade_tech.png
Normal file
BIN
ressources/techs/fi_grenade_tech.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
ressources/techs/fu_grenade_tech.png
Normal file
BIN
ressources/techs/fu_grenade_tech.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Loading…
Add table
Add a link
Reference in a new issue