Changeset 3328
- Timestamp:
- 11/29/08 23:33:19 (5 weeks ago)
- Location:
- trunk/mods/ca/LuaRules/Gadgets
- Files:
-
- 2 modified
-
planetwars.lua (modified) (1 diff)
-
unit_start_boost.lua (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/mods/ca/LuaRules/Gadgets/planetwars.lua
r3327 r3328 49 49 50 50 if (m.unitname == 'armcom' or m.unitname == 'corcom') then 51 GG.boostHandler.AddBoost(uid )51 GG.boostHandler.AddBoost(uid,nil,nil) 52 52 end 53 53 -
trunk/mods/ca/LuaRules/Gadgets/unit_start_boost.lua
r3326 r3328 54 54 55 55 56 function gadget:Initialize()57 -- self linking58 GG['boostHandler'] = {}59 GG['boostHandler'].AddBoost = AddBoost60 end61 62 63 56 local function AddBoost(unitID, newBoost, newBoostMax) 64 57 local tm = teamMetal[Spring.GetUnitTeam(unitID)] 65 boost[unitID] = newBoost or tm 66 boostMax[unitID] = newBoostMax or tm 58 boost[unitID] = newBoost or tm or 1000 59 boostMax[unitID] = newBoostMax or tm or 1000 67 60 SendToUnsynced("UpdateBoost", unitID, boost[unitID], boostMax[unitID]) 68 61 end … … 138 131 end 139 132 133 134 135 136 function gadget:Initialize() 137 -- self linking 138 GG['boostHandler'] = {} 139 GG['boostHandler'].AddBoost = AddBoost 140 end 141 142 143 140 144 -------------------------------------------------------------------- 141 145 -- unsynced code