Spray Nozzle & Backpack Water Tank (#16133)
@@ -181,7 +181,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
|||||||
{
|
{
|
||||||
if (throwItems)
|
if (throwItems)
|
||||||
{
|
{
|
||||||
Recoil(user, direction);
|
Recoil(user, direction, gun.CameraRecoilScalar);
|
||||||
if (ent!.Value.IsClientSide())
|
if (ent!.Value.IsClientSide())
|
||||||
Del(ent.Value);
|
Del(ent.Value);
|
||||||
else
|
else
|
||||||
@@ -197,7 +197,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
|||||||
SetCartridgeSpent(ent!.Value, cartridge, true);
|
SetCartridgeSpent(ent!.Value, cartridge, true);
|
||||||
MuzzleFlash(gunUid, cartridge, user);
|
MuzzleFlash(gunUid, cartridge, user);
|
||||||
Audio.PlayPredicted(gun.SoundGunshot, gunUid, user);
|
Audio.PlayPredicted(gun.SoundGunshot, gunUid, user);
|
||||||
Recoil(user, direction);
|
Recoil(user, direction, gun.CameraRecoilScalar);
|
||||||
// TODO: Can't predict entity deletions.
|
// TODO: Can't predict entity deletions.
|
||||||
//if (cartridge.DeleteOnSpawn)
|
//if (cartridge.DeleteOnSpawn)
|
||||||
// Del(cartridge.Owner);
|
// Del(cartridge.Owner);
|
||||||
@@ -214,7 +214,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
|||||||
case AmmoComponent newAmmo:
|
case AmmoComponent newAmmo:
|
||||||
MuzzleFlash(gunUid, newAmmo, user);
|
MuzzleFlash(gunUid, newAmmo, user);
|
||||||
Audio.PlayPredicted(gun.SoundGunshot, gunUid, user);
|
Audio.PlayPredicted(gun.SoundGunshot, gunUid, user);
|
||||||
Recoil(user, direction);
|
Recoil(user, direction, gun.CameraRecoilScalar);
|
||||||
if (ent!.Value.IsClientSide())
|
if (ent!.Value.IsClientSide())
|
||||||
Del(ent.Value);
|
Del(ent.Value);
|
||||||
else
|
else
|
||||||
@@ -222,18 +222,18 @@ public sealed partial class GunSystem : SharedGunSystem
|
|||||||
break;
|
break;
|
||||||
case HitscanPrototype:
|
case HitscanPrototype:
|
||||||
Audio.PlayPredicted(gun.SoundGunshot, gunUid, user);
|
Audio.PlayPredicted(gun.SoundGunshot, gunUid, user);
|
||||||
Recoil(user, direction);
|
Recoil(user, direction, gun.CameraRecoilScalar);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Recoil(EntityUid? user, Vector2 recoil)
|
private void Recoil(EntityUid? user, Vector2 recoil, float recoilScalar)
|
||||||
{
|
{
|
||||||
if (!Timing.IsFirstTimePredicted || user == null || recoil == Vector2.Zero)
|
if (!Timing.IsFirstTimePredicted || user == null || recoil == Vector2.Zero || recoilScalar == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_recoil.KickCamera(user.Value, recoil.Normalized * 0.5f);
|
_recoil.KickCamera(user.Value, recoil.Normalized * 0.5f * recoilScalar);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Popup(string message, EntityUid? uid, EntityUid? user)
|
protected override void Popup(string message, EntityUid? uid, EntityUid? user)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace Content.Server.Chemistry.Components
|
|||||||
public FixedPoint2 TransferAmount = FixedPoint2.New(0.5);
|
public FixedPoint2 TransferAmount = FixedPoint2.New(0.5);
|
||||||
|
|
||||||
public float ReactTimer;
|
public float ReactTimer;
|
||||||
|
[DataField("active")]
|
||||||
public bool Active;
|
public bool Active;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
82
Content.Server/Weapons/Ranged/Systems/GunSystem.Solution.cs
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
using Content.Server.Chemistry.Components;
|
||||||
|
using Content.Server.Chemistry.EntitySystems;
|
||||||
|
using Content.Shared.Chemistry.Components;
|
||||||
|
using Content.Shared.FixedPoint;
|
||||||
|
using Content.Shared.Vapor;
|
||||||
|
using Content.Shared.Weapons.Ranged;
|
||||||
|
using Content.Shared.Weapons.Ranged.Components;
|
||||||
|
using Robust.Shared.Map;
|
||||||
|
|
||||||
|
namespace Content.Server.Weapons.Ranged.Systems;
|
||||||
|
|
||||||
|
public sealed partial class GunSystem
|
||||||
|
{
|
||||||
|
[Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
|
||||||
|
|
||||||
|
protected override void InitializeSolution()
|
||||||
|
{
|
||||||
|
base.InitializeSolution();
|
||||||
|
|
||||||
|
SubscribeLocalEvent<SolutionAmmoProviderComponent, MapInitEvent>(OnSolutionMapInit);
|
||||||
|
SubscribeLocalEvent<SolutionAmmoProviderComponent, SolutionChangedEvent>(OnSolutionChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSolutionMapInit(EntityUid uid, SolutionAmmoProviderComponent component, MapInitEvent args)
|
||||||
|
{
|
||||||
|
UpdateSolutionShots(uid, component);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSolutionChanged(EntityUid uid, SolutionAmmoProviderComponent component, SolutionChangedEvent args)
|
||||||
|
{
|
||||||
|
if (args.Solution.Name == component.SolutionId)
|
||||||
|
UpdateSolutionShots(uid, component, args.Solution);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void UpdateSolutionShots(EntityUid uid, SolutionAmmoProviderComponent component, Solution? solution = null)
|
||||||
|
{
|
||||||
|
var shots = 0;
|
||||||
|
var maxShots = 0;
|
||||||
|
if (solution == null && !_solutionContainer.TryGetSolution(uid, component.SolutionId, out solution))
|
||||||
|
{
|
||||||
|
component.Shots = shots;
|
||||||
|
component.MaxShots = maxShots;
|
||||||
|
Dirty(component);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
shots = (int) (solution.Volume / component.FireCost);
|
||||||
|
maxShots = (int) (solution.MaxVolume / component.FireCost);
|
||||||
|
|
||||||
|
component.Shots = shots;
|
||||||
|
component.MaxShots = maxShots;
|
||||||
|
Dirty(component);
|
||||||
|
|
||||||
|
UpdateSolutionAppearance(uid, component);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override (EntityUid Entity, IShootable) GetSolutionShot(EntityUid uid, SolutionAmmoProviderComponent component, EntityCoordinates position)
|
||||||
|
{
|
||||||
|
var (ent, shootable) = base.GetSolutionShot(uid, component, position);
|
||||||
|
|
||||||
|
if (!_solutionContainer.TryGetSolution(uid, component.SolutionId, out var solution))
|
||||||
|
return (ent, shootable);
|
||||||
|
|
||||||
|
var newSolution = _solutionContainer.SplitSolution(uid, solution, component.FireCost);
|
||||||
|
|
||||||
|
if (newSolution.Volume <= FixedPoint2.Zero)
|
||||||
|
return (ent, shootable);
|
||||||
|
|
||||||
|
if (TryComp<AppearanceComponent>(ent, out var appearance))
|
||||||
|
{
|
||||||
|
Appearance.SetData(ent, VaporVisuals.Color, newSolution.GetColor(ProtoManager).WithAlpha(1f), appearance);
|
||||||
|
Appearance.SetData(ent, VaporVisuals.State, true, appearance);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the solution to the vapor and actually send the thing
|
||||||
|
if (_solutionContainer.TryGetSolution(ent, VaporComponent.SolutionName, out var vaporSolution))
|
||||||
|
{
|
||||||
|
_solutionContainer.TryAddSolution(ent, vaporSolution, newSolution);
|
||||||
|
}
|
||||||
|
return (ent, shootable);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using Content.Shared.Inventory;
|
||||||
|
using Content.Shared.Weapons.Ranged.Systems;
|
||||||
|
using Content.Shared.Whitelist;
|
||||||
|
using Robust.Shared.GameStates;
|
||||||
|
|
||||||
|
namespace Content.Shared.Weapons.Ranged.Components;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This is used for relaying ammo events
|
||||||
|
/// to an entity in the user's clothing slot.
|
||||||
|
/// </summary>
|
||||||
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedGunSystem))]
|
||||||
|
public sealed class ClothingSlotAmmoProviderComponent : AmmoProviderComponent
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The slot that the ammo provider should be located in.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("targetSlot", required: true)]
|
||||||
|
public SlotFlags TargetSlot;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A whitelist for determining whether or not an ammo provider is valid.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("providerWhitelist")]
|
||||||
|
public EntityWhitelist? ProviderWhitelist;
|
||||||
|
}
|
||||||
@@ -30,6 +30,13 @@ public partial class GunComponent : Component
|
|||||||
|
|
||||||
// These values are very small for now until we get a debug overlay and fine tune it
|
// These values are very small for now until we get a debug overlay and fine tune it
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A scalar value applied to the vector governing camera recoil.
|
||||||
|
/// If 0, there will be no camera recoil.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("cameraRecoilScalar"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||||
|
public float CameraRecoilScalar = 1f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Last time the gun fired.
|
/// Last time the gun fired.
|
||||||
/// Used for recoil purposes.
|
/// Used for recoil purposes.
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
using Content.Shared.Weapons.Ranged.Systems;
|
||||||
|
using Robust.Shared.GameStates;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||||
|
|
||||||
|
namespace Content.Shared.Weapons.Ranged.Components;
|
||||||
|
|
||||||
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedGunSystem))]
|
||||||
|
public sealed partial class SolutionAmmoProviderComponent : Component
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The solution where reagents are extracted from for the projectile.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("solutionId", required: true), AutoNetworkedField]
|
||||||
|
public string SolutionId = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// How much reagent it costs to fire once.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("fireCost"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||||
|
public float FireCost = 10;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The amount of shots currently available.
|
||||||
|
/// used for network predictions.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("shots"), ViewVariables, AutoNetworkedField]
|
||||||
|
public int Shots;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The max amount of shots the gun can fire.
|
||||||
|
/// used for network prediction
|
||||||
|
/// </summary>
|
||||||
|
[DataField("maxShots"), ViewVariables, AutoNetworkedField]
|
||||||
|
public int MaxShots;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The prototype that's fired by the gun.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("proto", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>)), ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public string Prototype = default!;
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using Content.Shared.Inventory;
|
||||||
|
using Content.Shared.Weapons.Ranged.Components;
|
||||||
|
using Content.Shared.Weapons.Ranged.Events;
|
||||||
|
|
||||||
|
namespace Content.Shared.Weapons.Ranged.Systems;
|
||||||
|
|
||||||
|
public partial class SharedGunSystem
|
||||||
|
{
|
||||||
|
[Dependency] private readonly InventorySystem _inventory = default!;
|
||||||
|
|
||||||
|
private void InitializeClothing()
|
||||||
|
{
|
||||||
|
SubscribeLocalEvent<ClothingSlotAmmoProviderComponent, TakeAmmoEvent>(OnClothingTakeAmmo);
|
||||||
|
SubscribeLocalEvent<ClothingSlotAmmoProviderComponent, GetAmmoCountEvent>(OnClothingAmmoCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnClothingTakeAmmo(EntityUid uid, ClothingSlotAmmoProviderComponent component, TakeAmmoEvent args)
|
||||||
|
{
|
||||||
|
if (!TryGetClothingSlotEntity(uid, component, out var entity))
|
||||||
|
return;
|
||||||
|
RaiseLocalEvent(entity.Value, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnClothingAmmoCount(EntityUid uid, ClothingSlotAmmoProviderComponent component, ref GetAmmoCountEvent args)
|
||||||
|
{
|
||||||
|
if (!TryGetClothingSlotEntity(uid, component, out var entity))
|
||||||
|
return;
|
||||||
|
RaiseLocalEvent(entity.Value, ref args);
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool TryGetClothingSlotEntity(EntityUid uid, ClothingSlotAmmoProviderComponent component, [NotNullWhen(true)] out EntityUid? slotEntity)
|
||||||
|
{
|
||||||
|
slotEntity = null;
|
||||||
|
if (!_container.TryGetContainingContainer(uid, out var container))
|
||||||
|
return false;
|
||||||
|
var user = container.Owner;
|
||||||
|
|
||||||
|
if (!TryComp<InventoryComponent>(user, out var inventory))
|
||||||
|
return false;
|
||||||
|
var slots = _inventory.GetSlots(user, inventory);
|
||||||
|
foreach (var slot in slots)
|
||||||
|
{
|
||||||
|
if (slot.SlotFlags != component.TargetSlot)
|
||||||
|
continue;
|
||||||
|
if (!_inventory.TryGetSlotEntity(user, slot.Name, out var e, inventory))
|
||||||
|
continue;
|
||||||
|
if (component.ProviderWhitelist != null && !component.ProviderWhitelist.IsValid(e.Value, EntityManager))
|
||||||
|
continue;
|
||||||
|
slotEntity = e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return slotEntity != null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
using Content.Shared.Chemistry.Components;
|
||||||
|
using Content.Shared.Weapons.Ranged.Components;
|
||||||
|
using Content.Shared.Weapons.Ranged.Events;
|
||||||
|
using Robust.Shared.Map;
|
||||||
|
|
||||||
|
namespace Content.Shared.Weapons.Ranged.Systems;
|
||||||
|
|
||||||
|
public partial class SharedGunSystem
|
||||||
|
{
|
||||||
|
protected virtual void InitializeSolution()
|
||||||
|
{
|
||||||
|
SubscribeLocalEvent<SolutionAmmoProviderComponent, TakeAmmoEvent>(OnSolutionTakeAmmo);
|
||||||
|
SubscribeLocalEvent<SolutionAmmoProviderComponent, GetAmmoCountEvent>(OnSolutionAmmoCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSolutionTakeAmmo(EntityUid uid, SolutionAmmoProviderComponent component, TakeAmmoEvent args)
|
||||||
|
{
|
||||||
|
var shots = Math.Min(args.Shots, component.Shots);
|
||||||
|
|
||||||
|
// Don't dirty if it's an empty fire.
|
||||||
|
if (shots == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (var i = 0; i < shots; i++)
|
||||||
|
{
|
||||||
|
args.Ammo.Add(GetSolutionShot(uid, component, args.Coordinates));
|
||||||
|
component.Shots--;
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateSolutionShots(uid, component);
|
||||||
|
UpdateSolutionAppearance(uid, component);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSolutionAmmoCount(EntityUid uid, SolutionAmmoProviderComponent component, ref GetAmmoCountEvent args)
|
||||||
|
{
|
||||||
|
args.Count = component.Shots;
|
||||||
|
args.Capacity = component.MaxShots;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void UpdateSolutionShots(EntityUid uid, SolutionAmmoProviderComponent component, Solution? solution = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual (EntityUid Entity, IShootable) GetSolutionShot(EntityUid uid, SolutionAmmoProviderComponent component, EntityCoordinates position)
|
||||||
|
{
|
||||||
|
var ent = Spawn(component.Prototype, position);
|
||||||
|
return (ent, EnsureComp<AmmoComponent>(ent));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void UpdateSolutionAppearance(EntityUid uid, SolutionAmmoProviderComponent component)
|
||||||
|
{
|
||||||
|
if (!TryComp<AppearanceComponent>(uid, out var appearance))
|
||||||
|
return;
|
||||||
|
|
||||||
|
Appearance.SetData(uid, AmmoVisuals.HasAmmo, component.Shots != 0, appearance);
|
||||||
|
Appearance.SetData(uid, AmmoVisuals.AmmoCount, component.Shots, appearance);
|
||||||
|
Appearance.SetData(uid, AmmoVisuals.AmmoMax, component.MaxShots, appearance);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -79,7 +79,9 @@ public abstract partial class SharedGunSystem : EntitySystem
|
|||||||
InitializeMagazine();
|
InitializeMagazine();
|
||||||
InitializeRevolver();
|
InitializeRevolver();
|
||||||
InitializeBasicEntity();
|
InitializeBasicEntity();
|
||||||
|
InitializeClothing();
|
||||||
InitializeContainer();
|
InitializeContainer();
|
||||||
|
InitializeSolution();
|
||||||
|
|
||||||
// Interactions
|
// Interactions
|
||||||
SubscribeLocalEvent<GunComponent, GetVerbsEvent<AlternativeVerb>>(OnAltVerb);
|
SubscribeLocalEvent<GunComponent, GetVerbsEvent<AlternativeVerb>>(OnAltVerb);
|
||||||
|
|||||||
4
Resources/Audio/Weapons/Guns/Gunshots/attributions.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
- files: ["water_spray.ogg"]
|
||||||
|
license: "CC0-1.0"
|
||||||
|
copyright: "Watering by elittle13. Converted to .OGG and MONO by EmoGarbage404 (github)"
|
||||||
|
source: "https://freesound.org/people/elittle13/sounds/568558"
|
||||||
BIN
Resources/Audio/Weapons/Guns/Gunshots/water_spray.ogg
Normal file
@@ -7,6 +7,9 @@ technologies-cleaning-technology-description = Start to a shiny clean station.
|
|||||||
technologies-advanced-cleaning-technology = Advanced cleaning technology
|
technologies-advanced-cleaning-technology = Advanced cleaning technology
|
||||||
technologies-advanced-cleaning-technology-description = Advanced tools won't stop people from trashing the station, sadly.
|
technologies-advanced-cleaning-technology-description = Advanced tools won't stop people from trashing the station, sadly.
|
||||||
|
|
||||||
|
technologies-advanced-spray-technology = Advanced spray technology
|
||||||
|
technologies-advanced-spray-technology-description = The newest ways to hose down the station. Filthy animals.
|
||||||
|
|
||||||
technologies-foodbev-technology = Food and beverage technology
|
technologies-foodbev-technology = Food and beverage technology
|
||||||
technologies-food-and-beverage-technology-description = Robust service from better technology.
|
technologies-food-and-beverage-technology-description = Robust service from better technology.
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,20 @@
|
|||||||
- AdvMopItem
|
- AdvMopItem
|
||||||
- MegaSprayBottle
|
- MegaSprayBottle
|
||||||
|
|
||||||
|
- type: technology
|
||||||
|
id: AdvancedSprayTechnology
|
||||||
|
name: technologies-advanced-spray-technology
|
||||||
|
description: technologies-advanced-spray-technology-description
|
||||||
|
icon:
|
||||||
|
sprite: Objects/Weapons/Guns/Basic/spraynozzle.rsi
|
||||||
|
state: icon
|
||||||
|
requiredPoints: 7500
|
||||||
|
requiredTechnologies:
|
||||||
|
- AdvancedCleaningTechnology
|
||||||
|
unlockedRecipes:
|
||||||
|
- WeaponSprayNozzle
|
||||||
|
- ClothingBackpackWaterTank
|
||||||
|
|
||||||
# Food/Bev Service Technology Tree
|
# Food/Bev Service Technology Tree
|
||||||
|
|
||||||
- type: technology
|
- type: technology
|
||||||
|
|||||||
@@ -21,3 +21,45 @@
|
|||||||
type: StorageBoundUserInterface
|
type: StorageBoundUserInterface
|
||||||
- key: enum.ChameleonUiKey.Key
|
- key: enum.ChameleonUiKey.Key
|
||||||
type: ChameleonBoundUserInterface
|
type: ChameleonBoundUserInterface
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: Clothing
|
||||||
|
id: ClothingBackpackWaterTank
|
||||||
|
name: backpack water tank
|
||||||
|
description: Holds a large amount of fluids. Supplies to spray nozzles in your hands.
|
||||||
|
components:
|
||||||
|
- type: Tag
|
||||||
|
tags:
|
||||||
|
- NozzleBackTank
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Clothing/Back/Backpacks/waterbackpack.rsi
|
||||||
|
state: icon
|
||||||
|
- type: Item
|
||||||
|
size: 200
|
||||||
|
- type: Clothing
|
||||||
|
slots: BACK
|
||||||
|
sprite: Clothing/Back/Backpacks/waterbackpack.rsi
|
||||||
|
- type: SolutionAmmoProvider
|
||||||
|
solutionId: tank
|
||||||
|
proto: BulletWaterShot
|
||||||
|
- type: SolutionContainerManager
|
||||||
|
solutions:
|
||||||
|
tank:
|
||||||
|
maxVol: 1000 #much water
|
||||||
|
- type: SolutionTransfer
|
||||||
|
transferAmount: 50
|
||||||
|
maxTransferAmount: 100
|
||||||
|
minTransferAmount: 10
|
||||||
|
canChangeTransferAmount: true
|
||||||
|
- type: UserInterface
|
||||||
|
interfaces:
|
||||||
|
- key: enum.TransferAmountUiKey.Key
|
||||||
|
type: TransferAmountBoundUserInterface
|
||||||
|
- type: DrawableSolution
|
||||||
|
solution: tank
|
||||||
|
- type: RefillableSolution
|
||||||
|
solution: tank
|
||||||
|
- type: DrainableSolution
|
||||||
|
solution: tank
|
||||||
|
- type: ExaminableSolution
|
||||||
|
solution: tank
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
- type: entity
|
||||||
|
id: WeaponSprayNozzle
|
||||||
|
parent: BaseItem
|
||||||
|
name: spray nozzle
|
||||||
|
description: A high-powered spray nozzle used in conjunction with a backpack-mounted water tank.
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Objects/Weapons/Guns/Basic/spraynozzle.rsi
|
||||||
|
state: icon
|
||||||
|
- type: Item
|
||||||
|
sprite: Objects/Weapons/Guns/Basic/spraynozzle.rsi
|
||||||
|
size: 30
|
||||||
|
- type: Gun
|
||||||
|
cameraRecoilScalar: 0 #no recoil
|
||||||
|
fireRate: 4
|
||||||
|
selectedMode: FullAuto
|
||||||
|
availableModes:
|
||||||
|
- FullAuto
|
||||||
|
soundGunshot:
|
||||||
|
path: /Audio/Weapons/Guns/Gunshots/water_spray.ogg
|
||||||
|
- type: Appearance
|
||||||
|
- type: ClothingSlotAmmoProvider
|
||||||
|
targetSlot: BACK
|
||||||
|
providerWhitelist:
|
||||||
|
tags:
|
||||||
|
- NozzleBackTank
|
||||||
@@ -566,6 +566,47 @@
|
|||||||
- type: Ammo
|
- type: Ammo
|
||||||
muzzleFlash: null
|
muzzleFlash: null
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: BulletWaterShot
|
||||||
|
name: water
|
||||||
|
noSpawn: true
|
||||||
|
components:
|
||||||
|
- type: Clickable
|
||||||
|
- type: Physics
|
||||||
|
bodyType: Dynamic
|
||||||
|
linearDamping: 0
|
||||||
|
angularDamping: 0
|
||||||
|
- type: TimedDespawn
|
||||||
|
lifetime: 10
|
||||||
|
- type: Projectile
|
||||||
|
damage:
|
||||||
|
types:
|
||||||
|
Blunt: 0 #it's just water, bro
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Objects/Weapons/Guns/Projectiles/water_shot.rsi
|
||||||
|
layers:
|
||||||
|
- state: icon
|
||||||
|
map: ["enum.VaporVisualLayers.Base"]
|
||||||
|
- type: Ammo
|
||||||
|
muzzleFlash: null
|
||||||
|
- type: SolutionContainerManager
|
||||||
|
solutions:
|
||||||
|
vapor:
|
||||||
|
maxVol: 50
|
||||||
|
- type: Fixtures
|
||||||
|
fixtures:
|
||||||
|
- shape:
|
||||||
|
!type:PhysShapeAabb
|
||||||
|
bounds: "-0.25,-0.25,0.25,0.25"
|
||||||
|
hard: false
|
||||||
|
mask:
|
||||||
|
- FullTileMask
|
||||||
|
- Opaque
|
||||||
|
- type: Vapor
|
||||||
|
active: true
|
||||||
|
- type: Appearance
|
||||||
|
- type: VaporVisuals
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: BulletCannonBall
|
id: BulletCannonBall
|
||||||
name: cannonball
|
name: cannonball
|
||||||
|
|||||||
@@ -215,6 +215,8 @@
|
|||||||
- Bucket
|
- Bucket
|
||||||
- MopItem
|
- MopItem
|
||||||
- AdvMopItem
|
- AdvMopItem
|
||||||
|
- WeaponSprayNozzle
|
||||||
|
- ClothingBackpackWaterTank
|
||||||
- SprayBottle
|
- SprayBottle
|
||||||
- MegaSprayBottle
|
- MegaSprayBottle
|
||||||
- FireExtinguisher
|
- FireExtinguisher
|
||||||
|
|||||||
@@ -64,3 +64,19 @@
|
|||||||
Plastic: 400
|
Plastic: 400
|
||||||
Steel: 100
|
Steel: 100
|
||||||
Glass: 100
|
Glass: 100
|
||||||
|
|
||||||
|
- type: latheRecipe
|
||||||
|
id: WeaponSprayNozzle
|
||||||
|
result: WeaponSprayNozzle
|
||||||
|
completetime: 5
|
||||||
|
materials:
|
||||||
|
Steel: 1500
|
||||||
|
Glass: 500
|
||||||
|
|
||||||
|
- type: latheRecipe
|
||||||
|
id: ClothingBackpackWaterTank
|
||||||
|
result: ClothingBackpackWaterTank
|
||||||
|
completetime: 4
|
||||||
|
materials:
|
||||||
|
Steel: 250
|
||||||
|
Glass: 1000
|
||||||
|
|||||||
@@ -504,6 +504,9 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: NoBlockAnchoring
|
id: NoBlockAnchoring
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: NozzleBackTank
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: NukeOpsUplink
|
id: NukeOpsUplink
|
||||||
|
|
||||||
|
|||||||
|
After Width: | Height: | Size: 926 B |
|
After Width: | Height: | Size: 828 B |
|
After Width: | Height: | Size: 573 B |
|
After Width: | Height: | Size: 578 B |
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"license": "CC-BY-SA-3.0",
|
||||||
|
"copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/f7337f1aa9efdcc1403ca4771d638e0634074537",
|
||||||
|
"size": {
|
||||||
|
"x": 32,
|
||||||
|
"y": 32
|
||||||
|
},
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "icon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "equipped-BACKPACK",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inhand-left",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inhand-right",
|
||||||
|
"directions": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 809 B |
|
After Width: | Height: | Size: 594 B |
|
After Width: | Height: | Size: 583 B |
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"license": "CC-BY-SA-3.0",
|
||||||
|
"copyright": "tgstation at https://github.com/tgstation/tgstation/commit/f7337f1aa9efdcc1403ca4771d638e0634074537",
|
||||||
|
"size": {
|
||||||
|
"x": 32,
|
||||||
|
"y": 32
|
||||||
|
},
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "icon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inhand-right",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inhand-left",
|
||||||
|
"directions": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 250 B |
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"license": "CC0-1.0",
|
||||||
|
"copyright": "Created by EmoGarbage404 (github) for Space Station 14.",
|
||||||
|
"size": {
|
||||||
|
"x": 32,
|
||||||
|
"y": 32
|
||||||
|
},
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "icon"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||