Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anomalous infections #31876

Merged
merged 57 commits into from
Sep 17, 2024
Merged

Conversation

TheShuEd
Copy link
Member

@TheShuEd TheShuEd commented Sep 5, 2024

About the PR

If you've ever wanted to play as a sentient anomaly, that time is now!

Added new types of anomalies - “Anomalous Injectors”, which are completely invisible zones that can appear at random points on the station. When someone touches this zone, they become infected, and literally become the anomaly incarnate

Added (almost) all transformations to anomalies. Each one has its own unique visual, strongly distinguishing the “infected” character, mostly with glowing eyes and all sorts of decorative details. Examples:

Анимация11
Анимация12
Анимация13

Once infected with an anomaly, the character gains most of its properties, as well as the ability to manually activate the pulsation early. But, human bodies are not adapted to anomalous conditions: All of these properties will damage and hinder both those around them and the host himself.

All pulse and explosion anomaly effects are attenuated by 0.5x
But the number of points generated is increased by 1.5x times

the idea is that anomalies are not superpowers. It's an infection that harms the host, but is still somewhat profitable to maintain, due to the generation of science points.

Being an anomaly, all relevant mechanics start working with you:

  • You can be scanned with an anomaly scanner.
  • You can be tethered to a vessel and generate points.
  • You can be bombarded with APEs to affect your anomaly parameters.
  • You can get random behaviors including invisibility, or a reflective barrier

If you die, anomaly instantly decays, you are cleansed
If the anomaly decays, you are cleansed
If the anomaly explodes, your body gibbed.

Technical details

The whole system is fairly generic, and the anomaly code is pretty much untouched. Everything is tied to adding and removing certain components from an entity.

Media

2024-09-05.23-02-47.mp4

Requirements

  • I have read and I am following the Pull Request Guidelines. I understand that not doing so may get my pr closed at maintainer’s discretion
  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog
🆑

  • add: Anomalous infections added! People can now be infected by anomalies! This allows you to use abnormal abilities, but can easily kill the host. To cure them, bombard them with containment particles, because if the anomaly inside them explodes, their bodies will be gibbed....
  • tweak: Flesh anomaly resprite
  • fix: anomalies now disconnect from the anomaly synchronizer if they are too far away from it.

@github-actions github-actions bot added Status: Needs Review This PR requires new reviews before it can be merged. Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. labels Sep 5, 2024
Copy link
Contributor

github-actions bot commented Sep 5, 2024

RSI Diff Bot; head commit b6dd24a merging into 3b2fc54
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Structures/Specific/anomaly.rsi

State Old New Status
anom5-pulse Modified
anom5 Modified

Resources/Textures/Structures/Specific/Anomalies/inner_anom_layer.rsi

State Old New Status
bluespace Added
bluespace_VOX Added
fire Added
fire_VOX Added
flesh Added
flesh_VOX Added
flora Added
flora_VOX Added
frost Added
frost_VOX Added
grav Added
grav_VOX Added
rock Added
rock_VOX Added
shadow Added
shadow_VOX Added
shock Added
shock_VOX Added
tech Added
tech_VOX Added

Edit: diff updated after b6dd24a

@TheShuEd
Copy link
Member Author

TheShuEd commented Sep 5, 2024

TODO:

  • Rock anomaly
  • Grav anomaly
  • Tech Anomaly #31764
  • Anomaly synchonizer updating
  • Dying trigger anomaly decay
  • Add into Anomaly spawner
  • Displacement maps for Vox
  • FUCKING BUG that crash server on remove components

@TheShuEd
Copy link
Member Author

TheShuEd commented Sep 8, 2024

Ok, anomaly mobs now FRIENDS to anomaly host

@Kadeo64
Copy link
Contributor

Kadeo64 commented Sep 8, 2024

Ok, anomaly mobs now FRIENDS to anomaly host

devious shenanigans brewing

@Plykiya
Copy link
Contributor

Plykiya commented Sep 8, 2024

Consider not having it do that

getting gibbed for not cooperating with science is based

Comment on lines +112 to +124

private void OnStartCollideInjector(Entity<InnerBodyAnomalyInjectorComponent> ent, ref StartCollideEvent args)
{
if (ent.Comp.Whitelist is not null && !_whitelist.IsValid(ent.Comp.Whitelist, args.OtherEntity))
return;
if (TryComp<InnerBodyAnomalyComponent>(args.OtherEntity, out var innerAnom) && innerAnom.Injected)
return;
if (!_mind.TryGetMind(args.OtherEntity, out _, out var mindComponent))
return;

EntityManager.AddComponents(args.OtherEntity, ent.Comp.InjectionComponents);
QueueDel(ent);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding components during eventbus can easily break things and should be deferred.

Copy link
Member Author

Choose a reason for hiding this comment

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

image

Comment on lines +203 to +214

private void OnAnomalyShutdown(Entity<InnerBodyAnomalyComponent> ent, ref AnomalyShutdownEvent args)
{
RemoveAnomalyFromBody(ent);
RemCompDeferred<InnerBodyAnomalyComponent>(ent);
}

private void OnCompShutdown(Entity<InnerBodyAnomalyComponent> ent, ref ComponentShutdown args)
{
RemoveAnomalyFromBody(ent);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

Comment on lines +6 to +21

/// <summary>
/// On contact with an entity, if it meets the conditions, it will transfer the specified components to it
/// </summary>
[RegisterComponent, Access(typeof(SharedInnerBodyAnomalySystem))]
public sealed partial class InnerBodyAnomalyInjectorComponent : Component
{
[DataField]
public EntityWhitelist? Whitelist;

/// <summary>
/// components that will be automatically removed after “curing”
/// </summary>
[DataField(required: true)]
public ComponentRegistry InjectionComponents = default!;
}
Copy link
Contributor

@metalgearsloth metalgearsloth Sep 11, 2024

Choose a reason for hiding this comment

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

This should be relying upon contact events instead like forensics.

Copy link
Member Author

@TheShuEd TheShuEd Sep 12, 2024

Choose a reason for hiding this comment

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

no!

Copy link
Contributor

@metalgearsloth metalgearsloth left a comment

Choose a reason for hiding this comment

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

uhh it's prolly fine.

@TheShuEd TheShuEd merged commit 92be69a into space-wizards:master Sep 17, 2024
13 checks passed
@SoulFN
Copy link
Contributor

SoulFN commented Sep 17, 2024

Finally, it's merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. Status: Needs Review This PR requires new reviews before it can be merged. Undergoing Maintainer Discussion This PR is currently going through the 72-hour discussion window as per maintainer policy
Projects
None yet
Development

Successfully merging this pull request may close these issues.