Adds some extra toys to the arcade machine (#10637)

This commit is contained in:
Flipp Syder
2022-08-16 02:57:39 -07:00
committed by GitHub
parent ed8414c800
commit 0396f8eb9d
9 changed files with 85 additions and 61 deletions

View File

@@ -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()

View File

@@ -12,6 +12,9 @@ namespace Content.Server.Weapon.Melee.EnergySword
public bool Activated = false;
[DataField("isSharp")]
public bool IsSharp = true;
/// <summary>
/// RGB cycle rate for hacked e-swords.
/// </summary>
@@ -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;
}
}

View File

@@ -80,6 +80,7 @@ namespace Content.Server.Weapon.Melee.EnergySword
if(TryComp<MeleeWeaponComponent>(comp.Owner, out var weaponComp))
weaponComp.HitSound = comp.OnHitOff;
if (comp.IsSharp)
RemComp<SharpComponent>(comp.Owner);
SoundSystem.Play(comp.DeActivateSound.GetSound(), Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner);
@@ -97,6 +98,7 @@ namespace Content.Server.Weapon.Melee.EnergySword
_item.SetSize(comp.Owner, 9999, item);
}
if (comp.IsSharp)
EnsureComp<SharpComponent>(comp.Owner);
if(TryComp<MeleeWeaponComponent>(comp.Owner, out var weaponComp))

View File

@@ -151,15 +151,17 @@ public abstract partial class SharedGunSystem
{
entity = component.Entities[^1];
args.Ammo.Add(EnsureComp<AmmoComponent>(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<CartridgeAmmoComponent>(entity) && component.AutoCycle)
if (!component.AutoCycle)
{
component.Entities.RemoveAt(component.Entities.Count - 1);
component.Container.Remove(entity);
return;
}
args.Ammo.Add(EnsureComp<AmmoComponent>(entity));
component.Entities.RemoveAt(component.Entities.Count - 1);
component.Container.Remove(entity);
}
else if (component.UnspawnedCount > 0)
{

View File

@@ -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

View File

@@ -20,7 +20,7 @@
components:
- type: BallisticAmmoProvider
capacity: 40
proto: BulletDonkSoft
proto: BulletFoam
- type: Sprite
sprite: Objects/Fun/toys.rsi
state: foambox

View File

@@ -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
- BulletFoam
- type: Ammo
- type: Sprite
sprite: Objects/Fun/toys.rsi
layers:
- state: foamdart
- type: Projectile
damage:
types:
Blunt: 1

View File

@@ -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

View File

@@ -36,6 +36,9 @@
- type: Tag
id: Bottle
- type: Tag
id: BulletFoam
- type: Tag
id: CableCoil