-
-
Notifications
You must be signed in to change notification settings - Fork 10
[ADD]New antagonist - Blood Worm #400
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
Open
Gorox221
wants to merge
12
commits into
ss14-ganimed:master
Choose a base branch
from
Gorox221:bloodworm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3b8e9dd
РП черви
Gorox221 4e0f56b
Допил
Gorox221 94d6a2c
Допил
Gorox221 de1ddbf
Вызов червей при помощи взлома ниндзяго
Gorox221 f7155b5
Фиксик
Gorox221 68d2c3d
Фиксы
Gorox221 dd8ddf3
Новые цели
Gorox221 6a6b9a1
Фикс
Gorox221 57c4ef2
фикс
Gorox221 e4ae691
Фикс цели на командование
Gorox221 2369f0e
Фикс спавна гост ролей
Gorox221 68c0010
Покидание хоста при реагентах
Gorox221 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
Content.Client/ADT/BloodWorm/BloodWormResourceAlertSystem.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| using Content.Shared._Ganimed.BloodWorm.Components; | ||
| using Content.Shared.Alert.Components; | ||
|
|
||
| namespace Content.Client._Ganimed.BloodWorm; | ||
|
|
||
| public sealed class BloodWormResourceAlertSystem : EntitySystem | ||
| { | ||
| public override void Initialize() | ||
| { | ||
| base.Initialize(); | ||
| SubscribeLocalEvent<BloodWormResourceComponent, GetGenericAlertCounterAmountEvent>(OnGetCounterAmount); | ||
| } | ||
|
|
||
| private void OnGetCounterAmount(Entity<BloodWormResourceComponent> ent, ref GetGenericAlertCounterAmountEvent args) | ||
| { | ||
| if (args.Alert.ID != ent.Comp.BloodAlert) | ||
| return; | ||
|
|
||
| args.Amount = ent.Comp.BloodAmount; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| using Content.Shared._Ganimed.BloodWorm.Components; | ||
| using Content.Shared.Antag; | ||
| using Content.Shared.StatusIcon; | ||
| using Content.Shared.StatusIcon.Components; | ||
| using Robust.Client.Player; | ||
| using Robust.Shared.Prototypes; | ||
|
|
||
| namespace Content.Client._Ganimed.BloodWorm; | ||
|
|
||
| public sealed class BloodWormStatusIconSystem : EntitySystem | ||
| { | ||
| [Dependency] private readonly IPrototypeManager _prototype = default!; | ||
| [Dependency] private readonly IPlayerManager _player = default!; | ||
|
|
||
| public override void Initialize() | ||
| { | ||
| base.Initialize(); | ||
| SubscribeLocalEvent<BloodWormInfectedComponent, GetStatusIconsEvent>(OnGetStatusIcons); | ||
| } | ||
|
|
||
| private void OnGetStatusIcons(Entity<BloodWormInfectedComponent> ent, ref GetStatusIconsEvent args) | ||
| { | ||
| var viewer = _player.LocalEntity; | ||
| if (viewer == null) | ||
| return; | ||
|
|
||
| if (!HasComp<ShowAntagIconsComponent>(viewer.Value) && !HasComp<BloodWormResourceComponent>(viewer.Value)) | ||
| return; | ||
|
|
||
| args.StatusIcons.Add(_prototype.Index(ent.Comp.StatusIcon)); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
Content.Server/_Ganimed/BloodWorm/Components/BloodWormComponent.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| using Content.Shared.Chemistry.Reagent; | ||
| using Robust.Shared.Prototypes; | ||
| using Content.Shared.DoAfter; | ||
| using Robust.Shared.Audio; | ||
|
|
||
| namespace Content.Server._Ganimed.BloodWorm.Components; | ||
|
|
||
| public enum BloodWormStage : byte | ||
| { | ||
| Cocoon, | ||
| Hatchling, | ||
| Juvenile, | ||
| Adult | ||
| } | ||
|
|
||
| [RegisterComponent] | ||
| public sealed partial class BloodWormComponent : Component | ||
| { | ||
| [DataField] | ||
| public BloodWormStage Stage = BloodWormStage.Hatchling; | ||
|
|
||
| [DataField] | ||
| public float BloodResource = 80f; | ||
|
|
||
| [DataField] | ||
| public float MaxBloodResource = 80f; | ||
|
|
||
| [DataField] | ||
| public float ConsumedBlood = 0f; | ||
|
|
||
| [DataField] | ||
| public float SyntheticBloodConsumed = 0f; | ||
|
|
||
| [DataField] | ||
| public float MaxSyntheticBloodGain = 1000f; | ||
|
|
||
| [DataField] | ||
| public float SyntheticEfficiency = 0.7f; | ||
|
|
||
| [DataField] | ||
| public float HatchlingMatureThreshold = 500f; | ||
|
|
||
| [DataField] | ||
| public float JuvenileMatureThreshold = 1500f; | ||
|
|
||
| [DataField] | ||
| public float EjectThresholdRatio = 0.1f; | ||
|
|
||
| /// <summary> | ||
| /// If the host has ALL of these reagents in their bloodstream, | ||
| /// the worm will automatically leave the host. | ||
| /// </summary> | ||
| [DataField] | ||
| public List<ProtoId<ReagentPrototype>> LeaveHostReagents = new(); | ||
|
|
||
| [DataField] | ||
| public float HostDrainPerSecond = 14f; | ||
|
|
||
| [DataField] | ||
| public float HostBleedDamageMultiplier = 4f; | ||
|
|
||
| [DataField] | ||
| public float RegenPerSecond = 0.3f; | ||
|
|
||
| [DataField] | ||
| public EntityUid? Host; | ||
|
|
||
| [DataField] | ||
| public string HostContainerId = "blood-worm"; | ||
|
|
||
| [DataField] | ||
| public EntProtoId? LeechAction = "ActionBloodWormLeechHatchling"; | ||
|
|
||
| [DataField] | ||
| public EntProtoId? InvadeAction = "ActionBloodWormInvade"; | ||
|
|
||
| [DataField] | ||
| public EntProtoId? SpitAction; | ||
|
|
||
| [DataField] | ||
| public EntProtoId? MatureAction = "ActionBloodWormMature"; | ||
|
|
||
| [DataField] | ||
| public EntProtoId? InjectAction; | ||
|
|
||
| [DataField] | ||
| public EntProtoId? LeaveHostAction = "ActionBloodWormLeaveHost"; | ||
|
|
||
| [DataField] | ||
| public EntProtoId? ReviveHostAction; | ||
|
|
||
| [DataField] | ||
| public EntProtoId SpitProjectile = "BulletAcid"; | ||
|
|
||
| [DataField] | ||
| public float SpitProjectileSpeed = 18f; | ||
|
|
||
| [DataField] | ||
| public EntProtoId? CocoonHatchPrototype; | ||
|
|
||
| [DataField] | ||
| public float CocoonHatchDelay = 30f; | ||
|
|
||
| [DataField] | ||
| public int CocoonSpawnHatchlings = 0; | ||
|
|
||
| [DataField] | ||
| public bool CocoonResetProgress = false; | ||
|
|
||
| public float CocoonAccumulator = 0f; | ||
|
|
||
| public EntityUid? LeechActionEntity; | ||
| public EntityUid? InvadeActionEntity; | ||
| public EntityUid? SpitActionEntity; | ||
| public EntityUid? MatureActionEntity; | ||
|
|
||
| public DoAfterId? LeechDoAfter; | ||
|
|
||
| [DataField] | ||
| public SoundSpecifier EnterHostSound = new SoundPathSpecifier("/Audio/Weapons/Xeno/alien_claw_flesh2.ogg"); | ||
|
|
||
| [DataField] | ||
| public SoundSpecifier LeaveHostSound = new SoundPathSpecifier("/Audio/Effects/gib2.ogg"); | ||
|
|
||
| [DataField] | ||
| public SoundSpecifier SpitSound = new SoundPathSpecifier("/Audio/Weapons/Xeno/alien_spitacid.ogg"); | ||
|
|
||
| [DataField] | ||
| public SoundSpecifier CocoonFormSound = new SoundPathSpecifier("/Audio/Effects/Chemistry/bubbles.ogg"); | ||
|
|
||
| [DataField] | ||
| public SoundSpecifier CocoonHatchSound = new SoundPathSpecifier("/Audio/Effects/gib1.ogg"); | ||
|
|
||
| [DataField] | ||
| public SoundSpecifier LeechTickSound = new SoundPathSpecifier("/Audio/Effects/Fluids/slosh.ogg"); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.