-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Anomalous infections #31876
Conversation
RSI Diff Bot; head commit b6dd24a merging into 3b2fc54 Resources/Textures/Structures/Specific/anomaly.rsi
Resources/Textures/Structures/Specific/Anomalies/inner_anom_layer.rsi
|
TODO:
|
Ok, anomaly mobs now FRIENDS to anomaly host |
devious shenanigans brewing |
getting gibbed for not cooperating with science is based |
|
||
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); | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
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); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
|
||
/// <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!; | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this 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.
Finally, it's merged |
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:
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:
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
Changelog
🆑