1
0
mirror of https://github.com/Wyrrrd/Rocket_Turrets.git synced 2026-06-11 01:58:32 +02:00

Integration work

- Reworked integration with Bob's
- Added Booktorio integration
- Moved some files around
This commit is contained in:
Wyrrrd
2020-04-03 10:40:44 +02:00
parent 8f4dcf4491
commit b0278680c0
52 changed files with 367 additions and 195 deletions
+79
View File
@@ -0,0 +1,79 @@
local rocketturrets_thread =
{
name = {"rocketturrets.menu_rocketturrets"},
specified_version = 0,
topics =
{
{
name = {"rocketturrets.title_rocketturrets"},
topic =
{
{type = "image", spritename = "booktorio-cover"},
{type = "text", text = "info.text_intro"}
}
},
{
name = {"info.heading_turrets"},
topic =
{
{type = "title", title = {"info.heading_turrets"}},
{type = "image", spritename = "booktorio-turrets"},
{type = "text", text = "info.text_turrets"}
}
},
{
name = {"info.heading_ammo"},
topic =
{
{type = "title", title = {"info.heading_ammo"}},
{type = "image", spritename = "booktorio-ammo"},
{type = "text", text = "info.text_ammo"}
}
}
}
}
local rocketturrets_bob_thread =
{
name = {"rocketturrets.menu_rocketturrets"},
specified_version = 0,
topics =
{
{
name = {"rocketturrets.title_rocketturrets"},
topic =
{
{type = "image", spritename = "booktorio-cover-bob"},
{type = "text", text = "info.text_intro"}
}
},
{
name = {"info.heading_turrets"},
topic =
{
{type = "image", spritename = "booktorio-turrets-bob"},
{type = "text", text = "info.text_turrets_bob"}
}
},
{
name = {"info.heading_ammo"},
topic =
{
{type = "image", spritename = "booktorio-ammo"},
{type = "text", text = "info.text_ammo"}
}
}
}
}
local function registerThread()
if remote.interfaces["Booktorio"] then
remote.call("Booktorio", "add_thread", rocketturrets_thread)
if script.active_mods["bobwarfare"] then
remote.call("Booktorio", "override_thread", rocketturrets_bob_thread)
end
end
end
script.on_init(registerThread)
script.on_configuration_changed(registerThread)
+45
View File
@@ -0,0 +1,45 @@
if mods["Booktorio"] then
data:extend(
{
{
type = "sprite",
name = "booktorio-ammo",
filename = "__Rocket_Turrets__/graphics/info/ammo.png",
width = 104,
height = 64,
scale = 1
},
{
type = "sprite",
name = "booktorio-cover",
filename = "__Rocket_Turrets__/graphics/info/cover.png",
width = 360,
height = 264,
scale = 1
},
{
type = "sprite",
name = "booktorio-cover-bob",
filename = "__Rocket_Turrets__/graphics/info/cover_bob.png",
width = 360,
height = 264,
scale = 1
},
{
type = "sprite",
name = "booktorio-turrets",
filename = "__Rocket_Turrets__/graphics/info/turrets.png",
width = 154,
height = 154,
scale = 1
},
{
type = "sprite",
name = "booktorio-turrets-bob",
filename = "__Rocket_Turrets__/graphics/info/turrets_bob.png",
width = 698,
height = 154,
scale = 1
}
})
end
+15 -45
View File
@@ -1,52 +1,22 @@
require("integrations.bobplates.prototypes.entity")
require("integrations.bobplates.prototypes.item")
require("integrations.bobplates.prototypes.recipe")
require("integrations.bobplates.prototypes.technology")
require("integrations.bobplates.ingredients")
if mods["bobplates"] then
-- if bobplates enabled, modify mk1 turret
local add_prerequisite = function (tech, prereq)
table.insert(data.raw.technology[tech].prerequisites,prereq)
end
if mods["bobplates"] and mods["bobwarfare"] then
-- if bobplates enabled, change tiered turret recipes and tech (if existing)
data.raw["ammo-turret"]["rocket-turret"].folded_animation.layers[1].filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].folded_animation.layers[1].hr_version["filename"] = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/hr-rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].folding_animation.layers[1].filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].folding_animation.layers[1].hr_version["filename"] = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/hr-rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].prepared_animation.layers[1].filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].prepared_animation.layers[1].hr_version["filename"] = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/hr-rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].preparing_animation.layers[1].filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].preparing_animation.layers[1].hr_version["filename"] = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/hr-rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].attacking_animation.layers[1].filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].attacking_animation.layers[1].hr_version["filename"] = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/hr-rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].fast_replaceable_group = "turret"
data.raw["item"]["rocket-turret"].icon = "__Rocket_Turrets__/integrations/bobplates/graphics/icon/turret-rocket-mk1-icon.png"
data.raw["technology"]["rocket-turret"].icon = "__Rocket_Turrets__/integrations/bobplates/graphics/technology/rocket-turret-mk1.png"
data.raw.recipe["rocket-turret-mk2"].ingredients = rocket_mk2_ingred
-- if bobplates enabled, load tiered turrets
data:extend({
rocket_mk2_entity,
rocket_mk2_item,
rocket_mk2_recipe,
rocket_mk2_tech,
data.raw.recipe["rocket-turret-mk3"].ingredients = rocket_mk3_ingred
table.insert(data.raw.technology["rocket-turret-mk3"].prerequisites,"zinc-processing")
table.insert(data.raw.technology["rocket-turret-mk3"].prerequisites,"invar-processing")
rocket_mk3_entity,
rocket_mk3_item,
rocket_mk3_recipe,
rocket_mk3_tech,
data.raw.recipe["rocket-turret-mk4"].ingredients = rocket_mk4_ingred
table.insert(data.raw.technology["rocket-turret-mk4"].prerequisites,"titanium-processing")
rocket_mk4_entity,
rocket_mk4_item,
rocket_mk4_recipe,
rocket_mk4_tech,
data.raw.recipe["rocket-turret-mk5"].ingredients = rocket_mk5_ingred
table.insert(data.raw.technology["rocket-turret-mk5"].prerequisites,"nitinol-processing")
rocket_mk5_entity,
rocket_mk5_item,
-- recipe below
rocket_mk5_tech
})
if data.raw.item["advanced-processing-unit"] then
data:extend({rocket_mk5_recipe2})
else
data:extend({rocket_mk5_recipe1})
end
end
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

