Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tech_table = {
- MicroManufacturing = "AutoMaticElectronicsFactory",
- NuclearFusion = "AutomatedFusionReactor",
- DronePrinting = "AutoMaticDroneAssembler",
- NuclearFusion = "FusionSpire",
- LowGHydrosynthsis = "AutoMaticPolymerFactory",
- ["3DMachining"] = "AutoMaticMachinePartsFactory",
- LowGFungi = "AutoMaticFungalFarm",
- }
- local function ToggleLock()
- -- local them for slightly more speed
- local UICity = UICity
- local UnlockBuilding = UnlockBuilding
- local LockBuilding = LockBuilding
- for tech,bld in pairs(tech_table) do
- if UICity:IsTechResearched(tech) then
- UnlockBuilding(bld)
- else
- LockBuilding(bld)
- end
- end
- end
- OnMsg.CityStart = ToggleLock
- OnMsg.LoadGame = ToggleLock
- OnMsg.TechResearched = ToggleLock
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement