ForbodingAngel

Untitled

Jan 4th, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. --------------------------------------------------------------------------------
  2. -- Gameplay Speed (Classic RTS Mode) --
  3. --------------------------------------------------------------------------------
  4.  
  5. if modOptions and tobool(modOptions.gameplayspeed == "normal") then
  6. for id,unitDef in pairs(UnitDefs) do
  7. -- Spring.Echo(unitDef.buildcostmetal)
  8. unitDef.buildtime = unitDef.buildcostmetal
  9. end
  10. for name, unitDef in pairs(UnitDefs) do
  11. if unitDef.unitname == "ecommander" then
  12. -- Spring.Echo(unitDef.unitname)
  13. unitDef.workertime = unitDef.workertime * 2
  14. end
  15. end
  16. end
  17.  
  18. if modOptions and tobool(modOptions.gameplayspeed == "fast") then
  19. for id,unitDef in pairs(UnitDefs) do
  20. -- Spring.Echo(unitDef.buildcostmetal)
  21. unitDef.buildtime = unitDef.buildcostmetal / 2
  22. end
  23. for name, unitDef in pairs(UnitDefs) do
  24. if unitDef.unitname == "ecommander" then
  25. -- Spring.Echo(unitDef.unitname)
  26. unitDef.workertime = unitDef.workertime * 2
  27. end
  28. end
  29. end
  30.  
  31. if modOptions and tobool(modOptions.gameplayspeed == "faster") then
  32. for id,unitDef in pairs(UnitDefs) do
  33. -- Spring.Echo(unitDef.buildcostmetal)
  34. unitDef.buildtime = unitDef.buildcostmetal / 4
  35. end
  36. end
  37.  
  38. if modOptions then
  39. if modOptions.gameplayspeed == nil then
  40. Spring.Echo("Gameplay Speed is set to fastest")
  41. else
  42. Spring.Echo("Gameplay Speed is set to " .. modOptions.gameplayspeed)
  43. end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment