Tweaks: разные мелкие исправления и корректировки (#22)

* add: система улучшения зрения для слепых

* tweak: повышен урон дробовиков, повышен разброс

* tweak: скорость снарядов лазеров увеличена вдвое

* fix: фикс отображение веревки крюка-кошки

* fix: исправлено отображение воспоминаний

* tweak: перевод геймпресета революции

* fix: фикс отображения цели и рефактор правила культа

* add: Теперь помповые ружья нужно перезаряжать вручную

* tweak: повышен урон других снарядов дробовиков

* tweak: вещмешок синдиката больше не замедляет

* fix: исправлено отображение слота хранилища костюма в инвентаре
This commit is contained in:
Remuchi
2024-02-03 17:49:33 +07:00
committed by GitHub
parent 66e628e476
commit 3cfa1890b0
35 changed files with 432 additions and 424 deletions

View File

@@ -67,6 +67,9 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
visuals.Sprite = component.RopeSprite;
visuals.OffsetA = new Vector2(0f, 0.5f);
visuals.Target = uid;
component.Joint = visuals.Target;
Dirty(shotUid.Value, visuals);
}
@@ -91,7 +94,7 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
if (msg.Reeling &&
(!TryComp<CombatModeComponent>(player, out var combatMode) ||
!combatMode.IsInCombatMode))
!combatMode.IsInCombatMode))
{
return;
}
@@ -132,7 +135,7 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
component.Projectile = null;
SetReeling(uid, component, false, args.User);
_gun.ChangeBasicEntityAmmoCount(uid, 1);
_gun.ChangeBasicEntityAmmoCount(uid, 1);
args.Handled = true;
}

View File

@@ -44,6 +44,24 @@ public sealed partial class BallisticAmmoProviderComponent : Component
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public bool Cycleable = true;
/// <summary>
/// Is the firearm currently cycled?
/// It cannot fire if is it not cycled.
/// Must be manually cycled if it is not cycled.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField]
[AutoNetworkedField]
public bool? Cycled = true;
public bool IsCycled => Cycled is true or null;
/// <summary>
/// Automatically cycles the firearm after firing a round
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField]
[AutoNetworkedField]
public bool AutoCycle = true;
/// <summary>
/// Is it okay for this entity to directly transfer its valid ammunition into another provider?
/// </summary>

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Weapons.Ranged.Components;
public sealed partial class GrapplingGunComponent : Component
{
[DataField("jointId"), AutoNetworkedField]
public string Joint = string.Empty;
public EntityUid? Joint;
[DataField, AutoNetworkedField]
public EntityUid? Projectile;

View File

@@ -206,6 +206,7 @@ public abstract partial class SharedGunSystem
var shots = GetBallisticShots(component);
Cycle(uid, component, coordinates);
component.Cycled = true;
var text = Loc.GetString(shots == 0 ? "gun-ballistic-cycled-empty" : "gun-ballistic-cycled");
@@ -243,6 +244,9 @@ public abstract partial class SharedGunSystem
private void OnBallisticTakeAmmo(EntityUid uid, BallisticAmmoProviderComponent component, TakeAmmoEvent args)
{
if (!component.IsCycled)
return;
for (var i = 0; i < args.Shots; i++)
{
EntityUid entity;
@@ -263,6 +267,10 @@ public abstract partial class SharedGunSystem
}
}
//un-cycle the firearm
if (!component.AutoCycle)
component.Cycled = false;
UpdateBallisticAppearance(uid, component);
Dirty(uid, component);
}