Skip to content

Allergies exist, Please don't make me regret this. (I already do)#284

Open
ScarlettJFG wants to merge 6 commits intoFloof-Station:masterfrom
ScarlettJFG:Major-Additions
Open

Allergies exist, Please don't make me regret this. (I already do)#284
ScarlettJFG wants to merge 6 commits intoFloof-Station:masterfrom
ScarlettJFG:Major-Additions

Conversation

@ScarlettJFG
Copy link
Contributor

@ScarlettJFG ScarlettJFG commented Mar 16, 2026

About the PR

Adds Allergies and the associated effects to the game.

Why / Balance

EVERYONE WANTS MEDICAL TO [SUFFER]

(https://discord.com/channels/1255902263667331193/1478151943078674484/1482892877188173925)

Technical details

I'll be completely honest: It's a near 1:1 port from this PR, but with a minor change (I...didn't need to add lines for the allergies to grab what was processed). This adds changes to the server.database folder for records, HumanoidCharacterProfile for attaching the allergies, Histamine in the toxins.yml, and frankly, this is just a port. All of the edits however, allows the selections from the profile editor in lobby to be used, but does not sync the "Allergies" text field, with what is selected. Medical should be able to pick up on an allergen fairly quickly however, so this doesn't...completely screw them over.

Media

Click to show

Example Media Embed
Discord link to Video (Will open in browser, a little too big to upload here)

Requirements

  • I have tested all added content and changes.
  • I have added media to this PR or it does not require an ingame showcase.

Licensing:

Breaking changes

Allergies selected do not update in the Allergies text field in records.
Transforming (Geras or fox form) will temporarily pause allergic reactions, at least until transformed back. This can be used as a way to treat certain issues you might otherwise be allergic to, without death...unless it's too late.

Sources

As listed above, This PR is where the port is from.

Changelog

🆑

  • add: Added Allergies, fun! Actually no, as a medical main, this is pain...
  • add: You all will absolutely find fun interactions with this system.

@ScarlettJFG
Copy link
Contributor Author

I can mark this as "In-progress" if it needs changes, since this is a rather large port, I did not get a full understanding of everything, but it works as is, just a little...chaotic for medical when someone doesn't list their allergies...or are allergic to meds.

@Tarazicon
Copy link
Contributor

Tarazicon commented Mar 16, 2026

add: Added fun! Actually no, as a medical main, this is pain...
add: You all will absolutely find fun interactions with this system.

im not a maintainer, but i know changelogs need to actually list.. yknow, the changes. just letting you know

maybe something like add: Added allergies! Check out the character creation menu for a new tab!

Copy link
Collaborator

@Mnemotechnician Mnemotechnician left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Structurally this PR looks fine, but database migrations need to be re-created based on our current db model to avoid potentially corrupting the live db

Comment on lines +1 to +45
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Content.Server.Database.Migrations.Postgres
{
/// <inheritdoc />
public partial class CDAllergies : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "cd_character_allergies",
columns: table => new
{
allergen = table.Column<string>(type: "TEXT", nullable: false),
cdprofile_id = table.Column<int>(type: "INTEGER", nullable: false),
intensity = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_cd_character_allergies", x => new { x.cdprofile_id, x.allergen });
table.ForeignKey(
name: "FK_cd_character_allergies_cdprofile_cdprofile_id",
column: x => x.cdprofile_id,
principalTable: "cdprofile",
principalColumn: "cdprofile_id",
onDelete: ReferentialAction.Cascade);
});

migrationBuilder.CreateIndex(
name: "IX_cd_character_allergies_cdprofile_id_allergen",
table: "cd_character_allergies",
columns: new[] { "cdprofile_id", "allergen" });
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "cd_character_allergies");
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these database migration files should be deleted and re-created by running the add_migration.sh script in Content.Server.Database since they don't match our db model

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I did it right? not 100% certain, but I did run the script after deleting those.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't delete the old ones, e.g. this one (20250609134446_CDAllergies.cs) is still here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Third time is the charm? I hope?

ScarlettJFG and others added 5 commits March 21, 2026 17:08
@github-actions github-actions bot added size/L and removed size/XL labels Mar 21, 2026
@SyaoranFox SyaoranFox added the DO NOT MERGE Mrrow mrrp label Mar 22, 2026
@SyaoranFox
Copy link
Contributor

When the repo was updated, there was a database conflict. Recommendation that the changes are implemented into a fresh branch to see if the issue is still present. This PR is DNM for now.

@Arbitrated
Copy link

Hmmm we checked in the original GitHub for CD, and we're wondering if this is relevant: cosmatic-drift-14/cosmatic-drift#727

We don't know anything worthwhile about code or databases, but this might have been from the same issue?

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.

5 participants