diff --git a/README.md b/README.md index 6f47d0d..ee43db0 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,10 @@ This mod adds a rocket turret to make rockets great again™. Sadly you would on This mod should just work, but I specifically added compatibility for the following mods: + [Bob's Metals, Chemicals and Intermediates](https://mods.factorio.com/mod/bobplates) - more turrets (MK2-MK5) ++ [Informatron](https://mods.factorio.com/mod/informatron) - informational page to explain functions and dangers ### Locale -If you want to contribute by translating this mod, you can view the existing translations [here](https://github.com/Wyrrrd/Rocket_Turrets/tree/master/locale). I'd be happy to add your language and credits to the next release. +If you want to contribute by translating this mod, you can view the existing translations [here](https://github.com/Wyrrrd/Rocket_Turrets/tree/master/locale). I'd be happy to add your language and credits to the next release. Especially the polish translation is in need of a proper Informatron page. ### Credits - Thanks to [Kamsta99](https://mods.factorio.com/user/kamsta99) for the [original mod](https://mods.factorio.com/mod/RocketTurrets) and the [vanilla version](https://mods.factorio.com/mod/RocketTurretsNonBob). \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index 471c99e..c8392c6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,8 @@ --------------------------------------------------------------------------------------------------- Version: 0.18.3 Date: 2020-03-16 + Features: + - Added Informatron integration and dynamic informational page (also depending on bobplates) Changes: - Moved integrations into separate directory - Simplified check for bobplates diff --git a/control.lua b/control.lua new file mode 100644 index 0000000..c27fa25 --- /dev/null +++ b/control.lua @@ -0,0 +1,3 @@ +--control.lua + +require("integrations.informatron.control") \ No newline at end of file diff --git a/data.lua b/data.lua index f743366..4f4f037 100644 --- a/data.lua +++ b/data.lua @@ -13,4 +13,5 @@ data:extend({ }) -- integrations -require("integrations.bobplates.data") \ No newline at end of file +require("integrations.bobplates.data") +require("integrations.informatron.data") \ No newline at end of file diff --git a/info.json b/info.json index cae2999..719d5f8 100644 --- a/info.json +++ b/info.json @@ -6,7 +6,8 @@ "factorio_version": "0.18", "dependencies": [ "base >= 0.18.0", - "? bobplates >= 0.18.1" + "? bobplates >= 0.18.1", + "? informatron >= 0.1.5" ], "description": "Adds rocket turrets" } \ No newline at end of file diff --git a/integrations/informatron/control.lua b/integrations/informatron/control.lua new file mode 100644 index 0000000..5c5d378 --- /dev/null +++ b/integrations/informatron/control.lua @@ -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 \ No newline at end of file diff --git a/integrations/informatron/data.lua b/integrations/informatron/data.lua new file mode 100644 index 0000000..ff00991 --- /dev/null +++ b/integrations/informatron/data.lua @@ -0,0 +1,7 @@ +if mods["informatron"] then + informatron_make_image("rocketturrets_cover", "__Rocket_Turrets__/integrations/informatron/graphics/cover.png", 380, 264) + informatron_make_image("rocketturrets_cover_bob", "__Rocket_Turrets__/integrations/informatron/graphics/cover_bob.png", 380, 264) + informatron_make_image("rocketturrets_turrets", "__Rocket_Turrets__/integrations/informatron/graphics/turrets.png", 154, 154) + informatron_make_image("rocketturrets_turrets_bob", "__Rocket_Turrets__/integrations/informatron/graphics/turrets_bob.png", 698, 154) + informatron_make_image("rocketturrets_ammo", "__Rocket_Turrets__/integrations/informatron/graphics/ammo.png", 104, 64) +end \ No newline at end of file diff --git a/integrations/informatron/graphics/ammo.png b/integrations/informatron/graphics/ammo.png new file mode 100644 index 0000000..c1b3a15 Binary files /dev/null and b/integrations/informatron/graphics/ammo.png differ diff --git a/integrations/informatron/graphics/cover.png b/integrations/informatron/graphics/cover.png new file mode 100644 index 0000000..abff7bf Binary files /dev/null and b/integrations/informatron/graphics/cover.png differ diff --git a/integrations/informatron/graphics/cover_bob.png b/integrations/informatron/graphics/cover_bob.png new file mode 100644 index 0000000..6aa4b98 Binary files /dev/null and b/integrations/informatron/graphics/cover_bob.png differ diff --git a/integrations/informatron/graphics/turrets.png b/integrations/informatron/graphics/turrets.png new file mode 100644 index 0000000..1f24058 Binary files /dev/null and b/integrations/informatron/graphics/turrets.png differ diff --git a/integrations/informatron/graphics/turrets_bob.png b/integrations/informatron/graphics/turrets_bob.png new file mode 100644 index 0000000..afea5a6 Binary files /dev/null and b/integrations/informatron/graphics/turrets_bob.png differ diff --git a/locale/de/locale.cfg b/locale/de/locale.cfg index 5d8aaaa..b0c1996 100644 --- a/locale/de/locale.cfg +++ b/locale/de/locale.cfg @@ -20,4 +20,14 @@ rocket-turret=Raketen-Geschützturm rocket-turret-mk2=Raketen-Geschützturm MK2 rocket-turret-mk3=Raketen-Geschützturm MK3 rocket-turret-mk4=Raketen-Geschützturm MK4 -rocket-turret-mk5=Raketen-Geschützturm MK5 \ No newline at end of file +rocket-turret-mk5=Raketen-Geschützturm MK5 + +[rocketturrets] +menu_rocketturrets=Rocket Turrets +title_rocketturrets=Rocket Turrets +text_intro=Raketen waren in Factorio schon immer das hässliche Entlein, das dritte Rad am Wagen der Basisverteidigung. Für manuellen Beschuss eignen sich andere Methoden besser, und automatischer Beschuss war lange nicht möglich. Doch nun hast du deine Badonkadonks in einen Geschützturm geschraubt, um Chaos und Explosionen auf Beißer und Speier regnen zu lassen. +heading_turrets=Neue Geschütztürme +text_turrets=Du hast neue Geschützturm entwickelt. Leider hattest du nur noch diese Farbe auf Lager. Jetzt sehen die Geschütztürme zwar etwas trist aus, aber sie verschießen Raketen, die ihren üblichen Schaden anrichten. +text_turrets_bob=Du hast neue Geschütztürme entwickelt, die in (fast) allen Regenbogenfarben strahlen. Der gelbe Raketen-Geschützturm fügt den üblichen Raketenschaden zu. Jede Weiterentwicklung (MK2-5) erhöht den Schaden um 25% und die Reichweite um 2 zum Vorgänger. Zusätzlich können die Geschütztürme MK4-5 je einen weiteren Stapel Munition aufnehmen. +heading_ammo=Munition +text_ammo=Alle Raketen lassen sich in die Raketen-Geschütztürme laden. Damit sie sich nicht selbst zerstören, können Raketen-Geschütztürme keine Feinde innerhalb eines Radius von 15 angreifen. Besondere Vorsicht ist bei dem Einsatz von Atombomben geboten, da die Explosion einen höheren Radius hat und somit Chaos über deine eigenen Verteidigungsanlagen bringen könnte. \ No newline at end of file diff --git a/locale/en/locale.cfg b/locale/en/locale.cfg index ad15b9c..74a142f 100644 --- a/locale/en/locale.cfg +++ b/locale/en/locale.cfg @@ -20,4 +20,14 @@ rocket-turret=Rocket turret rocket-turret-mk2=Rocket turret MK2 rocket-turret-mk3=Rocket turret MK3 rocket-turret-mk4=Rocket turret MK4 -rocket-turret-mk5=Rocket turret MK5 \ No newline at end of file +rocket-turret-mk5=Rocket turret MK5 + +[rocketturrets] +menu_rocketturrets=Rocket Turrets +title_rocketturrets=Rocket Turrets +text_intro=Rockets have always been the lame duck, the third wheel of base defense in Factorio. For manual fire, other methods are more effective, and automatic fire was not possible for a long time. But now, you screwed your badonkadonks on a turret socket to make mayhem and explosions rain on biters and spitters. +heading_turrets=New Turrets +text_turrets=You developed new turrets. Sadly, you only had one colour available to paint them. Now the turrets look a bit depressing, but they launch rockets dealing their usual damage. +text_turrets_bob=You developed new turrets, which are glistening in (almost) every colours of the rainbow. The yellow rocket turret deals the rocket's usual damage. Every improvement (MK2-5) increases damage by 25% and range by 2. The turrets MK4-5 can each handle an additional stack of ammunition, too. +heading_ammo=Ammunition +text_ammo=All rockets can be loaded into the rocket turrets. To prevent them from self-destroying, rocket turrets cannot attack enemies inside a radius of 15 around them. Additional care should be taken when using atom bombs, since the explosion has a far greater radius than that and may therefore cause mayhem over your very own base defenses. \ No newline at end of file diff --git a/locale/pl/locale.cfg b/locale/pl/locale.cfg index 432502b..1f384e4 100644 --- a/locale/pl/locale.cfg +++ b/locale/pl/locale.cfg @@ -20,4 +20,14 @@ rocket-turret=Działko rakietowe rocket-turret-mk2=Działko rakietowe MK2 rocket-turret-mk3=Działko rakietowe MK3 rocket-turret-mk4=Działko rakietowe MK4 -rocket-turret-mk5=Działko rakietowe MK5 \ No newline at end of file +rocket-turret-mk5=Działko rakietowe MK5 + +[rocketturrets] +menu_rocketturrets=Rocket Turrets +title_rocketturrets=Rocket Turrets +text_intro=Rockets have always been the lame duck, the third wheel of base defense in Factorio. For manual fire, other methods are more effective, and automatic fire was not possible for a long time. But now, you screwed your badonkadonks on a turret socket to make mayhem and explosions rain on biters and spitters. +heading_turrets=New Turrets +text_turrets=You developed new turrets. Sadly, you only had one colour available to paint them. Now the turrets look a bit depressing, but they launch rockets dealing their usual damage. +text_turrets_bob=You developed new turrets, which are glistening in (almost) every colours of the rainbow. The yellow rocket turret deals the rocket's usual damage. Every improvement (MK2-5) increases damage by 25% and range by 2. The turrets MK4-5 can each handle an additional stack of ammunition, too. +heading_ammo=Ammunition +text_ammo=All rockets can be loaded into the rocket turrets. To prevent them from self-destroying, rocket turrets cannot attack enemies inside a radius of 15 around them. Additional care should be taken when using atom bombs, since the explosion has a far greater radius than that and may therefore cause mayhem over your very own base defenses. \ No newline at end of file