Rescue HQ - The Tycoon

Rescue HQ - The Tycoon

Multi Sandbox Mod
MaFooBar 31 May, 2019 @ 8:01am
Fix for "Vehicles still get damage"
you can try something like this inside Scenario.Modifications function (for some reason the code markdown doesn't work here, so you need to remove the leading dots in each line)

// iterate over all smart objects for smartObject in Def.SmartObject |> Seq.toArray do match smartObject.Type with // is it a vehicle? | Some (:? VehicleDef as v) -> // update defintion Def.SmartObject.Update smartObject.ID (fun x -> {x with Type = SmartObjectType.Vehicle {v with // update maintenance of vehicle Maintenance = {v.Maintenance with // nullify damage DamageMultiplier = [Above 0, 0.0] // never break down BreakDownChance = [Above 0.0, 0.0] } } }) // no -> ignore | _ -> ()
< >
Showing 1-5 of 5 comments
nDeavor  [developer] 31 May, 2019 @ 9:01am 
That works perfectly. Thanks! Update will be uploaded shortly
MaFooBar 31 May, 2019 @ 9:04am 
woot woot
nDeavor  [developer] 1 Jun, 2019 @ 3:58pm 
So after using this for some reason it influences the unlocks in the SF scenarios. I can't seem to find why though.
nDeavor  [developer] 1 Jun, 2019 @ 8:10pm 
Looks like adding x.Modifications () under Modifications = fun () -> takes care of that
MaFooBar 2 Jun, 2019 @ 1:19am 
Yep, that should do it. if you don't call the old Modifications function, you just completly override it. (e.g. if you know OOP: when inheriting from a base class, overriding a virtual function and forget to call the base implementation)
Last edited by MaFooBar; 2 Jun, 2019 @ 1:19am
< >
Showing 1-5 of 5 comments
Per page: 1530 50