Add optional shoreline Motorboats and recommended addon controls
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-11-07 00:32:01 +01:00
parent a7452f8be6
commit 161100cf08
31 changed files with 624 additions and 56 deletions
+7 -3
View File
@@ -7,7 +7,7 @@ methods=methods.replace('role.ToString()', 'string(std::to_string(role))').repla
methods=methods.replace('protected ', '').replace('array<string>', 'Array<string>').replace('set<string> keys = new set<string>();','Array<string> keys;')
methods=methods.replace('foreach (', 'for (').replace('ResourceName','string').replace('ERR_TerrainCatalog.Key(prefab)', 'prefab').replace('SCR_AddonTool.GetResourceAddons(prefab)', 'sources')
methods=methods.replace('Array<string> sources = sources;', 'Array<string> resourceSources = sources;').replace('project : sources','project : resourceSources')
methods=methods.replace('"01234".IndexOf', 'string("01234").IndexOf')
methods=methods.replace('"012345".IndexOf', 'string("012345").IndexOf')
methods=methods.replace('"0123456789abcdef".IndexOf','string("0123456789abcdef").IndexOf').replace('!records || ', '')
run(r'''
#include <cassert>
@@ -88,9 +88,13 @@ int main(){
assert(p.SetVehicleRole(a,j,3,false)&&!p.AllowsVehicleRole(j,3,false)&&p.AllowsVehicleRole(j,2,false));
assert(p.Preset("save","replacement")&&p.SetVehicleRole(a,j,2,false)&&p.Preset("load","replacement")&&p.AllowsVehicleRole(j,2,false));
assert(p.SetSwitch(a,"mod",false)&&!p.AllowsVehicleRole(j,2,true)&&p.SetSwitch(a,"mod",true)&&p.AllowsVehicleRole(j,2,false));
assert(p.SetVehicleRole(a,j,5,false)&&!p.AllowsVehicleRole(j,5,true));
assert(p.SetVehicleRole(a,j,5,true)&&p.AllowsVehicleRole(j,5,true));
assert(p.Preset("save","replacement")&&p.SetVehicleRole(a,j,5,false)&&p.Preset("load","replacement")&&p.AllowsVehicleRole(j,5,true));
assert(p.Valid({"active","active|1111111111111111|r5*|1"}));
int before=p.m_Revision;p.fail=true;assert(!p.SetVehicleRole(a,j,2,false)&&p.m_Revision==before&&p.AllowsVehicleRole(j,2,false));p.fail=false;
assert(!p.SetVehicleRole(a,j,5,true)&&!p.SetVehicleRole(a,j,-1,true)&&!p.SetVehicleRole(a,"bad",0,true));
assert(!p.Valid({"active","active|1111111111111111|r5*|1"}));
assert(!p.SetVehicleRole(a,j,6,true)&&!p.SetVehicleRole(a,j,-1,true)&&!p.SetVehicleRole(a,"bad",0,true));
assert(!p.Valid({"active","active|1111111111111111|r6*|1"}));
assert(!p.Set("../x",i,true)&&!p.Set(a,"unknown",true));
}
''')