Skip to content

Commit

Permalink
Fix speedrun mode settings
Browse files Browse the repository at this point in the history
  • Loading branch information
EnAppelsin committed Nov 24, 2019
1 parent 7b2595c commit 9069058
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions Randomiser/CustomFiles.lua
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
ModPath = GetModPath()
Settings = GetSettings()

if Settings.SpeedrunMode then
--Force on
Settings.RandomPlayerVehicles = true
Settings.RandomTraffic = true
Settings.RandomChase = true
Settings.RandomChaseAmount = true
Settings.RandomChaseStats = true
Settings.RandomMissionVehicles = true
Settings.RandomMissionVehiclesStats = true
Settings.RandomStaticCars = true
Settings.SaveChoiceRSC = true

--Force off
Settings.RemoveOutOfCar = false
Settings.CustomCars = false
end

Paths = {}
Paths.ModPath = GetModPath()
Paths.Resources = Paths.ModPath .. "/Resources/"
Expand All @@ -37,6 +20,32 @@ if Settings.UseDebugSettings then
dofile("/GameData/RandomiserSettings/CustomFiles.lua")
end
end

if Settings.SpeedrunMode then
--Force on
Settings.RandomPlayerVehicles = true
Settings.RandomTraffic = true
Settings.RandomChase = true
Settings.RandomChaseAmount = true
Settings.RandomChaseStats = true
Settings.RandomMissionVehicles = true
Settings.RandomMissionVehiclesStats = true
Settings.RandomStaticCars = true
Settings.SaveChoiceRSC = true

--Force off
Settings.RemoveOutOfCar = false
Settings.CustomCars = false

-- Remove Husks
table.remove(RandomCarPoolPlayer, #RandomCarPoolPlayer)
table.remove(RandomCarPoolTraffic, #RandomCarPoolTraffic)
table.remove(RandomCarPoolMission, #RandomCarPoolMission)
table.remove(RandomCarPoolChase, #RandomCarPoolChase)

DebugPrint("Speedrun mode enabled, settings have been overridden")
end

DebugPrint("Debug settings enabled: " .. (Settings.UseDebugSettings and "true" or "false"))

if #RandomCarPoolPlayer < 5 and SettingRandomPlayerVehicles then
Expand Down

0 comments on commit 9069058

Please sign in to comment.