Rescue HQ - The Tycoon

Rescue HQ - The Tycoon

Multi Sandbox Mod
MaFooBar 2019 年 5 月 31 日 上午 8:01
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 | _ -> ()
< >
正在显示第 1 - 5 条,共 5 条留言
nDeavor  [开发者] 2019 年 5 月 31 日 上午 9:01 
That works perfectly. Thanks! Update will be uploaded shortly
MaFooBar 2019 年 5 月 31 日 上午 9:04 
woot woot
nDeavor  [开发者] 2019 年 6 月 1 日 下午 3:58 
So after using this for some reason it influences the unlocks in the SF scenarios. I can't seem to find why though.
nDeavor  [开发者] 2019 年 6 月 1 日 下午 8:10 
Looks like adding x.Modifications () under Modifications = fun () -> takes care of that
MaFooBar 2019 年 6 月 2 日 上午 1:19 
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)
最后由 MaFooBar 编辑于; 2019 年 6 月 2 日 上午 1:19
< >
正在显示第 1 - 5 条,共 5 条留言
每页显示数: 1530 50