share/hedgewars/Data/Scripts/Params.lua
author Wuzzy <almikes@aol.com>
Sun, 20 Nov 2016 04:21:24 +0100
changeset 11967 7dd85fe00de3
parent 9985 42cd42e44c9a
permissions -rw-r--r--
Fix typo in German campaign translation
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