[Documentation] Update Grid stubs to match current API #161
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#161
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The type stubs in
stubs/mcrfpy.pyihave outdated Grid and GridPoint definitions that don't match the current API.Incorrect Stub Definitions
Grid Constructor
Stubs say:
Actual API:
Changes needed:
x, y→pos=(x, y)tupletile_width, tile_height, scale→size=(w, h)tuple +zoompropertygrid_sizeis(2, 2)not(20, 20)Grid Properties
Missing from stubs:
zoom: float- scale factor for renderingfill_color: Color- grid background colorcenter: Vector- viewport center pointcenter_x, center_y: float- viewport center componentsperspective: bool- perspective renderingperspective_enabled: boollayers,add_layer(),remove_layer(),layer()- layer systemfov,fov_radius,is_in_fov(),compute_fov()- field of viewcompute_dijkstra(),get_dijkstra_path(),get_dijkstra_distance()- pathfindingcompute_astar_path(),find_path()- A* pathfindingentities_in_radius()- spatial queryhovered_cell- mouse interactionon_cell_click,on_cell_enter,on_cell_exit- cell-level eventsGridPoint
Stubs say:
Actual API:
No
texture_index,solid, orcolorproperties exist.GridPointState
Stubs say:
Actual API:
Completely different purpose - tracks FOV state, not tile appearance.
Related
tools/generate_stubs_v2.py