1
0
mirror of https://github.com/Wyrrrd/Rocket_Turrets.git synced 2026-03-04 21:32:19 +01:00
Files
Rocket_Turrets/integrations/informatron/control.lua
Wyrrrd b0278680c0 Integration work
- Reworked integration with Bob's
- Added Booktorio integration
- Moved some files around
2020-04-03 10:40:44 +02:00

36 lines
1.7 KiB
Lua

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