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.
18 lines
841 B
Python
18 lines
841 B
Python
from policy_harness import ROOT, body, run
|
|
import re
|
|
source = body(ROOT/'addons/core/Scripts/Game/ERR/00_Core/ERR_CasualtyGroundSupport.c', 'static bool SupportHit(')
|
|
source = re.sub(r'(?<![\w.])(\d+\.\d+)(?![\w.])', r'\1f', source)
|
|
run('#include <cassert>\n' + source + '''
|
|
int main() {
|
|
assert(SupportHit(0,1,false,false));
|
|
assert(SupportHit(0.999,0.85,false,false));
|
|
assert(!SupportHit(1,1,false,false)); // no hit is no support
|
|
assert(!SupportHit(-0.01,1,false,false));
|
|
assert(!SupportHit(0.5,0.849,false,false));
|
|
assert(!SupportHit(0.5,-1,false,false));
|
|
assert(!SupportHit(0.5,1,true,false)); // own landing gear cannot support itself
|
|
assert(!SupportHit(0.5,1,false,true)); // player/vehicle is not static parking support
|
|
}
|
|
''')
|
|
print('PASS: actual short-cast hit, upward support normal, no self support and no dynamic support')
|