Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building::isImpassableAtCreation may be misnamed #586

Open
ab9rf opened this issue Mar 23, 2023 · 1 comment
Open

building::isImpassableAtCreation may be misnamed #586

ab9rf opened this issue Mar 23, 2023 · 1 comment

Comments

@ab9rf
Copy link
Member

ab9rf commented Mar 23, 2023

this method (buildingst vmethod slot 0x200) returns true for several building classes that are passable at creation, notably hatches, rollers, slabs, floor grates, and bridges.

analysis of the v50.07 decompilation shows that the implementations of this method always return true for building_animaltrapst, building_axle_horizontalst, building_axle_verticalst, building_bars_floorst, building_bars_verticalst, building_bridgest, building_floodgatest, building_gear_assemblyst, building_grate_floorst, building_grate_wallst, building_hatchst, building_rollersst, building_slabst, building_statuest, building_water_wheelst, building_wellst, building_windmillst, building_window_gemst, and building_window_glassst. all other implementations return always false except for the implementation for building_constructionst which returns true for fortifications and walls, and false for everything else.

in discussion, it has been suggested that this method may instead indicate whether the constructing unit stands on or next to the central square of the building during construction, or whether the building is impassable at construction "if powered"

further research appears needed to properly characterize the purpose of this vmethod; once we better understand its purpose it would probably be appropriate to rename it

@quietust
Copy link
Member

Toady's name for this vmethod is perimdestroyer, which seems consistent with the interpretation of "stands next to the building during [de]construction instead of on top of it".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants