Advertisement
DarthPresidente

NoLimits

Apr 27th, 2020
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. local GameEntityCount = 200000
  2. local MaxPopulation = 20000
  3. function NoLimitsMod()
  4.     -- Sets the entity count
  5.     config.MaxGameObjectExCount = GameEntityCount
  6.     config.MaxGameObjectCount = GameEntityCount
  7.     -- Remove the road construction limitations
  8.     road_construction.ReachedLimit =  function(x)
  9.         return false
  10.     end
  11.     -- Sets the population
  12.     MigrationMaxCitizens = MaxPopulation
  13.     ImmigrationRandomize = function(y)
  14.         return MulDivRound(y, MaxPopulation - CitizenCount, 375)
  15.     end
  16. end
  17. -- Only fire once
  18. local FiredOnce = false
  19.  
  20. -- UA Set Mode
  21. OnMsg.UASetMode = function(actions,mode)
  22.     if not FiredOnce then
  23.         if(mode == "Boot") then
  24.             FiredOnce = true
  25.             CreateRealTimeThread(function()
  26.                 NoLimitsMod()
  27.                 OnMsg.MapPermanentObjectsLoaded = function()
  28.                     NoLimitsMod()
  29.                 end
  30.             end)
  31.         end
  32.     end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement