feat: integrate room framework and isolated subgame bundles

Complete room UI and protocol integration, move game definitions and resources behind bundle entries, publish authoritative version XML, and document single-game builds. Include all current resource changes and experiment artifacts.
This commit is contained in:
2026-09-09 03:13:18 +08:00
parent a7ec8aa6a7
commit 35216f75e7
1028 changed files with 835556 additions and 21415 deletions
@@ -0,0 +1,15 @@
import {readFileSync,writeFileSync,mkdirSync} from 'node:fs';
const base='G:/Works/YouleGamesCocosCreator/cocoscreator_projects/YouleNexus/assets/';
const path=base+'framework/presentation/room-chat-config.ts';
const source=readFileSync(path,'utf8');
const corpus=readFileSync(base+'framework/presentation/room-chat-banned-words.ts','utf8');
for(const [key,folder,constant] of [['Game_Surface_3','template','ROOM_CHAT_BANNED_WORDS'],['erqiwang','erqiwang','ERQIWANG_CHAT_BANNED_WORDS']]){
const begin=source.indexOf(key+':Object.freeze(')+key.length+1;
const end=source.indexOf('].map(phrase=>Object.freeze(phrase)))}),',begin)+'].map(phrase=>Object.freeze(phrase)))}),'.length-1;
if(begin<key.length+1||end<begin)throw Error('chat extraction failed');
const declaration=corpus.split(/\r?\n/).find(line=>line.startsWith('export const '+constant+':'));
if(!declaration)throw Error('missing corpus '+constant);
writeFileSync(base+'games/'+folder+'/room-chat-config.ts',"import type {RoomChatConfig} from '../../framework/presentation/room-chat-config.ts';\n"+declaration+'\n/** Copied from this game’s original configuration and banned-word source. */\nexport const roomChatConfig:RoomChatConfig='+source.slice(begin,end)+';\n');
}
writeFileSync(path,source.replace(/^import \{ROOM_CHAT_BANNED_WORDS[^\n]*\r?\n/m,'').replace(/\/\/ Authoritative migration[\s\S]*?(?=\/\*\* Incoming send_text)/,''));
mkdirSync(base+'app/composition',{recursive:true});