Fix turn combat facing and player movement

This commit is contained in:
maple
2026-06-08 00:01:46 +09:00
parent 1299d718e2
commit 27818e92c7
16 changed files with 116 additions and 41 deletions

View File

@@ -0,0 +1,20 @@
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.');