Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4dc2df2
CompoundBow
Firemixx Feb 5, 2026
ea026e9
аааа
Firemixx Feb 7, 2026
56ded2e
fixs
Firemixx Feb 8, 2026
5ee9f80
fix
Firemixx Feb 8, 2026
297776b
fix: Мелкие правки
Firemixx Feb 8, 2026
c5d6110
fix
Firemixx Feb 8, 2026
ac0429a
фикс тестов..буэ
Firemixx Feb 8, 2026
87158f4
еще фикс
Firemixx Feb 8, 2026
7692786
aaaaaaaaaaaaaaaaaaaaaaaaaaa
Firemixx Feb 8, 2026
b973633
nullable developer
Firemixx Feb 8, 2026
5be421b
уэ?
Firemixx Feb 8, 2026
023c5c7
аааааааааааааааааааааааааааааааааа улучшение звуки и фиксы и нахер урон
Firemixx Feb 8, 2026
92647dd
хули,пробуем
Firemixx Feb 9, 2026
b190899
еще раз пробуем
Firemixx Feb 9, 2026
4f6c9a2
починка тупости
Firemixx Feb 9, 2026
5f26340
fix
Firemixx Feb 9, 2026
7664d53
aaaaaa
Firemixx Feb 9, 2026
c455da7
коммит для смены ветки
Firemixx Feb 10, 2026
5bfcce1
add: Добавил луки, технологию, крафт и заготовки паков для стрел и луков
Firemixx Feb 12, 2026
89b1b40
Merge branch 'master' into CompoundBow
Firemixx Feb 12, 2026
fbdb804
add: взрывные стрелы, стрелы светяшки, локализация, еще технология
Firemixx Feb 13, 2026
7a94e9a
Merge branch 'CompoundBow' of https://github.com/Firemixx/Firemix_Rep…
Firemixx Feb 13, 2026
52f5fbf
fix
Firemixx Feb 13, 2026
2ea3ce6
fix2
Firemixx Feb 13, 2026
264df20
fix: фикс рецептов
Firemixx Feb 13, 2026
75fc88e
Merge branch 'master' into CompoundBow
Firemixx Feb 22, 2026
31e04dc
Fix YAML syntax for Bombs/plastic.yml
Firemixx Feb 22, 2026
e91e100
Add ADTArrowGranade node to arrows.yml
Firemixx Feb 22, 2026
975be00
Fix comment formatting for StepOfTension property
Firemixx Feb 22, 2026
b5a356c
Merge branch 'master' into CompoundBow
Firemixx Feb 23, 2026
a3872ed
Remove 'name' entry from arrows.yml
Firemixx Mar 3, 2026
cf76abb
fix
Firemixx Mar 3, 2026
4c9e9c3
Merge branch 'CompoundBow' of https://github.com/Firemixx/Firemix_Rep…
Firemixx Mar 3, 2026
9829842
fix of brain
Firemixx Mar 3, 2026
a4f2ba0
fix
Firemixx Mar 3, 2026
6978660
Update arsenal.yml
Firemixx Mar 3, 2026
1952d7a
Merge branch 'master' into CompoundBow
Firemixx Mar 3, 2026
d468d8a
Merge branch 'master' into CompoundBow
Firemixx Mar 6, 2026
bebc614
малые фиксы
Firemixx Mar 7, 2026
1eb9f9c
Merge branch 'master' into CompoundBow
Firemixx Mar 7, 2026
e6a8000
Merge branch 'master' into CompoundBow
Firemixx Mar 17, 2026
0ae4173
Merge branch 'master' into CompoundBow
Darkiich Mar 19, 2026
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
28 changes: 28 additions & 0 deletions Content.Server/ADT/BowsSystem/BowsSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System.Diagnostics.CodeAnalysis;
using Content.Shared.ADT.BowsSystem.Components;
using Content.Shared.Interaction.Events;
using Content.Shared.Projectiles;
using Content.Shared.Weapons.Ranged.Components;
using Content.Shared.Weapons.Ranged.Events;
using Content.Shared.Weapons.Ranged.Systems;
using Microsoft.VisualBasic;
using Robust.Shared.Containers;
using Robust.Shared.Utility;

namespace Content.Server.ADT.BowsSystem;

public sealed partial class BowsSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<ExpendedBowsComponent, ShotAttemptedEvent>(OnShootAttemp);
}

public void OnShootAttemp(Entity<ExpendedBowsComponent> bow,ref ShotAttemptedEvent args)
{
if(bow.Comp.StepOfTension==0)
args.Cancel();
}
}
38 changes: 38 additions & 0 deletions Content.Shared/ADT/BowsSystem/Components/ExpendedBowsComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Robust.Shared.Prototypes;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;

