Great mods! Suggest: mini api for custom building opt out?

X-Mag-X X-Mag-X · 9 hours ago

Thanks for making this mod! It’s very useful and fun to use = )

I've been testing it out with my own mods for any presentation or compatibility issues. In most other cases, makes the status bar look even better. πŸ’ͺ🏻

i have found 2 cases where small a API hook for mod authors to exclude a falsely placed button, perhaps even reposition the button would be very helpful.

1. Custom UI Layout

Custom inspectors may rearrange or omit the standard status bar. A hook to reposition the button would help preserve these kind of layouts. Also, sometimes these rows are carefully sized across 21 languages, with little room left for additional controls.

Examples:image.pngText wrap and button fall-offimage.pngHere, the button brings a removed control strip back into view.

2. Custom Unique Validation

  • Building with custom unique validation get a move button that may not work.
    • In this case, I have a building that uses custom limits rather than native IsUnique, allowing talent-based level-ups skills that may increase placement limits from one yard to two. The native flag cannot express that rule. For this building, an opt-out API hook would be helpful to ensure all it's custom limits code always initiates safely and as intended.

image.png

Other tests

  • No issues found with settlement anarchy global housing manipulation with custom event-driven deconstruct code. βœ…

Still to test:

  • Dual-use buildings registered as one prototype, but using custom code to simulate other prototypes, involving storage.

Thanks again for the mod and any consideration!

Edited 5 hours ago
X-Mag-X X-Mag-X · 4 hours ago

Also i loved this mod's function so much, when installed with omni-tools, i added support for it's function to work as an omni tool too. For my own personal use, so i can repeatedly move multiple buildings without the button = )

Edited 4 hours ago
Wimma Wimma · 2 hours ago

thanks a lot for testing it with your mods :) added it in 0.1.2, just uploaded. easiest way without any reference to my mod: give your entity or proto class an empty interface named IMoveBuildingsOptOut (no button, no moving) or IMoveBuildingsNoButton (button gone, moving still works). or call MoveBuildings.MoveBuildingsApi, also works by reflection: ExcludeProto("YourYard"), HideButton, AddRule (return a reason and the button shows it greyed out) and StartMove(entity), so you can put your own button wherever you want or use it in your omni tools. for your yard limit there is BuildingBeingPlaced, so your check can let the moved copy through. all in the readme, let me know if you need anything else :)

💡 1
18 Showing 1–3 of 3