From 4b7d5ff9f008aec7913d6d4afdca7eaf2212ab1f Mon Sep 17 00:00:00 2001 From: Hero010h <163765999+Hero010h@users.noreply.github.com> Date: Sun, 29 Dec 2024 17:01:52 +0300 Subject: [PATCH 01/13] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru-RU/construction/components/construction-component.ftl | 1 + Resources/Locale/ru-RU/locales-new/autotranslate-29.ftl | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Resources/Locale/ru-RU/construction/components/construction-component.ftl b/Resources/Locale/ru-RU/construction/components/construction-component.ftl index ac28d0c3ce..5a24167ecf 100644 --- a/Resources/Locale/ru-RU/construction/components/construction-component.ftl +++ b/Resources/Locale/ru-RU/construction/components/construction-component.ftl @@ -1,3 +1,4 @@ construction-component-to-create-header = Чтобы создать { $targetName }... node-machine = машину node-ripley = рипли +deconstruction-header-text = Чтобы разобрать... \ No newline at end of file diff --git a/Resources/Locale/ru-RU/locales-new/autotranslate-29.ftl b/Resources/Locale/ru-RU/locales-new/autotranslate-29.ftl index 173188e814..30884680ee 100644 --- a/Resources/Locale/ru-RU/locales-new/autotranslate-29.ftl +++ b/Resources/Locale/ru-RU/locales-new/autotranslate-29.ftl @@ -21,8 +21,8 @@ ent-GrapeSeeds = пакет виноградных косточек .desc = { ent-SeedBase.desc } ent-MopBucketFull = Ведро для мытья пола .desc = { ent-MopBucket.desc } -ent-WetFloorSignMineExplosive = табличка 'Мокрый пол' - .desc = Осторожность! Мокрый пол! +ent-WetFloorSignMineExplosive = знак "Мокрый пол" + .desc = Осторожно! Мокрый пол! ent-Plunger = вантуз .desc = Вантуз с красной пластиковой присоской и деревянной ручкой. Используется для прочистки стоков. ent-MegaSprayBottle = мега распылитель From 2945473db0d4ea6e0e4a998d5c79ca7b26d86b80 Mon Sep 17 00:00:00 2001 From: BIGZi0348 Date: Tue, 31 Dec 2024 13:58:00 +0300 Subject: [PATCH 02/13] Maybe --- .../PacifiedOnChaplainAction/PacifiedOnChaplainActionSystem.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Content.Server/_White/_Engi/PacifiedOnChaplainAction/PacifiedOnChaplainActionSystem.cs b/Content.Server/_White/_Engi/PacifiedOnChaplainAction/PacifiedOnChaplainActionSystem.cs index f86ca2054f..e5c6e8ae7b 100644 --- a/Content.Server/_White/_Engi/PacifiedOnChaplainAction/PacifiedOnChaplainActionSystem.cs +++ b/Content.Server/_White/_Engi/PacifiedOnChaplainAction/PacifiedOnChaplainActionSystem.cs @@ -32,6 +32,9 @@ namespace Content.Server._White._Engi.PacifiedOnChaplainAction private void Action(PacifiedOnChaplainActionComponent component, EntityUid target, EntityUid user) { + if (!HasComp(target)) + return; + var popup = ""; if (HasComp(target)) From 0cb6411c7add459208c7bc96b5f85a2d86598825 Mon Sep 17 00:00:00 2001 From: BIGZi0348 Date: Tue, 31 Dec 2024 17:27:15 +0300 Subject: [PATCH 03/13] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D0=BA=D0=B0=20=D1=80=D0=B0=D0=BD=D0=B4=D0=BE?= =?UTF-8?q?=D0=BC=D0=BD=D1=8B=D1=85=20=D0=B0=D1=80=D1=82=D0=B5=D1=84=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XenoArtifacts/ArtifactSystem.Nodes.cs | 67 ++++++++++++++++++- .../XenoArtifacts/ArtifactSystem.cs | 14 ++++ .../RandomArtifacts/RandomArtifactsSystem.cs | 22 ++++-- .../XenoArtifacts/ArtifactEffectPrototype.cs | 6 ++ .../XenoArch/Effects/normal_effects.yml | 18 +++++ .../XenoArch/Effects/utility_effects.yml | 11 +++ 6 files changed, 129 insertions(+), 9 deletions(-) diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs index 895bb0217b..9099d6d763 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs @@ -30,7 +30,7 @@ public sealed partial class ArtifactSystem _usedNodeIds.Clear(); - var uninitializedNodes = new List { new(){ Id = GetValidNodeId() } }; + var uninitializedNodes = new List { new() { Id = GetValidNodeId() } }; var createdNodes = 1; while (uninitializedNodes.Count > 0) @@ -50,7 +50,7 @@ public sealed partial class ArtifactSystem break; } - var child = new ArtifactNode {Id = GetValidNodeId(), Depth = node.Depth + 1}; + var child = new ArtifactNode { Id = GetValidNodeId(), Depth = node.Depth + 1 }; node.Edges.Add(child.Id); child.Edges.Add(node.Id); @@ -240,4 +240,67 @@ public sealed partial class ArtifactSystem { return nodes.First(x => x.Id == id); } + + /// + /// WD. + /// Generate an Artifact tree with fully developed nodes. + /// + private void GenerateSafeArtifactNodeTree(EntityUid artifact, List allNodes, int nodesToCreate) + { + if (nodesToCreate < 1) + { + Log.Error($"nodesToCreate {nodesToCreate} is less than 1. Aborting artifact tree generation."); + return; + } + + _usedNodeIds.Clear(); + + var uninitializedNodes = new List { new() { Id = GetValidNodeId() } }; + var createdNodes = 1; + + while (uninitializedNodes.Count > 0) + { + var node = uninitializedNodes[0]; + uninitializedNodes.Remove(node); + + node.Trigger = GetRandomTrigger(artifact, ref node); + node.Effect = GetSafeRandomEffect(artifact, ref node); + + var maxChildren = _random.Next(1, MaxEdgesPerNode - 1); + + for (var i = 0; i < maxChildren; i++) + { + if (nodesToCreate <= createdNodes) + { + break; + } + + var child = new ArtifactNode { Id = GetValidNodeId(), Depth = node.Depth + 1 }; + node.Edges.Add(child.Id); + child.Edges.Add(node.Id); + + uninitializedNodes.Add(child); + createdNodes++; + } + + allNodes.Add(node); + } + } + + /// + /// WD. + /// + private string GetSafeRandomEffect(EntityUid artifact, ref ArtifactNode node) + { + var allEffects = _prototype.EnumeratePrototypes() + .Where(x => (x.Whitelist?.IsValid(artifact, EntityManager) ?? true) && (!x.Blacklist?.IsValid(artifact, EntityManager) ?? true) && x.Safe).ToList(); + var validDepth = allEffects.Select(x => x.TargetDepth).Distinct().ToList(); + + var weights = GetDepthWeights(validDepth, node.Depth); + var selectedRandomTargetDepth = GetRandomTargetDepth(weights); + var targetEffects = allEffects + .Where(x => x.TargetDepth == selectedRandomTargetDepth).ToList(); + + return _random.Pick(targetEffects).ID; + } } diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs index a5469e93dc..253c42be03 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs @@ -295,4 +295,18 @@ public sealed partial class ArtifactSystem : EntitySystem { return allNodes.First(n => n.Depth == 0); } + + /// + /// WD. Randomize a given artifact. + /// + [PublicAPI] + public void SafeRandomizeArtifact(EntityUid uid, ArtifactComponent component) + { + component.NodesMax = 5; + var nodeAmount = _random.Next(component.NodesMin, component.NodesMax); + + GenerateSafeArtifactNodeTree(uid, component.NodeTree, nodeAmount); + var firstNode = GetRootNode(component.NodeTree); + EnterNode(uid, ref firstNode, component); + } } diff --git a/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs b/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs index 1ef1ac8f11..782b54ca79 100644 --- a/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs +++ b/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs @@ -3,6 +3,8 @@ using Content.Server.Station.Components; using Content.Server.Station.Systems; using Content.Server.Xenoarchaeology.XenoArtifacts; using Content.Shared._White; +using Content.Shared.Damage; +using Content.Shared.Stacks; using Content.Shared.Item; using Robust.Shared.Configuration; using Robust.Shared.Random; @@ -16,7 +18,7 @@ public sealed class RandomArtifactsSystem : EntitySystem [Dependency] private readonly IConfigurationManager _configurationManager = default!; [Dependency] private readonly StationSystem _station = default!; - private float _itemToArtifactRatio; // from 0 to 100. In % percents. Default is 0.7% + private float _itemToArtifactRatio; // from 0 to 100. In % percents. Default is 0.4% private bool _artifactsEnabled; public override void Initialize() @@ -34,11 +36,12 @@ public sealed class RandomArtifactsSystem : EntitySystem if (!_artifactsEnabled) return; - // Removing old artifact-items and replace it with new funny stealthy items - foreach (var oldArtifact in EntityQuery()) - { - QueueDel(oldArtifact.Owner); - } + // No we don't + // // Removing old artifact-items and replace it with new funny stealthy items + // foreach (var oldArtifact in EntityQuery()) + // { + // QueueDel(oldArtifact.Owner); + // } var items = EntityQuery().ToList(); _random.Shuffle(items); @@ -55,8 +58,13 @@ public sealed class RandomArtifactsSystem : EntitySystem if (!HasComp(station)) continue; + if (HasComp(entity)) + continue; + var artifactComponent = EnsureComp(entity); - _artifactsSystem.RandomizeArtifact(entity, artifactComponent); + _artifactsSystem.SafeRandomizeArtifact(entity, artifactComponent); + + EnsureComp(entity); } } diff --git a/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactEffectPrototype.cs b/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactEffectPrototype.cs index f3c3e6d470..933be64a79 100644 --- a/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactEffectPrototype.cs +++ b/Content.Shared/Xenoarchaeology/XenoArtifacts/ArtifactEffectPrototype.cs @@ -41,4 +41,10 @@ public sealed partial class ArtifactEffectPrototype : IPrototype [DataField("blacklist")] public EntityWhitelist? Blacklist; + + /// + /// WD. Is it safe for random items? + /// + [DataField] + public bool Safe = false; } diff --git a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml index 493f6dd840..db3240dc4b 100644 --- a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml +++ b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml @@ -2,6 +2,7 @@ id: EffectBadFeeling targetDepth: 0 effectHint: artifact-effect-hint-mental + safe: true # WD components: - type: TelepathicArtifact messages: @@ -32,6 +33,7 @@ id: EffectGoodFeeling targetDepth: 0 effectHint: artifact-effect-hint-mental + safe: true # WD components: - type: TelepathicArtifact messages: @@ -61,6 +63,7 @@ id: EffectJunkSpawn targetDepth: 0 effectHint: artifact-effect-hint-creation + safe: true # WD components: - type: SpawnArtifact maxSpawns: 10 @@ -100,12 +103,14 @@ id: EffectLightFlicker targetDepth: 0 effectHint: artifact-effect-hint-electrical-interference + safe: true # WD components: - type: LightFlickerArtifact - type: artifactEffect id: EffectPointLight targetDepth: 0 + safe: true # WD components: - type: PointLight radius: 8 @@ -119,6 +124,7 @@ id: EffectBananaSpawn targetDepth: 0 effectHint: artifact-effect-hint-creation + safe: true # WD components: - type: SpawnArtifact maxSpawns: 20 @@ -137,6 +143,7 @@ id: EffectFloraSpawn targetDepth: 1 effectHint: artifact-effect-hint-creation + safe: true # WD components: - type: SpawnArtifact maxSpawns: 3 @@ -186,6 +193,7 @@ id: EffectCold targetDepth: 1 effectHint: artifact-effect-hint-consumption + safe: true # WD components: - type: TemperatureArtifact targetTemp: 50 @@ -221,6 +229,7 @@ id: EffectInstrumentSpawn targetDepth: 1 effectHint: artifact-effect-hint-creation + safe: true # WD components: - type: SpawnArtifact maxSpawns: 5 @@ -231,6 +240,7 @@ id: EffectMonkeySpawn targetDepth: 1 effectHint: artifact-effect-hint-creation + safe: true # WD components: - type: SpawnArtifact spawns: @@ -245,6 +255,7 @@ id: EffectChargeBatteries targetDepth: 1 effectHint: artifact-effect-hint-release + safe: true # WD components: - type: ChargeBatteryArtifact - type: TelepathicArtifact @@ -264,6 +275,7 @@ id: EffectKnock targetDepth: 1 effectHint: artifact-effect-hint-electrical-interference + safe: true # WD components: - type: KnockArtifact @@ -291,6 +303,7 @@ id: EffectInvisibility targetDepth: 2 effectHint: artifact-effect-hint-visual + safe: true # WD components: - type: Stealth hadOutline: true @@ -317,6 +330,7 @@ id: EffectRareMaterialSpawn targetDepth: 2 effectHint: artifact-effect-hint-creation + safe: true # WD components: - type: SpawnArtifact spawns: @@ -414,6 +428,7 @@ id: EffectCashSpawn targetDepth: 2 effectHint: artifact-effect-hint-creation + safe: true # WD components: - type: SpawnArtifact maxSpawns: 10 @@ -461,6 +476,7 @@ id: EffectBlink targetDepth: 2 effectHint: artifact-effect-hint-displacement + safe: true # WD components: - type: RandomTeleportArtifact @@ -592,6 +608,7 @@ id: EffectHealAll targetDepth: 3 effectHint: artifact-effect-hint-environment + safe: true # WD components: - type: DamageNearbyArtifact damageChance: 1 @@ -617,6 +634,7 @@ id: EffectMaterialSpawn targetDepth: 3 effectHint: artifact-effect-hint-creation + safe: true # WD components: - type: SpawnArtifact maxSpawns: 5 diff --git a/Resources/Prototypes/XenoArch/Effects/utility_effects.yml b/Resources/Prototypes/XenoArch/Effects/utility_effects.yml index 84df09af33..015af7f7b8 100644 --- a/Resources/Prototypes/XenoArch/Effects/utility_effects.yml +++ b/Resources/Prototypes/XenoArch/Effects/utility_effects.yml @@ -4,6 +4,7 @@ id: EffectIntercom targetDepth: 2 effectHint: artifact-effect-hint-communication + safe: true # WD permanentComponents: - type: RadioMicrophone powerRequired: false @@ -31,6 +32,7 @@ id: EffectRandomInstrument targetDepth: 2 effectHint: artifact-effect-hint-mental + safe: true # WD permanentComponents: - type: Instrument - type: ActivatableUI @@ -43,6 +45,7 @@ id: EffectStorage targetDepth: 2 effectHint: artifact-effect-hint-storage + safe: true # WD whitelist: components: - Item # it doesnt necessarily have to be restricted from structures, but i think it'll be better that way @@ -62,6 +65,7 @@ id: EffectPhasing targetDepth: 2 effectHint: artifact-effect-hint-phasing + safe: true # WD permanentComponents: - type: PhasingArtifact @@ -83,6 +87,7 @@ id: EffectSolutionStorage targetDepth: 2 effectHint: artifact-effect-hint-storage + safe: true # WD whitelist: components: - Item @@ -112,6 +117,7 @@ id: EffectSpeedUp targetDepth: 2 effectHint: artifact-effect-hint-displacement + safe: true # WD whitelist: components: - Item @@ -124,6 +130,7 @@ id: EffectDrill targetDepth: 3 effectHint: artifact-effect-hint-drill + safe: true # WD whitelist: components: - Item @@ -142,6 +149,7 @@ id: EffectPowerGen20K targetDepth: 3 effectHint: artifact-effect-hint-release + safe: true # WD blacklist: components: - Item @@ -159,6 +167,7 @@ id: EffectBigIron targetDepth: 3 effectHint: artifact-effect-hint-gun + safe: true # WD whitelist: components: - Item @@ -192,6 +201,7 @@ id: EffectSentience targetDepth: 3 effectHint: artifact-effect-hint-sentience + safe: true # WD permanentComponents: - type: GhostRole allowMovement: true @@ -208,6 +218,7 @@ id: EffectMultitool targetDepth: 3 effectHint: artifact-effect-hint-multitool + safe: true # WD whitelist: components: - Item From b16514a48190a2e642402c665550c957b1e6a561 Mon Sep 17 00:00:00 2001 From: BIGZi0348 Date: Tue, 31 Dec 2024 17:33:41 +0300 Subject: [PATCH 04/13] =?UTF-8?q?=D0=94=D0=B5=D1=80=D0=B5=D0=B2=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ss14-ru/prototypes/entities/objects/materials/materials.ftl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/materials.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/materials.ftl index be783de738..ad343c0b4d 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/materials.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/materials.ftl @@ -20,6 +20,8 @@ ent-MaterialWoodPlank = древесина ent-MaterialWoodPlank1 = { ent-MaterialWoodPlank } .suffix = Один .desc = { ent-MaterialWoodPlank.desc } +ent-MaterialWoodPlank10 = { ent-MaterialWoodPlank } + .desc = { ent-MaterialWoodPlank.desc } ent-MaterialBiomass = биомасса .suffix = Полный .desc = { ent-MaterialBase.desc } From 5ae29f939dfa589682c3a9ef8e41d1d62a653d71 Mon Sep 17 00:00:00 2001 From: BIGZi0348 Date: Tue, 31 Dec 2024 19:44:02 +0300 Subject: [PATCH 05/13] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BB=D0=BE?= =?UTF-8?q?=D0=B3=D0=B8=D0=BA=D0=B8=20=D0=BB=D0=B5=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BA=D1=80=D0=BE=D0=B2=D0=BE=D1=82=D0=B5=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Server/Medical/HealingSystem.cs | 33 ++++++++++++++++--- .../medical/components/healing-component.ftl | 3 +- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Content.Server/Medical/HealingSystem.cs b/Content.Server/Medical/HealingSystem.cs index fb6883dfd1..70336c8b27 100644 --- a/Content.Server/Medical/HealingSystem.cs +++ b/Content.Server/Medical/HealingSystem.cs @@ -1,21 +1,23 @@ using Content.Server.Administration.Logs; using Content.Server.Body.Components; using Content.Server.Body.Systems; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Medical.Components; using Content.Server.Popups; using Content.Server.Stack; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Audio; using Content.Shared.Damage; using Content.Shared.Database; using Content.Shared.DoAfter; using Content.Shared.FixedPoint; +using Content.Shared.IdentityManagement; using Content.Shared.Interaction; using Content.Shared.Interaction.Events; using Content.Shared.Medical; using Content.Shared.Mobs; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; +using Content.Shared.Popups; using Content.Shared.Stacks; using Robust.Shared.Audio.Systems; using Robust.Shared.Random; @@ -34,7 +36,7 @@ public sealed class HealingSystem : EntitySystem [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; [Dependency] private readonly MobThresholdSystem _mobThresholdSystem = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; public override void Initialize() { @@ -70,7 +72,6 @@ public sealed class HealingSystem : EntitySystem _bloodstreamSystem.TryModifyBleedAmount(entity.Owner, healing.BloodlossModifier); if (isBleeding != bloodstream.BleedAmount > 0) { - dontRepeat = true; _popupSystem.PopupEntity(Loc.GetString("medical-item-stop-bleeding"), entity, args.User); } } @@ -114,7 +115,7 @@ public sealed class HealingSystem : EntitySystem _audio.PlayPvs(healing.HealingEndSound, entity.Owner, AudioHelpers.WithVariation(0.125f, _random).WithVolume(1f)); // Logic to determine the whether or not to repeat the healing action - args.Repeat = (HasDamage(entity.Comp, healing) && !dontRepeat); + args.Repeat = ((HasDamage(entity.Comp, healing) || HasBleedingToHeal(entity, healing)) && !dontRepeat); // WD added HasBleedingToHeal() if (!args.Repeat && !dontRepeat) _popupSystem.PopupEntity(Loc.GetString("medical-item-finished-using", ("item", args.Used)), entity.Owner, args.User); args.Handled = true; @@ -172,6 +173,7 @@ public sealed class HealingSystem : EntitySystem return false; var anythingToDo = + HasBleedingToHeal(target, component) || // WD Edit HasDamage(targetDamage, component) || component.ModifyBloodLevel > 0 // Special case if healing item can restore lost blood... && TryComp(target, out var bloodstream) @@ -189,6 +191,12 @@ public sealed class HealingSystem : EntitySystem var isNotSelf = user != target; + if (isNotSelf) + { + var msg = Loc.GetString("medical-item-popup-target", ("user", Identity.Entity(user, EntityManager)), ("item", uid)); + _popupSystem.PopupEntity(msg, target, target, PopupType.Medium); + } + var delay = isNotSelf ? component.Delay : component.Delay * GetScaledHealingPenalty(user, component); @@ -227,4 +235,21 @@ public sealed class HealingSystem : EntitySystem var modifier = percentDamage * (component.SelfHealPenaltyMultiplier - 1) + 1; return Math.Max(modifier, 1); } + + + /// + /// WD. + /// + private bool HasBleedingToHeal(EntityUid target, HealingComponent healing) + { + if (healing.BloodlossModifier == float.NegativeZero) + return false; + + if (!TryComp(target, out var bloodstream)) + return false; + + var isBleeding = bloodstream.BleedAmount > 0; + + return isBleeding; + } } diff --git a/Resources/Locale/ru-RU/medical/components/healing-component.ftl b/Resources/Locale/ru-RU/medical/components/healing-component.ftl index 2336039081..bf4d3750af 100644 --- a/Resources/Locale/ru-RU/medical/components/healing-component.ftl +++ b/Resources/Locale/ru-RU/medical/components/healing-component.ftl @@ -1,3 +1,4 @@ medical-item-finished-using = Вы закончили исцеление с помощью { $item } medical-item-cant-use = Нет никаких повреждений, которые вы могли бы залечить с помощью { $item } -medical-item-stop-bleeding = Оно перестало кровоточить +medical-item-stop-bleeding = Кровотечение было остановлено +medical-item-popup-target = { CAPITALIZE($user) } пытается лечить вас при помощи { $item }! From 37ffb7eba0e23944119eabaab62c021459d27614 Mon Sep 17 00:00:00 2001 From: RavmorganButOnCocaine Date: Tue, 31 Dec 2024 17:12:38 +0000 Subject: [PATCH 06/13] Automatic changelog update --- Resources/Changelog/ChangelogWhite.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/ChangelogWhite.yml b/Resources/Changelog/ChangelogWhite.yml index 435a380e4a..ab3230efa1 100644 --- a/Resources/Changelog/ChangelogWhite.yml +++ b/Resources/Changelog/ChangelogWhite.yml @@ -1,11 +1,4 @@ Entries: -- author: RavMorgan - changes: - - message: "\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D \u043F\u0440\u0438\u0437\ - \u0440\u0430\u043A \u0434\u043B\u044F merkkaa!" - type: Add - id: 146 - time: '2023-04-27T20:09:54.0000000+00:00' - author: RavMorgan changes: - message: "\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D \u043F\u0440\u0438\u0437\ @@ -8908,3 +8901,16 @@ id: 645 time: '2024-12-29T20:51:07.0000000+00:00' url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/861 +- author: BIG_Zi_348 + changes: + - message: "\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0430 \u0441\u0438\u0441\u0442\ + \u0435\u043C\u0430 \u0440\u0430\u043D\u0434\u043E\u043C\u043D\u044B\u0445 \u0430\ + \u0440\u0442\u0435\u0444\u0430\u043A\u0442\u043E\u0432." + type: Tweak + - message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0430 \u043B\u043E\ + \u0433\u0438\u043A\u0430 \u043B\u0435\u0447\u0435\u043D\u0438\u044F \u043A\u0440\ + \u043E\u0432\u043E\u0442\u0435\u0447\u0435\u043D\u0438\u044F." + type: Fix + id: 646 + time: '2024-12-31T17:11:33.0000000+00:00' + url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/864 From 95f67127b5f92916f2f717f6e43be930f54fd651 Mon Sep 17 00:00:00 2001 From: BIGZi0348 Date: Tue, 31 Dec 2024 20:34:42 +0300 Subject: [PATCH 07/13] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B2=D0=BE?= =?UTF-8?q?=D0=B4=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_white/locales-new/autotranslate-102.ftl | 2 ++ .../_white/locales-new/autotranslate-83.ftl | 2 ++ .../_white/locales-new/autotranslate-93.ftl | 26 ++++++++++++++----- .../ru-RU/locales-new/autotranslate-32.ftl | 2 ++ .../ru-RU/locales-new/autotranslate-33.ftl | 2 ++ .../ru-RU/locales-new/autotranslate-44.ftl | 2 ++ .../objects/consumable/drinks/drinks_cans.ftl | 2 ++ .../entities/objects/materials/parts.ftl | 6 +++-- .../objects/materials/sheets/glass.ftl | 3 +-- .../objects/materials/sheets/metal.ftl | 2 ++ .../entities/objects/misc/tiles.ftl | 2 ++ .../entities/objects/specific/chemistry.ftl | 4 +++ .../objects/specific/medical/healing.ftl | 2 ++ .../entities/objects/specific/syndicate.ftl | 2 ++ 14 files changed, 48 insertions(+), 11 deletions(-) diff --git a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-102.ftl b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-102.ftl index a9bd3bb98f..1d714ccd93 100644 --- a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-102.ftl +++ b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-102.ftl @@ -24,6 +24,8 @@ ent-SpyCrewMonitor = шпионский монитор .desc = Шпионское устройство, способное подключаться к серверам мониторинга экипажа. ent-SyndiCrewMonitor = синдикатский монитор экипажа .desc = Синдицированная версия монитора экипажа, перехватывает информацию с сервера. +ent-SyndiCrewMonitorEmpty = { ent-SyndiCrewMonitor } + .desc = { ent-SyndiCrewMonitor.desc } ent-Tourniquet = жгут .desc = Останавливает кровотечение! Надеюсь. ent-HealingToolbox = набор инструментов для лечения diff --git a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-83.ftl b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-83.ftl index 164b8c7322..9cbafc99ca 100644 --- a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-83.ftl +++ b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-83.ftl @@ -38,6 +38,8 @@ ent-SyndiAgentPDA = ПДА агента синдиката .desc = Для тех случаев, когда исцеление обычных членов синдиката недостаточно, попробуйте исцелить ядерных оперативников! ent-PinpointerSyndicateNuclear = указатель синдиката .desc = Разработан специально для миссий ядерных оперативников, найдите диск! +ent-PinpointerStationNuclear = { ent-PinpointerSyndicateNuclear } + .desc = { ent-PinpointerSyndicateNuclear.desc } ent-PinpointerStation = станционный указатель .desc = Ручной трекинг-устройство, указывающее направление на любую близлежащую станцию. .suffix = Станции diff --git a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-93.ftl b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-93.ftl index 9725a427fe..a7681f02ef 100644 --- a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-93.ftl +++ b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-93.ftl @@ -24,23 +24,35 @@ ent-ShardCrystalRandom = случайный кристаллический ос .desc = случайный кристаллический осколок ent-MaterialHideCorgi = шкура корги .desc = Роскошная шкура, используемая только в самых элитных модных вещах. По слухам, ее можно найти, когда корги отправляют на хорошую ферму. -ent-MaterialPyrotton = пироттон - .desc = пироттон +ent-MaterialPyrotton = пирохлопок + .desc = { ent-MaterialBase.desc } .suffix = Полный +ent-MaterialPyrotton1 = { ent-MaterialPyrotton } + .desc = { ent-MaterialPyrotton.desc } ent-MaterialWebSilk = шелк .desc = Паутинный материал. .suffix = Полный +ent-MaterialWebSilk1 = { ent-MaterialWebSilk } + .desc = { ent-MaterialWebSilk.desc } +ent-MaterialWebSilk25 = { ent-MaterialWebSilk } + .desc = { ent-MaterialWebSilk.desc } ent-MaterialBones = кости - .desc = кости + .desc = { ent-MaterialBase.desc } .suffix = Полный +ent-MaterialBones1 = { ent-MaterialBones } + .desc = { ent-MaterialBones.desc } ent-MaterialGunpowder = порох .desc = Взрывчатое вещество. +ent-MaterialGunpowder60 = { ent-MaterialGunpowder } + .desc = { ent-MaterialGunpowder.desc } ent-Coal = уголь - .desc = уголь + .desc = { ent-OreBase.desc } .suffix = Полный +ent-Coal1 = { ent-Coal } + .desc = { ent-Coal.desc } ent-SaltOre = соль - .desc = соль + .desc = { ent-OreBase.desc } .suffix = Полный -ent-PartRodMetal10 = металлический стержень - .desc = металлический стержень +ent-PartRodMetal10 = { ent-PartRodMetal } + .desc = { ent-PartRodMetal.desc } .suffix = 10 diff --git a/Resources/Locale/ru-RU/locales-new/autotranslate-32.ftl b/Resources/Locale/ru-RU/locales-new/autotranslate-32.ftl index 9214f8ea33..63f868848a 100644 --- a/Resources/Locale/ru-RU/locales-new/autotranslate-32.ftl +++ b/Resources/Locale/ru-RU/locales-new/autotranslate-32.ftl @@ -14,6 +14,8 @@ ent-HandheldCrewMonitorEmpty = { ent-HandheldCrewMonitor } .desc = { ent-HandheldCrewMonitor.desc } ent-Ointment1 = { ent-Ointment } .desc = { ent-Ointment.desc } +ent-Ointment10Lingering = { ent-Ointment } + .desc = { ent-Ointment.desc } ent-RegenerativeMesh = регенеративная сетка .desc = Используется для лечения даже самых неприятных ожогов. Также эффективен против щелочных ожогов. ent-OintmentAdvanced1 = продвинутая мазь diff --git a/Resources/Locale/ru-RU/locales-new/autotranslate-33.ftl b/Resources/Locale/ru-RU/locales-new/autotranslate-33.ftl index b87d13d986..afb20275d4 100644 --- a/Resources/Locale/ru-RU/locales-new/autotranslate-33.ftl +++ b/Resources/Locale/ru-RU/locales-new/autotranslate-33.ftl @@ -24,6 +24,8 @@ ent-VariedXenoArtifactItem = { ent-BaseXenoArtifactItem } .desc = { ent-BaseXenoArtifactItem.desc } ent-ArtifactFragment = фрагмент артефакта .desc = Обломок артефакта. Возможно, вы могли бы починить его, если бы у вас было больше. +ent-ArtifactFragment1 = { ent-ArtifactFragment } + .desc = { ent-ArtifactFragment.desc } ent-CableHVStack10 = { ent-CableHVStack } .desc = { ent-CableHVStack.desc } ent-CableMVStack10 = { ent-CableMVStack } diff --git a/Resources/Locale/ru-RU/locales-new/autotranslate-44.ftl b/Resources/Locale/ru-RU/locales-new/autotranslate-44.ftl index 5183554e1d..2f2ae65108 100644 --- a/Resources/Locale/ru-RU/locales-new/autotranslate-44.ftl +++ b/Resources/Locale/ru-RU/locales-new/autotranslate-44.ftl @@ -10,6 +10,8 @@ ent-PaperBin5 = { ent-PaperBin } .desc = { ent-PaperBin.desc } ent-PaperBin10 = { ent-PaperBin } .desc = { ent-PaperBin.desc } +ent-PaperBin20 = { ent-PaperBin } + .desc = { ent-PaperBin.desc } ent-SuitStorageBase = отделение для хранения скафандров .desc = Причудливое высокотехнологичное хранилище, предназначенное для хранения скафандров. ent-SuitStorageEVA = { ent-SuitStorageBase } diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/consumable/drinks/drinks_cans.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/consumable/drinks/drinks_cans.ftl index 0712d328b3..24712c2fc6 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/consumable/drinks/drinks_cans.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/consumable/drinks/drinks_cans.ftl @@ -2,6 +2,8 @@ ent-DrinkCanBaseFull = { ent-BaseItem } .desc = { ent-BaseItem.desc } ent-DrinkColaCan = космическая кола .desc = Прохладительный напиток. +ent-DrinkColaCanEmpty = { ent-DrinkColaCan } + .desc = { ent-DrinkColaCan.desc } ent-DrinkIcedTeaCan = банка холодного чая .desc = Освежающая банка холодного чая. ent-DrinkLemonLimeCan = банка лимон-лайма diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/parts.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/parts.ftl index 1e47c8b490..90c7f8f4a9 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/parts.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/parts.ftl @@ -1,8 +1,10 @@ ent-PartBase = { ent-BaseItem } .desc = { ent-BaseItem.desc } -ent-PartRodMetal = металлические стержни +ent-PartRodMetal = металлический стержень .suffix = Полный .desc = { ent-PartBase.desc } -ent-PartRodMetal1 = металлический стержень +ent-PartRodMetal1 = { ent-PartRodMetal } .suffix = Один .desc = { ent-PartRodMetal.desc } +ent-PartRodMetalLingering0 = { ent-PartRodMetal } + .desc = { ent-PartRodMetal.desc } diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/sheets/glass.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/sheets/glass.ftl index cc72cbd2a9..4d5f1d2347 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/sheets/glass.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/sheets/glass.ftl @@ -10,7 +10,6 @@ ent-SheetGlass1 = { ent-SheetGlass } .suffix = Один .desc = { ent-SheetGlass.desc } ent-SheetGlassLingering0 = { ent-SheetGlass } - .suffix = Не исчезают закончившись, 0 .desc = { ent-SheetGlass.desc } ent-SheetRGlass = бронестекло .suffix = Полный @@ -47,4 +46,4 @@ ent-SheetClockworkGlass = заводное стекло .suffix = Полный ent-SheetClockworkGlass1 = заводное стекло .suffix = Один - .desc = { ent-SheetClockworkGlass.desc } \ No newline at end of file + .desc = { ent-SheetClockworkGlass.desc } diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/sheets/metal.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/sheets/metal.ftl index 49fc95f42a..7c7e3ed53e 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/sheets/metal.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/materials/sheets/metal.ftl @@ -6,6 +6,8 @@ ent-SheetSteel = сталь ent-SheetSteel1 = сталь .suffix = Один .desc = { ent-SheetSteel.desc } +ent-SheetSteelLingering0 = сталь + .desc = { ent-SheetSteel.desc } ent-SheetPlasteel = пласталь .suffix = Полный .desc = { ent-SheetMetalBase.desc } diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/misc/tiles.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/misc/tiles.ftl index 0f595d17b2..b5eb328650 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/misc/tiles.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/misc/tiles.ftl @@ -2,6 +2,8 @@ ent-FloorTileItemBase = { ent-BaseItem } .desc = Может послужить неплохим метательным оружием. ent-FloorTileItemSteel = стальная плитка .desc = { ent-FloorTileItemBase.desc } +ent-FloorTileItemSteelLingering0 = стальная плитка + .desc = { ent-FloorTileItemBase.desc } ent-FloorTileItemMetalDiamond = стальная плитка .desc = { ent-FloorTileItemBase.desc } ent-FloorTileItemWood = деревянный пол diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/chemistry.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/chemistry.ftl index 5ee14d0873..dbbf68d7d9 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/chemistry.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/chemistry.ftl @@ -14,7 +14,11 @@ ent-BaseSyringe = шприц .desc = Используется для забора образцов крови у существ, или для введения им реагентов. ent-Syringe = { ent-BaseSyringe } .desc = { ent-BaseSyringe.desc } +ent-PrefilledSyringe = { ent-BaseSyringe } + .desc = { ent-BaseSyringe.desc } ent-Pill = таблетка .desc = Это не свеча. ent-PillCanister = баночка для таблеток .desc = Вмещает до 10 таблеток. +ent-PillCanisterRandom = { ent-PillCanister } + .desc = { ent-PillCanister.desc } diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/medical/healing.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/medical/healing.ftl index cdae446286..49554e7802 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/medical/healing.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/medical/healing.ftl @@ -9,6 +9,8 @@ ent-Gauze = марлевый бинт ent-Gauze1 = { ent-Gauze } .desc = { ent-Gauze.desc } .suffix = Один +ent-Gauze10Lingering = { ent-Gauze } + .desc = { ent-Gauze.desc } ent-AloeCream = алоэ крем .desc = Крем для наружного применения при ожогах. ent-PillDexalin = таблетка дексалина diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/syndicate.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/syndicate.ftl index 3a9f6b2a24..2d1ef6e1d2 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/syndicate.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/specific/syndicate.ftl @@ -25,3 +25,5 @@ ent-BaseUplinkRadio40TC = { ent-BaseUplinkRadio } ent-BaseUplinkRadioDebug = { ent-BaseUplinkRadio } .suffix = Дебаг .desc = { ent-BaseUplinkRadio.desc } +ent-BaseUplinkRadio60TC = { ent-BaseUplinkRadio } + .desc = { ent-BaseUplinkRadio.desc } From e79cd4e1d503f962de75db894312d9d16f46481d Mon Sep 17 00:00:00 2001 From: Hero010h <163765999+Hero010h@users.noreply.github.com> Date: Wed, 1 Jan 2025 14:07:14 +0300 Subject: [PATCH 08/13] CybersYn --- Resources/Locale/ru-RU/store/uplink-catalog.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Locale/ru-RU/store/uplink-catalog.ftl b/Resources/Locale/ru-RU/store/uplink-catalog.ftl index 0c94ebec9a..a9e0a8820f 100644 --- a/Resources/Locale/ru-RU/store/uplink-catalog.ftl +++ b/Resources/Locale/ru-RU/store/uplink-catalog.ftl @@ -127,7 +127,7 @@ uplink-grenade-frag-desc = Большой радиус поражения, ма # Utility uplink-holopara-kit-name = Набор Голопаразита uplink-holopara-kit-desc = - Гордость и радость Cybersyn. Содержит инжектор, в котором находится разумный метафизический страж, сделанный из жесткого света, который находится в теле пользователя, когда он не активен. + Гордость и радость Cybersun. Содержит инжектор, в котором находится разумный метафизический страж, сделанный из жесткого света, который находится в теле пользователя, когда он не активен. Страж может быстро наносить удары и невосприимчив к опасным средам и пулям, но любой наносимый им урон делится с пользователем. uplink-holoclown-kit-name = Набор Голоклоуна From 46d76b057a4b9c4bf614b1f73a9a4874fdabedf4 Mon Sep 17 00:00:00 2001 From: Hero010h <163765999+Hero010h@users.noreply.github.com> Date: Wed, 1 Jan 2025 14:11:22 +0300 Subject: [PATCH 09/13] =?UTF-8?q?=D0=9F=D0=BB=D1=8E=D1=88=D0=B5=D0=B2?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=BA=D0=B0=D1=80=D0=BF=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Locale/ru-RU/_white/locales-new/autotranslate-87.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-87.ftl b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-87.ftl index d36413be8e..98f1abac80 100644 --- a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-87.ftl +++ b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-87.ftl @@ -1,5 +1,5 @@ -ent-PlushieRainbowCarp = плюшевая радужная карпа - .desc = Милая плюшевая игрушка, напоминающая легендарную радужную карпу. +ent-PlushieRainbowCarp = плюшевый радужный карп + .desc = Милая плюшевая игрушка, напоминающая легендарного радужного карпа. ent-PlushieHolocarp = плюшевый голокарп .desc = Голографическая плюшевая игрушка, напоминающая научного врага - голокарпа. ent-PlushiePenguin = плюшевый пингвин From 3369b22ace7c995d362ed117d07ba476f8bf2625 Mon Sep 17 00:00:00 2001 From: RavmorganButOnCocaine Date: Wed, 1 Jan 2025 13:57:00 +0000 Subject: [PATCH 10/13] Automatic changelog update --- Resources/Changelog/ChangelogWhite.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/ChangelogWhite.yml b/Resources/Changelog/ChangelogWhite.yml index ab3230efa1..e2868e5c17 100644 --- a/Resources/Changelog/ChangelogWhite.yml +++ b/Resources/Changelog/ChangelogWhite.yml @@ -1,11 +1,4 @@ Entries: -- author: RavMorgan - changes: - - message: "\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D \u043F\u0440\u0438\u0437\ - \u0440\u0430\u043A \u0434\u043B\u044F nairsark!" - type: Add - id: 147 - time: '2023-04-27T20:30:38.0000000+00:00' - author: RavMorgan changes: - message: "\u041A\u0430\u0441\u0442\u043E\u043C\u043D\u044B\u0435 \u043F\u0440\u0438\ @@ -8914,3 +8907,15 @@ id: 646 time: '2024-12-31T17:11:33.0000000+00:00' url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/864 +- author: Hero_010 + changes: + - message: "\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u044B \u043F\u0435\u0440\ + \u0435\u0432\u043E\u0434\u044B \u043C\u0435\u043B\u043E\u0447\u0435\u0439." + type: Add + - message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u044B \u043F\u0435\ + \u0440\u0435\u0432\u043E\u0434\u044B \u043C\u0435\u043B\u043E\u0447\u0435\u0439\ + ." + type: Fix + id: 647 + time: '2025-01-01T13:55:57.0000000+00:00' + url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/855 From 84d4c85b2fcadb0a5effe97ce81f718f6e73e850 Mon Sep 17 00:00:00 2001 From: BIGZi0348 Date: Wed, 1 Jan 2025 16:57:56 +0300 Subject: [PATCH 11/13] =?UTF-8?q?=D0=9D=D0=B0=D1=81=D1=80=D0=B0=D0=BB?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs | 2 +- .../Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs | 4 ++-- .../_White/RandomArtifacts/RandomArtifactsSystem.cs | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs index 9099d6d763..fd9e26aa15 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs @@ -245,7 +245,7 @@ public sealed partial class ArtifactSystem /// WD. /// Generate an Artifact tree with fully developed nodes. /// - private void GenerateSafeArtifactNodeTree(EntityUid artifact, List allNodes, int nodesToCreate) + private void GenerateSafeArtifactNodeTree(EntityUid artifact, ref List allNodes, int nodesToCreate) { if (nodesToCreate < 1) { diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs index 253c42be03..927e9be321 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs @@ -300,12 +300,12 @@ public sealed partial class ArtifactSystem : EntitySystem /// WD. Randomize a given artifact. /// [PublicAPI] - public void SafeRandomizeArtifact(EntityUid uid, ArtifactComponent component) + public void SafeRandomizeArtifact(EntityUid uid, ref ArtifactComponent component) { component.NodesMax = 5; var nodeAmount = _random.Next(component.NodesMin, component.NodesMax); - GenerateSafeArtifactNodeTree(uid, component.NodeTree, nodeAmount); + GenerateSafeArtifactNodeTree(uid, ref component.NodeTree, nodeAmount); var firstNode = GetRootNode(component.NodeTree); EnterNode(uid, ref firstNode, component); } diff --git a/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs b/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs index 782b54ca79..eb423842d7 100644 --- a/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs +++ b/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs @@ -8,6 +8,7 @@ using Content.Shared.Stacks; using Content.Shared.Item; using Robust.Shared.Configuration; using Robust.Shared.Random; +using Robust.Server.GameObjects; namespace Content.Server._White.RandomArtifacts; @@ -61,8 +62,11 @@ public sealed class RandomArtifactsSystem : EntitySystem if (HasComp(entity)) continue; + if (HasComp(entity)) + continue; + var artifactComponent = EnsureComp(entity); - _artifactsSystem.SafeRandomizeArtifact(entity, artifactComponent); + _artifactsSystem.SafeRandomizeArtifact(entity, ref artifactComponent); EnsureComp(entity); } From 12eb0b5308c3a6a2f36245c14dc1af91bd8eaeff Mon Sep 17 00:00:00 2001 From: BIGZi0348 Date: Wed, 1 Jan 2025 19:34:11 +0300 Subject: [PATCH 12/13] =?UTF-8?q?=D0=95=D1=89=D1=91=20=D0=B1=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D1=88=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XenoArtifacts/ArtifactSystem.Nodes.cs | 12 +++++++--- .../XenoArtifacts/ArtifactSystem.cs | 1 - .../RandomArtifactComponent.cs | 12 ++++++++++ .../RandomArtifactSystem.cs | 22 +++++++++++++++++ .../RandomArtifacts/RandomArtifactsSystem.cs | 24 ++++++++++++++++--- Content.Shared/_White/WhiteCVars.cs | 2 +- .../XenoArch/Effects/normal_effects.yml | 1 - 7 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 Content.Server/_White/RandomArtifactDesc/RandomArtifactComponent.cs create mode 100644 Content.Server/_White/RandomArtifactDesc/RandomArtifactSystem.cs diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs index fd9e26aa15..aba68fdd1d 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs @@ -264,7 +264,7 @@ public sealed partial class ArtifactSystem uninitializedNodes.Remove(node); node.Trigger = GetRandomTrigger(artifact, ref node); - node.Effect = GetSafeRandomEffect(artifact, ref node); + node.Effect = GetRandomEffect(artifact, ref node); var maxChildren = _random.Next(1, MaxEdgesPerNode - 1); @@ -285,18 +285,24 @@ public sealed partial class ArtifactSystem allNodes.Add(node); } + + foreach (var item in allNodes) + { + if (item.Depth <= 3) + item.Effect = GetSafeRandomEffect(artifact, item.Depth); + } } /// /// WD. /// - private string GetSafeRandomEffect(EntityUid artifact, ref ArtifactNode node) + private string GetSafeRandomEffect(EntityUid artifact, int nodeDepth) { var allEffects = _prototype.EnumeratePrototypes() .Where(x => (x.Whitelist?.IsValid(artifact, EntityManager) ?? true) && (!x.Blacklist?.IsValid(artifact, EntityManager) ?? true) && x.Safe).ToList(); var validDepth = allEffects.Select(x => x.TargetDepth).Distinct().ToList(); - var weights = GetDepthWeights(validDepth, node.Depth); + var weights = GetDepthWeights(validDepth, nodeDepth); var selectedRandomTargetDepth = GetRandomTargetDepth(weights); var targetEffects = allEffects .Where(x => x.TargetDepth == selectedRandomTargetDepth).ToList(); diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs index 927e9be321..7a3fc1610b 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs @@ -302,7 +302,6 @@ public sealed partial class ArtifactSystem : EntitySystem [PublicAPI] public void SafeRandomizeArtifact(EntityUid uid, ref ArtifactComponent component) { - component.NodesMax = 5; var nodeAmount = _random.Next(component.NodesMin, component.NodesMax); GenerateSafeArtifactNodeTree(uid, ref component.NodeTree, nodeAmount); diff --git a/Content.Server/_White/RandomArtifactDesc/RandomArtifactComponent.cs b/Content.Server/_White/RandomArtifactDesc/RandomArtifactComponent.cs new file mode 100644 index 0000000000..4f8dfc9837 --- /dev/null +++ b/Content.Server/_White/RandomArtifactDesc/RandomArtifactComponent.cs @@ -0,0 +1,12 @@ +namespace Content.Server._White.RandomArtifactDesc +{ + /// + /// WD. + /// Добавляет описание предмету. + /// + [RegisterComponent] + public sealed partial class RandomArtifactDescComponent : Component + { + + } +} diff --git a/Content.Server/_White/RandomArtifactDesc/RandomArtifactSystem.cs b/Content.Server/_White/RandomArtifactDesc/RandomArtifactSystem.cs new file mode 100644 index 0000000000..e224ef6076 --- /dev/null +++ b/Content.Server/_White/RandomArtifactDesc/RandomArtifactSystem.cs @@ -0,0 +1,22 @@ +using Content.Shared.Examine; + +namespace Content.Server._White.RandomArtifactDesc; + +public sealed class RandomArtifactDescSystem : EntitySystem +{ + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnExamined); + } + + private void OnExamined(EntityUid uid, RandomArtifactDescComponent component, ExaminedEvent args) + { + if (args.IsInDetailsRange) + { + args.PushMarkup("С этим предметом что-то не так."); + } + } + +} diff --git a/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs b/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs index eb423842d7..69053520ad 100644 --- a/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs +++ b/Content.Server/_White/RandomArtifacts/RandomArtifactsSystem.cs @@ -2,6 +2,7 @@ using Content.Server.Station.Components; using Content.Server.Station.Systems; using Content.Server.Xenoarchaeology.XenoArtifacts; +using Content.Server._White.RandomArtifactDesc; using Content.Shared._White; using Content.Shared.Damage; using Content.Shared.Stacks; @@ -9,6 +10,8 @@ using Content.Shared.Item; using Robust.Shared.Configuration; using Robust.Shared.Random; using Robust.Server.GameObjects; +using Content.Shared.Body.Organ; +using Content.Shared.Body.Part; namespace Content.Server._White.RandomArtifacts; @@ -18,6 +21,7 @@ public sealed class RandomArtifactsSystem : EntitySystem [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IConfigurationManager _configurationManager = default!; [Dependency] private readonly StationSystem _station = default!; + [Dependency] private readonly IComponentFactory _componentFactory = default!; private float _itemToArtifactRatio; // from 0 to 100. In % percents. Default is 0.4% private bool _artifactsEnabled; @@ -65,9 +69,19 @@ public sealed class RandomArtifactsSystem : EntitySystem if (HasComp(entity)) continue; - var artifactComponent = EnsureComp(entity); - _artifactsSystem.SafeRandomizeArtifact(entity, ref artifactComponent); + if (HasComp(entity)) + continue; + if (HasComp(entity)) + continue; + + // var artifactComponent = EnsureComp(entity); + var comp = (ArtifactComponent) _componentFactory.GetComponent("Artifact"); + comp.Owner = entity; + _artifactsSystem.SafeRandomizeArtifact(entity, ref comp); + AddComp(entity, comp); + + EnsureComp(entity); EnsureComp(entity); } } @@ -87,7 +101,11 @@ public sealed class RandomArtifactsSystem : EntitySystem foreach (var (_, artifact) in items) { - RemComp(artifact.Owner); + if (HasComp(artifact.Owner)) + { + RemComp(artifact.Owner); + RemComp(artifact.Owner); + } } } diff --git a/Content.Shared/_White/WhiteCVars.cs b/Content.Shared/_White/WhiteCVars.cs index 851d84167c..332c7e7db3 100644 --- a/Content.Shared/_White/WhiteCVars.cs +++ b/Content.Shared/_White/WhiteCVars.cs @@ -418,7 +418,7 @@ public sealed class WhiteCVars CVarDef.Create("white.random_artifacts_enabled", true, CVar.SERVERONLY); public static readonly CVarDef ItemToArtifactRatio = - CVarDef.Create("white.random_artifacts_ratio", 0.4f, CVar.SERVERONLY); + CVarDef.Create("white.random_artifacts_ratio", 10.4f, CVar.SERVERONLY); public static readonly CVarDef ACWebhook = CVarDef.Create("ac.webhook", "", CVar.SERVERONLY); diff --git a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml index db3240dc4b..2e255badbb 100644 --- a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml +++ b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml @@ -124,7 +124,6 @@ id: EffectBananaSpawn targetDepth: 0 effectHint: artifact-effect-hint-creation - safe: true # WD components: - type: SpawnArtifact maxSpawns: 20 From ccdcd00f54f7afe352b982159dd05497b3ff8b1f Mon Sep 17 00:00:00 2001 From: BIGZi0348 Date: Wed, 1 Jan 2025 19:34:38 +0300 Subject: [PATCH 13/13] =?UTF-8?q?=D0=9D=D0=B5=20=D1=82=D0=B0=D0=BA=20?= =?UTF-8?q?=D0=BC=D0=BD=D0=BE=D0=B3=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Shared/_White/WhiteCVars.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Shared/_White/WhiteCVars.cs b/Content.Shared/_White/WhiteCVars.cs index 332c7e7db3..851d84167c 100644 --- a/Content.Shared/_White/WhiteCVars.cs +++ b/Content.Shared/_White/WhiteCVars.cs @@ -418,7 +418,7 @@ public sealed class WhiteCVars CVarDef.Create("white.random_artifacts_enabled", true, CVar.SERVERONLY); public static readonly CVarDef ItemToArtifactRatio = - CVarDef.Create("white.random_artifacts_ratio", 10.4f, CVar.SERVERONLY); + CVarDef.Create("white.random_artifacts_ratio", 0.4f, CVar.SERVERONLY); public static readonly CVarDef ACWebhook = CVarDef.Create("ac.webhook", "", CVar.SERVERONLY);