Combine Workshop addon and fix prison startup
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.
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
from pathlib import Path
|
||||
import os
|
||||
from policy_harness import ROOT,body,run
|
||||
P=Path(os.environ.get('ERR_HQ_ADMIN_SOURCE',str(ROOT/'addons/ai/Scripts/Game/ERR/ERR_HQAdminProvider.c')))
|
||||
S=ROOT/'addons/core/Scripts/Game/ERR/ERR_Settings.c'
|
||||
P=Path(os.environ.get('ERR_HQ_ADMIN_SOURCE',str(ROOT/'addons/core/Scripts/Game/ERR/10_AI/ERR_HQAdminProvider.c')))
|
||||
S=ROOT/'addons/core/Scripts/Game/ERR/00_Core/ERR_Settings.c'
|
||||
valid=body(S,'static bool Valid(').replace('string key','std::string key')
|
||||
integer=body(ROOT/'addons/core/Scripts/Game/ERR/ERR_AdminService.c','static bool Integer(')
|
||||
integer=body(ROOT/'addons/core/Scripts/Game/ERR/00_Core/ERR_AdminService.c','static bool Integer(')
|
||||
integer=(integer.replace('string text','std::string text').replace('out int value','int& value').replace('text.IsEmpty()','text.empty()').replace('text.Length()','int(text.size())').replace('text.Substring(','text.substr(').replace('"0123456789".IndexOf(', 'std::string("0123456789").find(').replace('< 0) return false;','== std::string::npos) return false;').replace('text.ToInt()','std::stoi(text)'))
|
||||
method=body(P,'protected void StingerSetting(')
|
||||
method=(method.replace('protected ','').replace('ERR_GameMode mode','ERR_GameMode* mode').replace('array<string>','Array<string>&').replace('mode.Settings().','mode->Settings()->').replace('ERR_CommandArguments.Integer','Integer').replace('mode->Settings()->Get(key).ToString()','std::to_string(mode->Settings()->Get(key))').replace('value.ToString()','std::to_string(value)').replace('int value;','int value=0;'))
|
||||
@@ -50,7 +50,7 @@ int main(){
|
||||
execute=body(P,'override bool Execute(')
|
||||
assert execute.index('arguments.IndexOf("hq stinger ") == 0')<execute.index('if (arguments != "status"')
|
||||
assert 'StingerSetting(mode, parts, replies); return true;' in execute
|
||||
admin=body(ROOT/'addons/core/Scripts/Game/ERR/ERR_AdminService.c','void Execute(')
|
||||
admin=body(ROOT/'addons/core/Scripts/Game/ERR/00_Core/ERR_AdminService.c','void Execute(')
|
||||
assert admin.index('if (!authorized)')<admin.index('Extension(mode, arguments, replies)')
|
||||
for forbidden in ('Check(', 'RandomInt(', 'Spawn', 'ConvoyAllowance', 'SetAISkill', 'entry.'):
|
||||
assert forbidden not in body(P,'protected void StingerSetting(')
|
||||
|
||||
Reference in New Issue
Block a user