when using ModUtil.AddBuildingToPlanScreen with BuildingOrdering.Before, the insertion index is wrong.
the marked code needs to be Mathf.Max(num2,0), otherwise the inserted building is put into the list with an offset of 1 from the position, yielding the result:
[building_id-building], [some other building in the menu], [relativeBuildingId-building]
Steps to Reproduce
use ModUtil.AddBuildingToPlanScreen to add a new building to the planscreen using BuildingOrdering.Before
notice that the building position in the planscreen is inserted one building too early / it has one building between itself and the relativeBuildingId building
A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now