Files
maplecontest/tools/player/freeze-turn-player.mjs
gahusb 124e49b938 refactor(tools): .mjs를 주체별 폴더로 분류 + 카메라/플레이어 제어 분리
- tools/{player,monster,camera,map,deck,balance}/ 로 8개 스크립트 분류 (git mv 이력 보존)
- gen-camera의 플레이어 입력 차단·시선 고정을 tools/player/gen-player-lock.mjs(PlayerLock 코드블록)로 분리
- MapCamera 코드블록은 카메라 속성 전용으로 정리, 11개 맵 루트에 script.PlayerLock 부착
- README 및 스크립트 주석의 도구 경로 갱신

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 23:52:02 +09:00

21 lines
781 B
JavaScript

import { readFileSync, writeFileSync } from 'node:fs';
const file = 'Global/DefaultPlayer.model';
const data = JSON.parse(readFileSync(file, 'utf8'));
const values = data.ContentProto.Json.Values || [];
for (const value of values) {
if (value.TargetType === null && ['speed', 'jumpForce', 'walkAcceleration'].includes(value.Name)) {
value.Value = 0;
}
if (value.TargetType === 'MOD.Core.MovementComponent' && ['InputSpeed', 'JumpForce'].includes(value.Name)) {
value.Value = 0;
}
if (value.TargetType === 'MOD.Core.RigidbodyComponent' && ['MoveVelocity', 'RealMoveVelocity'].includes(value.Name)) {
value.Value = { x: 0, y: 0 };
}
}
writeFileSync(file, `${JSON.stringify(data, null, 2)}\n`, 'utf8');
console.log('Turn-combat player movement disabled.');