Skip to content

Commit

Permalink
Лютый нёрф КПБ
Browse files Browse the repository at this point in the history
  • Loading branch information
FaDeOkno committed Aug 26, 2024
1 parent c3f1b85 commit 165142f
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 22 deletions.
7 changes: 7 additions & 0 deletions Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,13 @@ public void RefreshTraits()
foreach (var traitProto in categoryTraits)
{
var trait = _prototypeManager.Index<TraitPrototype>(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;
Expand Down
8 changes: 8 additions & 0 deletions Content.Server/ADT/Power/Systems/BatteryDrinkerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 12 additions & 4 deletions Content.Server/ADT/Silicon/Systems/SiliconEmpSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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()
{
Expand All @@ -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<StatusEffectsComponent>(uid, out var statusComp))
return;
Expand All @@ -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<MutedComponent>(uid, "Muted", duration * 0.5, true, statusComp);

if (_random.Prob(0.02f))
if (_random.Prob(0.4f))
_status.TryAddStatusEffect<TemporaryBlindnessComponent>(uid, TemporaryBlindnessSystem.BlindingStatusEffect, duration * 0.5, true, statusComp);

if (_random.Prob(0.08f))
if (_random.Prob(0.7f))
_status.TryAddStatusEffect<PacifiedComponent>(uid, "Pacified", duration * 0.5, true, statusComp);

_damage.TryChangeDamage(uid, new DamageSpecifier(_proto.Index<DamageTypePrototype>("Shock"), _random.Next(20, 40))); // УБИВАТЬ УБИВАТЬ УБИВАТЬ УБИВАТЬ

args.EnergyConsumption = 0;
}
}
9 changes: 9 additions & 0 deletions Content.Shared/Traits/TraitPrototype.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Shared.Humanoid.Prototypes;
using Content.Shared.Whitelist;
using Robust.Shared.Prototypes;

Expand Down Expand Up @@ -60,4 +61,12 @@ public sealed partial class TraitPrototype : IPrototype
/// </summary>
[DataField]
public ProtoId<TraitCategoryPrototype>? Category;

// ADT Tweak start
/// <summary>
/// Will not be selectable if current species equals any of these
/// </summary>
[DataField]
public List<ProtoId<SpeciesPrototype>> SpeciesBlacklist = new();
// ADT Tweak end
}
23 changes: 12 additions & 11 deletions Resources/Prototypes/ADT/Entities/Mobs/Player/ipc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -93,7 +94,7 @@
- type: ContentEye
maxZoom: 1.0,1.0
- type: LightningTarget
priority: 4
priority: 4 # Всё ещё угараю с того, что приоритет КПБ выше чем у катушек теслы
lightningExplode: false
- type: Vocal
sounds:
Expand Down
11 changes: 6 additions & 5 deletions Resources/Prototypes/ADT/Entities/Mobs/Player/silicon_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/ADT/Traits/disabilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- type: Hemophilia
modifier: 0.01
cost: -2 # ADT Quirks
speciesBlacklist:
- IPC

# Simple Station

Expand Down
64 changes: 64 additions & 0 deletions Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
- ADTSiliconDamageContainer
damage:
types:
Heat: -5
Cold: -5
Shock: -5
Caustic: -5
# healingBeginSound:
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Traits/disabilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
components:
- type: Unrevivable
cost: -1 # ADT Quirks
speciesBlacklist:
- IPC

- type: trait
id: Muted
Expand Down
4 changes: 4 additions & 0 deletions Resources/Prototypes/Traits/quirks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
- type: LightweightDrunk
boozeStrengthMultiplier: 2
cost: -1 # ADT quirks
speciesBlacklist:
- IPC

- type: trait
id: Snoring
Expand All @@ -25,3 +27,5 @@
components:
- type: Snoring
cost: -1 # ADT quirks
speciesBlacklist:
- IPC

0 comments on commit 165142f

Please sign in to comment.