Changeset 3336

Show
Ignore:
Timestamp:
12/01/08 01:03:58 (5 weeks ago)
Author:
licho
Message:

fix crashing lua (i hope)

Location:
trunk/mods/ca/LuaRules/Gadgets
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/mods/ca/LuaRules/Gadgets/awards.lua

    r3335 r3336  
    517517        -- planetwars init 
    518518        local modOptions = Spring.GetModOptions() 
    519         if (modOptions) and modOptions.planetwars then 
     519        if (modOptions) and modOptions.planetwars and modOptions.planetwars ~= '' then 
    520520                local optionsRaw = modOptions.planetwars 
    521521                optionsRaw = string.gsub(optionsRaw, '_', '=') 
  • trunk/mods/ca/LuaRules/Gadgets/unit_morph.lua

    r3335 r3336  
    494494  GG['morphHandler'].AddExtraUnitMorph = AddExtraUnitMorph 
    495495  local modOptions = Spring.GetModOptions() 
    496   if (modOptions) and modOptions.planetwars then 
     496  if (modOptions) and modOptions.planetwars and modOptions.planetwars ~= '' then 
    497497        local optionsRaw = modOptions.planetwars 
    498498        optionsRaw = string.gsub(optionsRaw, '_', '=') 
  • trunk/mods/ca/LuaRules/Gadgets/unit_start_boost.lua

    r3333 r3336  
    189189end 
    190190 
    191  
    192191end