-
Notifications
You must be signed in to change notification settings - Fork 110
Ивентовый контент NDA/Terror spider #571
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
Fredik21-git
wants to merge
14
commits into
imperial-space:develop
Choose a base branch
from
Fredik21-git:develop
base: develop
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.
+11,418
−598
Open
Changes from 6 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6fb420f
Контент...
Fredik21 613775b
фикс
Fredik21 948c869
фикс1
Fredik21 1d35092
фикс2
Fredik21 d905222
фикс3
Fredik21 ad28bea
фикс4
Fredik21 446f8d6
фикс5
Fredik21 6488005
фикс6: armor modifiers rusar/guardian 0.60.75/1.11.25, remove UwU web…
Fredik21 d42a079
фикс7: TerrorSpiderArmor - switch from BeforeDamageChangedEvent to Da…
Fredik21 a8ddc6d
фикс8: DamageModifyEvent handler needs ref
Fredik21 52e75c2
DeadSector: add DeadSectorPoisonWater entity with bubble sprite overl…
Fredik21 6946fc4
DeadSector: water - DamageContacts instead of StepTrigger/Puddle, add…
Fredik21 aa2ec81
DeadSector: water - add IconSmooth (Corners mode) for seamless tiling
Fredik21 adcc81d
DeadSector: water - fix ERROR sprite, add main sprite RSI for IconSmooth
Fredik21 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
Content.Server/Imperial/SCP/SCP008/Components/SCP008InfectionAuraComponent.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,37 @@ | ||
| // usings moved to file-level globals; removed unused using | ||
|
|
||
| namespace Content.Server.Imperial.SCP.SCP008.Components; | ||
|
|
||
| [RegisterComponent] | ||
| public sealed partial class SCP008InfectionAuraComponent : Component | ||
| { | ||
| [DataField("radius")] | ||
| public float Radius = 8f; | ||
|
|
||
| [DataField("zombifyDelay")] | ||
| public TimeSpan ZombifyDelay = TimeSpan.FromSeconds(12); | ||
|
|
||
| [DataField("updateInterval")] | ||
| public TimeSpan UpdateInterval = TimeSpan.FromSeconds(1); | ||
|
|
||
| [DataField("lookupFlags")] | ||
| public LookupFlags LookupFlags = LookupFlags.Dynamic; | ||
|
|
||
| [DataField("allowCritical")] | ||
| public bool AllowCritical = false; | ||
|
|
||
| [DataField("warningDelay")] | ||
| public TimeSpan WarningDelay = TimeSpan.FromSeconds(3); | ||
|
|
||
| [DataField("warningPopup")] | ||
| public LocId WarningPopup = "scp008-warning-popup"; | ||
|
|
||
| [ViewVariables] | ||
| public TimeSpan NextUpdate; | ||
|
|
||
| [ViewVariables] | ||
| public TimeSpan LastUpdate; | ||
|
|
||
| [ViewVariables] | ||
| public Dictionary<EntityUid, TimeSpan> ExposureTime = new(); | ||
| } |
119 changes: 119 additions & 0 deletions
119
Content.Server/Imperial/SCP/SCP008/Systems/SCP008InfectionAuraSystem.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,119 @@ | ||
| using Content.Server.Imperial.SCP.SCP008.Components; | ||
| using Content.Server.Zombies; | ||
| using Content.Shared.Mobs; | ||
| using Content.Shared.Mobs.Components; | ||
| using Content.Shared.Popups; | ||
| using Content.Shared.Zombies; | ||
| using Robust.Shared.Timing; | ||
| using Robust.Shared.Localization; | ||
|
|
||
| namespace Content.Server.Imperial.SCP.SCP008.Systems; | ||
|
|
||
| public sealed class SCP008InfectionAuraSystem : EntitySystem | ||
| { | ||
| private readonly HashSet<EntityUid> _reusableInRange = new(); | ||
| [Dependency] private readonly EntityLookupSystem _lookup = default!; | ||
| [Dependency] private readonly SharedPopupSystem _popup = default!; | ||
| [Dependency] private readonly ZombieSystem _zombie = default!; | ||
| [Dependency] private readonly IGameTiming _timing = default!; | ||
|
|
||
| public override void Initialize() | ||
| { | ||
| base.Initialize(); | ||
|
|
||
| SubscribeLocalEvent<SCP008InfectionAuraComponent, MapInitEvent>(OnMapInit); | ||
| SubscribeLocalEvent<SCP008InfectionAuraComponent, ComponentShutdown>(OnShutdown); | ||
| } | ||
|
|
||
| private void OnMapInit(Entity<SCP008InfectionAuraComponent> ent, ref MapInitEvent args) | ||
| { | ||
| ent.Comp.LastUpdate = _timing.CurTime; | ||
| ent.Comp.NextUpdate = _timing.CurTime + ent.Comp.UpdateInterval; | ||
| ent.Comp.ExposureTime.Clear(); | ||
| } | ||
|
|
||
| private void OnShutdown(Entity<SCP008InfectionAuraComponent> ent, ref ComponentShutdown args) | ||
| { | ||
| ent.Comp.ExposureTime.Clear(); | ||
| } | ||
|
|
||
| public override void Update(float frameTime) | ||
| { | ||
| base.Update(frameTime); | ||
|
|
||
| var curTime = _timing.CurTime; | ||
| var query = EntityQueryEnumerator<SCP008InfectionAuraComponent>(); | ||
|
|
||
| while (query.MoveNext(out var uid, out var comp)) | ||
| { | ||
| if (comp.NextUpdate > curTime) | ||
| continue; | ||
|
|
||
| var elapsed = curTime - comp.LastUpdate; | ||
| comp.LastUpdate = curTime; | ||
| comp.NextUpdate = curTime + comp.UpdateInterval; | ||
|
|
||
| if (elapsed <= TimeSpan.Zero) | ||
| continue; | ||
|
|
||
| _reusableInRange.Clear(); | ||
| var nearbyEntities = _lookup.GetEntitiesInRange(uid, comp.Radius, comp.LookupFlags); | ||
|
|
||
| foreach (var target in nearbyEntities) | ||
| { | ||
| if (target == uid) | ||
| continue; | ||
|
|
||
| if (!TryComp<MobStateComponent>(target, out var mobState)) | ||
| continue; | ||
|
|
||
| var validState = mobState.CurrentState == MobState.Alive || | ||
| (comp.AllowCritical && mobState.CurrentState == MobState.Critical); | ||
|
|
||
| if (!validState) | ||
| continue; | ||
|
|
||
| if (HasComp<ZombieComponent>(target) || HasComp<ZombieImmuneComponent>(target)) | ||
| continue; | ||
|
|
||
| _reusableInRange.Add(target); | ||
|
|
||
| var totalExposure = elapsed; | ||
| var previousExposure = TimeSpan.Zero; | ||
| if (comp.ExposureTime.TryGetValue(target, out var existingExposure)) | ||
| { | ||
| previousExposure = existingExposure; | ||
| totalExposure += previousExposure; | ||
| } | ||
|
|
||
| var warningStart = comp.ZombifyDelay - comp.WarningDelay; | ||
| if (warningStart < TimeSpan.Zero) | ||
| warningStart = TimeSpan.Zero; | ||
|
|
||
| if (previousExposure < warningStart && totalExposure >= warningStart && totalExposure < comp.ZombifyDelay) | ||
| _popup.PopupEntity(Loc.GetString(comp.WarningPopup), target, target, PopupType.MediumCaution); | ||
|
|
||
| if (totalExposure >= comp.ZombifyDelay) | ||
| { | ||
| _zombie.ZombifyEntity(target, mobState); | ||
| comp.ExposureTime.Remove(target); | ||
| continue; | ||
| } | ||
|
|
||
| comp.ExposureTime[target] = totalExposure; | ||
| } | ||
|
|
||
| var toRemove = new List<EntityUid>(); | ||
| foreach (var (tracked, _) in comp.ExposureTime) | ||
| { | ||
| if (!_reusableInRange.Contains(tracked)) | ||
| toRemove.Add(tracked); | ||
| } | ||
|
|
||
| foreach (var tracked in toRemove) | ||
| { | ||
| comp.ExposureTime.Remove(tracked); | ||
| } | ||
| } | ||
| } | ||
| } |
73 changes: 73 additions & 0 deletions
73
Content.Server/Imperial/SCP/SCP096/Components/SCP096RageOnLookComponent.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,73 @@ | ||
| using Robust.Shared.Audio; | ||
|
|
||
| namespace Content.Server.Imperial.SCP.SCP096.Components; | ||
|
|
||
| [RegisterComponent] | ||
| public sealed partial class SCP096RageOnLookComponent : Component | ||
| { | ||
| [DataField("observeRadius")] | ||
| public float ObserveRadius = 9f; | ||
|
|
||
| [DataField("minLookDot")] | ||
| public float MinLookDot = 0.42f; | ||
|
|
||
| [DataField("requireUnobstructed")] | ||
| public bool RequireUnobstructed = true; | ||
|
|
||
| [DataField("enragedWalkModifier")] | ||
| public float EnragedWalkModifier = 1.7f; | ||
|
|
||
| [DataField("enragedSprintModifier")] | ||
| public float EnragedSprintModifier = 1.7f; | ||
|
|
||
| [DataField("enragedAttackRate")] | ||
| public float EnragedAttackRate = 1.7f; | ||
|
|
||
| [DataField("calmAttackRate")] | ||
| public float CalmAttackRate = 1.0f; | ||
|
|
||
| [DataField("rageWindup")] | ||
| public TimeSpan RageWindup = TimeSpan.FromSeconds(10); | ||
|
|
||
| [DataField("rageDuration")] | ||
| public TimeSpan RageDuration = TimeSpan.FromSeconds(120); | ||
|
|
||
| [DataField("rageWindupPopup")] | ||
| public LocId RageWindupPopup = "scp096-rage-windup-popup"; | ||
|
|
||
| [DataField("ragePopup")] | ||
| public LocId RagePopup = "scp096-rage-popup"; | ||
|
|
||
| [DataField("rageCalmPopup")] | ||
| public LocId RageCalmPopup = "scp096-rage-calm-popup"; | ||
|
|
||
| [DataField("rageSound")] | ||
| public SoundSpecifier RageSound = new SoundPathSpecifier("/Audio/Voice/Human/malescream_1.ogg"); | ||
|
|
||
| [DataField("cryingSound")] | ||
| public SoundSpecifier CryingSound = new SoundPathSpecifier("/Audio/Voice/Human/cry_male_1.ogg"); | ||
|
|
||
| [DataField("rageLoopSound")] | ||
| public SoundSpecifier RageLoopSound = new SoundPathSpecifier("/Audio/Ambience/Objects/anomaly_generator_ambi.ogg"); | ||
|
|
||
| [ViewVariables] | ||
| public bool IsEnraged; | ||
|
|
||
| [ViewVariables] | ||
| public bool IsRageWindup; | ||
|
|
||
| [ViewVariables] | ||
| public TimeSpan RageWindupEndTime; | ||
|
|
||
| [ViewVariables] | ||
| public TimeSpan RageEndTime; | ||
|
|
||
| [ViewVariables] | ||
| public bool UsingRageLoopSound; | ||
|
|
||
| [ViewVariables] | ||
| public float? OriginalAttackRate; | ||
|
|
||
| [ViewVariables] | ||
| public HashSet<EntityUid> RageTargets = new(); | ||
| } | ||
6 changes: 6 additions & 0 deletions
6
Content.Server/Imperial/SCP/SCP096/Components/SCP096RageSuppressorComponent.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,6 @@ | ||
| namespace Content.Server.Imperial.SCP.SCP096.Components; | ||
|
|
||
| [RegisterComponent] | ||
| public sealed partial class SCP096RageSuppressorComponent : Component | ||
| { | ||
| } |
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.
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.
RageLoopSoundпо умолчанию использует звук генератора аномалий — вероятно, заглушка./Audio/Ambience/Objects/anomaly_generator_ambi.ogg— это эмбиент генератора аномалий, не связанный с SCP-096. Если это временный звук-заглушка, стоит заменить его на соответствующий аудиоресурс SCP-096 или оставить комментарий о намеренном использовании.🤖 Prompt for AI Agents