Skip to content

ResetCauseOfDeath API#67

Draft
Turkeysteaks wants to merge 1 commit intoEliteMasterEric:masterfrom
Turkeysteaks:master
Draft

ResetCauseOfDeath API#67
Turkeysteaks wants to merge 1 commit intoEliteMasterEric:masterfrom
Turkeysteaks:master

Conversation

@Turkeysteaks
Copy link
Copy Markdown
Contributor

Closes #66
(I think) Closes #57

Adds in two methods to the API, void ResetCauseOfDeath(int playerId) and void ResetCauseOfDeath(PlayerControllerB player).

SetCauseOfDeath is unchanged aside from wording in the summary. Currently, if null is passed to SetCauseOfDeath then it will still correctly be rejected, as forceOverride will never be true.
The only issue I can forsee is that if there are existing mods that hook into AdvancedDeathTracker without using the public API, the issue you mentioned about accidentally passing null could arise. This would still require forceOverride to be true.
This could be rectified by more extensively editing existing functionality, like straight up having a separate Rpc for ResetCauseOfDeath to call, however I'm unsure if any mods DO use the private AdvancedDeathTracker in that way so I figured it would be best to preserve existing code as much as possible. Let me know if you want me to find another way instead though.

I also need to do more testing just to make sure this works as expected, so will leave as a draft PR until I do so - but please let me know of any changes you'd want in the meantime in order to accept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No method to Reset Cause of Death Request: Allow override in API

1 participant