From 2454da3e8def8053addaf7541885e1d147508c04 Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Fri, 19 Jul 2024 15:52:56 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=BC=D0=BD=D0=BE=D0=B3=D0=BE=20?= =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D0=B9=20(#463)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Git Taburet * Git Taburet2 * fix conflict --- .../_White/Wizard/WizardRuleSystem.cs | 35 +++++++++++-------- Content.Shared/Prying/Systems/PryingSystem.cs | 9 +++-- .../Components/ToolTileCompatibleComponent.cs | 2 +- .../ru-RU/interaction/offer-item-system.ftl | 6 ++-- 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/Content.Server/_White/Wizard/WizardRuleSystem.cs b/Content.Server/_White/Wizard/WizardRuleSystem.cs index 60b1e3bb92..170e1a3b54 100644 --- a/Content.Server/_White/Wizard/WizardRuleSystem.cs +++ b/Content.Server/_White/Wizard/WizardRuleSystem.cs @@ -283,30 +283,35 @@ public sealed class WizardRuleSystem : GameRuleSystem private HumanoidCharacterProfile SetupWizardEntity( EntityUid mob, StartingGearPrototype gear, - bool endRoundOnDeath) + bool endRoundOnDeath, + bool randomPtofile = true) { EnsureComp(mob, out var component); component.EndRoundOnDeath = endRoundOnDeath; EnsureComp(mob).AntagonistPrototype = "globalAntagonistWizard"; - var random = IoCManager.Resolve(); - var profile = HumanoidCharacterProfile.RandomWithSpecies().WithAge(random.Next(component.MinAge, component.MaxAge)); + if (randomPtofile) + { + var random = IoCManager.Resolve(); + var profile = HumanoidCharacterProfile.RandomWithSpecies() + .WithAge(random.Next(component.MinAge, component.MaxAge)); - var color = Color.FromHex(GetRandom(component.Color, "#B5B8B1")); - var hair = GetRandom(component.Hair, "HumanHairAfricanPigtails"); - var facialHair = GetRandom(component.FacialHair, "HumanFacialHairAbe"); - profile = profile.WithCharacterAppearance( - profile.WithCharacterAppearance( + var color = Color.FromHex(GetRandom(component.Color, "#B5B8B1")); + var hair = GetRandom(component.Hair, "HumanHairAfricanPigtails"); + var facialHair = GetRandom(component.FacialHair, "HumanFacialHairAbe"); + profile = profile.WithCharacterAppearance( profile.WithCharacterAppearance( - profile.WithCharacterAppearance( - profile.Appearance.WithHairStyleName(hair)) - .Appearance.WithFacialHairStyleName(facialHair)) - .Appearance.WithHairColor(color)) - .Appearance.WithFacialHairColor(color)); + profile.WithCharacterAppearance( + profile.WithCharacterAppearance( + profile.Appearance.WithHairStyleName(hair)) + .Appearance.WithFacialHairStyleName(facialHair)) + .Appearance.WithHairColor(color)) + .Appearance.WithFacialHairColor(color)); - _humanoid.LoadProfile(mob, profile); + _humanoid.LoadProfile(mob, profile); - _metaData.SetEntityName(mob, GetRandom(component.Name, "")); + _metaData.SetEntityName(mob, GetRandom(component.Name, "")); + } _stationSpawning.EquipStartingGear(mob, gear); diff --git a/Content.Shared/Prying/Systems/PryingSystem.cs b/Content.Shared/Prying/Systems/PryingSystem.cs index 69a63f72b5..aefec3e211 100644 --- a/Content.Shared/Prying/Systems/PryingSystem.cs +++ b/Content.Shared/Prying/Systems/PryingSystem.cs @@ -99,7 +99,7 @@ public sealed class PryingSystem : EntitySystem // to be marked as handled. return true; - return StartPry(target, user, null, 0.1f, out id); // hand-prying is much slower + return StartPry(target, user, null, 10f, out id); // hand-prying is much slower } private bool CanPry(EntityUid target, EntityUid user, out string? message, PryingComponent? comp = null) @@ -133,7 +133,10 @@ public sealed class PryingSystem : EntitySystem var modEv = new GetPryTimeModifierEvent(user); RaiseLocalEvent(target, ref modEv); - var doAfterArgs = new DoAfterArgs(EntityManager, user, TimeSpan.FromSeconds(modEv.BaseTime * modEv.PryTimeModifier / toolModifier), new DoorPryDoAfterEvent(), target, target, tool) + + var time = TimeSpan.FromSeconds(!TryComp(target, out var airlock) || !airlock.Powered ? 0 : modEv.BaseTime * modEv.PryTimeModifier * toolModifier); // WD EDIT + + var doAfterArgs = new DoAfterArgs(EntityManager, user, time, new DoorPryDoAfterEvent(), target, target, tool) { BreakOnDamage = true, BreakOnMove = true, @@ -166,7 +169,7 @@ public sealed class PryingSystem : EntitySystem return; } - if (args.Used != null && comp != null) + if (args.Used != null && comp != null && door.State is not DoorState.Closing and not DoorState.Opening) { _audioSystem.PlayPredicted(comp.UseSound, args.Used.Value, args.User); } diff --git a/Content.Shared/Tools/Components/ToolTileCompatibleComponent.cs b/Content.Shared/Tools/Components/ToolTileCompatibleComponent.cs index caac41a3de..679ad424ee 100644 --- a/Content.Shared/Tools/Components/ToolTileCompatibleComponent.cs +++ b/Content.Shared/Tools/Components/ToolTileCompatibleComponent.cs @@ -18,7 +18,7 @@ public sealed partial class ToolTileCompatibleComponent : Component /// The time it takes to modify the tile. /// [DataField, ViewVariables(VVAccess.ReadWrite)] - public TimeSpan Delay = TimeSpan.FromSeconds(1); + public TimeSpan Delay = TimeSpan.FromSeconds(0); /// /// Whether or not the tile being modified must be unobstructed diff --git a/Resources/Locale/ru-RU/interaction/offer-item-system.ftl b/Resources/Locale/ru-RU/interaction/offer-item-system.ftl index 737cff1539..aaf864c30b 100644 --- a/Resources/Locale/ru-RU/interaction/offer-item-system.ftl +++ b/Resources/Locale/ru-RU/interaction/offer-item-system.ftl @@ -2,8 +2,8 @@ offer-item-empty-hand = У тебя в руках нет ничего, что т offer-item-full-hand = Ваша рука занята offer-item-try-give = Вы предлагаете {$item} {$target} offer-item-try-give-target = {$user} предлагает вам {$item} -offer-item-give = Вы передали {THE($item)} {$target} +offer-item-give = Вы передали {$item} {$target} offer-item-give-other = {$user} передал {$item} {$target} -offer-item-give-target = {$user} передал вам ($item) +offer-item-give-target = {$user} передал вам {$item} offer-item-no-give = Вы прекращаете предлагать {$item} {$target} -offer-item-no-give-target = {$user} прекращает предлагать вам ($item) \ No newline at end of file +offer-item-no-give-target = {$user} прекращает предлагать вам {$item} \ No newline at end of file