mirror of
https://github.com/Wyrrrd/Rocket_Turrets.git
synced 2026-05-30 20:52:29 +02:00
Added wiki integration
Also moved graphics to be used by both info integrations
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 210 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 202 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 170 KiB |
@@ -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["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
|
||||
@@ -0,0 +1,7 @@
|
||||
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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 437 KiB |
@@ -0,0 +1,17 @@
|
||||
require("integrations.info.wiki.wiki")
|
||||
|
||||
if script.active_mods["wiki"] then
|
||||
local initialize_wiki
|
||||
if script.active_mods["bobplates"] then
|
||||
initialize_wiki = function()
|
||||
remote.call("wiki","register_mod_wiki",rocketturrets_bob_wiki)
|
||||
end
|
||||
else
|
||||
initialize_wiki = function()
|
||||
remote.call("wiki","register_mod_wiki",rocketturrets_wiki)
|
||||
end
|
||||
end
|
||||
|
||||
script.on_init(function() initialize_wiki() end)
|
||||
script.on_load(function() initialize_wiki() end)
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
require("integrations.info.wiki.wiki")
|
||||
|
||||
if mods["wiki"] then
|
||||
if mods["bobplates"] then
|
||||
wiki_register_mod_wiki(rocketturrets_bob_wiki)
|
||||
else
|
||||
wiki_register_mod_wiki(rocketturrets_wiki)
|
||||
end
|
||||
end
|
||||
@@ -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__/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"} },
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user