diff --git a/Content.Server/Arcade/Components/SpaceVillainArcadeComponent.cs b/Content.Server/Arcade/Components/SpaceVillainArcadeComponent.cs
index fca97c2757..48fad3d2d0 100644
--- a/Content.Server/Arcade/Components/SpaceVillainArcadeComponent.cs
+++ b/Content.Server/Arcade/Components/SpaceVillainArcadeComponent.cs
@@ -8,6 +8,8 @@ using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
+// TODO: ECS.
+
namespace Content.Server.Arcade.Components
{
[RegisterComponent]
@@ -54,7 +56,11 @@ namespace Content.Server.Arcade.Components
{
"ToyMouse", "ToyAi", "ToyNuke", "ToyAssistant", "ToyGriffin", "ToyHonk", "ToyIan",
"ToyMarauder", "ToyMauler", "ToyGygax", "ToyOdysseus", "ToyOwlman", "ToyDeathRipley",
- "ToyPhazon", "ToyFireRipley", "ToyReticence", "ToyRipley", "ToySeraph", "ToyDurand", "ToySkeleton"
+ "ToyPhazon", "ToyFireRipley", "ToyReticence", "ToyRipley", "ToySeraph", "ToyDurand", "ToySkeleton",
+ "FoamCrossbow", "RevolverCapGun", "PlushieLizard", "PlushieSpaceLizard",
+ "PlushieNuke", "PlushieCarp", "PlushieRatvar", "PlushieNar", "PlushieSnake", "Basketball", "Football",
+ "PlushieRouny", "PlushieBee", "PlushieSlime", "BalloonCorgi", "ToySword", "CrayonBox", "BoxDonkSoftBox", "BoxCartridgeCap",
+ "HarmonicaInstrument", "OcarinaInstrument", "RecorderInstrument", "GunpetInstrument", "BirdToyInstrument"
};
protected override void Initialize()
diff --git a/Content.Server/Weapon/Melee/EnergySword/Components/EnergySwordComponent.cs b/Content.Server/Weapon/Melee/EnergySword/Components/EnergySwordComponent.cs
index f7fac0bc8d..532a2b206e 100644
--- a/Content.Server/Weapon/Melee/EnergySword/Components/EnergySwordComponent.cs
+++ b/Content.Server/Weapon/Melee/EnergySword/Components/EnergySwordComponent.cs
@@ -12,6 +12,9 @@ namespace Content.Server.Weapon.Melee.EnergySword
public bool Activated = false;
+ [DataField("isSharp")]
+ public bool IsSharp = true;
+
///
/// RGB cycle rate for hacked e-swords.
///
@@ -40,10 +43,10 @@ namespace Content.Server.Weapon.Melee.EnergySword
Color.MediumOrchid
};
- [DataField("litDamageBonus", required: true)]
- public DamageSpecifier LitDamageBonus = default!;
+ [DataField("litDamageBonus")]
+ public DamageSpecifier LitDamageBonus = new();
- [DataField("litDisarmMalus", required: true)]
+ [DataField("litDisarmMalus")]
public float litDisarmMalus = 0.6f;
}
}
diff --git a/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs b/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs
index a94afbb90c..25bd429aa7 100644
--- a/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs
+++ b/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs
@@ -80,7 +80,8 @@ namespace Content.Server.Weapon.Melee.EnergySword
if(TryComp(comp.Owner, out var weaponComp))
weaponComp.HitSound = comp.OnHitOff;
- RemComp(comp.Owner);
+ if (comp.IsSharp)
+ RemComp(comp.Owner);
SoundSystem.Play(comp.DeActivateSound.GetSound(), Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner);
@@ -97,7 +98,8 @@ namespace Content.Server.Weapon.Melee.EnergySword
_item.SetSize(comp.Owner, 9999, item);
}
- EnsureComp(comp.Owner);
+ if (comp.IsSharp)
+ EnsureComp(comp.Owner);
if(TryComp(comp.Owner, out var weaponComp))
weaponComp.HitSound = comp.OnHitOn;
diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs
index b67af7514c..56d89a048e 100644
--- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs
+++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs
@@ -151,15 +151,17 @@ public abstract partial class SharedGunSystem
{
entity = component.Entities[^1];
+ args.Ammo.Add(EnsureComp(entity));
+
// Leave the entity as is if it doesn't auto cycle
// TODO: Suss this out with NewAmmoComponent as I don't think it gets removed from container properly
- if (HasComp(entity) && component.AutoCycle)
+ if (!component.AutoCycle)
{
- component.Entities.RemoveAt(component.Entities.Count - 1);
- component.Container.Remove(entity);
+ return;
}
- args.Ammo.Add(EnsureComp(entity));
+ component.Entities.RemoveAt(component.Entities.Count - 1);
+ component.Container.Remove(entity);
}
else if (component.UnspawnedCount > 0)
{
diff --git a/Resources/Prototypes/Entities/Objects/Fun/toys.yml b/Resources/Prototypes/Entities/Objects/Fun/toys.yml
index 128b541a6f..d1ea5e30c1 100644
--- a/Resources/Prototypes/Entities/Objects/Fun/toys.yml
+++ b/Resources/Prototypes/Entities/Objects/Fun/toys.yml
@@ -487,7 +487,7 @@
- type: BallisticAmmoProvider
whitelist:
tags:
- - CartridgeRocket
+ - BulletFoam
capacity: 1
soundInsert:
path: /Audio/Weapons/drawbow2.ogg
@@ -648,3 +648,49 @@
size: 24
sprite: Objects/Fun/toys.rsi
heldPrefix: orb
+
+- type: entity
+ id: ToySword
+ name: toy sword
+ description: New Sandy-Cat plastic sword! Comes with realistic sound and full color! Looks almost like the real thing!
+ components:
+ - type: EnergySword
+ isSharp: false
+ colorOptions:
+ - DodgerBlue
+ - type: Sprite
+ sprite: Objects/Weapons/Melee/e_sword.rsi
+ layers:
+ - state: e_sword
+ - state: e_sword_blade
+ color: "#FFFFFF"
+ visible: false
+ shader: unshaded
+ map: [ "blade" ]
+ - type: Item
+ size: 5
+ sprite: Objects/Weapons/Melee/e_sword.rsi
+ - type: UseDelay
+ delay: 1.0
+ - type: PointLight
+ netsync: false
+ enabled: false
+ radius: 2
+ energy: 2
+ color: white
+ - type: Appearance
+ - type: ToggleableLightVisuals
+ spriteLayer: blade
+ inhandVisuals:
+ left:
+ - state: inhand-left-blade
+ shader: unshaded
+ right:
+ - state: inhand-right-blade
+ shader: unshaded
+ - type: DisarmMalus
+ malus: 0
+ - type: MeleeWeapon
+ damage:
+ types:
+ Blunt: 0
diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Boxes/toy.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Boxes/toy.yml
index 62098078ad..39904580fa 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Boxes/toy.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Boxes/toy.yml
@@ -20,7 +20,7 @@
components:
- type: BallisticAmmoProvider
capacity: 40
- proto: BulletDonkSoft
+ proto: BulletFoam
- type: Sprite
sprite: Objects/Fun/toys.rsi
state: foambox
diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/toy.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/toy.yml
index 6ded681011..3909d4c28d 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/toy.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/toy.yml
@@ -1,34 +1,14 @@
- type: entity
- id: BaseBulletDonkSoft
+ id: BulletFoam
+ description: I hope you're wearing eye protection.
name: foam dart
parent: BaseItem
- abstract: true
components:
- - type: Tag
- tags:
- - Cartridge
- - CartridgeRocket
- - type: Projectile
- damage:
- types:
- Blunt: 1
- soundHit:
- path: /Audio/Weapons/Guns/Hits/bullet_hit.ogg
-
-- type: entity
- id: BulletDonkSoft
- name: foam dart
- parent: BaseBulletDonkSoft
- description: I hope you're wearing eye protection.
- components:
- - type: CartridgeAmmo
- proto: BulletFoam
- deleteOnSpawn: true
- - type: Sprite
- sprite: Objects/Fun/toys.rsi
- layers:
- - state: foamdart
- - type: Projectile
- damage:
- types:
- Blunt: 1
+ - type: Tag
+ tags:
+ - BulletFoam
+ - type: Ammo
+ - type: Sprite
+ sprite: Objects/Fun/toys.rsi
+ layers:
+ - state: foamdart
diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml
index c3c4c4b827..fc26a02171 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml
@@ -323,24 +323,6 @@
intensitySlope: 1
maxIntensity: 10
-- type: entity
- id: BulletFoam
- name: foam dart
- parent: BaseBullet
- noSpawn: true
- components:
- - type: Sprite
- sprite: Objects/Fun/toys.rsi
- layers:
- - state: foamdart
- - type: Projectile
- deleteOnCollide: true
- damage:
- types:
- Blunt: 2
- soundHit:
- path: /Audio/Weapons/Guns/Hits/snap.ogg
-
- type: entity
id: BulletCap
name: cap bullet
diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml
index c012ad82ab..97768a6690 100644
--- a/Resources/Prototypes/tags.yml
+++ b/Resources/Prototypes/tags.yml
@@ -36,6 +36,9 @@
- type: Tag
id: Bottle
+- type: Tag
+ id: BulletFoam
+
- type: Tag
id: CableCoil
@@ -307,7 +310,7 @@
- type: Tag
id: MailingUnitElectronics
-
+
- type: Tag
id: Medkit