aboutsummaryrefslogtreecommitdiffstats
path: root/data/mods/enemy-fort/maps.lua
diff options
context:
space:
mode:
Diffstat (limited to 'data/mods/enemy-fort/maps.lua')
-rw-r--r--data/mods/enemy-fort/maps.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/data/mods/enemy-fort/maps.lua b/data/mods/enemy-fort/maps.lua
new file mode 100644
index 0000000..4f748ae
--- /dev/null
+++ b/data/mods/enemy-fort/maps.lua
@@ -0,0 +1,21 @@
+-- Layered-modding demo: this runs AFTER data/maps.lua, so it can reach into a
+-- map the base game defined and change it. Here we bolt an extra armour skin
+-- onto the Proving Ground enemy fort, making it a tougher target.
+--
+-- A mod could equally `table.insert(Maps, { ... })` to ship a whole new map;
+-- see data/maps.lua for the shape of an entry.
+
+local m = FindMap("Proving Ground")
+if m then
+ table.insert(m.structures, {
+ name = "enemy outer plating",
+ beams = {
+ -- a second armoured skin one unit in front of the fort's face,
+ -- tied back to it so the whole thing stays triangulated
+ {24,1,24,3,"armour"}, {24,3,24,5,"armour"},
+ {24,1,25,1,"wood"}, {24,3,25,3,"wood"}, {24,5,25,5,"wood"},
+ {24,1,25,3,"wood"}, {24,3,25,5,"wood"},
+ },
+ })
+ m.description = m.description .. " (+ enemy-fort mod plating)"
+end