mirror of
https://github.com/Wyrrrd/Rocket_Turrets.git
synced 2026-03-25 23:29:49 +01:00
Merged vanilla version
Reworked loading logic of entities, items, recipes and tech
This commit is contained in:
@@ -1,4 +1,28 @@
|
||||
|
||||
-- Sheet definition
|
||||
|
||||
function rocket_sheet(inputs)
|
||||
return
|
||||
{
|
||||
layers =
|
||||
{
|
||||
{
|
||||
filename = "__Rocket_Turrets__/graphics/entity/rocket-sheet.png",
|
||||
priority = "medium",
|
||||
scale = 1,
|
||||
width = 72,
|
||||
height = 80,
|
||||
direction_count = inputs.direction_count and inputs.direction_count or 64,
|
||||
frame_count = 1,
|
||||
line_length = inputs.line_length and inputs.line_length or 16,
|
||||
axially_symmetrical = false,
|
||||
run_mode = inputs.run_mode and inputs.run_mode or "forward",
|
||||
shift = { 0.25, -0.5 },
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
function rocket_mk1_sheet(inputs)
|
||||
return
|
||||
{
|
||||
@@ -179,8 +203,70 @@ return
|
||||
}
|
||||
end
|
||||
|
||||
data:extend({
|
||||
{
|
||||
|
||||
-- Entity definition
|
||||
|
||||
entity0 = {
|
||||
type = "ammo-turret",
|
||||
name = "rocket-turret",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-icon.png",
|
||||
icon_size = 32,
|
||||
flags = {"placeable-player", "player-creation"},
|
||||
minable = {mining_time = 0.7, result = "rocket-turret"},
|
||||
max_health = 400,
|
||||
corpse = "small-remnants",
|
||||
collision_box = {{-0.7, -0.7 }, {0.7, 0.7}},
|
||||
selection_box = {{-1, -1 }, {1, 1}},
|
||||
rotation_speed = 0.008,
|
||||
preparing_speed = 0.04,
|
||||
folding_speed = 0.04,
|
||||
dying_explosion = "medium-explosion",
|
||||
inventory_size = 1,
|
||||
automated_ammo_count = 10,
|
||||
attacking_speed = 0.09,
|
||||
|
||||
folded_animation = rocket_sheet{direction_count = 4, line_length = 1},
|
||||
preparing_animation = rocket_sheet{direction_count = 4, line_length = 1},
|
||||
prepared_animation = rocket_sheet{},
|
||||
attacking_animation = rocket_sheet{},
|
||||
folding_animation = rocket_sheet{direction_count = 4, line_length = 1, run_mode = "backward"},
|
||||
|
||||
vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
|
||||
|
||||
attack_parameters =
|
||||
{
|
||||
type = "projectile",
|
||||
ammo_category = "rocket",
|
||||
cooldown = 75,
|
||||
projectile_creation_distance = 1.2,
|
||||
projectile_center = {-0.15625, -0.07812},
|
||||
damage_modifier = 1,
|
||||
shell_particle =
|
||||
{
|
||||
name = "shell-particle",
|
||||
direction_deviation = 0.1,
|
||||
speed = 0.1,
|
||||
speed_deviation = 0.03,
|
||||
center = {0, 0},
|
||||
creation_distance = -1.925,
|
||||
starting_frame_speed = 0.2,
|
||||
starting_frame_speed_deviation = 0.1
|
||||
},
|
||||
range = 35,
|
||||
min_range = 15,
|
||||
sound =
|
||||
{
|
||||
{
|
||||
filename = "__base__/sound/fight/rocket-launcher.ogg",
|
||||
volume = 0.8
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
call_for_help_radius = 40
|
||||
}
|
||||
|
||||
entity1 = {
|
||||
type = "ammo-turret",
|
||||
name = "rocket-turret-mk1",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk1-icon.png",
|
||||
@@ -238,8 +324,9 @@ data:extend({
|
||||
},
|
||||
|
||||
call_for_help_radius = 40
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
entity2 = {
|
||||
type = "ammo-turret",
|
||||
name = "rocket-turret-mk2",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk2-icon.png",
|
||||
@@ -297,8 +384,9 @@ data:extend({
|
||||
},
|
||||
|
||||
call_for_help_radius = 40
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
entity3 = {
|
||||
type = "ammo-turret",
|
||||
name = "rocket-turret-mk3",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk3-icon.png",
|
||||
@@ -356,8 +444,9 @@ data:extend({
|
||||
},
|
||||
|
||||
call_for_help_radius = 40
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
entity4 = {
|
||||
type = "ammo-turret",
|
||||
name = "rocket-turret-mk4",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk4-icon.png",
|
||||
@@ -415,8 +504,9 @@ data:extend({
|
||||
},
|
||||
|
||||
call_for_help_radius = 40
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
entity5 = {
|
||||
type = "ammo-turret",
|
||||
name = "rocket-turret-mk5",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk5-icon.png",
|
||||
@@ -474,5 +564,4 @@ data:extend({
|
||||
},
|
||||
|
||||
call_for_help_radius = 40
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -1,6 +1,17 @@
|
||||
--item
|
||||
data:extend({
|
||||
{
|
||||
|
||||
item0 = {
|
||||
type = "item",
|
||||
name = "rocket-turret",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-icon.png",
|
||||
icon_size = 32,
|
||||
subgroup = "defensive-structure",
|
||||
order = "b[turret]-c[base]-d[rocket]",
|
||||
place_result = "rocket-turret",
|
||||
stack_size = 50,
|
||||
}
|
||||
|
||||
item1 = {
|
||||
type = "item",
|
||||
name = "rocket-turret-mk1",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk1-icon.png",
|
||||
@@ -9,8 +20,9 @@ data:extend({
|
||||
order = "b[turret]-c[base]-d[rocket-mk1]",
|
||||
place_result = "rocket-turret-mk1",
|
||||
stack_size = 50,
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
item2 = {
|
||||
type = "item",
|
||||
name = "rocket-turret-mk2",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk2-icon.png",
|
||||
@@ -19,8 +31,9 @@ data:extend({
|
||||
order = "b[turret]-c[base]-d[rocket-mk2]",
|
||||
place_result = "rocket-turret-mk2",
|
||||
stack_size = 50,
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
item3 = {
|
||||
type = "item",
|
||||
name = "rocket-turret-mk3",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk3-icon.png",
|
||||
@@ -29,8 +42,9 @@ data:extend({
|
||||
order = "b[turret]-c[base]-d[rocket-mk3]",
|
||||
place_result = "rocket-turret-mk3",
|
||||
stack_size = 50,
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
item4 = {
|
||||
type = "item",
|
||||
name = "rocket-turret-mk4",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk4-icon.png",
|
||||
@@ -39,8 +53,9 @@ data:extend({
|
||||
order = "b[turret]-c[base]-d[rocket-mk4]",
|
||||
place_result = "rocket-turret-mk4",
|
||||
stack_size = 50,
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
item5 = {
|
||||
type = "item",
|
||||
name = "rocket-turret-mk5",
|
||||
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk5-icon.png",
|
||||
@@ -49,5 +64,4 @@ data:extend({
|
||||
order = "b[turret]-c[base]-d[rocket-mk5]",
|
||||
place_result = "rocket-turret-mk5",
|
||||
stack_size = 50,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
--recipe
|
||||
data:extend({
|
||||
{
|
||||
|
||||
recipe0 = {
|
||||
type = "recipe",
|
||||
name = "rocket-turret",
|
||||
enabled = false,
|
||||
energy_required = 10,
|
||||
ingredients =
|
||||
{
|
||||
{"rocket-launcher", 10},
|
||||
{"iron-gear-wheel", 5},
|
||||
{"steel-plate", 20},
|
||||
{"advanced-circuit", 15},
|
||||
},
|
||||
result = "rocket-turret",
|
||||
}
|
||||
|
||||
recipe1 = {
|
||||
type = "recipe",
|
||||
name = "rocket-turret-mk1",
|
||||
enabled = false,
|
||||
@@ -13,8 +28,9 @@ data:extend({
|
||||
{"electronic-circuit", 15},
|
||||
},
|
||||
result = "rocket-turret-mk1",
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
recipe2 = {
|
||||
type = "recipe",
|
||||
name = "rocket-turret-mk2",
|
||||
enabled = false,
|
||||
@@ -28,8 +44,9 @@ data:extend({
|
||||
{"electronic-circuit", 5},
|
||||
},
|
||||
result = "rocket-turret-mk2",
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
recipe3 = {
|
||||
type = "recipe",
|
||||
name = "rocket-turret-mk3",
|
||||
enabled = false,
|
||||
@@ -42,8 +59,9 @@ data:extend({
|
||||
{"advanced-circuit", 20},
|
||||
},
|
||||
result = "rocket-turret-mk3",
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
recipe4 = {
|
||||
type = "recipe",
|
||||
name = "rocket-turret-mk4",
|
||||
enabled = false,
|
||||
@@ -56,8 +74,9 @@ data:extend({
|
||||
{"processing-unit", 20},
|
||||
},
|
||||
result = "rocket-turret-mk4",
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
recipe5_1 = {
|
||||
type = "recipe",
|
||||
name = "rocket-turret-mk5",
|
||||
enabled = false,
|
||||
@@ -70,14 +89,19 @@ data:extend({
|
||||
{"processing-unit", 20},
|
||||
},
|
||||
result = "rocket-turret-mk5",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if data.raw.item["advanced-processing-unit"] then
|
||||
data.raw.recipe["rocket-turret-mk5"].ingredients = {
|
||||
recipe5_2 = {
|
||||
type = "recipe",
|
||||
name = "rocket-turret-mk5",
|
||||
enabled = false,
|
||||
energy_required = 10,
|
||||
ingredients =
|
||||
{
|
||||
{"rocket-turret-mk4", 1},
|
||||
{"nitinol-gear-wheel", 10},
|
||||
{"nitinol-alloy", 20},
|
||||
{"advanced-processing-unit", 20},
|
||||
}
|
||||
end
|
||||
},
|
||||
result = "rocket-turret-mk5",
|
||||
}
|
||||
@@ -1,157 +1,190 @@
|
||||
data:extend(
|
||||
{
|
||||
tech0 = {
|
||||
type = "technology",
|
||||
name = "rocket-turret",
|
||||
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret.png",
|
||||
icon_size = 128,
|
||||
effects =
|
||||
{
|
||||
type = "technology",
|
||||
name = "rocket-turret-mk1",
|
||||
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk1.png",
|
||||
icon_size = 128,
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "rocket-turret-mk1",
|
||||
},
|
||||
type = "unlock-recipe",
|
||||
recipe = "rocket-turret",
|
||||
},
|
||||
prerequisites =
|
||||
{
|
||||
"rocketry",
|
||||
"turrets",
|
||||
"steel-processing",
|
||||
},
|
||||
unit =
|
||||
{
|
||||
count = 75,
|
||||
ingredients =
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1},
|
||||
{"military-science-pack", 1},
|
||||
},
|
||||
time = 20
|
||||
},
|
||||
order = "c-a"
|
||||
},
|
||||
prerequisites =
|
||||
{
|
||||
type = "technology",
|
||||
name = "rocket-turret-mk2",
|
||||
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk2.png",
|
||||
icon_size = 128,
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "rocket-turret-mk2",
|
||||
},
|
||||
},
|
||||
prerequisites =
|
||||
{
|
||||
"rocket-turret-mk1",
|
||||
},
|
||||
unit =
|
||||
{
|
||||
count = 75,
|
||||
ingredients =
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1},
|
||||
{"chemical-science-pack", 1},
|
||||
{"military-science-pack", 1},
|
||||
},
|
||||
time = 20
|
||||
},
|
||||
order = "c-a"
|
||||
"rocketry",
|
||||
"turrets",
|
||||
"steel-processing",
|
||||
},
|
||||
unit =
|
||||
{
|
||||
type = "technology",
|
||||
name = "rocket-turret-mk3",
|
||||
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk3.png",
|
||||
icon_size = 128,
|
||||
effects =
|
||||
count = 75,
|
||||
ingredients =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "rocket-turret-mk3",
|
||||
},
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1},
|
||||
{"military-science-pack", 1},
|
||||
},
|
||||
prerequisites =
|
||||
{
|
||||
"rocket-turret-mk2",
|
||||
"invar-processing",
|
||||
},
|
||||
unit =
|
||||
{
|
||||
count = 100,
|
||||
ingredients =
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1},
|
||||
{"chemical-science-pack", 1},
|
||||
{"production-science-pack", 1}
|
||||
},
|
||||
time = 30
|
||||
},
|
||||
order = "c-a"
|
||||
time = 20
|
||||
},
|
||||
order = "c-a"
|
||||
}
|
||||
|
||||
tech1 = {
|
||||
type = "technology",
|
||||
name = "rocket-turret-mk1",
|
||||
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk1.png",
|
||||
icon_size = 128,
|
||||
effects =
|
||||
{
|
||||
type = "technology",
|
||||
name = "rocket-turret-mk4",
|
||||
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk4.png",
|
||||
icon_size = 128,
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "rocket-turret-mk4",
|
||||
},
|
||||
type = "unlock-recipe",
|
||||
recipe = "rocket-turret-mk1",
|
||||
},
|
||||
prerequisites =
|
||||
{
|
||||
"rocket-turret-mk3",
|
||||
"titanium-processing",
|
||||
},
|
||||
unit =
|
||||
{
|
||||
count = 100,
|
||||
ingredients =
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1},
|
||||
{"chemical-science-pack", 1},
|
||||
{"production-science-pack", 1}
|
||||
},
|
||||
time = 30
|
||||
},
|
||||
order = "c-a"
|
||||
},
|
||||
prerequisites =
|
||||
{
|
||||
type = "technology",
|
||||
name = "rocket-turret-mk5",
|
||||
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk5.png",
|
||||
icon_size = 128,
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "rocket-turret-mk5",
|
||||
},
|
||||
},
|
||||
prerequisites =
|
||||
{
|
||||
"rocket-turret-mk4",
|
||||
"nitinol-processing",
|
||||
},
|
||||
unit =
|
||||
{
|
||||
count = 125,
|
||||
ingredients =
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1},
|
||||
{"chemical-science-pack", 1},
|
||||
{"production-science-pack", 1},
|
||||
},
|
||||
time = 30
|
||||
},
|
||||
order = "c-a"
|
||||
"rocketry",
|
||||
"turrets",
|
||||
"steel-processing",
|
||||
},
|
||||
})
|
||||
unit =
|
||||
{
|
||||
count = 75,
|
||||
ingredients =
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1},
|
||||
{"military-science-pack", 1},
|
||||
},
|
||||
time = 20
|
||||
},
|
||||
order = "c-a"
|
||||
}
|
||||
|
||||
tech2 = {
|
||||
type = "technology",
|
||||
name = "rocket-turret-mk2",
|
||||
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk2.png",
|
||||
icon_size = 128,
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "rocket-turret-mk2",
|
||||
},
|
||||
},
|
||||
prerequisites =
|
||||
{
|
||||
"rocket-turret-mk1",
|
||||
},
|
||||
unit =
|
||||
{
|
||||
count = 75,
|
||||
ingredients =
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1},
|
||||
{"chemical-science-pack", 1},
|
||||
{"military-science-pack", 1},
|
||||
},
|
||||
time = 20
|
||||
},
|
||||
order = "c-a"
|
||||
}
|
||||
|
||||
tech3 = {
|
||||
type = "technology",
|
||||
name = "rocket-turret-mk3",
|
||||
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk3.png",
|
||||
icon_size = 128,
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "rocket-turret-mk3",
|
||||
},
|
||||
},
|
||||
prerequisites =
|
||||
{
|
||||
"rocket-turret-mk2",
|
||||
"invar-processing",
|
||||
},
|
||||
unit =
|
||||
{
|
||||
count = 100,
|
||||
ingredients =
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1},
|
||||
{"chemical-science-pack", 1},
|
||||
{"production-science-pack", 1}
|
||||
},
|
||||
time = 30
|
||||
},
|
||||
order = "c-a"
|
||||
}
|
||||
|
||||
tech4 = {
|
||||
type = "technology",
|
||||
name = "rocket-turret-mk4",
|
||||
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk4.png",
|
||||
icon_size = 128,
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "rocket-turret-mk4",
|
||||
},
|
||||
},
|
||||
prerequisites =
|
||||
{
|
||||
"rocket-turret-mk3",
|
||||
"titanium-processing",
|
||||
},
|
||||
unit =
|
||||
{
|
||||
count = 100,
|
||||
ingredients =
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1},
|
||||
{"chemical-science-pack", 1},
|
||||
{"production-science-pack", 1}
|
||||
},
|
||||
time = 30
|
||||
},
|
||||
order = "c-a"
|
||||
}
|
||||
|
||||
tech5 = {
|
||||
type = "technology",
|
||||
name = "rocket-turret-mk5",
|
||||
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk5.png",
|
||||
icon_size = 128,
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "rocket-turret-mk5",
|
||||
},
|
||||
},
|
||||
prerequisites =
|
||||
{
|
||||
"rocket-turret-mk4",
|
||||
"nitinol-processing",
|
||||
},
|
||||
unit =
|
||||
{
|
||||
count = 125,
|
||||
ingredients =
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1},
|
||||
{"chemical-science-pack", 1},
|
||||
{"production-science-pack", 1},
|
||||
},
|
||||
time = 30
|
||||
},
|
||||
order = "c-a"
|
||||
}
|
||||
Reference in New Issue
Block a user