Added wiki integration

Also moved graphics to be used by both info integrations
This commit is contained in:
Wyrrrd
2020-03-29 14:46:31 +02:00
parent e8620f14aa
commit 8f4dcf4491
16 changed files with 87 additions and 9 deletions
+17
View File
@@ -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
+9
View File
@@ -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
+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__/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"} },
}
}
}