2021-02-27 04:12:09 +01:00
|
|
|
using System;
|
2019-04-15 21:11:38 -06:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-07-12 01:32:10 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2019-04-15 21:11:38 -06:00
|
|
|
using Robust.Shared.Map;
|
2020-08-11 16:44:15 -07:00
|
|
|
using Robust.Shared.Maths;
|
2019-04-15 21:11:38 -06:00
|
|
|
using Robust.Shared.Serialization;
|
2018-12-13 14:49:57 +01:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.Weapons.Ranged.Components
|
2018-12-13 14:49:57 +01:00
|
|
|
{
|
2021-07-12 01:32:10 -07:00
|
|
|
[NetworkedComponent()]
|
2020-06-22 05:47:15 +10:00
|
|
|
public abstract class SharedRangedWeaponComponent : Component
|
2018-12-13 14:49:57 +01:00
|
|
|
{
|
2020-06-22 05:47:15 +10:00
|
|
|
// Each RangedWeapon should have a RangedWeapon component +
|
|
|
|
|
// some kind of RangedBarrelComponent (this dictates what ammo is retrieved).
|
|
|
|
|
}
|
2018-12-13 14:49:57 +01:00
|
|
|
|
2020-06-22 05:47:15 +10:00
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public sealed class RangedWeaponComponentState : ComponentState
|
|
|
|
|
{
|
|
|
|
|
public FireRateSelector FireRateSelector { get; }
|
2021-02-27 04:12:09 +01:00
|
|
|
|
2020-06-22 05:47:15 +10:00
|
|
|
public RangedWeaponComponentState(
|
|
|
|
|
FireRateSelector fireRateSelector
|
2021-07-12 01:32:10 -07:00
|
|
|
)
|
2018-12-13 14:49:57 +01:00
|
|
|
{
|
2020-06-22 05:47:15 +10:00
|
|
|
FireRateSelector = fireRateSelector;
|
2018-12-13 14:49:57 +01:00
|
|
|
}
|
2020-06-22 05:47:15 +10:00
|
|
|
}
|
2018-12-13 14:49:57 +01:00
|
|
|
|
2020-08-11 16:44:15 -07:00
|
|
|
/// <summary>
|
2022-01-30 17:39:46 +11:00
|
|
|
/// An event raised when the weapon is fired at a position on the map by a client.
|
2020-08-11 16:44:15 -07:00
|
|
|
/// </summary>
|
2020-06-22 05:47:15 +10:00
|
|
|
[Serializable, NetSerializable]
|
2022-01-30 17:39:46 +11:00
|
|
|
public sealed class FirePosEvent : EntityEventArgs
|
2020-06-22 05:47:15 +10:00
|
|
|
{
|
2022-01-30 17:39:46 +11:00
|
|
|
public EntityCoordinates Coordinates;
|
2018-12-13 14:49:57 +01:00
|
|
|
|
2022-01-30 17:39:46 +11:00
|
|
|
public FirePosEvent(EntityCoordinates coordinates)
|
2020-06-22 05:47:15 +10:00
|
|
|
{
|
2022-01-30 17:39:46 +11:00
|
|
|
Coordinates = coordinates;
|
2018-12-13 14:49:57 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|