namespace Content.Shared.ADT.BowsSystem.Components;
[RegisterComponent, NetworkedComponent]
public sealed partial class ExpendedBowsComponent : Component
{
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan coldownStart = TimeSpan.Zero;

[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan coldown = TimeSpan.FromSeconds(7f);

[DataField, ViewVariables(VVAccess.ReadWrite)]
public int StepOfTension=0;

[DataField, ViewVariables(VVAccess.ReadWrite)]
public string ItemSlot="projectiles";

[DataField]
public Dictionary<int, string> TensionAndLoc = new Dictionary<int, string>
{
{0, "popup-bow-use-null"},
{1, "popup-bow-use-light"},
{2, "popup-bow-use-medium"},
{3, "popup-bow-use-hard"},
};

[DataField]
public Dictionary<int, float> TensionAnModieferSpeed = new Dictionary<int, float>
{
{0, 0.5f},
{1, 1f},
{2, 1.4f},
{3, 1.7f},
};
}
87 changes: 87 additions & 0 deletions Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
using Content.Shared.ADT.BowsSystem.Components;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Interaction.Events;
using Content.Shared.Projectiles;
using Content.Shared.Popups;
using Content.Shared.Weapons.Ranged.Components;
using Content.Shared.Weapons.Ranged.Events;
using Content.Shared.Weapons.Ranged.Systems;
using Content.Shared.Wieldable.Components;
using Robust.Shared.Containers;
using Robust.Shared.Timing;
using System.Reflection.Metadata;
using System.Diagnostics;
using System.Threading;

namespace Content.Server.ADT.BowsSystem;

public sealed partial class BowsSystem : EntitySystem
{
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ExpendedBowsComponent, GunShotEvent>(OnShoot);
SubscribeLocalEvent<ExpendedBowsComponent, UseInHandEvent>(OnUseInHand);
SubscribeLocalEvent<ExpendedBowsComponent, GunRefreshModifiersEvent>(EditSpeed);
}

public void OnShoot(Entity<ExpendedBowsComponent> bow, ref GunShotEvent args)
{
if(!TryComp<ContainerAmmoProviderComponent>(bow, out var containerComp))
return;
if (_containerSystem.TryGetContainer(containerComp.ProviderUid.Value, containerComp.Container, out var container))

Check failure on line 36 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Nullable value type may be null.

Check failure on line 36 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Nullable value type may be null.

Check failure on line 36 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Nullable value type may be null.

Check failure on line 36 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Nullable value type may be null.

Check failure on line 36 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Nullable value type may be null.

Check failure on line 36 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Nullable value type may be null.
return;
if (bow.Comp.StepOfTension!=0)
{
foreach (var i in container.ContainedEntities)

Check failure on line 40 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Dereference of a possibly null reference.

Check failure on line 40 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Dereference of a possibly null reference.

Check failure on line 40 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Dereference of a possibly null reference.

Check failure on line 40 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Dereference of a possibly null reference.

Check failure on line 40 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Dereference of a possibly null reference.

Check failure on line 40 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Dereference of a possibly null reference.
{
if (TryComp<ProjectileComponent>(i,out var proj))
{
if (!proj.Damage.DamageDict.TryGetValue("Piercing", out var ProjectileDamage))
return;
var multipliedDamage = ProjectileDamage * bow.Comp.StepOfTension;
proj.Damage.DamageDict["Piercing"] = multipliedDamage;
}
}
}
}

public void OnUseInHand(Entity<ExpendedBowsComponent> bow, ref UseInHandEvent args)
{
bow.Comp.coldownStart = _timing.CurTime + bow.Comp.coldown;
}

public override void Update(float frameTime)
{
base.Update(frameTime);

var query = EntityQueryEnumerator<ExpendedBowsComponent>();

while (query.MoveNext(out var uid, out var comp))
{
if (_timing.CurTime < comp.coldownStart)
continue;
if(!TryComp<WieldableComponent>(uid,out var wielded) || !wielded.Wielded)
{
comp.StepOfTension=0;
return;
}
if (comp.StepOfTension >= 3)
continue;

comp.StepOfTension++;
_popup.PopupClient(Loc.GetString(comp.TensionAndLoc[comp.StepOfTension],("user", wielded.User)), uid, wielded.User);

Check failure on line 77 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type '(string, object? User)' cannot be used for parameter 'arg' of type '(string, object)' in 'string ILocalizationManager.GetString(string messageId, (string, object) arg)' due to differences in the nullability of reference types.

Check failure on line 77 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type '(string, object? User)' cannot be used for parameter 'arg' of type '(string, object)' in 'string ILocalizationManager.GetString(string messageId, (string, object) arg)' due to differences in the nullability of reference types.

Check failure on line 77 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Argument of type '(string, object? User)' cannot be used for parameter 'arg' of type '(string, object)' in 'string ILocalizationManager.GetString(string messageId, (string, object) arg)' due to differences in the nullability of reference types.

Check failure on line 77 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Argument of type '(string, object? User)' cannot be used for parameter 'arg' of type '(string, object)' in 'string ILocalizationManager.GetString(string messageId, (string, object) arg)' due to differences in the nullability of reference types.

Check failure on line 77 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type '(string, object? User)' cannot be used for parameter 'arg' of type '(string, object)' in 'string ILocalizationManager.GetString(string messageId, (string, object) arg)' due to differences in the nullability of reference types.

Check failure on line 77 in Content.Shared/ADT/BowsSystem/SharedBowsSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type '(string, object? User)' cannot be used for parameter 'arg' of type '(string, object)' in 'string ILocalizationManager.GetString(string messageId, (string, object) arg)' due to differences in the nullability of reference types.
comp.coldownStart = _timing.CurTime + comp.coldown;
}
}

public void EditSpeed(Entity<ExpendedBowsComponent> bow, ref GunRefreshModifiersEvent args)
{
args.ProjectileSpeed *= bow.Comp.TensionAnModieferSpeed[bow.Comp.StepOfTension];

}
}
2 changes: 1 addition & 1 deletion Content.Shared/Weapons/Ranged/Components/GunComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public sealed partial class GunComponent : Component
/// <summary>
/// The base value for how fast the projectile moves.
/// </summary>
[DataField]
[DataField]
public float ProjectileSpeed = 30f; // ADT-Tweak 42f -> 30f

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
popup-bow-use-null = {$user} отпускает тетеву!
popup-bow-use-light = {$user} начинает натягивать тетеву!
popup-bow-use-medium = {$user} натягивает тетеву сильнее!
popup-bow-use-hard = {$user} натягивает тетеву максимально!
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
projectiles: !type:ContainerSlot
- type: ContainerAmmoProvider
container: projectiles
- type: ExpendedBows # ADT-Tweak

- type: entity
id: BowImprovised
Expand Down
Loading