Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Content.Server/Weapons/Melee/MeleeWeaponSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ private void OnMeleeExamineDamage(EntityUid uid, MeleeWeaponComponent component,
return;

_damageExamine.AddDamageExamine(args.Message, Damageable.ApplyUniversalAllModifiers(damageSpec), Loc.GetString("damage-melee"));
// forge-change - partial armor penetration
// Forge-Change-Start
var ap = component.ResistanceBypass ? 100 : (int)Math.Round(damageSpec.ArmorPenetration * 100);
if (ap == 0)
return;

var abs = Math.Abs(ap);
args.Message.AddMarkupPermissive("\n" + Loc.GetString("armor-penetration", ("arg", ap/abs), ("abs", abs)));
// Forge-Change-End
}

protected override bool ArcRaySuccessful(EntityUid targetUid,
Expand Down
2 changes: 2 additions & 0 deletions Content.Server/Weapons/Ranged/Systems/GunSystem.Battery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ private void OnBatteryDamageExamine(EntityUid uid, BatteryAmmoProviderComponent

_damageExamine.AddDamageExamine(args.Message, Damageable.ApplyUniversalAllModifiers(damageSpec), damageType);

// Forge-Change-Start
if (TryComp<ProjectileBatteryAmmoProviderComponent>(uid, out var projectileComp))
{
var ap = GetProjectilePenetration(projectileComp.Prototype);
Expand All @@ -126,6 +127,7 @@ private void OnBatteryDamageExamine(EntityUid uid, BatteryAmmoProviderComponent

return;
}
// Forge-Change-End
}

private DamageSpecifier? GetDamage(BatteryAmmoProviderComponent component)
Expand Down
6 changes: 4 additions & 2 deletions Content.Server/Weapons/Ranged/Systems/GunSystem.Cartridges.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ private void OnCartridgeDamageExamine(EntityUid uid, CartridgeAmmoComponent comp

_damageExamine.AddDamageExamine(args.Message, Damageable.ApplyUniversalAllModifiers(damageSpec), Loc.GetString("damage-projectile"));

// Forge-Change-Start
var ap = GetProjectilePenetration(component.Prototype);
if (ap == 0)
return;

var abs = Math.Abs(ap);
args.Message.AddMarkupPermissive("\n" + Loc.GetString("armor-penetration", ("arg", ap/abs), ("abs", abs)));
// Forge-Change-End
}

private DamageSpecifier? GetProjectileDamage(string proto)
Expand Down Expand Up @@ -65,7 +67,7 @@ private void OnCartridgeExamine(EntityUid uid, CartridgeAmmoComponent component,
}
}

// Forge start - partial armor penetration
// Forge-Change-Start
private void OnBasicEntityDamageExamine(EntityUid uid, BasicEntityAmmoProviderComponent component, ref DamageExamineEvent args)
{
if (component.Proto == null)
Expand Down Expand Up @@ -96,5 +98,5 @@ private int GetProjectilePenetration(string proto)

return p.IgnoreResistances ? 100 : (int)Math.Round(p.Damage.ArmorPenetration * 100);
}
// Forge end
// Forge-Change-End
}
12 changes: 6 additions & 6 deletions Content.Shared/Armor/SharedArmorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ public override void Initialize()
SubscribeLocalEvent<ArmorComponent, GetVerbsEvent<ExamineVerb>>(OnArmorVerbExamine);
}

// Forge edit start
// Forge-Change-Start
private void OnDamageModify(EntityUid uid, ArmorComponent component, DamageModifyEvent args)
{
args.Damage = DamageSpecifier.ApplyModifierSet(args.Damage,
DamageSpecifier.PenetrateArmor(component.Modifiers, args.Damage.ArmorPenetration));
DamageSpecifier.PenetrateArmor(component.Modifiers, args.Damage.ArmorPenetration)); // Forge-Change: +args.Damage.ArmorPenetration
}
// Forge edit-end
// Forge-Change-End

/// <summary>
/// Get the total Damage reduction value of all equipment caught by the relay.
Expand All @@ -46,17 +46,17 @@ private void OnCoefficientQuery(Entity<ArmorComponent> ent, ref InventoryRelayed
}
}

