Remove camelCase module functions (setScale, findAll, getMetrics, setDevConsole), closes #304

Breaking API change: removes 4 camelCase function aliases from the mcrfpy
module. The snake_case equivalents (set_scale, find_all, get_metrics,
set_dev_console) remain and are the canonical API going forward.

- Removed setScale, findAll, getMetrics, setDevConsole from mcrfpyMethods[]
- Updated game scripts to use snake_case names
- Updated test scripts to use snake_case names
- Removed camelCase entries from type stubs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
John McCardle 2026-04-10 01:07:22 -04:00
commit e7462e37a3
7 changed files with 244 additions and 63 deletions

View file

@ -42,7 +42,7 @@ def collect_metrics(timer, runtime):
return
# Collect sample
m = mcrfpy.getMetrics()
m = mcrfpy.get_metrics()
metrics_samples.append({
'frame_time': m['frame_time'],
'avg_frame_time': m['avg_frame_time'],

View file

@ -14,7 +14,7 @@ def test_metrics(timer, runtime):
print("\nRunning metrics test...")
# Get metrics
metrics = mcrfpy.getMetrics()
metrics = mcrfpy.get_metrics()
print("\nPerformance Metrics:")
print(f" Frame Time: {metrics['frame_time']:.2f} ms")
@ -81,7 +81,7 @@ def test_metrics(timer, runtime):
# Schedule another check after 100ms
def check_later(timer2, runtime2):
global success
metrics2 = mcrfpy.getMetrics()
metrics2 = mcrfpy.get_metrics()
print(f"\nMetrics after 100ms:")
print(f" Frame Time: {metrics2['frame_time']:.2f} ms")