Conversation
# Conflicts: # Source/API/Dummy.cs # Source/MultiplayerAPI.csproj
|
Merged in changes from #8 |
|
API can't depend on Harmony since it needs to be included by random projects that may choose not to use Harmony. Is it being used? I don't see it at first glance. |
|
That... I did not consider. My bad. There's 2 different things use Harmony. Shouldn't be that bad to fix. First - Second - since I already dropped in Harmony in, I've also used Also, this will need further changes to due to #10, as some of the changes here overlap with those (I assume that due to changes in MP itself, the changes in my PR would need fixing anyway). I'll try to look at this tomorrow if I have the time. |
|
Yeah, we can have a copy of the enum just fine. |
# Conflicts: # Source/API/Dummy.cs # Source/API/Interfaces.cs # Source/API/MP.cs
The usage of Harmony was a big oversight on my part which has now been corrected. The removal of ThingFilterContext and ISyncSimple happened due to rwmt#10
|
Dropped reliance on Harmony, removed
|
# Conflicts: # Source/API/Dummy.cs # Source/API/MP.cs # Source/MultiplayerAPI.csproj
|
Fixed merge conflicts |
|
I've added another commit with an It's a minor change that shouldn't cause issues, so I made it part of this PR to avoid potential merge conflicts. I tried to make the summary as good as possible, but I feel it could still be improved. |
It's going to require changes to MP as well to work rwmt/Multiplayer#381
Several additions to the API:
Bumped up the version to 0.5 (from 0.3/0.4)handled by ThingFilterContext and ISyncSimple #10Referenced Harmony NuGet package (needed forremovedMethodTypeenum, but also used for a few other things)CanUseDevModebool property to check if the current player has access to dev mode (made default return false, should we keep it or change it to true/something else?)SetHostOnlyfor sync methods/delegates to bring them on par with sync fieldsExposeFieldsfor sync delegatesSetPreInvoke/SetPostInvokefor sync delegates (it was possible to use them before by castingISyncDelegatetoISyncMethod)CancelIfNoSelectedMapObjectsandCancelIfNoSelectedWorldObjectsfor sync delegates, matching sync methodsCancelIfNoSelectedObjectsas obsolete with a message to useCancelIfNoSelectedMapObjectsinstead (still works as before) as it's more descriptive