Skip to content

feat: Added SpawnReasons and RoleSpawnFlags to CustomRole and some item/ammo fixes#570

Closed
Bonjemus wants to merge 10 commits into
ExMod-Team:devfrom
Bonjemus:custolrole-spawnreasonflags
Closed

feat: Added SpawnReasons and RoleSpawnFlags to CustomRole and some item/ammo fixes#570
Bonjemus wants to merge 10 commits into
ExMod-Team:devfrom
Bonjemus:custolrole-spawnreasonflags

Conversation

@Bonjemus

Copy link
Copy Markdown

Description

Describe the changes
Read title.

What is the current behavior? (You can also link to an open issue here)
Currently CustomRole always uses ForceClass as a SpawnReason and doesn't allow devs to specify RoleSpawnFlags.
Additionally, CustomRole behaviours when it comes to ammo and items was inconsistent so I also fixed it.

What is the new behavior? (if this is a feature change)
Read title.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Nope, some methods became obsolete though :

  • AddRole
  • RoleAdded
  • RemoveRole

Other information:


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

BoltonDev and others added 5 commits June 13, 2025 12:15
## Description
**Describe the changes** 


**What is the current behavior?** (You can also link to an open issue
here)


**What is the new behavior?** (if this is a feature change)


**Does this PR introduce a breaking change?** (What changes might users
need to make in their application due to this PR?)


**Other information**:

<br />

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentations
<br />

## Submission checklist
<!--- Put an `x` in all the boxes that apply: -->
- [ ] I have checked the project can be compiled
- [ ] I have tested my changes and it worked as expected

### Patches (if there are any changes related to Harmony patches)
- [ ] I have checked no IL patching errors in the console

### Other
- [ ] Still requires more testing
@Bonjemus

Copy link
Copy Markdown
Author

I changed the name of the branch so I had to reopen it (again).

@github-actions github-actions Bot added the API label Jul 5, 2025
@Someone-193

Copy link
Copy Markdown
Collaborator

Looks good as long as it doesn't change default behavior 👍
I assume the PlayerHandler changes were accidental / copied from a previous PR or something

@Bonjemus Bonjemus closed this Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants