From 7e8556406dee9335997ff4a282b0f0b7bdd13ea6 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 3 Mar 2021 16:45:36 -0500 Subject: [PATCH] Added test that all items are properly formatted and valid. Fixed items that were broken. --- assets/common/items/grasses/long.ron | 2 +- assets/common/items/grasses/medium.ron | 2 +- assets/common/items/grasses/short.ron | 2 +- .../items/weapons/axe_1h/bloodsteel-1.ron | 4 +- .../common/items/weapons/axe_1h/bronze-0.ron | 4 +- .../common/items/weapons/axe_1h/bronze-1.ron | 4 +- .../common/items/weapons/axe_1h/cobalt-0.ron | 4 +- .../common/items/weapons/axe_1h/cobalt-1.ron | 4 +- assets/common/items/weapons/axe_1h/iron-0.ron | 4 +- assets/common/items/weapons/axe_1h/iron-1.ron | 4 +- assets/common/items/weapons/axe_1h/iron-2.ron | 4 +- assets/common/items/weapons/axe_1h/iron-3.ron | 4 +- .../items/weapons/axe_1h/orichalcum-0.ron | 4 +- .../common/items/weapons/axe_1h/steel-0.ron | 4 +- .../common/items/weapons/axe_1h/steel-1.ron | 4 +- .../common/items/weapons/axe_1h/steel-2.ron | 4 +- .../common/items/weapons/axe_1h/stone-0.ron | 4 +- .../common/items/weapons/axe_1h/stone-1.ron | 4 +- assets/common/items/weapons/axe_1h/wood-0.ron | 4 +- assets/common/items/weapons/axe_1h/wood-1.ron | 4 +- .../items/weapons/hammer_1h/bloodsteel-0.ron | 4 +- .../items/weapons/hammer_1h/bloodsteel-1.ron | 4 +- .../items/weapons/hammer_1h/bronze-0.ron | 4 +- .../items/weapons/hammer_1h/bronze-1.ron | 4 +- .../items/weapons/hammer_1h/cobalt-0.ron | 4 +- .../items/weapons/hammer_1h/cobalt-1.ron | 4 +- .../common/items/weapons/hammer_1h/iron-0.ron | 4 +- .../common/items/weapons/hammer_1h/iron-1.ron | 4 +- .../common/items/weapons/hammer_1h/iron-2.ron | 4 +- .../items/weapons/hammer_1h/orichalcum-0.ron | 4 +- .../items/weapons/hammer_1h/steel-0.ron | 4 +- .../items/weapons/hammer_1h/steel-1.ron | 4 +- .../items/weapons/hammer_1h/steel-2.ron | 4 +- .../items/weapons/hammer_1h/stone-0.ron | 4 +- .../items/weapons/hammer_1h/stone-1.ron | 4 +- .../common/items/weapons/hammer_1h/wood-0.ron | 4 +- .../common/items/weapons/hammer_1h/wood-1.ron | 4 +- .../items/weapons/sword_1h/bloodsteel-0.ron | 4 +- .../items/weapons/sword_1h/bloodsteel-1.ron | 4 +- .../items/weapons/sword_1h/bloodsteel-2.ron | 4 +- .../items/weapons/sword_1h/bronze-0.ron | 4 +- .../items/weapons/sword_1h/bronze-1.ron | 4 +- .../items/weapons/sword_1h/bronze-2.ron | 4 +- .../items/weapons/sword_1h/cobalt-0.ron | 4 +- .../items/weapons/sword_1h/cobalt-1.ron | 4 +- .../items/weapons/sword_1h/cobalt-2.ron | 4 +- .../items/weapons/sword_1h/cobalt-3.ron | 4 +- .../common/items/weapons/sword_1h/iron-0.ron | 4 +- .../common/items/weapons/sword_1h/iron-1.ron | 4 +- .../common/items/weapons/sword_1h/iron-2.ron | 4 +- .../common/items/weapons/sword_1h/iron-3.ron | 4 +- .../common/items/weapons/sword_1h/iron-4.ron | 4 +- .../items/weapons/sword_1h/obsidian-0.ron | 4 +- .../items/weapons/sword_1h/orichalcum-0.ron | 4 +- .../items/weapons/sword_1h/orichalcum-1.ron | 4 +- .../common/items/weapons/sword_1h/steel-0.ron | 4 +- .../common/items/weapons/sword_1h/steel-1.ron | 4 +- .../common/items/weapons/sword_1h/steel-2.ron | 4 +- .../common/items/weapons/sword_1h/steel-3.ron | 4 +- common/src/assets.rs | 109 ++++++++++++++++++ 60 files changed, 224 insertions(+), 115 deletions(-) diff --git a/assets/common/items/grasses/long.ron b/assets/common/items/grasses/long.ron index 5853b1d690..c0f635adb9 100644 --- a/assets/common/items/grasses/long.ron +++ b/assets/common/items/grasses/long.ron @@ -3,7 +3,7 @@ ItemDef( description: "Greener than an orc's snout.", kind: Ingredient( kind: "Grass", - ) + ), quality: Common, tags: [], ) diff --git a/assets/common/items/grasses/medium.ron b/assets/common/items/grasses/medium.ron index 64beff93a9..9846ad27fa 100644 --- a/assets/common/items/grasses/medium.ron +++ b/assets/common/items/grasses/medium.ron @@ -3,7 +3,7 @@ ItemDef( description: "Greener than an orc's snout.", kind: Ingredient( kind: "Grass", - ) + ), quality: Common, tags: [], ) diff --git a/assets/common/items/grasses/short.ron b/assets/common/items/grasses/short.ron index 55fc47cdf4..b9e58d63f3 100644 --- a/assets/common/items/grasses/short.ron +++ b/assets/common/items/grasses/short.ron @@ -3,7 +3,7 @@ ItemDef( description: "Greener than an orc's snout.", kind: Ingredient( kind: "Grass", - ) + ), quality: Common, tags: [], ) diff --git a/assets/common/items/weapons/axe_1h/bloodsteel-1.ron b/assets/common/items/weapons/axe_1h/bloodsteel-1.ron index b706746c75..b59fb0ffb0 100644 --- a/assets/common/items/weapons/axe_1h/bloodsteel-1.ron +++ b/assets/common/items/weapons/axe_1h/bloodsteel-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 2.0, poise_strength: 1.0, speed: 0.8, - ), + )), )), quality: High, tags: [], diff --git a/assets/common/items/weapons/axe_1h/bronze-0.ron b/assets/common/items/weapons/axe_1h/bronze-0.ron index db727cd4c6..06351719d2 100644 --- a/assets/common/items/weapons/axe_1h/bronze-0.ron +++ b/assets/common/items/weapons/axe_1h/bronze-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.0, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/axe_1h/bronze-1.ron b/assets/common/items/weapons/axe_1h/bronze-1.ron index b5c0ec0af9..ce14319f19 100644 --- a/assets/common/items/weapons/axe_1h/bronze-1.ron +++ b/assets/common/items/weapons/axe_1h/bronze-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.1, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/axe_1h/cobalt-0.ron b/assets/common/items/weapons/axe_1h/cobalt-0.ron index e98e19ad22..ce6689c37e 100644 --- a/assets/common/items/weapons/axe_1h/cobalt-0.ron +++ b/assets/common/items/weapons/axe_1h/cobalt-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.6, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: High, tags: [], diff --git a/assets/common/items/weapons/axe_1h/cobalt-1.ron b/assets/common/items/weapons/axe_1h/cobalt-1.ron index 2fe42ea912..3939e9cc8d 100644 --- a/assets/common/items/weapons/axe_1h/cobalt-1.ron +++ b/assets/common/items/weapons/axe_1h/cobalt-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.75, poise_strength: 1.0, speed: 0.85, - ), + )), )), quality: High, tags: [], diff --git a/assets/common/items/weapons/axe_1h/iron-0.ron b/assets/common/items/weapons/axe_1h/iron-0.ron index 88fe64b8c8..a7258ea723 100644 --- a/assets/common/items/weapons/axe_1h/iron-0.ron +++ b/assets/common/items/weapons/axe_1h/iron-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.1, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/axe_1h/iron-1.ron b/assets/common/items/weapons/axe_1h/iron-1.ron index 3438dbd5c4..4689926048 100644 --- a/assets/common/items/weapons/axe_1h/iron-1.ron +++ b/assets/common/items/weapons/axe_1h/iron-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.3, poise_strength: 1.0, speed: 0.9, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/axe_1h/iron-2.ron b/assets/common/items/weapons/axe_1h/iron-2.ron index d062ed6746..0499fb11b1 100644 --- a/assets/common/items/weapons/axe_1h/iron-2.ron +++ b/assets/common/items/weapons/axe_1h/iron-2.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.0, poise_strength: 1.0, speed: 1.2, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/axe_1h/iron-3.ron b/assets/common/items/weapons/axe_1h/iron-3.ron index e91bfe9830..96a4e172f0 100644 --- a/assets/common/items/weapons/axe_1h/iron-3.ron +++ b/assets/common/items/weapons/axe_1h/iron-3.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.2, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/axe_1h/orichalcum-0.ron b/assets/common/items/weapons/axe_1h/orichalcum-0.ron index ebfa2d84c2..78fdfd1a00 100644 --- a/assets/common/items/weapons/axe_1h/orichalcum-0.ron +++ b/assets/common/items/weapons/axe_1h/orichalcum-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 2.0, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: Epic, tags: [], diff --git a/assets/common/items/weapons/axe_1h/steel-0.ron b/assets/common/items/weapons/axe_1h/steel-0.ron index 1225ac4021..aead5494d2 100644 --- a/assets/common/items/weapons/axe_1h/steel-0.ron +++ b/assets/common/items/weapons/axe_1h/steel-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.5, poise_strength: 1.0, speed: 0.9, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/axe_1h/steel-1.ron b/assets/common/items/weapons/axe_1h/steel-1.ron index 9fe5d8834a..5660bfd7a5 100644 --- a/assets/common/items/weapons/axe_1h/steel-1.ron +++ b/assets/common/items/weapons/axe_1h/steel-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.4, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/axe_1h/steel-2.ron b/assets/common/items/weapons/axe_1h/steel-2.ron index c5d72f5c49..ae3fe6aee7 100644 --- a/assets/common/items/weapons/axe_1h/steel-2.ron +++ b/assets/common/items/weapons/axe_1h/steel-2.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.3, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/axe_1h/stone-0.ron b/assets/common/items/weapons/axe_1h/stone-0.ron index e030d7bb0e..9ddc75c43b 100644 --- a/assets/common/items/weapons/axe_1h/stone-0.ron +++ b/assets/common/items/weapons/axe_1h/stone-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 0.8, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/axe_1h/stone-1.ron b/assets/common/items/weapons/axe_1h/stone-1.ron index ea6ac1b1e9..188bbc5d8b 100644 --- a/assets/common/items/weapons/axe_1h/stone-1.ron +++ b/assets/common/items/weapons/axe_1h/stone-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 0.7, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/axe_1h/wood-0.ron b/assets/common/items/weapons/axe_1h/wood-0.ron index 7028a83aea..9027152dee 100644 --- a/assets/common/items/weapons/axe_1h/wood-0.ron +++ b/assets/common/items/weapons/axe_1h/wood-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 0.8, poise_strength: 1.0, speed: 0.8, - ), + )), )), quality: Low, tags: [], diff --git a/assets/common/items/weapons/axe_1h/wood-1.ron b/assets/common/items/weapons/axe_1h/wood-1.ron index 2f42c72aee..e4a368130a 100644 --- a/assets/common/items/weapons/axe_1h/wood-1.ron +++ b/assets/common/items/weapons/axe_1h/wood-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 0.5, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Low, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/bloodsteel-0.ron b/assets/common/items/weapons/hammer_1h/bloodsteel-0.ron index d7f08795cc..7f8680d76e 100644 --- a/assets/common/items/weapons/hammer_1h/bloodsteel-0.ron +++ b/assets/common/items/weapons/hammer_1h/bloodsteel-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.6, poise_strength: 1.0, speed: 1.2, - ), + )), )), quality: High, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/bloodsteel-1.ron b/assets/common/items/weapons/hammer_1h/bloodsteel-1.ron index 80b3a5c0dd..c808bc95b8 100644 --- a/assets/common/items/weapons/hammer_1h/bloodsteel-1.ron +++ b/assets/common/items/weapons/hammer_1h/bloodsteel-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.8, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: High, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/bronze-0.ron b/assets/common/items/weapons/hammer_1h/bronze-0.ron index 067607bb5e..2fc8168206 100644 --- a/assets/common/items/weapons/hammer_1h/bronze-0.ron +++ b/assets/common/items/weapons/hammer_1h/bronze-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.2, poise_strength: 1.0, speed: 0.8, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/bronze-1.ron b/assets/common/items/weapons/hammer_1h/bronze-1.ron index 7647b4b6dc..c3c153b010 100644 --- a/assets/common/items/weapons/hammer_1h/bronze-1.ron +++ b/assets/common/items/weapons/hammer_1h/bronze-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.0, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/cobalt-0.ron b/assets/common/items/weapons/hammer_1h/cobalt-0.ron index 05471d14c3..5788e12ee5 100644 --- a/assets/common/items/weapons/hammer_1h/cobalt-0.ron +++ b/assets/common/items/weapons/hammer_1h/cobalt-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.6, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: High, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/cobalt-1.ron b/assets/common/items/weapons/hammer_1h/cobalt-1.ron index f58b3d9901..e80beaa8e8 100644 --- a/assets/common/items/weapons/hammer_1h/cobalt-1.ron +++ b/assets/common/items/weapons/hammer_1h/cobalt-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.5, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: High, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/iron-0.ron b/assets/common/items/weapons/hammer_1h/iron-0.ron index b5ba278597..0e489cd140 100644 --- a/assets/common/items/weapons/hammer_1h/iron-0.ron +++ b/assets/common/items/weapons/hammer_1h/iron-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.4, poise_strength: 1.0, speed: 0.8, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/iron-1.ron b/assets/common/items/weapons/hammer_1h/iron-1.ron index f9d8a6bff6..01750186e7 100644 --- a/assets/common/items/weapons/hammer_1h/iron-1.ron +++ b/assets/common/items/weapons/hammer_1h/iron-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.3, poise_strength: 1.0, speed: 0.9, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/iron-2.ron b/assets/common/items/weapons/hammer_1h/iron-2.ron index 68991cd50c..a75e847444 100644 --- a/assets/common/items/weapons/hammer_1h/iron-2.ron +++ b/assets/common/items/weapons/hammer_1h/iron-2.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.1, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/orichalcum-0.ron b/assets/common/items/weapons/hammer_1h/orichalcum-0.ron index 76a5c5db2a..0c6f76a8a1 100644 --- a/assets/common/items/weapons/hammer_1h/orichalcum-0.ron +++ b/assets/common/items/weapons/hammer_1h/orichalcum-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Axe, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 2.0, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: Epic, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/steel-0.ron b/assets/common/items/weapons/hammer_1h/steel-0.ron index 93829715b5..77b063c698 100644 --- a/assets/common/items/weapons/hammer_1h/steel-0.ron +++ b/assets/common/items/weapons/hammer_1h/steel-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.5, poise_strength: 1.0, speed: 0.9, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/steel-1.ron b/assets/common/items/weapons/hammer_1h/steel-1.ron index 82a525bd8a..fa03dbdeff 100644 --- a/assets/common/items/weapons/hammer_1h/steel-1.ron +++ b/assets/common/items/weapons/hammer_1h/steel-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.4, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/steel-2.ron b/assets/common/items/weapons/hammer_1h/steel-2.ron index c6afbf9858..97e6a61a7f 100644 --- a/assets/common/items/weapons/hammer_1h/steel-2.ron +++ b/assets/common/items/weapons/hammer_1h/steel-2.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.2, poise_strength: 1.0, speed: 1.2, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/stone-0.ron b/assets/common/items/weapons/hammer_1h/stone-0.ron index a4daef28fb..2a980b9951 100644 --- a/assets/common/items/weapons/hammer_1h/stone-0.ron +++ b/assets/common/items/weapons/hammer_1h/stone-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 0.7, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/stone-1.ron b/assets/common/items/weapons/hammer_1h/stone-1.ron index 5f0c25640c..8169b32872 100644 --- a/assets/common/items/weapons/hammer_1h/stone-1.ron +++ b/assets/common/items/weapons/hammer_1h/stone-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 1.0, poise_strength: 1.0, speed: 0.8, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/wood-0.ron b/assets/common/items/weapons/hammer_1h/wood-0.ron index f5b9151d05..e850ddeb33 100644 --- a/assets/common/items/weapons/hammer_1h/wood-0.ron +++ b/assets/common/items/weapons/hammer_1h/wood-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 0.8, poise_strength: 1.0, speed: 0.8, - ), + )), )), quality: Low, tags: [], diff --git a/assets/common/items/weapons/hammer_1h/wood-1.ron b/assets/common/items/weapons/hammer_1h/wood-1.ron index 7e7e7e6410..f8c8f44eed 100644 --- a/assets/common/items/weapons/hammer_1h/wood-1.ron +++ b/assets/common/items/weapons/hammer_1h/wood-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Hammer, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.5, power: 0.5, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Low, tags: [], diff --git a/assets/common/items/weapons/sword_1h/bloodsteel-0.ron b/assets/common/items/weapons/sword_1h/bloodsteel-0.ron index eaac0ee44a..3636ea64ed 100644 --- a/assets/common/items/weapons/sword_1h/bloodsteel-0.ron +++ b/assets/common/items/weapons/sword_1h/bloodsteel-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.45, poise_strength: 1.0, speed: 1.3, - ), + )), )), quality: High, tags: [], diff --git a/assets/common/items/weapons/sword_1h/bloodsteel-1.ron b/assets/common/items/weapons/sword_1h/bloodsteel-1.ron index 2d8a74b0a0..e5de808957 100644 --- a/assets/common/items/weapons/sword_1h/bloodsteel-1.ron +++ b/assets/common/items/weapons/sword_1h/bloodsteel-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 2.0, poise_strength: 1.0, speed: 0.75, - ), + )), )), quality: High, tags: [], diff --git a/assets/common/items/weapons/sword_1h/bloodsteel-2.ron b/assets/common/items/weapons/sword_1h/bloodsteel-2.ron index aa4916aa8e..5028cc1266 100644 --- a/assets/common/items/weapons/sword_1h/bloodsteel-2.ron +++ b/assets/common/items/weapons/sword_1h/bloodsteel-2.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.75, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: High, tags: [], diff --git a/assets/common/items/weapons/sword_1h/bronze-0.ron b/assets/common/items/weapons/sword_1h/bronze-0.ron index fb01404bd2..d0b7c17a88 100644 --- a/assets/common/items/weapons/sword_1h/bronze-0.ron +++ b/assets/common/items/weapons/sword_1h/bronze-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 0.65, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/sword_1h/bronze-1.ron b/assets/common/items/weapons/sword_1h/bronze-1.ron index 8037ff8605..849d5a362f 100644 --- a/assets/common/items/weapons/sword_1h/bronze-1.ron +++ b/assets/common/items/weapons/sword_1h/bronze-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 0.75, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/sword_1h/bronze-2.ron b/assets/common/items/weapons/sword_1h/bronze-2.ron index bc8c5b65da..253691f2c8 100644 --- a/assets/common/items/weapons/sword_1h/bronze-2.ron +++ b/assets/common/items/weapons/sword_1h/bronze-2.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 0.85, poise_strength: 1.0, speed: 0.9, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/sword_1h/cobalt-0.ron b/assets/common/items/weapons/sword_1h/cobalt-0.ron index 2a3cb87e55..bc8e28409d 100644 --- a/assets/common/items/weapons/sword_1h/cobalt-0.ron +++ b/assets/common/items/weapons/sword_1h/cobalt-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.3, poise_strength: 1.0, speed: 1.2, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/sword_1h/cobalt-1.ron b/assets/common/items/weapons/sword_1h/cobalt-1.ron index 70b67c0060..8299250ce1 100644 --- a/assets/common/items/weapons/sword_1h/cobalt-1.ron +++ b/assets/common/items/weapons/sword_1h/cobalt-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.7, poise_strength: 1.0, speed: 0.8, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/sword_1h/cobalt-2.ron b/assets/common/items/weapons/sword_1h/cobalt-2.ron index 1977007700..4808840343 100644 --- a/assets/common/items/weapons/sword_1h/cobalt-2.ron +++ b/assets/common/items/weapons/sword_1h/cobalt-2.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.4, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/sword_1h/cobalt-3.ron b/assets/common/items/weapons/sword_1h/cobalt-3.ron index bc6c007feb..d5af18aaeb 100644 --- a/assets/common/items/weapons/sword_1h/cobalt-3.ron +++ b/assets/common/items/weapons/sword_1h/cobalt-3.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.6, poise_strength: 1.0, speed: 0.9, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/sword_1h/iron-0.ron b/assets/common/items/weapons/sword_1h/iron-0.ron index 53c13be6d9..5a40b752d4 100644 --- a/assets/common/items/weapons/sword_1h/iron-0.ron +++ b/assets/common/items/weapons/sword_1h/iron-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.0, poise_strength: 1.0, speed: 1.0, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/sword_1h/iron-1.ron b/assets/common/items/weapons/sword_1h/iron-1.ron index db2466d8a7..1848b367a2 100644 --- a/assets/common/items/weapons/sword_1h/iron-1.ron +++ b/assets/common/items/weapons/sword_1h/iron-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 0.9, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/sword_1h/iron-2.ron b/assets/common/items/weapons/sword_1h/iron-2.ron index 87730a7112..d414a968e1 100644 --- a/assets/common/items/weapons/sword_1h/iron-2.ron +++ b/assets/common/items/weapons/sword_1h/iron-2.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.2, poise_strength: 1.0, speed: 0.8, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/sword_1h/iron-3.ron b/assets/common/items/weapons/sword_1h/iron-3.ron index 6257983083..e687bc0510 100644 --- a/assets/common/items/weapons/sword_1h/iron-3.ron +++ b/assets/common/items/weapons/sword_1h/iron-3.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 0.8, poise_strength: 1.0, speed: 1.2, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/sword_1h/iron-4.ron b/assets/common/items/weapons/sword_1h/iron-4.ron index cea0370fc9..d2f6f046b7 100644 --- a/assets/common/items/weapons/sword_1h/iron-4.ron +++ b/assets/common/items/weapons/sword_1h/iron-4.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.1, poise_strength: 1.0, speed: 0.9, - ), + )), )), quality: Common, tags: [], diff --git a/assets/common/items/weapons/sword_1h/obsidian-0.ron b/assets/common/items/weapons/sword_1h/obsidian-0.ron index db312f8de3..37af1e1280 100644 --- a/assets/common/items/weapons/sword_1h/obsidian-0.ron +++ b/assets/common/items/weapons/sword_1h/obsidian-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.95, poise_strength: 1.0, speed: 0.8, - ), + )), )), quality: High, tags: [], diff --git a/assets/common/items/weapons/sword_1h/orichalcum-0.ron b/assets/common/items/weapons/sword_1h/orichalcum-0.ron index 99e74a3adc..5d0716958f 100644 --- a/assets/common/items/weapons/sword_1h/orichalcum-0.ron +++ b/assets/common/items/weapons/sword_1h/orichalcum-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 2.1, poise_strength: 1.0, speed: 0.9, - ), + )), )), quality: Epic, tags: [], diff --git a/assets/common/items/weapons/sword_1h/orichalcum-1.ron b/assets/common/items/weapons/sword_1h/orichalcum-1.ron index f48efd7d64..7566f7bedc 100644 --- a/assets/common/items/weapons/sword_1h/orichalcum-1.ron +++ b/assets/common/items/weapons/sword_1h/orichalcum-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.9, poise_strength: 1.0, speed: 1.1, - ), + )), )), quality: Epic, tags: [], diff --git a/assets/common/items/weapons/sword_1h/steel-0.ron b/assets/common/items/weapons/sword_1h/steel-0.ron index 998c2bedc7..8c3990bc3a 100644 --- a/assets/common/items/weapons/sword_1h/steel-0.ron +++ b/assets/common/items/weapons/sword_1h/steel-0.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.5, poise_strength: 1.0, speed: 0.75, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/sword_1h/steel-1.ron b/assets/common/items/weapons/sword_1h/steel-1.ron index 71a2aa1abf..c6aad22cbc 100644 --- a/assets/common/items/weapons/sword_1h/steel-1.ron +++ b/assets/common/items/weapons/sword_1h/steel-1.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.3, poise_strength: 1.0, speed: .95, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/sword_1h/steel-2.ron b/assets/common/items/weapons/sword_1h/steel-2.ron index 2ffe879bf8..d4f4dc2a56 100644 --- a/assets/common/items/weapons/sword_1h/steel-2.ron +++ b/assets/common/items/weapons/sword_1h/steel-2.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.05, poise_strength: 1.0, speed: 1.2, - ), + )), )), quality: Moderate, tags: [], diff --git a/assets/common/items/weapons/sword_1h/steel-3.ron b/assets/common/items/weapons/sword_1h/steel-3.ron index 4b588f7583..31dedfe598 100644 --- a/assets/common/items/weapons/sword_1h/steel-3.ron +++ b/assets/common/items/weapons/sword_1h/steel-3.ron @@ -4,12 +4,12 @@ ItemDef( kind: Tool(( kind: Sword, hands: One, - stats: ( + stats: Direct(( equip_time_secs: 0.4, power: 1.2, poise_strength: 1.0, speed: 1.05, - ), + )), )), quality: Moderate, tags: [], diff --git a/common/src/assets.rs b/common/src/assets.rs index 5ddf97d0ba..c30fec186e 100644 --- a/common/src/assets.rs +++ b/common/src/assets.rs @@ -248,3 +248,112 @@ impl Compound for Directory { Ok(Directory(files)) } } + +#[cfg(test)] +mod tests { + #[test] + fn test_assets_items() { + // TODO: Figure out how to get file name in error so only a single glob is + // needed + + // Separated out into subsections so that error more descriptive + crate::comp::item::Item::new_from_asset_glob("common.items.armor.*") + .expect("Failed to iterate over armors."); + + crate::comp::item::Item::new_from_asset_glob("common.items.boss_drops.*") + .expect("Failed to iterate over boss drops."); + + crate::comp::item::Item::new_from_asset_glob("common.items.consumable.*") + .expect("Failed to iterate over consumables."); + + crate::comp::item::Item::new_from_asset_glob("common.items.crafting_ing.*") + .expect("Failed to iterate over crafting ingredients."); + + crate::comp::item::Item::new_from_asset_glob("common.items.crafting_tools.*") + .expect("Failed to iterate over crafting tools."); + + crate::comp::item::Item::new_from_asset_glob("common.items.debug.*") + .expect("Failed to iterate over debug items."); + + crate::comp::item::Item::new_from_asset_glob("common.items.flowers.*") + .expect("Failed to iterate over flower items."); + + crate::comp::item::Item::new_from_asset_glob("common.items.food.*") + .expect("Failed to iterate over food items."); + + crate::comp::item::Item::new_from_asset_glob("common.items.glider.*") + .expect("Failed to iterate over gliders."); + + crate::comp::item::Item::new_from_asset_glob("common.items.grasses.*") + .expect("Failed to iterate over grasses."); + + crate::comp::item::Item::new_from_asset_glob("common.items.lantern.*") + .expect("Failed to iterate over lanterns."); + + crate::comp::item::Item::new_from_asset_glob("common.items.npc_armor.*") + .expect("Failed to iterate over npc armors."); + + crate::comp::item::Item::new_from_asset_glob("common.items.npc_weapons.*") + .expect("Failed to iterate over npc weapons."); + + crate::comp::item::Item::new_from_asset_glob("common.items.ore.*") + .expect("Failed to iterate over ores."); + + crate::comp::item::Item::new_from_asset_glob("common.items.tag_examples.*") + .expect("Failed to iterate over tag examples."); + + crate::comp::item::Item::new_from_asset_glob("common.items.testing.*") + .expect("Failed to iterate over testing items."); + + crate::comp::item::Item::new_from_asset_glob("common.items.utility.*") + .expect("Failed to iterate over utility items."); + + // Checks each weapon type to allow errors to be located more easily + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.axe.*") + .expect("Failed to iterate over axes."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.axe_1h.*") + .expect("Failed to iterate over 1h axes."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.bow.*") + .expect("Failed to iterate over bows."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.dagger.*") + .expect("Failed to iterate over daggers."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.empty.*") + .expect("Failed to iterate over empty."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.hammer.*") + .expect("Failed to iterate over hammers."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.hammer_1h.*") + .expect("Failed to iterate over 1h hammers."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.sceptre.*") + .expect("Failed to iterate over sceptres."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.shield.*") + .expect("Failed to iterate over shields."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.staff.*") + .expect("Failed to iterate over staffs."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.sword.*") + .expect("Failed to iterate over swords."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.sword_1h.*") + .expect("Failed to iterate over 1h swords."); + + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.tool.*") + .expect("Failed to iterate over tools."); + + // Checks all weapons should more weapons be added later + crate::comp::item::Item::new_from_asset_glob("common.items.weapons.*") + .expect("Failed to iterate over weapons."); + + // Final at the end to account for a new folder being added + crate::comp::item::Item::new_from_asset_glob("common.items.*") + .expect("Failed to iterate over item folders."); + } +}