Revert click damage mod (#19860)
Maybe swings should be default and we make the animation not shit and the prediction slightly better.
This commit is contained in:
@@ -74,15 +74,8 @@ public sealed partial class MeleeWeaponComponent : Component
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Multiplies damage by this amount for single-target attacks.
|
/// Multiplies damage by this amount for single-target attacks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables(VVAccess.ReadWrite), DataField("heavyDamageModifier")]
|
[ViewVariables(VVAccess.ReadWrite), DataField("clickDamageModifier")]
|
||||||
public FixedPoint2 HeavyDamageModifier = FixedPoint2.New(1.25);
|
public FixedPoint2 ClickDamageModifier;
|
||||||
|
|
||||||
//TODO: Was set to 0 value as of 2023-08-06, might want to delete later if we never go back to this idea
|
|
||||||
/// <summary>
|
|
||||||
/// How much stamina it costs for a heavy attack.
|
|
||||||
/// </summary>
|
|
||||||
[ViewVariables(VVAccess.ReadWrite), DataField("heavyStaminaCost")]
|
|
||||||
public float HeavyStaminaCost = 0f;
|
|
||||||
|
|
||||||
// TODO: Temporarily 1.5 until interactionoutline is adjusted to use melee, then probably drop to 1.2
|
// TODO: Temporarily 1.5 until interactionoutline is adjusted to use melee, then probably drop to 1.2
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
|||||||
if (gun.NextFire > component.NextAttack)
|
if (gun.NextFire > component.NextAttack)
|
||||||
{
|
{
|
||||||
component.NextAttack = gun.NextFire;
|
component.NextAttack = gun.NextFire;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
component.NextAttack = minimum;
|
component.NextAttack = minimum;
|
||||||
Dirty(component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnGetBonusMeleeDamage(EntityUid uid, BonusMeleeDamageComponent component, ref GetMeleeDamageEvent args)
|
private void OnGetBonusMeleeDamage(EntityUid uid, BonusMeleeDamageComponent component, ref GetMeleeDamageEvent args)
|
||||||
@@ -173,7 +173,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
weapon.Attacking = false;
|
weapon.Attacking = false;
|
||||||
Dirty(weapon);
|
Dirty(weaponUid, weapon);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnLightAttack(LightAttackEvent msg, EntitySessionEventArgs args)
|
private void OnLightAttack(LightAttackEvent msg, EntitySessionEventArgs args)
|
||||||
@@ -272,7 +272,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
|||||||
if (!Resolve(uid, ref component))
|
if (!Resolve(uid, ref component))
|
||||||
return FixedPoint2.Zero;
|
return FixedPoint2.Zero;
|
||||||
|
|
||||||
var ev = new GetHeavyDamageModifierEvent(uid, component.HeavyDamageModifier, 1, user);
|
var ev = new GetHeavyDamageModifierEvent(uid, component.ClickDamageModifier, 1, user);
|
||||||
RaiseLocalEvent(uid, ref ev);
|
RaiseLocalEvent(uid, ref ev);
|
||||||
|
|
||||||
return ev.DamageModifier * ev.Multipliers;
|
return ev.DamageModifier * ev.Multipliers;
|
||||||
@@ -398,7 +398,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
|||||||
swings++;
|
swings++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty(weapon);
|
Dirty(weaponUid, weapon);
|
||||||
|
|
||||||
// Do this AFTER attack so it doesn't spam every tick
|
// Do this AFTER attack so it doesn't spam every tick
|
||||||
var ev = new AttemptMeleeEvent();
|
var ev = new AttemptMeleeEvent();
|
||||||
@@ -566,12 +566,6 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
|||||||
if (targetMap.MapId != userXform.MapID)
|
if (targetMap.MapId != userXform.MapID)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!_stamina.TryTakeStamina(user, component.HeavyStaminaCost))
|
|
||||||
{
|
|
||||||
PopupSystem.PopupClient(Loc.GetString("melee-stamina"), user, user);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var userPos = TransformSystem.GetWorldPosition(userXform);
|
var userPos = TransformSystem.GetWorldPosition(userXform);
|
||||||
var direction = targetMap.Position - userPos;
|
var direction = targetMap.Position - userPos;
|
||||||
var distance = Math.Min(component.Range, direction.Length());
|
var distance = Math.Min(component.Range, direction.Length());
|
||||||
|
|||||||
@@ -271,8 +271,7 @@
|
|||||||
attackRate: 1
|
attackRate: 1
|
||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
# Actually does 5 damage due to +25% damage bonus on all single target melee attacks
|
Blunt: 5
|
||||||
Blunt: 4
|
|
||||||
- type: Pullable
|
- type: Pullable
|
||||||
- type: DoAfter
|
- type: DoAfter
|
||||||
- type: CreamPied
|
- type: CreamPied
|
||||||
|
|||||||
@@ -43,8 +43,7 @@
|
|||||||
animation: WeaponArcPunch
|
animation: WeaponArcPunch
|
||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
# Actually does 5 damage due to +25% damage bonus on all single target melee attacks
|
Piercing: 5
|
||||||
Piercing: 4
|
|
||||||
- type: Temperature
|
- type: Temperature
|
||||||
heatDamageThreshold: 400
|
heatDamageThreshold: 400
|
||||||
coldDamageThreshold: 285
|
coldDamageThreshold: 285
|
||||||
|
|||||||
Reference in New Issue
Block a user