From 9ccb9aeb5c0fb4f7f8325444e29dd994e64932cb Mon Sep 17 00:00:00 2001 From: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Date: Fri, 7 Feb 2020 09:13:48 -0800 Subject: [PATCH] Yaml fixes (#615) * Change BaseMagazines to abstract * Change walls and power buildings to use SnapGrid placement --- .../Weapons/Ammunition/.32/ammunition.yml | 1 + .../Weapons/Ammunition/.357/ammunition.yml | 221 +++++++++--------- .../Weapons/Ammunition/.44/ammunition.yml | 1 + .../Weapons/Ammunition/.45mm/ammunition.yml | 2 + .../Weapons/Ammunition/.50/ammunition.yml | 1 + .../Weapons/Ammunition/10mm/ammunition.yml | 1 + .../Weapons/Ammunition/20mm/ammunition.yml | 1 + .../Weapons/Ammunition/24mm/ammunition.yml | 1 + .../Weapons/Ammunition/5.56mm/ammunition.yml | 1 + .../Weapons/Ammunition/6.5mm/ammunition.yml | 1 + .../Weapons/Ammunition/7.62mm/ammunition.yml | 1 + .../Weapons/Ammunition/9mm/ammunition.yml | 2 + .../Entities/buildings/low_wall.yml | 8 +- .../Prototypes/Entities/buildings/power.yml | 22 ++ .../Prototypes/Entities/buildings/walls.yml | 7 +- 15 files changed, 154 insertions(+), 117 deletions(-) diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/.32/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/.32/ammunition.yml index d04f323212..a454ce4f5c 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/.32/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/.32/ammunition.yml @@ -3,6 +3,7 @@ id: magazine_32_empty name: ".32 magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A32 diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/.357/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/.357/ammunition.yml index 443918aef1..415372ac6d 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/.357/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/.357/ammunition.yml @@ -1,110 +1,111 @@ -# Empty mags -- type: entity - id: magazine_357_empty - name: ".357 magazine - empty" - parent: BaseItem - components: - - type: BallisticMagazine - caliber: A357 - magazine: A357 - capacity: 6 - - type: Sprite - netsync: false - -# Magazines -# Casings - magazines above here -- type: entity - id: ammo_casing_357 - name: ".357 casing" - parent: BaseItem - components: - - type: BallisticBullet - caliber: A357 - projectile: bullet_357 - - type: Sprite - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing - drawdepth: FloorObjects - - type: Icon - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing - -- type: entity - id: ammo_casing_357_flash - name: ".357 casing (Flash)" - parent: BaseItem - components: - - type: BallisticBullet - caliber: A357 - projectile: bullet_357f - - type: Sprite - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing - drawdepth: FloorObjects - - type: Icon - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing - -- type: entity - id: ammo_casing_357_hv - name: ".357 casing (High Velocity)" - parent: BaseItem - components: - - type: BallisticBullet - caliber: A357 - projectile: bullet_357hv - - type: Sprite - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing - drawdepth: FloorObjects - - type: Icon - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing - -- type: entity - id: ammo_casing_357_l - name: ".357 casing (L)" - parent: BaseItem - components: - - type: BallisticBullet - caliber: A357 - projectile: bullet_357l - - type: Sprite - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing - drawdepth: FloorObjects - - type: Icon - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing - -- type: entity - id: ammo_casing_357_p - name: ".357 casing (Practice)" - parent: BaseItem - components: - - type: BallisticBullet - caliber: A357 - projectile: bullet_357p - - type: Sprite - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing - drawdepth: FloorObjects - - type: Icon - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing - -- type: entity - id: ammo_casing_357_r - name: ".357 casing (Rubber)" - parent: BaseItem - components: - - type: BallisticBullet - caliber: A357 - projectile: bullet_357r - - type: Sprite - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing - drawdepth: FloorObjects - - type: Icon - sprite: Objects/Guns/Ammunition/ammo_casing.rsi - state: s-casing +## Empty mags +#- type: entity +# id: magazine_357_empty +# name: ".357 magazine - empty" +# parent: BaseItem +# abstract: true +# components: +# - type: BallisticMagazine +# caliber: A357 +# magazine: A357 +# capacity: 6 +# - type: Sprite +# netsync: false +# +## Magazines +## Casings - magazines above here +#- type: entity +# id: ammo_casing_357 +# name: ".357 casing" +# parent: BaseItem +# components: +# - type: BallisticBullet +# caliber: A357 +# projectile: bullet_357 +# - type: Sprite +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing +# drawdepth: FloorObjects +# - type: Icon +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing +# +#- type: entity +# id: ammo_casing_357_flash +# name: ".357 casing (Flash)" +# parent: BaseItem +# components: +# - type: BallisticBullet +# caliber: A357 +# projectile: bullet_357f +# - type: Sprite +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing +# drawdepth: FloorObjects +# - type: Icon +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing +# +#- type: entity +# id: ammo_casing_357_hv +# name: ".357 casing (High Velocity)" +# parent: BaseItem +# components: +# - type: BallisticBullet +# caliber: A357 +# projectile: bullet_357hv +# - type: Sprite +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing +# drawdepth: FloorObjects +# - type: Icon +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing +# +#- type: entity +# id: ammo_casing_357_l +# name: ".357 casing (L)" +# parent: BaseItem +# components: +# - type: BallisticBullet +# caliber: A357 +# projectile: bullet_357l +# - type: Sprite +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing +# drawdepth: FloorObjects +# - type: Icon +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing +# +#- type: entity +# id: ammo_casing_357_p +# name: ".357 casing (Practice)" +# parent: BaseItem +# components: +# - type: BallisticBullet +# caliber: A357 +# projectile: bullet_357p +# - type: Sprite +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing +# drawdepth: FloorObjects +# - type: Icon +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing +# +#- type: entity +# id: ammo_casing_357_r +# name: ".357 casing (Rubber)" +# parent: BaseItem +# components: +# - type: BallisticBullet +# caliber: A357 +# projectile: bullet_357r +# - type: Sprite +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing +# drawdepth: FloorObjects +# - type: Icon +# sprite: Objects/Guns/Ammunition/ammo_casing.rsi +# state: s-casing diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/.44/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/.44/ammunition.yml index 4e68c2cdb3..3255dca654 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/.44/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/.44/ammunition.yml @@ -3,6 +3,7 @@ id: magazine_44_empty name: ".44 magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A44 diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/.45mm/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/.45mm/ammunition.yml index fb1ac719af..68a1d87b78 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/.45mm/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/.45mm/ammunition.yml @@ -3,6 +3,7 @@ id: magazine_45mm_empty name: ".45mm magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A45mm @@ -15,6 +16,7 @@ id: magazine_45mm_smg_empty name: ".45mm SMG magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A45mm diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/.50/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/.50/ammunition.yml index 3c5f84eb74..b557761d45 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/.50/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/.50/ammunition.yml @@ -3,6 +3,7 @@ id: magazine_50_empty name: ".50 cal magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A50 diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/10mm/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/10mm/ammunition.yml index f73af3ebba..88a9130526 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/10mm/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/10mm/ammunition.yml @@ -3,6 +3,7 @@ id: magazine_10mm_empty name: "10mm magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A10mm diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/20mm/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/20mm/ammunition.yml index fa0f8bc57d..c96bd621d5 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/20mm/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/20mm/ammunition.yml @@ -3,6 +3,7 @@ id: magazine_20mm_empty name: "20mm magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A20mm diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/24mm/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/24mm/ammunition.yml index f0bdc015f6..e1f7991fce 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/24mm/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/24mm/ammunition.yml @@ -3,6 +3,7 @@ id: magazine_24mm_empty name: "24mm magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A24mm diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/5.56mm/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/5.56mm/ammunition.yml index 6fb6545341..b02b6acfca 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/5.56mm/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/5.56mm/ammunition.yml @@ -3,6 +3,7 @@ id: magazine_556mm_empty name: "5.56mm magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A556mm diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/6.5mm/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/6.5mm/ammunition.yml index e8f2150fbe..26bc3add14 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/6.5mm/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/6.5mm/ammunition.yml @@ -3,6 +3,7 @@ id: magazine_65mm_empty name: "6.5mm magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A65mm diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/7.62mm/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/7.62mm/ammunition.yml index ff847d0b72..f30f8a6b14 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/7.62mm/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/7.62mm/ammunition.yml @@ -3,6 +3,7 @@ id: magazine_762mm_empty name: "7.62mm magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A762mm diff --git a/Resources/Prototypes/Entities/Weapons/Ammunition/9mm/ammunition.yml b/Resources/Prototypes/Entities/Weapons/Ammunition/9mm/ammunition.yml index bbb7153955..9a54ebbddc 100644 --- a/Resources/Prototypes/Entities/Weapons/Ammunition/9mm/ammunition.yml +++ b/Resources/Prototypes/Entities/Weapons/Ammunition/9mm/ammunition.yml @@ -3,6 +3,7 @@ id: magazine_9mm_empty name: "9mm magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A9mm @@ -15,6 +16,7 @@ id: magazine_9mm_smg_empty name: "9mm SMG magazine - empty" parent: BaseItem + abstract: true components: - type: BallisticMagazine caliber: A9mm diff --git a/Resources/Prototypes/Entities/buildings/low_wall.yml b/Resources/Prototypes/Entities/buildings/low_wall.yml index 611bd18ab3..3e7fb82889 100644 --- a/Resources/Prototypes/Entities/buildings/low_wall.yml +++ b/Resources/Prototypes/Entities/buildings/low_wall.yml @@ -2,6 +2,10 @@ id: low_wall name: Low Wall description: Goes up to about your waist. + placement: + mode: SnapgridCenter + snap: + - Wall components: - type: Clickable - type: InteractionOutline @@ -30,10 +34,6 @@ key: walls base: metal_ - placement: - snap: - - Wall - - type: entity id: low_wall_overlay name: Low Wall Overlay diff --git a/Resources/Prototypes/Entities/buildings/power.yml b/Resources/Prototypes/Entities/buildings/power.yml index 4fa6a28b7c..70b4be8ab1 100644 --- a/Resources/Prototypes/Entities/buildings/power.yml +++ b/Resources/Prototypes/Entities/buildings/power.yml @@ -2,6 +2,8 @@ id: Wire name: Wire description: Transfers power, avoid letting things come down it + placement: + mode: SnapgridCenter components: - type: Clickable - type: InteractionOutline @@ -42,6 +44,8 @@ id: Generator name: Generator description: A portal to hell which summons power from the nether + placement: + mode: SnapgridCenter components: - type: Clickable - type: InteractionOutline @@ -55,11 +59,15 @@ - type: Icon texture: Objects/Power/generator.png - type: PowerGenerator + - type: SnapGrid + offset: Center - type: entity id: WPPnobattery name: WPPnobattery description: Supplies power directly to nearby objects + placement: + mode: SnapgridCenter components: - type: Clickable - type: InteractionOutline @@ -76,6 +84,8 @@ range: 8 priority: Provider load: 0 + - type: SnapGrid + offset: Center - type: entity parent: WPPnobattery @@ -117,6 +127,8 @@ id: SMES name: Smes description: Stores power in its super-magnetic cells + placement: + mode: SnapgridCenter components: - type: Clickable - type: InteractionOutline @@ -145,6 +157,8 @@ - type: Appearance visuals: - type: SmesVisualizer2D + - type: SnapGrid + offset: Center - type: entity id: smes_dry @@ -157,6 +171,8 @@ id: WiredMachine name: WiredMachine description: A monstrosity that does nothing but suck up power from the nearby wires + placement: + mode: SnapgridCenter components: - type: Clickable - type: InteractionOutline @@ -173,11 +189,15 @@ drawtype: Node load: 100 priority: High + - type: SnapGrid + offset: Center - type: entity id: WirelessMachine name: WirelessMachine description: A terrifying monstrosity that sucks up power from the wireless transmitters, Tesla would be proud + placement: + mode: SnapgridCenter components: - type: Clickable - type: InteractionOutline @@ -194,3 +214,5 @@ drawtype: Both load: 200 priority: Low + - type: SnapGrid + offset: Center diff --git a/Resources/Prototypes/Entities/buildings/walls.yml b/Resources/Prototypes/Entities/buildings/walls.yml index 973c110a2e..5bd0e7f08c 100644 --- a/Resources/Prototypes/Entities/buildings/walls.yml +++ b/Resources/Prototypes/Entities/buildings/walls.yml @@ -3,6 +3,10 @@ name: BaseWall description: Keeps the air in and the greytide out. abstract: true + placement: + mode: SnapgridCenter + snap: + - Wall components: - type: Clickable - type: InteractionOutline @@ -28,9 +32,6 @@ - type: IconSmooth key: walls base: solid - placement: - snap: - - Wall - type: entity id: brick_wall