From 165142f363a2033047efef443d6742b59ccf6eb4 Mon Sep 17 00:00:00 2001 From: FaDeOkno Date: Mon, 26 Aug 2024 18:07:01 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9B=D1=8E=D1=82=D1=8B=D0=B9=20=D0=BD=D1=91?= =?UTF-8?q?=D1=80=D1=84=20=D0=9A=D0=9F=D0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Lobby/UI/HumanoidProfileEditor.xaml.cs | 7 ++ .../ADT/Power/Systems/BatteryDrinkerSystem.cs | 8 +++ .../ADT/Silicon/Systems/SiliconEmpSystem.cs | 16 +++-- Content.Shared/Traits/TraitPrototype.cs | 9 +++ .../ADT/Entities/Mobs/Player/ipc.yml | 23 +++---- .../ADT/Entities/Mobs/Player/silicon_base.yml | 11 ++-- .../Prototypes/ADT/Traits/disabilities.yml | 2 + .../Objects/Materials/Sheets/glass.yml | 64 +++++++++++++++++++ .../Entities/Objects/Tools/cable_coils.yml | 2 - Resources/Prototypes/Traits/disabilities.yml | 2 + Resources/Prototypes/Traits/quirks.yml | 4 ++ 11 files changed, 126 insertions(+), 22 deletions(-) diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs index 2f410ce670c..145213672ed 100644 --- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs +++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs @@ -569,6 +569,13 @@ public void RefreshTraits() foreach (var traitProto in categoryTraits) { var trait = _prototypeManager.Index(traitProto); + // ADT Trait species blacklist start + if (Profile != null && trait.SpeciesBlacklist.Contains(Profile.Species)) + { + Profile = Profile?.WithoutTraitPreference(trait.ID, _prototypeManager); + continue; + } + // ADT Trait species blacklist end var selector = new TraitPreferenceSelector(trait); selector.Preference = Profile?.TraitPreferences.Contains(trait.ID) == true; diff --git a/Content.Server/ADT/Power/Systems/BatteryDrinkerSystem.cs b/Content.Server/ADT/Power/Systems/BatteryDrinkerSystem.cs index d00cad93cf3..cde79796877 100644 --- a/Content.Server/ADT/Power/Systems/BatteryDrinkerSystem.cs +++ b/Content.Server/ADT/Power/Systems/BatteryDrinkerSystem.cs @@ -136,11 +136,19 @@ private void OnDoAfter(EntityUid uid, BatteryDrinkerComponent drinkerComp, DoAft } if (_battery.TryUseCharge(source, amountToDrink, sourceBattery)) + { _battery.SetCharge(drinkerBatteryUid, drinkerBattery.CurrentCharge + amountToDrink, drinkerBattery); + if (drinkerBattery.CurrentCharge < drinkerBattery.MaxCharge * 0.95f) + args.Repeat = true; + else + args.Repeat = false; + } + else { _battery.SetCharge(drinker, sourceBattery.CurrentCharge + drinkerBattery.CurrentCharge, drinkerBattery); _battery.SetCharge(source, 0, sourceBattery); + args.Repeat = false; } //if (sourceComp != null && sourceComp.DrinkSound != null) diff --git a/Content.Server/ADT/Silicon/Systems/SiliconEmpSystem.cs b/Content.Server/ADT/Silicon/Systems/SiliconEmpSystem.cs index 9c76895e91b..e95027a6bd5 100644 --- a/Content.Server/ADT/Silicon/Systems/SiliconEmpSystem.cs +++ b/Content.Server/ADT/Silicon/Systems/SiliconEmpSystem.cs @@ -12,6 +12,9 @@ using Content.Shared.Speech.Muting; using Content.Shared.StatusEffect; using Robust.Shared.Random; +using Content.Shared.Damage; +using Robust.Shared.Prototypes; +using Content.Shared.Damage.Prototypes; namespace Content.Server.ADT.Silicon.Systems; @@ -22,6 +25,8 @@ public sealed class SiliconEmpSystem : EntitySystem [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly SharedStutteringSystem _stuttering = default!; [Dependency] private readonly SharedSlurredSystem _slurredSystem = default!; + [Dependency] private readonly DamageableSystem _damage = default!; + [Dependency] private readonly IPrototypeManager _proto = default!; public override void Initialize() { @@ -32,7 +37,8 @@ public override void Initialize() private void OnEmpPulse(EntityUid uid, SiliconComponent component, ref EmpPulseEvent args) { - args.EnergyConsumption *= 0.25f; // EMPs drain a lot of freakin power. + //args.EnergyConsumption *= 0.25f; // EMPs drain a lot of freakin power. + // А потому что нефиг под эми попадаться if (!TryComp(uid, out var statusComp)) return; @@ -57,15 +63,17 @@ private void OnEmpPulse(EntityUid uid, SiliconComponent component, ref EmpPulseE else if (_random.Prob(0.80f)) _slurredSystem.DoSlur(uid, duration * 2, statusComp); - if (_random.Prob(0.02f)) + if (_random.Prob(0.4f)) // Какие-то неадекватно низкие шансы тут, буквально 2-8 процентов. Ребят, это слишком мало для ЭМИ _status.TryAddStatusEffect(uid, "Muted", duration * 0.5, true, statusComp); - if (_random.Prob(0.02f)) + if (_random.Prob(0.4f)) _status.TryAddStatusEffect(uid, TemporaryBlindnessSystem.BlindingStatusEffect, duration * 0.5, true, statusComp); - if (_random.Prob(0.08f)) + if (_random.Prob(0.7f)) _status.TryAddStatusEffect(uid, "Pacified", duration * 0.5, true, statusComp); + _damage.TryChangeDamage(uid, new DamageSpecifier(_proto.Index("Shock"), _random.Next(20, 40))); // УБИВАТЬ УБИВАТЬ УБИВАТЬ УБИВАТЬ + args.EnergyConsumption = 0; } } diff --git a/Content.Shared/Traits/TraitPrototype.cs b/Content.Shared/Traits/TraitPrototype.cs index c79d3cbf308..a8e7d2a3eb4 100644 --- a/Content.Shared/Traits/TraitPrototype.cs +++ b/Content.Shared/Traits/TraitPrototype.cs @@ -1,3 +1,4 @@ +using Content.Shared.Humanoid.Prototypes; using Content.Shared.Whitelist; using Robust.Shared.Prototypes; @@ -60,4 +61,12 @@ public sealed partial class TraitPrototype : IPrototype /// [DataField] public ProtoId? Category; + + // ADT Tweak start + /// + /// Will not be selectable if current species equals any of these + /// + [DataField] + public List> SpeciesBlacklist = new(); + // ADT Tweak end } diff --git a/Resources/Prototypes/ADT/Entities/Mobs/Player/ipc.yml b/Resources/Prototypes/ADT/Entities/Mobs/Player/ipc.yml index ca0b8519b09..583d2157dc5 100644 --- a/Resources/Prototypes/ADT/Entities/Mobs/Player/ipc.yml +++ b/Resources/Prototypes/ADT/Entities/Mobs/Player/ipc.yml @@ -19,13 +19,13 @@ - type: MobState allowedStates: - Alive - - Critical + #- Critical - Dead - type: MobThresholds thresholds: 0: Alive - 125: Critical - 180: Dead + 125: Dead # Нёрф КПБ - смерть с 125, крита нет + #180: Dead stateAlertDict: Alive: BorgHealth Critical: BorgCrit @@ -41,20 +41,21 @@ - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 400 + damage: 220 behaviors: - !type:GibBehavior { } - type: SlowOnDamage speedModifierThresholds: - 60: 0.7 - 90: 0.5 - 120: 0.3 + 40: 0.8 + 60: 0.6 + 80: 0.4 + 100: 0.3 - type: SiliconDownOnDead - type: EyeProtection protectionTime: 12 - type: Battery - maxCharge: 75000 - startingCharge: 75000 + maxCharge: 50000 + startingCharge: 50000 - type: Silicon entityType: enum.SiliconType.Player batteryPowered: true @@ -75,7 +76,7 @@ color: "#a8d8ff" mask: /Textures/Effects/LightMasks/cone.png autoRot: true - radius: 6 + radius: 3 # 6 Далеко - type: Wires boardName: "ipc-board-name" layoutId: IPC @@ -93,7 +94,7 @@ - type: ContentEye maxZoom: 1.0,1.0 - type: LightningTarget - priority: 4 + priority: 4 # Всё ещё угараю с того, что приоритет КПБ выше чем у катушек теслы lightningExplode: false - type: Vocal sounds: diff --git a/Resources/Prototypes/ADT/Entities/Mobs/Player/silicon_base.yml b/Resources/Prototypes/ADT/Entities/Mobs/Player/silicon_base.yml index b94515013e1..682b0a0191d 100644 --- a/Resources/Prototypes/ADT/Entities/Mobs/Player/silicon_base.yml +++ b/Resources/Prototypes/ADT/Entities/Mobs/Player/silicon_base.yml @@ -175,14 +175,15 @@ sprite: "Effects/creampie.rsi" state: "creampie_human" visible: false - - type: Repairable + - type: Repairable # Взамен на быструю починку я урезал лечение примерно в 3 раза. Это лучше, чем DoAfter на 30 секунд при попытке вылечить себя #fuelcost: 60 - doAfterDelay: 10 # was 18 + selfRepairPenalty: 2 + doAfterDelay: 2 # was 10 # was 18 damage: types: - Blunt: -20 - Slash: -20 - Piercing: -20 + Blunt: -7 + Slash: -7 + Piercing: -7 #bloodlossModifier: -100 - type: Bloodstream ### я добавил компонент Bloodstream как заглушку. Он нужен, # чтобы хилиться с помощью CableStack. Дело в том, что HealingSystem использует проверку на наличие BloodstreamComponent. diff --git a/Resources/Prototypes/ADT/Traits/disabilities.yml b/Resources/Prototypes/ADT/Traits/disabilities.yml index ad1a32c1f19..e2a13d5340d 100644 --- a/Resources/Prototypes/ADT/Traits/disabilities.yml +++ b/Resources/Prototypes/ADT/Traits/disabilities.yml @@ -7,6 +7,8 @@ - type: Hemophilia modifier: 0.01 cost: -2 # ADT Quirks + speciesBlacklist: + - IPC # Simple Station diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml index 59d8ed19220..e409f043117 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml @@ -48,6 +48,16 @@ solutions: glass: canReact: false + # ADT IPC healing start + - type: Healing + delay: 1.5 + damageContainers: + - ADTSiliconDamageContainer + damage: + types: + Heat: -2 + Cold: -2 + # ADT IPC healing end - type: entity parent: SheetGlassBase @@ -171,6 +181,15 @@ max: 1 - !type:DoActsBehavior acts: [ "Destruction" ] + # ADT IPC healing start + - type: Healing + damageContainers: + - ADTSiliconDamageContainer + damage: + types: + Heat: -4 + Cold: -4 + # ADT IPC healing end - type: entity parent: SheetRGlass @@ -248,6 +267,15 @@ max: 1 - !type:DoActsBehavior acts: [ "Destruction" ] + # ADT IPC healing start + - type: Healing + damageContainers: + - ADTSiliconDamageContainer + damage: + types: + Heat: -2 + Cold: -6 + # ADT IPC healing end - type: entity parent: SheetPGlass @@ -314,6 +342,15 @@ - ReagentId: Carbon Quantity: 0.5 canReact: false + # ADT IPC healing start + - type: Healing + damageContainers: + - ADTSiliconDamageContainer + damage: + types: + Heat: -2 + Cold: -8 + # ADT IPC healing end - type: entity parent: SheetRPGlass @@ -389,6 +426,15 @@ - ReagentId: Uranium Quantity: 10 canReact: false + # ADT IPC healing start + - type: Healing + damageContainers: + - ADTSiliconDamageContainer + damage: + types: + Heat: -6 + Cold: -2 + # ADT IPC healing end - type: entity parent: SheetUGlass @@ -443,6 +489,15 @@ - ReagentId: Carbon Quantity: 0.5 canReact: false + # ADT IPC healing start + - type: Healing + damageContainers: + - ADTSiliconDamageContainer + damage: + types: + Heat: -8 + Cold: -2 + # ADT IPC healing end - type: entity parent: SheetRUGlass @@ -520,6 +575,15 @@ - ReagentId: Copper Quantity: 6.7 canReact: false + # ADT IPC healing start + - type: Healing + damageContainers: + - ADTSiliconDamageContainer + damage: + types: + Heat: -5 + Cold: -5 + # ADT IPC healing end - type: entity parent: SheetClockworkGlass diff --git a/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml b/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml index 355ce3c8789..0018e0f880a 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml @@ -35,8 +35,6 @@ - ADTSiliconDamageContainer damage: types: - Heat: -5 - Cold: -5 Shock: -5 Caustic: -5 # healingBeginSound: diff --git a/Resources/Prototypes/Traits/disabilities.yml b/Resources/Prototypes/Traits/disabilities.yml index 5a889855040..5dc8d5ff687 100644 --- a/Resources/Prototypes/Traits/disabilities.yml +++ b/Resources/Prototypes/Traits/disabilities.yml @@ -44,6 +44,8 @@ components: - type: Unrevivable cost: -1 # ADT Quirks + speciesBlacklist: + - IPC - type: trait id: Muted diff --git a/Resources/Prototypes/Traits/quirks.yml b/Resources/Prototypes/Traits/quirks.yml index 28979dcc23b..9dc16ffb3c3 100644 --- a/Resources/Prototypes/Traits/quirks.yml +++ b/Resources/Prototypes/Traits/quirks.yml @@ -16,6 +16,8 @@ - type: LightweightDrunk boozeStrengthMultiplier: 2 cost: -1 # ADT quirks + speciesBlacklist: + - IPC - type: trait id: Snoring @@ -25,3 +27,5 @@ components: - type: Snoring cost: -1 # ADT quirks + speciesBlacklist: + - IPC