Open midspace opened 6 years ago
OwnerID
for handtools sounds neat.
When I checked the last time (which was very long ago) IMyCubeBuilder.FindClosestGrid()
did the same calculations as the method currently used in protection areas, thus it had issues with grids that have wheels.
Wheels, because they aren't owned. Sigh. I suppose there are some alternatives for that now.
I currently have the new code running in my dev mod for testing: http://steamcommunity.com/sharedfiles/filedetails/?id=387257948
I had a request to enhance the PA, to be able to prevent building anything.
There were changes put through for API improvements which need to be implemented for handtool checks.
https://forum.keenswh.com/threads/modapi-changes-jan-26.7392280/
Hand tools now have an OwnerID property which gives you the EntityId of the owning character. Also an OwnerIdentityId that tells you which player has the tool.
IMyCharacter.EquippedWeapon gives you the EntityId of the equipped tool/weapon.
Also look into
IMyCubeBuilder.FindClosestGrid()
for cubeplacer improvements