+32
View File
@@ -0,0 +1,32 @@
--ingredients
rocket_mk2_ingred = {
{"rocket-turret", 1},
{"steel-gear-wheel", 10},
{"steel-plate", 20},
{"advanced-circuit", 20},
}
rocket_mk3_ingred = {
{"rocket-turret-mk2", 1},
{"brass-gear-wheel", 10},
{"invar-alloy", 20},
{"steel-bearing",10},
{"advanced-circuit", 20},
}
rocket_mk4_ingred = {
{"rocket-turret-mk3", 1},
{"titanium-gear-wheel", 10},
{"titanium-plate", 20},
{"titanium-bearing",10},
{"processing-unit", 20},
}
rocket_mk5_ingred = {
{"rocket-turret-mk4", 1},
{"nitinol-gear-wheel", 10},
{"nitinol-alloy", 20},
{"nitinol-bearing", 10},
{"advanced-processing-unit", 20},
}
+46
View File
@@ -0,0 +1,46 @@
require("integrations.bobwarfare.prototypes.entity")
require("integrations.bobwarfare.prototypes.item")
require("integrations.bobwarfare.prototypes.recipe")
require("integrations.bobwarfare.prototypes.technology")
if mods["bobwarfare"] then
-- if bobwarfare enabled, modify vanilla turret to be mk1 turret
data.raw["ammo-turret"]["rocket-turret"].folded_animation.layers[1].filename = "__Rocket_Turrets__/graphics/entity/rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].folded_animation.layers[1].hr_version["filename"] = "__Rocket_Turrets__/graphics/entity/hr-rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].folding_animation.layers[1].filename = "__Rocket_Turrets__/graphics/entity/rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].folding_animation.layers[1].hr_version["filename"] = "__Rocket_Turrets__/graphics/entity/hr-rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].prepared_animation.layers[1].filename = "__Rocket_Turrets__/graphics/entity/rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].prepared_animation.layers[1].hr_version["filename"] = "__Rocket_Turrets__/graphics/entity/hr-rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].preparing_animation.layers[1].filename = "__Rocket_Turrets__/graphics/entity/rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].preparing_animation.layers[1].hr_version["filename"] = "__Rocket_Turrets__/graphics/entity/hr-rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].attacking_animation.layers[1].filename = "__Rocket_Turrets__/graphics/entity/rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].attacking_animation.layers[1].hr_version["filename"] = "__Rocket_Turrets__/graphics/entity/hr-rocket-mk1-sheet.png"
data.raw["ammo-turret"]["rocket-turret"].fast_replaceable_group = "turret"
data.raw["item"]["rocket-turret"].icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk1-icon.png"
data.raw["technology"]["rocket-turret"].icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk1.png"
-- if bobwarfare enabled, load tiered turrets
data:extend({
rocket_mk2_entity,
rocket_mk2_item,
rocket_mk2_recipe,
rocket_mk2_tech,
rocket_mk3_entity,
rocket_mk3_item,
rocket_mk3_recipe,
rocket_mk3_tech,
rocket_mk4_entity,
rocket_mk4_item,
rocket_mk4_recipe,
rocket_mk4_tech,
rocket_mk5_entity,
rocket_mk5_item,
rocket_mk5_recipe,
rocket_mk5_tech,
})
end
@@ -6,7 +6,7 @@ return
layers =
{
{
filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/rocket-mk2-sheet.png",
filename = "__Rocket_Turrets__/graphics/entity/rocket-mk2-sheet.png",
priority = "medium",
scale = 1,
width = 72,
@@ -19,7 +19,7 @@ return
shift = { 0.25, -0.5 },
hr_version =
{
filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/hr-rocket-mk2-sheet.png",
filename = "__Rocket_Turrets__/graphics/entity/hr-rocket-mk2-sheet.png",
priority = "medium",
scale = 0.5,
width = 144,
@@ -42,7 +42,7 @@ return
layers =
{
{
filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/rocket-mk3-sheet.png",
filename = "__Rocket_Turrets__/graphics/entity/rocket-mk3-sheet.png",
priority = "medium",
scale = 1,
width = 72,
@@ -55,7 +55,7 @@ return
shift = { 0.25, -0.5 },
hr_version =
{
filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/hr-rocket-mk3-sheet.png",
filename = "__Rocket_Turrets__/graphics/entity/hr-rocket-mk3-sheet.png",
priority = "medium",
scale = 0.5,
width = 144,
@@ -78,7 +78,7 @@ return
layers =
{
{
filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/rocket-mk4-sheet.png",
filename = "__Rocket_Turrets__/graphics/entity/rocket-mk4-sheet.png",
priority = "medium",
scale = 1,
width = 72,
@@ -91,7 +91,7 @@ return
shift = { 0.25, -0.5 },
hr_version =
{
filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/hr-rocket-mk4-sheet.png",
filename = "__Rocket_Turrets__/graphics/entity/hr-rocket-mk4-sheet.png",
priority = "medium",
scale = 0.5,
width = 144,
@@ -114,7 +114,7 @@ return
layers =
{
{
filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/rocket-mk5-sheet.png",
filename = "__Rocket_Turrets__/graphics/entity/rocket-mk5-sheet.png",
priority = "medium",
scale = 1,
width = 72,
@@ -127,7 +127,7 @@ return
shift = { 0.25, -0.5 },
hr_version =
{
filename = "__Rocket_Turrets__/integrations/bobplates/graphics/entity/hr-rocket-mk5-sheet.png",
filename = "__Rocket_Turrets__/graphics/entity/hr-rocket-mk5-sheet.png",
priority = "medium",
scale = 0.5,
width = 144,
@@ -150,7 +150,7 @@ end
rocket_mk2_entity = {
type = "ammo-turret",
name = "rocket-turret-mk2",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/icon/turret-rocket-mk2-icon.png",
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk2-icon.png",
icon_size = 32,
flags = {"placeable-player", "player-creation"},
minable = {mining_time = 0.7, result = "rocket-turret-mk2"},
@@ -211,7 +211,7 @@ rocket_mk2_entity = {
rocket_mk3_entity = {
type = "ammo-turret",
name = "rocket-turret-mk3",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/icon/turret-rocket-mk3-icon.png",
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk3-icon.png",
icon_size = 32,
flags = {"placeable-player", "player-creation"},
minable = {mining_time = 0.7, result = "rocket-turret-mk3"},
@@ -272,7 +272,7 @@ rocket_mk3_entity = {
rocket_mk4_entity = {
type = "ammo-turret",
name = "rocket-turret-mk4",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/icon/turret-rocket-mk4-icon.png",
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk4-icon.png",
icon_size = 32,
flags = {"placeable-player", "player-creation"},
minable = {mining_time = 0.7, result = "rocket-turret-mk4"},
@@ -333,7 +333,7 @@ rocket_mk4_entity = {
rocket_mk5_entity = {
type = "ammo-turret",
name = "rocket-turret-mk5",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/icon/turret-rocket-mk5-icon.png",
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk5-icon.png",
icon_size = 32,
flags = {"placeable-player", "player-creation"},
minable = {mining_time = 0.7, result = "rocket-turret-mk5"},
@@ -3,7 +3,7 @@
rocket_mk2_item = {
type = "item",
name = "rocket-turret-mk2",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/icon/turret-rocket-mk2-icon.png",
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk2-icon.png",
icon_size = 32,
subgroup = "defensive-structure",
order = "b[turret]-c[base]-d[rocket-mk2]",
@@ -14,7 +14,7 @@ rocket_mk2_item = {
rocket_mk3_item = {
type = "item",
name = "rocket-turret-mk3",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/icon/turret-rocket-mk3-icon.png",
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk3-icon.png",
icon_size = 32,
subgroup = "defensive-structure",
order = "b[turret]-c[base]-d[rocket-mk3]",
@@ -25,7 +25,7 @@ rocket_mk3_item = {
rocket_mk4_item = {
type = "item",
name = "rocket-turret-mk4",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/icon/turret-rocket-mk4-icon.png",
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk4-icon.png",
icon_size = 32,
subgroup = "defensive-structure",
order = "b[turret]-c[base]-d[rocket-mk4]",
@@ -36,7 +36,7 @@ rocket_mk4_item = {
rocket_mk5_item = {
type = "item",
name = "rocket-turret-mk5",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/icon/turret-rocket-mk5-icon.png",
icon = "__Rocket_Turrets__/graphics/icon/turret-rocket-mk5-icon.png",
icon_size = 32,
subgroup = "defensive-structure",
order = "b[turret]-c[base]-d[rocket-mk5]",
@@ -8,10 +8,9 @@ rocket_mk2_recipe = {
ingredients =
{
{"rocket-turret", 1},
{"steel-gear-wheel", 10},
{"iron-gear-wheel", 10},
{"steel-plate", 20},
{"battery", 5},
{"electronic-circuit", 5},
{"advanced-circuit", 20},
},
result = "rocket-turret-mk2",
order = "c-a"
@@ -25,8 +24,8 @@ rocket_mk3_recipe = {
ingredients =
{
{"rocket-turret-mk2", 1},
{"steel-bearing", 10},
{"invar-alloy", 20},
{"iron-gear-wheel", 10},
{"steel-plate", 20},
{"advanced-circuit", 20},
},
result = "rocket-turret-mk3",
@@ -41,15 +40,15 @@ rocket_mk4_recipe = {
ingredients =
{
{"rocket-turret-mk3", 1},
{"titanium-gear-wheel", 10},
{"titanium-plate", 20},
{"iron-gear-wheel", 10},
{"steel-plate", 20},
{"processing-unit", 20},
},
result = "rocket-turret-mk4",
order = "c-a"
}
rocket_mk5_recipe1 = {
rocket_mk5_recipe = {
type = "recipe",
name = "rocket-turret-mk5",
enabled = false,
@@ -57,26 +56,10 @@ rocket_mk5_recipe1 = {
ingredients =
{
{"rocket-turret-mk4", 1},
{"nitinol-gear-wheel", 10},
{"nitinol-alloy", 20},
{"iron-gear-wheel", 10},
{"steel-plate", 20},
{"processing-unit", 20},
},
result = "rocket-turret-mk5",
order = "c-a"
}
rocket_mk5_recipe2 = {
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},
},
result = "rocket-turret-mk5",
order = "c-a"
}
@@ -1,7 +1,7 @@
rocket_mk2_tech = {
type = "technology",
name = "rocket-turret-mk2",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/technology/rocket-turret-mk2.png",
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk2.png",
icon_size = 128,
effects =
{
@@ -32,7 +32,7 @@ rocket_mk2_tech = {
rocket_mk3_tech = {
type = "technology",
name = "rocket-turret-mk3",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/technology/rocket-turret-mk3.png",
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk3.png",
icon_size = 128,
effects =
{
@@ -44,7 +44,6 @@ rocket_mk3_tech = {
prerequisites =
{
"rocket-turret-mk2",
"invar-processing",
},
unit =
{
@@ -64,7 +63,7 @@ rocket_mk3_tech = {
rocket_mk4_tech = {
type = "technology",
name = "rocket-turret-mk4",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/technology/rocket-turret-mk4.png",
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk4.png",
icon_size = 128,
effects =
{
@@ -76,7 +75,6 @@ rocket_mk4_tech = {
prerequisites =
{
"rocket-turret-mk3",
"titanium-processing",
},
unit =
{
@@ -96,7 +94,7 @@ rocket_mk4_tech = {
rocket_mk5_tech = {
type = "technology",
name = "rocket-turret-mk5",
icon = "__Rocket_Turrets__/integrations/bobplates/graphics/technology/rocket-turret-mk5.png",
icon = "__Rocket_Turrets__/graphics/technology/rocket-turret-mk5.png",
icon_size = 128,
effects =
{
@@ -108,7 +106,6 @@ rocket_mk5_tech = {
prerequisites =
{
"rocket-turret-mk4",
"nitinol-processing",
},
unit =
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

-36
View File
@@ -1,36 +0,0 @@
if script.active_mods["informatron"] then
remote.add_interface("rocketturrets", {
informatron_menu = function(data)
return rocketturrets_menu(data.player_index)
end,
informatron_page_content = function(data)
return rocketturrets_page_content(data.page_name, data.player_index, data.element)
end
})
end
function rocketturrets_menu(player_index)
return {}
end
function rocketturrets_page_content(page_name, player_index, element)
if page_name == "rocketturrets" then
if script.active_mods["bobplates"] then
element.add{type="button", name="image_cover", style="rocketturrets_cover_bob"}
element.add{type="label", name="text_intro", caption={"rocketturrets.text_intro"}}
element.add{type="label", name="heading_turrets", caption={"rocketturrets.heading_turrets"}, style="heading_1_label"}
element.add{type="button", name="image_turrets", style="rocketturrets_turrets_bob"}
element.add{type="label", name="text_turrets", caption={"rocketturrets.text_turrets_bob"}}
else
element.add{type="button", name="image_cover", style="rocketturrets_cover"}
element.add{type="label", name="text_intro", caption={"rocketturrets.text_intro"}}
element.add{type="label", name="heading_turrets", caption={"rocketturrets.heading_turrets"}, style="heading_1_label"}
element.add{type="button", name="image_turrets", style="rocketturrets_turrets"}
element.add{type="label", name="text_turrets", caption={"rocketturrets.text_turrets"}}
end
-- the following is the same with and without bobplates
element.add{type="label", name="heading_ammo", caption={"rocketturrets.heading_ammo"}, style="heading_1_label"}
element.add{type="button", name="image_ammo", style="rocketturrets_ammo"}
element.add{type="label", name="text_ammo", caption={"rocketturrets.text_ammo"}}
end
end
-7
View File
@@ -1,7 +0,0 @@
if mods["informatron"] then
informatron_make_image("rocketturrets_cover", "__Rocket_Turrets__/integrations/info/graphics/cover.png", 380, 264)
informatron_make_image("rocketturrets_cover_bob", "__Rocket_Turrets__/integrations/info/graphics/cover_bob.png", 380, 264)
informatron_make_image("rocketturrets_turrets", "__Rocket_Turrets__/integrations/info/graphics/turrets.png", 154, 154)
informatron_make_image("rocketturrets_turrets_bob", "__Rocket_Turrets__/integrations/info/graphics/turrets_bob.png", 698, 154)
informatron_make_image("rocketturrets_ammo", "__Rocket_Turrets__/integrations/info/graphics/ammo.png", 104, 64)
end
-43
View File
@@ -1,43 +0,0 @@
rocketturrets_wiki =
{
name = "Rocket_Turrets",
title = {"rocketturrets.menu_rocketturrets"},
mod_path = "__Rocket_Turrets__",
{
name = {"rocketturrets.title_rocketturrets"},
topic = {
{type = "image", name = "image_cover", filepath = "__Rocket_Turrets__/integrations/info/graphics/cover.png", width = 380, height = 264, scale = 0.95},
{type = "text", text = {"rocketturrets.text_intro"} },
{type = "line"},
{type = "title", title = {"rocketturrets.heading_turrets"} },
{type = "image", name = "image_turrets", filepath = "__Rocket_Turrets__/integrations/info/graphics/turrets.png", width = 154, height = 154, scale = 0.516},
{type = "text", text = {"rocketturrets.text_turrets"} },
{type = "line"},
{type = "title", title = {"rocketturrets.heading_ammo"} },
{type = "image", name = "image_ammo", filepath = "__Rocket_Turrets__/integrations/info/graphics/ammo.png", width = 104, height = 64, scale = 1},
{type = "text", text = {"rocketturrets.text_ammo"} },
}
}
}
rocketturrets_bob_wiki =
{
name = "Rocket_Turrets",
title = {"rocketturrets.menu_rocketturrets"},
mod_path = "__Rocket_Turrets__",
{
name = {"rocketturrets.title_rocketturrets"},
topic = {
{type = "image", name = "image_cover", filepath = "__Rocket_Turrets__/integrations/info/graphics/cover_bob.png", width = 380, height = 264, scale = 0.95},
{type = "text", text = {"rocketturrets.text_intro"} },
{type = "line"},
{type = "title", title = {"rocketturrets.heading_turrets"} },
{type = "image", name = "image_turrets", filepath = "__Rocket_Turrets__/integrations/info/graphics/turrets_bob.png", width = 698, height = 154, scale = 0.516},
{type = "text", text = {"rocketturrets.text_turrets_bob"} },
{type = "line"},
{type = "title", title = {"rocketturrets.heading_ammo"} },
{type = "image", name = "image_ammo", filepath = "__Rocket_Turrets__/integrations/info/graphics/ammo.png", width = 104, height = 64, scale = 1},
{type = "text", text = {"rocketturrets.text_ammo"} },
}
}
}
+36
View File
@@ -0,0 +1,36 @@
if script.active_mods["informatron"] then
remote.add_interface("rocketturrets", {
informatron_menu = function(data)
return rocketturrets_menu(data.player_index)
end,
informatron_page_content = function(data)
return rocketturrets_page_content(data.page_name, data.player_index, data.element)
end
})
end
function rocketturrets_menu(player_index)
return {}
end
function rocketturrets_page_content(page_name, player_index, element)
if page_name == "rocketturrets" then
if script.active_mods["bobwarfare"] then
element.add{type="button", name="image_cover", style="informatron-cover-bob"}
element.add{type="label", name="text_intro", caption={"info.text_intro"}}
element.add{type="label", name="heading_turrets", caption={"info.heading_turrets"}, style="heading_1_label"}
element.add{type="button", name="image_turrets", style="informatron-turrets-bob"}
element.add{type="label", name="text_turrets", caption={"info.text_turrets_bob"}}
else
element.add{type="button", name="image_cover", style="informatron-cover"}
element.add{type="label", name="text_intro", caption={"info.text_intro"}}
element.add{type="label", name="heading_turrets", caption={"info.heading_turrets"}, style="heading_1_label"}
element.add{type="button", name="image_turrets", style="informatron-turrets"}
element.add{type="label", name="text_turrets", caption={"info.text_turrets"}}
end
-- the following is the same with and without bobplates
element.add{type="label", name="heading_ammo", caption={"info.heading_ammo"}, style="heading_1_label"}
element.add{type="button", name="image_ammo", style="informatron-ammo"}
element.add{type="label", name="text_ammo", caption={"info.text_ammo"}}
end
end
+7
View File
@@ -0,0 +1,7 @@
if mods["informatron"] then
informatron_make_image("informatron-cover", "__Rocket_Turrets__/graphics/info/cover.png", 380, 264)
informatron_make_image("informatron-cover-bob", "__Rocket_Turrets__/graphics/info/cover_bob.png", 380, 264)
informatron_make_image("informatron-turrets", "__Rocket_Turrets__/graphics/info/turrets.png", 154, 154)
informatron_make_image("informatron-turrets-bob", "__Rocket_Turrets__/graphics/info/turrets_bob.png", 698, 154)
informatron_make_image("informatron-ammo", "__Rocket_Turrets__/graphics/info/ammo.png", 104, 64)
end

Before

Width:  |  Height:  |  Size: 437 KiB

After

Width:  |  Height:  |  Size: 437 KiB

@@ -1,8 +1,8 @@
require("integrations.info.wiki.wiki")
require("integrations.wiki.wiki")
if script.active_mods["wiki"] then
local initialize_wiki
if script.active_mods["bobplates"] then
if script.active_mods["bobwarfare"] then
initialize_wiki = function()
remote.call("wiki","register_mod_wiki",rocketturrets_bob_wiki)
end
@@ -12,6 +12,6 @@ if script.active_mods["wiki"] then
end
end
script.on_init(function() initialize_wiki() end)
script.on_load(function() initialize_wiki() end)
script.on_init(initialize_wiki)
script.on_load(initialize_wiki)
end
@@ -1,7 +1,7 @@
require("integrations.info.wiki.wiki")
require("integrations.wiki.wiki")
if mods["wiki"] then
if mods["bobplates"] then
if mods["bobwarfare"] then
wiki_register_mod_wiki(rocketturrets_bob_wiki)
else
wiki_register_mod_wiki(rocketturrets_wiki)
+43
View File
@@ -0,0 +1,43 @@
rocketturrets_wiki =
{
name = "Rocket_Turrets",
title = {"rocketturrets.menu_rocketturrets"},
mod_path = "__Rocket_Turrets__",
{
name = {"rocketturrets.title_rocketturrets"},
topic = {
{type = "image", name = "image_cover", filepath = "__Rocket_Turrets__/graphics/info/cover.png", width = 380, height = 264, scale = 0.95},
{type = "text", text = {"info.text_intro"} },
{type = "line"},
{type = "title", title = {"info.heading_turrets"} },
{type = "image", name = "image_turrets", filepath = "__Rocket_Turrets__/graphics/info/turrets.png", width = 154, height = 154, scale = 0.516},
{type = "text", text = {"info.text_turrets"} },
{type = "line"},
{type = "title", title = {"info.heading_ammo"} },
{type = "image", name = "image_ammo", filepath = "__Rocket_Turrets__/graphics/info/ammo.png", width = 104, height = 64, scale = 1},
{type = "text", text = {"info.text_ammo"} },
}
}
}
rocketturrets_bob_wiki =
{
name = "Rocket_Turrets",
title = {"rocketturrets.menu_rocketturrets"},
mod_path = "__Rocket_Turrets__",
{
name = {"rocketturrets.title_rocketturrets"},
topic = {
{type = "image", name = "image_cover", filepath = "__Rocket_Turrets__/graphics/info/cover_bob.png", width = 380, height = 264, scale = 0.95},
{type = "text", text = {"info.text_intro"} },
{type = "line"},
{type = "title", title = {"info.heading_turrets"} },
{type = "image", name = "image_turrets", filepath = "__Rocket_Turrets__/graphics/info/turrets_bob.png", width = 698, height = 154, scale = 0.516},
{type = "text", text = {"info.text_turrets_bob"} },
{type = "line"},
{type = "title", title = {"info.heading_ammo"} },
{type = "image", name = "image_ammo", filepath = "__Rocket_Turrets__/graphics/info/ammo.png", width = 104, height = 64, scale = 1},
{type = "text", text = {"info.text_ammo"} },
}
}
}