Construction Mode, Space Invasion: Add example script param in default schems to make editing more convenient
authorWuzzy <Wuzzy2@mail.ru>
Sat, 17 Feb 2018 00:34:00 +0100
changeset 13026 ca7fdb431b34
parent 13025 261b8fd14235
child 13027 625d5a45f267
Construction Mode, Space Invasion: Add example script param in default schems to make editing more convenient
QTfrontend/model/ammoSchemeModel.cpp
share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua
share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua
--- a/QTfrontend/model/ammoSchemeModel.cpp	Sat Feb 17 00:06:34 2018 +0100
+++ b/QTfrontend/model/ammoSchemeModel.cpp	Sat Feb 17 00:34:00 2018 +0100
@@ -615,7 +615,8 @@
             << QVariant(100)           // rope modfier   40
             << QVariant(100)           // get away time  41
             << QVariant(0)             // world edge     42
-            << QVariant()              // scriptparam    43
+            // NOTE: If you change this, also change the defaults in the Construction Mode script
+            << QVariant("initialenergy=550, energyperround=50, maxenergy=1000, cratesperround=5") // scriptparam    43
             ;
 
     QList<QVariant> spaceinvasion;
@@ -663,7 +664,8 @@
             << QVariant(100)           // rope modfier   40
             << QVariant(100)           // get away time  41
             << QVariant(0)             // world edge     42
-            << QVariant()              // scriptparam    43
+            // NOTE: If you change this, also change the defaults in the Space Invasion script
+            << QVariant("rounds=3, shield=30, barrels=5, pings=2, barrelbonus=3, shieldbonus=30, timebonus=4") // scriptparam    43
             ;
 
     QList<QVariant> hedgeeditor;
--- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua	Sat Feb 17 00:06:34 2018 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua	Sat Feb 17 00:34:00 2018 +0100
@@ -128,6 +128,7 @@
 local amCMObjectPlacer = amNapalm
 
 -- Config variables (script parameter)
+-- NOTE: If you change this, also change the default game scheme “Construction Mode”
 local conf_initialEnergy = 550
 local conf_energyPerRound = 50
 local conf_maxEnergy = 1000
--- a/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua	Sat Feb 17 00:06:34 2018 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua	Sat Feb 17 00:34:00 2018 +0100
@@ -363,6 +363,7 @@
 local RoundHasChanged = true
 
 -- for script parameters
+-- NOTE: If you change this, also change the default “Space Invasion” game scheme
 local startBarrels = 5		-- "barrels"
 local startShield = 30		-- "shield"
 local startRadShots = 2		-- "pings"