private void OnRelayDamageModify(EntityUid uid, ArmorComponent component, InventoryRelayedEvent<DamageModifyEvent> args) // Forge edit
private void OnRelayDamageModify(EntityUid uid, ArmorComponent component, InventoryRelayedEvent<DamageModifyEvent> args)
{
args.Args.Damage = DamageSpecifier.ApplyModifierSet(args.Args.Damage,
DamageSpecifier.PenetrateArmor(component.Modifiers, args.Args.Damage.ArmorPenetration));
DamageSpecifier.PenetrateArmor(component.Modifiers, args.Args.Damage.ArmorPenetration)); // Forge-Change: +args.Args.Damage.ArmorPenetration
}

private void OnBorgDamageModify(EntityUid uid, ArmorComponent component,
ref BorgModuleRelayedEvent<DamageModifyEvent> args)
{
args.Args.Damage = DamageSpecifier.ApplyModifierSet(args.Args.Damage,
DamageSpecifier.PenetrateArmor(component.Modifiers, args.Args.Damage.ArmorPenetration)); // Forge edit
DamageSpecifier.PenetrateArmor(component.Modifiers, args.Args.Damage.ArmorPenetration)); // Forge-Change: +args.Args.Damage.ArmorPenetration
}

private void OnArmorVerbExamine(EntityUid uid, ArmorComponent component, GetVerbsEvent<ExamineVerb> args)
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Blocking/BlockingSystem.User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private void OnDamageModified(EntityUid uid, BlockingComponent component, Damage
}

args.Damage = DamageSpecifier.ApplyModifierSet(args.Damage,
DamageSpecifier.PenetrateArmor(modifier, args.Damage.ArmorPenetration)); // Forge edit
DamageSpecifier.PenetrateArmor(modifier, args.Damage.ArmorPenetration)); // Forge-Change: +args.Damage.ArmorPenetration
}

private void OnEntityTerminating(EntityUid uid, BlockingUserComponent component, ref EntityTerminatingEvent args)
Expand Down
8 changes: 4 additions & 4 deletions Content.Shared/Damage/DamageModifierSet.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Content.Shared.Damage.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; // Forge
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; // Forge-Change
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;

namespace Content.Shared.Damage
Expand All @@ -26,15 +26,15 @@ public partial class DamageModifierSet
public Dictionary<string, float> FlatReduction = new();

/// <summary>
/// Forge.
/// Forge-Change:
/// Whether this modifier set will ignore incoming damage partial armor penetration, positive or negative.
/// Used mainly for species modifier sets.
/// </summary>
[DataField(customTypeSerializer: typeof(FlagSerializer<ArmorPierceFlags>))]
public int IgnoreArmorPierceFlags = (int) PartialArmorPierceFlags.None;
}

// Forge start
// Forge-Change-Start
public sealed class ArmorPierceFlags;

[Flags, Serializable]
Expand All @@ -46,5 +46,5 @@ public enum PartialArmorPierceFlags
Negative = 1 << 1,
All = Positive | Negative,
}
// Forge end
// Forge-Change-End
}
19 changes: 9 additions & 10 deletions Content.Shared/Damage/DamageSpecifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ public sealed partial class DamageSpecifier : IEquatable<DamageSpecifier>
[IncludeDataField(customTypeSerializer: typeof(DamageSpecifierDictionarySerializer), readOnly: true)]
public Dictionary<string, FixedPoint2> DamageDict { get; set; } = new();

// Forge
[DataField]
[DataField] // Forge-Change
public float ArmorPenetration { get; set; }

/// <summary>
Expand Down Expand Up @@ -93,8 +92,7 @@ public override string ToString()
/// </summary>
public DamageSpecifier() { }

// Forge
public DamageSpecifier(float armorPenetration)
public DamageSpecifier(float armorPenetration) // Forge-Change
{
ArmorPenetration = armorPenetration;
}
Expand All @@ -105,7 +103,7 @@ public DamageSpecifier(float armorPenetration)
public DamageSpecifier(DamageSpecifier damageSpec)
{
DamageDict = new(damageSpec.DamageDict);
ArmorPenetration = damageSpec.ArmorPenetration; // Forge
ArmorPenetration = damageSpec.ArmorPenetration; // Forge-Change
}

/// <summary>
Expand Down Expand Up @@ -357,7 +355,7 @@ public void GetDamagePerGroup(IPrototypeManager protoManager, Dictionary<string,
}
}

