Merge owned systems into one addon while preserving resource identities. Gate player admission on the replicated prison scene, restore the original framed door, and hold enemy AI until escape. Correct scenario branding and author metadata, include publishing assets, and retain regression and native verification evidence.
20 lines
1.0 KiB
Python
20 lines
1.0 KiB
Python
from pathlib import Path
|
|
from policy_harness import body,run
|
|
ROOT=Path(__file__).resolve().parents[1]
|
|
s=body(ROOT/'addons/core/Scripts/Game/ERR/10_AI/ERR_HelicopterAvailability.c','string Check(')
|
|
run('#include <string>\n#include <cassert>\nusing std::string;\nstruct Availability {float m_fGroundedSince=-1;\n'+s+'''};
|
|
int main(){
|
|
Availability a;
|
|
assert(a.Check(0,0,false,false,true,false,false,0,0).empty());
|
|
assert(!a.Check(0,0,true,false,true,false,false,0,0).empty());
|
|
assert(a.Check(20000,0,false,false,true,false,false,0,0).empty());
|
|
assert(a.Check(79999,0,false,false,true,false,false,0,0).empty());
|
|
assert(!a.Check(80000,0,false,false,true,false,false,0,0).empty());
|
|
assert(a.Check(81000,0,false,false,true,true,false,0,0).empty());
|
|
assert(a.Check(82000,0,false,false,true,false,true,0,0).empty());
|
|
assert(!a.Check(82000,0,false,true,true,false,false,0,0).empty());
|
|
assert(!a.Check(82000,0,false,false,false,false,false,0,0).empty());
|
|
}
|
|
''')
|
|
print('PASS: migrated aircraft availability policy (controller migration still pending)')
|