-
-
Notifications
You must be signed in to change notification settings - Fork 64
Добавление нового объекта 933. Его механики #954
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
helper342
wants to merge
33
commits into
space-sunrise:master
Choose a base branch
from
helper342:933-tape-test
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
33 commits
Select commit
Hold shift + click to select a range
a3f6911
Refactor code structure for improved readability and maintainability
helper342 721fd35
Merge pull request #1 from helper342/scp933-fix
helper342 c1a542c
Refactor SCP-933 master system to improve interaction mechanics and l…
helper342 971d50b
Merge pull request #2 from helper342/cursor/scp-933-victims-d9b6c
helper342 f4ce127
933 is better
helper342 c85f607
933 is better
helper342 b53b211
Merge pull request #3 from helper342/cursor/scp-933-victims-d9b6c
helper342 3fa2034
Merge branch 'space-sunrise:master' into master
helper342 37b2e96
SCP-933: face-torn victims instead of controlled slaves
helper342 e7408d8
Merge branch 'space-sunrise:master' into cursor/scp-933-victims-d9b6c
helper342 df2813c
Update scp-posters RSI meta.json
helper342 8596770
Remove mistaken Scp9332 slave/NPC stub (wrong folder)
helper342 da5cd65
Merge origin/master into cursor/scp-933-victims-d9b6c
helper342 ee40894
Merge pull request #4 from helper342/cursor/scp-933-victims-d9b6c
helper342 db00a7b
Merge branch 'space-sunrise:master' into master
helper342 177055e
Refactor Scp933MasterSystem to implement full SCP-933 tape functional…
helper342 b14b685
Merge pull request #5 from helper342/933-tape-test
helper342 c07a913
Merge branch 'master' into 933-tape-test
helper342 94bfbbc
КомитН2
helper342 93ecfe0
КомитН2.1
helper342 4f9ccd4
Merge branch 'space-sunrise:master' into master
helper342 e9809f7
Merge branch '933-tape-test' of github.com:helper342/fire-station1984…
helper342 10574a0
Merge branch 'space-sunrise:master' into 933-tape-test
helper342 d7283bf
Merge branch 'master' into 933-tape-test
helper342 4a4248b
Update Content.Shared/_Scp/Scp933/Scp933MasterSystem.cs
helper342 69e73a9
commitv7
helper342 e176eb3
коммитик
helper342 939d39e
Merge branch '933-tape-test' of github.com:helper342/fire-station1984…
helper342 a6cb491
КоммитН8
helper342 041462c
Коммит8.1
helper342 442f10b
коммитфикс8
helper342 ba0fa81
коммитфикс8.1
helper342 3e74a63
Merge branch 'master' into 933-tape-test
helper342 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
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,57 @@ | ||
| using Content.Shared._Scp.Scp933; | ||
| using Content.Shared.Damage.Components; | ||
| using Content.Shared.Damage; | ||
| using Content.Shared.Damage.Systems; | ||
| using Content.Shared.FixedPoint; | ||
| using Content.Shared.Mobs; | ||
| using Content.Shared.Mobs.Components; | ||
| using Content.Shared.Mobs.Systems; | ||
| using Content.Shared.Weapons.Melee; | ||
|
|
||
| namespace Content.Server._Scp.Scp933; | ||
|
|
||
| public sealed class Scp933MasterSystem : SharedScp933MasterSystem | ||
| { | ||
| [Dependency] private readonly DamageableSystem _damageable = default!; | ||
| [Dependency] private readonly MobThresholdSystem _mobThresholds = default!; | ||
| public bool HasAnyScp933Host() | ||
| { | ||
| var query = EntityQueryEnumerator<Scp933MasterComponent>(); | ||
| return query.MoveNext(out _, out _); | ||
| } | ||
|
|
||
| public void ApplyHostBuffs(EntityUid uid) | ||
| { | ||
| if (!TryComp<Scp933MasterComponent>(uid, out var master)) | ||
| return; | ||
|
|
||
| if (master.HealOnHostBecoming) | ||
| { | ||
| if (HasComp<DamageableComponent>(uid)) | ||
| _damageable.SetAllDamage(uid, FixedPoint2.Zero); | ||
|
|
||
| foreach (var victim in master.FaceTornVictims) | ||
| { | ||
| if (HasComp<DamageableComponent>(victim)) | ||
| _damageable.SetAllDamage(victim, FixedPoint2.Zero); | ||
| } | ||
| } | ||
|
|
||
| if (!TryComp<MobThresholdsComponent>(uid, out var thresholds)) | ||
| return; | ||
|
|
||
| // Target can be dead before ritual completes; explicitly allow revive transition. | ||
| _mobThresholds.SetAllowRevives(uid, master.AllowRevivesOnHost, thresholds); | ||
| _mobThresholds.SetMobStateThreshold(uid, master.AliveThreshold, MobState.Alive, thresholds); | ||
| _mobThresholds.SetMobStateThreshold(uid, master.CriticalThreshold, MobState.Critical, thresholds); | ||
| _mobThresholds.SetMobStateThreshold(uid, master.DeadThreshold, MobState.Dead, thresholds); | ||
| _mobThresholds.VerifyThresholds(uid, thresholds); | ||
|
|
||
| if (TryComp<MeleeWeaponComponent>(uid, out var melee)) | ||
| { | ||
| melee.Damage = new DamageSpecifier { DamageDict = { ["Blunt"] = master.HostBluntDamage } }; | ||
| Dirty(uid, melee); | ||
| } | ||
|
Comment on lines
+50
to
+54
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Сразу храни в компоненте DamageSpecifier, тогда будет ещё меньше хардкода и код лучше |
||
| } | ||
|
|
||
| } | ||
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.