// Forge - partial AP. Returns new armor modifier set.
// Forge-Change-Start: +partial AP. Returns new armor modifier set.
public static DamageModifierSet PenetrateArmor(DamageModifierSet modifierSet, float penetration)
{
if (penetration == 0f ||
Expand Down Expand Up @@ -398,11 +396,12 @@ public static DamageModifierSet PenetrateArmor(DamageModifierSet modifierSet, fl

return result;
}
// Forge-Change-End

#region Operators
public static DamageSpecifier operator *(DamageSpecifier damageSpec, FixedPoint2 factor)
{
DamageSpecifier newDamage = new(damageSpec.ArmorPenetration);
DamageSpecifier newDamage = new(damageSpec.ArmorPenetration); // Forge-Change: +new(damageSpec.ArmorPenetration)
foreach (var entry in damageSpec.DamageDict)
{
newDamage.DamageDict.Add(entry.Key, entry.Value * factor);
Expand All @@ -412,7 +411,7 @@ public static DamageModifierSet PenetrateArmor(DamageModifierSet modifierSet, fl

public static DamageSpecifier operator *(DamageSpecifier damageSpec, float factor)
{
DamageSpecifier newDamage = new(damageSpec.ArmorPenetration);
DamageSpecifier newDamage = new(damageSpec.ArmorPenetration); // Forge-Change: +new(damageSpec.ArmorPenetration)
foreach (var entry in damageSpec.DamageDict)
{
newDamage.DamageDict.Add(entry.Key, entry.Value * factor);
Expand All @@ -422,7 +421,7 @@ public static DamageModifierSet PenetrateArmor(DamageModifierSet modifierSet, fl

public static DamageSpecifier operator /(DamageSpecifier damageSpec, FixedPoint2 factor)
{
DamageSpecifier newDamage = new(damageSpec.ArmorPenetration);
DamageSpecifier newDamage = new(damageSpec.ArmorPenetration); // Forge-Change: +new(damageSpec.ArmorPenetration)
foreach (var entry in damageSpec.DamageDict)
{
newDamage.DamageDict.Add(entry.Key, entry.Value / factor);
Expand All @@ -432,7 +431,7 @@ public static DamageModifierSet PenetrateArmor(DamageModifierSet modifierSet, fl

public static DamageSpecifier operator /(DamageSpecifier damageSpec, float factor)
{
DamageSpecifier newDamage = new(damageSpec.ArmorPenetration);
DamageSpecifier newDamage = new(damageSpec.ArmorPenetration); // Forge-Change: +new(damageSpec.ArmorPenetration)

foreach (var entry in damageSpec.DamageDict)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ private void OnDamageModify(EntityUid uid, DamageProtectionBuffComponent compone
{
foreach (var modifier in component.Modifiers.Values)
args.Damage = DamageSpecifier.ApplyModifierSet(args.Damage,
DamageSpecifier.PenetrateArmor(modifier, args.Damage.ArmorPenetration)); // Forge edit
DamageSpecifier.PenetrateArmor(modifier, args.Damage.ArmorPenetration)); // Forge-Change
}
}
2 changes: 1 addition & 1 deletion Content.Shared/Damage/Systems/DamageableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public void DamageChanged(EntityUid uid, DamageableComponent component, DamageSp
// TODO DAMAGE PERFORMANCE
// use a local private field instead of creating a new dictionary here..
damage = DamageSpecifier.ApplyModifierSet(damage,
DamageSpecifier.PenetrateArmor(modifierSet, damage.ArmorPenetration)); // Forge edit
DamageSpecifier.PenetrateArmor(modifierSet, damage.ArmorPenetration)); // Forge-Change
}

var ev = new DamageModifyEvent(damage, origin);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
admin-announce-title = Сделать объявление
admin-announce-announcement-placeholder = Текст объявления...
admin-announce-announcer-placeholder = Отправитель
admin-announce-announcer-default = Управление Секторальным Флотом
admin-announce-announcer-default = Управления Секторальным Флотом
admin-announce-button = Сделать объявление
admin-announce-type-station = Станция
admin-announce-type-server = Сервер
Expand Down
2 changes: 1 addition & 1 deletion Resources/Locale/ru-RU/chat/managers/chat-manager.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ chat-manager-no-radio-key = Не задан ключ канала!
chat-manager-no-such-channel = Нет канала с ключём '{ $key }'!
chat-manager-whisper-headset-on-message = Вы не можете шептать в радио!
chat-manager-server-wrap-message = [bold]{ $message }[/bold]
chat-manager-sender-announcement = Управление Секторальным Флотом
chat-manager-sender-announcement = Управления Секторальным Флотом
chat-manager-sender-announcement-wrap-message = [font size=14][bold]Объявление { $sender }:[/font][font size=12]
{ $message }[/bold][/font]
chat-manager-entity-say-wrap-message = [BubbleHeader][bold][Name]{ $entityName }[/Name][/bold][/BubbleHeader] { $verb }, [font={ $fontType } size={ $fontSize } ]"[BubbleContent]{ $message }[/BubbleContent]"[/font]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ comms-console-announcement-sent-by = Отправитель
comms-console-announcement-unknown-sender = Неизвестный
# Comms console variant titles
comms-console-announcement-title-station = Консоль связи
comms-console-announcement-title-centcom = Управление Секторальным Флотом
comms-console-announcement-title-centcom = Управления Секторальным Флотом
comms-console-announcement-title-nukie = Ядерные оперативники Синдиката
comms-console-menu-announcement-button-tooltip = Отправить ваше сообщение как общесекторное радиооповещение.
comms-console-menu-broadcast-button-tooltip = Транслировать сообщение на настенные экраны по всему сектору. Примечание: вмещают только 10 символов!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
visuals:
enum.BatteryWeaponFireModeVisuals.State:
enum.DeployableTurretVisuals.Weapon:
NFBulletDisabler: { state: stun } # Forge
NFBulletEnergyTurretLaser: { state: lethal } # Forge
NFBulletDisabler: { state: stun } # Forge-Change
NFBulletEnergyTurretLaser: { state: lethal } # Forge-Change
enum.DeployableTurretVisuals.Broken:
base:
True: { state: destroyed }
Expand All @@ -74,14 +74,14 @@
factions:
- AllHostile
- type: ProjectileBatteryAmmoProvider
proto: NFBulletDisabler # Forge
proto: NFBulletDisabler # Forge-Change
fireCost: 100
- type: BatteryWeaponFireModes
fireModes:
- proto: NFBulletDisabler # Forge
fireCost: 100 # Forge
- proto: NFBulletEnergyTurretLaser # Forge
fireCost: 100 # Forge
- proto: NFBulletDisabler # Forge-Change
fireCost: 100 # Forge-Change
- proto: NFBulletEnergyTurretLaser # Forge-Change
fireCost: 100 # Forge-Change
- type: DeployableTurret
retractedDamageModifierSetId: Metallic
deployedDamageModifierSetId: FlimsyMetallic
Expand Down Expand Up @@ -136,7 +136,7 @@
- type: LockedWiresPanel
- type: UseDelay
delay: 1.2
- type: Gun # Forge
- type: Gun # Forge-Change
projectileSpeed: 40

- type: entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
damage:
types:
Slash: 17 #cmon, it has to be at least BETTER than the rest.
armorPenetration: 0.15 # Forge
armorPenetration: 0.15 # Forge-Change
soundHit:
path: /Audio/Weapons/bladeslice.ogg
- type: Reflect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@
access: [["HeadOfPersonnel"], ["HeadOfSecurity"]]
- type: CommunicationsConsole
title: comms-console-announcement-title-station
canShuttle: false #Corvax-Forge
canShuttle: false # Forge-Change
global: true #SR WILL NOT BE IGNORED
- type: DeviceNetwork
deviceNetId: Wireless
Expand Down Expand Up @@ -828,7 +828,7 @@
- type: CommunicationsConsole
title: comms-console-announcement-title-centcom
color: "#1d8bad"
#canShuttle: false #Corvax-Forge
#canShuttle: false # Forge-Change
global: true
- type: Computer
board: CentcommCommsComputerCircuitboard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
map: [ "base" ]
# color: "#bfe3ff" # Forge-Change: Fax-color-fix
- type: FaxMachine
name: "Штаб УСФ" # Forge-Lore-Change: CentCom -> MSF
name: "Штаб УСФ" # Forge-Change: CentCom -> MSF
notifyAdmins: true

- type: entity
Expand Down
Loading
Loading