Changeset 3318
- Timestamp:
- 11/29/08 07:37:07 (5 weeks ago)
- Location:
- trunk/mods/ca
- Files:
-
- 3 modified
-
LuaRules/Gadgets/unit_terraform.lua (modified) (2 diffs)
-
ModOptions.lua (modified) (1 diff)
-
gamedata/unitdefs_post.lua (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/mods/ca/LuaRules/Gadgets/unit_terraform.lua
r3299 r3318 209 209 if ((UnitDefs[unitDefID].isBuilding == true or UnitDefs[unitDefID].maxAcc == 0) and (not checkTerraform(UnitDefs[unitDefID].name))) then 210 210 local ux, uy, uz = Spring.GetUnitPosition(unitID) 211 structure[unitID] = { x = ux, z = uz , h = spGetGroundHeight(ux, uz), def = UnitDefs[unitDefID], 212 minx = UnitDefs[unitDefID].minx, minz = UnitDefs[unitDefID].minz, maxx = UnitDefs[unitDefID].maxx, maxz = UnitDefs[unitDefID].maxz} 211 local face = spGetUnitBuildFacing(unitID) 212 if ((face == 0) or(face == 2)) then 213 structure[unitID] = { x = ux, z = uz , h = spGetGroundHeight(ux, uz), def = UnitDefs[unitDefID], 214 minx = UnitDefs[unitDefID].minx, minz = UnitDefs[unitDefID].minz, maxx = UnitDefs[unitDefID].maxx, maxz = UnitDefs[unitDefID].maxz} 215 else 216 structure[unitID] = { x = ux, z = uz , h = spGetGroundHeight(ux, uz), def = UnitDefs[unitDefID], 217 minx = UnitDefs[unitDefID].minz, minz = UnitDefs[unitDefID].minx, maxx = UnitDefs[unitDefID].maxz, maxz = UnitDefs[unitDefID].maxx} 218 end 213 219 end 214 220 … … 315 321 function gadget:GameFrame(n) 316 322 317 if (n% 150<1) then323 if (n%90<1) then 318 324 checkHeightChange() 319 325 end -
trunk/mods/ca/ModOptions.lua
r3316 r3318 69 69 }, 70 70 { 71 key = 'dgun', 72 name = 'Enable Dgun', 73 desc = "Gives the Commander a Dgun", 74 type = 'bool', 75 def = true, 76 }, 77 { 71 78 key = "specialair", 72 79 name = "Special Air Units", -
trunk/mods/ca/gamedata/unitdefs_post.lua
r3306 r3318 273 273 ud.maxdamage = 2000 274 274 ud.canattack = false 275 ud.candgun = false276 ud.cloakcost = -1277 275 ud.explodeas = "BIG_UNIT" 278 ud.weapons = nil276 ud.weapons = {[1] = nil ,[3] = nil ,[4] = nil ,} 279 277 ud.selfdestructas = "BIG_UNIT" 280 278 ud.maxvelocity = 1.5 … … 304 302 ud.maxdamage = 4000 305 303 ud.energymake = 8 306 ud.candgun = true307 304 ud.explodeas = "COMMANDER_BLAST_CAT" 308 305 ud.selfdestructas = "COMMANDER_BLAST_CAT" … … 324 321 end 325 322 323 -------------------------------------------------------------------------------- 324 -------------------------------------------------------------------------------- 325 -- Dgun 326 -- 327 328 if (modOptions and modOptions.dgun) then 329 if tobool(modOptions.dgun) then 330 for name, ud in pairs(UnitDefs) do 331 local unitname = ud.unitname 332 if (unitname == "armcom" or unitname == "corcom") then 333 ud.candgun = true 334 ud.weapons[1] = {def = "FAKELASER",} 335 ud.weapons[3] = {def = "DISINTEGRATOR",} 336 end 337 end 338 else 339 for name, ud in pairs(UnitDefs) do 340 local unitname = ud.unitname 341 if (unitname == "armcom" or unitname == "corcom") then 342 ud.candgun = false 343 ud.weapons[3] = nil 344 end 345 end 346 end 347 end 326 348 327 349 --------------------------------------------------------------------------------