Skip to content

[FEAT] Blood feeding and blood examining - #62

Draft
portfiend wants to merge 12 commits into
TheDenSS14:masterfrom
portfiend:feat/bloodfeeding-trait
Draft

[FEAT] Blood feeding and blood examining#62
portfiend wants to merge 12 commits into
TheDenSS14:masterfrom
portfiend:feat/bloodfeeding-trait

Conversation

@portfiend

Copy link
Copy Markdown
Contributor

About the PR

this PR will be a reimplementation of den's systems for a) drinking the blood of mobs and b) examining the bloodstream of other mobs

Why / Balance

Technical details

Media

image

Requirements

Breaking changes

Changelog

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@portfiend portfiend mentioned this pull request Jun 28, 2026
5 tasks
Dirius77 pushed a commit that referenced this pull request Jul 1, 2026
<!-- Guidelines: https://docs.macrocosm.cool/docs/intro -->

## About the PR
This PR ports the Detritivore trait from TheDenSS14/TheDen#684.

Entities with a detritivorous diet can derive hunger from gastrotoxin,
mold, vent crud, and reprocessed material (trash) without being
poisoned.

In addition, reprocessed material was given a *new* poison metabolism
for non-Vox/non-Detritivores.

## Why / Balance
Required for these PRs:
- #115
- #62

## Technical details
`AddMetabolizerTrait` is a new trait function that adds metabolizerTypes
to all metabolizing organs of an entity that pass a certain whitelist.
(You can, for example, make it *only* affect the heart or lungs, or
whatever). This sends an event to the extended `MetabolismSystem` to add
or remove metabolizers respectively when the trait is added/removed.

Detritivore trait adds the "Detritivore" type to all metabolizing
organs.

A new set of organs with both "Detritivore" and "Animal" metabolisms
were added. This was given to rats (like the Rat King) and mice.

The following metabolisms were added:
- Detritivores are not poisoned by gastrotoxin and sate hunger from it
at 0.5x rate.
- Detritivores are not poisoned by mold and sate hunger from it at 0.5x
rate.
- Detritivores are not poisoned by vent crud and sate hunger from it at
0.25x rate.
- Detritivores sate hunger from reprocessed material at 0.25x rate.
Non-vox and non-Detritivores take 2 poison damage per 0.5 unit of
reprocessed trash.
- Detritivores are not poisoned by uncooked proteins, and can derive
hunger from it, similar to animals.

I'll deal with trait balance later

## Test plan
<!--
Describe how you tested the pull request, and how someone reviewing this
PR can test it themselves.
-->
- Pick the "Detritivore" trait in character editor and spawn in
- Eat rotten meat, moldy bread, maybe sip on reprocessed material
(trash) and vent crud. Should not poison you.
- Do the same to an unmodified non-Vox urist - they should be poisoned.
- While you're at it, remove the trait from yourself with `self
traits:remove Detritivore` and try guzzling trash and mold again. You
should be made horribly sick.
- Mice and rat kings should have the Detritivore diet.

## Media
<!-- Attach media if the PR makes in-game changes (clothing, items,
features, etc). -->

<img width="672" height="84" alt="image"
src="https://github.com/user-attachments/assets/98b4fa82-632f-43b4-81d6-73822329e613"
/>

ill handle trait balance later

### Metabolisms

<img width="658" height="305" alt="image"
src="https://github.com/user-attachments/assets/3fd8a5fb-10d3-42ea-bdff-835d5c0cedb7"
/>
<img width="652" height="253" alt="image"
src="https://github.com/user-attachments/assets/506698c5-1dc3-4d3d-8ff6-0e053debe2a8"
/>
<img width="656" height="374" alt="image"
src="https://github.com/user-attachments/assets/85ea3154-6acd-438c-abf7-748b9c9e714c"
/>
<img width="658" height="229" alt="image"
src="https://github.com/user-attachments/assets/59b231aa-a2e2-450b-9e13-a2b0b02ba394"
/>
<img width="654" height="367" alt="image"
src="https://github.com/user-attachments/assets/678fcead-f05a-4be6-925f-b064d2cf744c"
/>

### Gameplay

Injecting 15u gastrotoxin each into detritivore and non-detritivore
reptilian

<img width="923" height="611" alt="image"
src="https://github.com/user-attachments/assets/b85f7ded-3f51-4142-8775-9fdd9531088e"
/>

Removing detritivore trait from self and injecting 15u gastrotoxin

<img width="638" height="75" alt="image"
src="https://github.com/user-attachments/assets/5ceb0af1-2ebe-4150-b091-e785db2e90cc"
/>

<img width="558" height="540" alt="image"
src="https://github.com/user-attachments/assets/0284c997-c9b5-4297-af11-2be91e93c1e6"
/>

## 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.-->

mice have a `BaseMobDetritivore` parent that changes their organs
`BaseMobRat` also had its organs changed
these mobs will be unusable for "animal organ"-type recipes specifically

## 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: You can select the "Detritivore" trait in the character editor to
be able to consume gastrotoxin, mold, reprocessed material (trash), and
vent crud safely.
- add: Reprocessed material (trash) is now poisonous to non-Vox and
non-Detritivores.
- add: Mice and rats are now detritivores.
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

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.

1 participant