Skip to content

[FEAT] Blood Swap Traits - #127

Open
salamanderskies wants to merge 8 commits into
TheDenSS14:masterfrom
salamanderskies:blood-swap-trait
Open

[FEAT] Blood Swap Traits#127
salamanderskies wants to merge 8 commits into
TheDenSS14:masterfrom
salamanderskies:blood-swap-trait

Conversation

@salamanderskies

@salamanderskies salamanderskies commented Jul 8, 2026

Copy link
Copy Markdown

About the PR

Adds traits for swapping blood reagents. Port of Aurora's Song #1215: feat: Blood Reagent Swap Traits

Why / Balance

Prebase parity.

Technical details

Adds BloodSwapComponent & BloodSwapSystem to handle changing a character's blood type. The reagent itself is defined in YAML, so it's easy to add new blood types, if need be.
Otherwise, adds traits for swapping blood type, restricted by species.

Test plan

(once inversions for requirement fields are fixed)
Golobby
Go to the traits menu and select a trait under "Blood types"
Startround and join.
Bleed all over the floor.

Media

image

(from the original PR)
https://github.com/user-attachments/assets/95a19ebd-c95f-4bdc-89e6-360fe9a67654

Requirements

  • I have read and am following the Macrocosm Pull Request Conventions.
  • I have tested this pull request and written instructions on how to test it.
  • I have added media to this PR or it does not require an in-game showcase.

Licensing

  • All code in this pull request can be licensed to MIT.
  • (OPTIONAL) I give permission to seeing this feature upstreamed to Macrocosm in the future.

Changelog

🆑

  • add: You can now select your character's blood reagent in the traits menu.

@salamanderskies

Copy link
Copy Markdown
Author

As a note: Traits and the relevant component exist in-game, but the traits themselves are non-functional at the moment (probably a formatting issue on my part).

@salamanderskies
salamanderskies marked this pull request as ready for review July 9, 2026 00:00
@salamanderskies

Copy link
Copy Markdown
Author

It's normal :).

portfiend pushed a commit to portfiend/TheDenTwo that referenced this pull request Aug 4, 2026
<!-- Guidelines: https://docs.macrocosm.cool/docs/intro -->

## About the PR
<!-- What did you change? -->
Made it so that the Inverted setting in requirements applies to their
CheckRequirements logic instead of just their reason text. Fixes TheDenSS14#127

Also updated the trait UI to grey out and disable traits your
requirements don't match for.

## Why / Balance
Bugfix + UI Clarity

## Technical details
It's a bool. Changed SetInvalid to a more generic UpdateAppearance
function that handles the different appearances now.

## Test plan
I used the traits from the blood PR to test this, but:
Try to select a trait you can't.
Select one you can.
Switch to a species that wouldn't be able to select that trait.
Verify that you can still **UN**select it.

## Media


https://github.com/user-attachments/assets/4833717d-be18-4a82-88e7-8259487611a1


## Requirements
<!-- Confirm the following by placing an X in the brackets without
spaces inside (for example: [X] ): -->
- [X] I have read and am following the Macrocosm [Pull Request
Conventions](https://docs.macrocosm.cool/docs/Conventions/pull-requests/).
- [X] I have tested this pull request and written instructions on how to
test it.
- [X] I have added media to this PR or it does not require an in-game
showcase.
<!-- You should understand that not following the above may get your PR
closed at maintainer’s discretion -->

### Licensing
<!--
    This is REQUIRED for any code submitted to The Den 2 repository.
If this is a port, make sure to check the original repository's license!

    This code can be licensed to MIT if:
    1. You wrote it yourself, and you agree it can be MIT-licensed.
2. The original pull request originates from an MIT-licensed codebase,
such as Wizard's Den.
3. The original code author submitted the code to a non-MIT (e.g.
AGPLv3) codebase, but
       has given explicit permission to have their code re-licensed.

If your code does not fit these cases, it probably can't be accepted!
If you need help getting MIT licensing, please ask for help in our
development channels.
-->
- [X] All code in this pull request can be licensed to MIT.

<!--
Macrocosm is The Den 2's upstream repository. We may port features to
Macrocosm if other
servers that share the Macrocosm upstream are interested in the feature.
-->
- [X] (OPTIONAL) I give permission to seeing this feature upstreamed to
Macrocosm in the future.

## Breaking changes
<!-- List any breaking changes, including namespaces, public
class/method/field changes, prototype renames; and provide instructions
for fixing them.
Also, include instructions on how to enable/disable the content for the
benefit of downstreams.-->

## Changelog
<!-- Add a Changelog entry to make players aware of new features or
changes that could affect gameplay.
Make sure to read the guidelines and take this Changelog template out of
the comment block in order for it to show up.
Changelog must have a 🆑 symbol, so the bot recognizes the changes and
adds them to the game's changelog.
The name that appears on the changelog will be your GitHub username by
default. If you wish for a different name to appear, format the symbol
like so:
🆑 My Name -->
<!--
🆑
- add: Added fun!
- remove: Removed fun!
- tweak: Changed fun!
- fix: Fixed fun!
-->
@portfiend

Copy link
Copy Markdown
Contributor

wait why did this get closed

@portfiend portfiend reopened this Aug 4, 2026
@salamanderskies

Copy link
Copy Markdown
Author

OH. THE FIXES…

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.

2 participants