share/hedgewars/Data/Scripts/Params.lua
author mikade <redgrinner@gmail.com>
Sat, 16 May 2015 19:08:45 +0900
changeset 10947 bb5f9dc79a6b
parent 9985 42cd42e44c9a
permissions -rw-r--r--
Add two new maps, improve an old one Fix a few maps so they can be converted into HWMAP format
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9908
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
     1
-- Library for parameters handling
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
     2
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
     3
params = {}
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
     4
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
     5
function parseParams()
9985
42cd42e44c9a GravRacer, GravHigh, GravMutant, Grav... uhm... shoppamap? Easy! Gravity script could be combined with any other script now.
unc0rr
parents: 9908
diff changeset
     6
    if ScriptParam ~= nil then
42cd42e44c9a GravRacer, GravHigh, GravMutant, Grav... uhm... shoppamap? Easy! Gravity script could be combined with any other script now.
unc0rr
parents: 9908
diff changeset
     7
        for k, v in string.gmatch(ScriptParam, "(%w+)=([^,]+)") do
42cd42e44c9a GravRacer, GravHigh, GravMutant, Grav... uhm... shoppamap? Easy! Gravity script could be combined with any other script now.
unc0rr
parents: 9908
diff changeset
     8
            params[k] = v
42cd42e44c9a GravRacer, GravHigh, GravMutant, Grav... uhm... shoppamap? Easy! Gravity script could be combined with any other script now.
unc0rr
parents: 9908
diff changeset
     9
        end
9908
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
    10
    end
81eb25ddf594 - Utility script for parameters handling
unc0rr
parents:
diff changeset
    11
end