Nanite-Construction-System / NaniteConstructionSystem

A continuation of scripts for the Nanite Construction System
14 stars 13 forks source link

Multigrid Projector integration #174

Closed viktor-ferenczi closed 1 year ago

viktor-ferenczi commented 3 years ago

Integration with the Multigrid Projector plugin.

Tested working in single player and on a local Torch instance. Needs testing in between-clients multiplayer and dedicated server for completeness. They should also work, because they communicate the same way.

For the integration a few methods related to projections were refactored into class ProjectorIntegration under the NaniteConstructionSystem.Integration namespace for clean separation from your base logic.

The MultigridProjector directory contains a plain copy of the MGP Mod API files, so they are easy to update.

Compatibility with MGP 0.* is guaranteed as per semantic versioning, therefore an update of the API files are not needed unless your mod wants to use an API function introduced after MGP 0.4.6. In case of any API incompatibility the MGP integration disables itself without crashing the mod.

The integration is disabled (falls back to vanilla behavior) if the MGP plugin is not available.