diff --git a/assets/common/items/npc_armor/back/backpack.ron b/assets/common/items/npc_armor/back/backpack.ron deleted file mode 100644 index d08bdaddd6..0000000000 --- a/assets/common/items/npc_armor/back/backpack.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Rugged Backpack", - description: "Keeps all your stuff together.", - kind: Armor( - ( - kind: Back("Backpack"), - stats: ( - protection: Normal(0.0), - poise_resilience: Normal(0.0), - ), - ) - ), - quality: Moderate, - tags: [], -) diff --git a/assets/common/items/npc_armor/back/dungeon_purple.ron b/assets/common/items/npc_armor/back/dungeon_purple.ron deleted file mode 100644 index c95589191f..0000000000 --- a/assets/common/items/npc_armor/back/dungeon_purple.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Purple Cultist Cape", - description: "Smells like dark magic and candles.", - kind: Armor( - ( - kind: Back("DungeonPurple"), - stats: ( - protection: Normal(1.0), - poise_resilience: Normal(0.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/belt/cultist_belt.ron b/assets/common/items/npc_armor/belt/cultist_belt.ron deleted file mode 100644 index 7b0abda30c..0000000000 --- a/assets/common/items/npc_armor/belt/cultist_belt.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Cultist Belt", - description: "Ceremonial attire used by members.", - kind: Armor( - ( - kind: Belt("Cultist"), - stats: ( - protection: Normal(0.0), - poise_resilience: Normal(0.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/cultist_chest_purple.ron b/assets/common/items/npc_armor/chest/cultist_chest_purple.ron deleted file mode 100644 index 095159e682..0000000000 --- a/assets/common/items/npc_armor/chest/cultist_chest_purple.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Purple Cultist Chest", - description: "Ceremonial attire used by members.", - kind: Armor( - ( - kind: Chest("Cultist"), - stats: ( - protection: Normal(5.0), - poise_resilience: Normal(5.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/plate.ron b/assets/common/items/npc_armor/chest/plate.ron deleted file mode 100644 index f09d6ae8de..0000000000 --- a/assets/common/items/npc_armor/chest/plate.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Iron Chestplate", - description: "A chestplate forged from iron.", - kind: Armor( - ( - kind: Chest("Plate"), - stats: ( - protection: Normal(5.0), - poise_resilience: Normal(5.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/worker_green_0.ron b/assets/common/items/npc_armor/chest/worker_green_0.ron deleted file mode 100644 index 33ba7a86f9..0000000000 --- a/assets/common/items/npc_armor/chest/worker_green_0.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Green Worker Shirt", - description: "Was used by a farmer, until recently.", - kind: Armor( - ( - kind: Chest("WorkerGreen0"), - stats: ( - protection: Normal(80.0), - poise_resilience: Normal(80.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/worker_green_1.ron b/assets/common/items/npc_armor/chest/worker_green_1.ron deleted file mode 100644 index 697772c95f..0000000000 --- a/assets/common/items/npc_armor/chest/worker_green_1.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Green Worker Shirt", - description: "Was used by a farmer, until recently.", - kind: Armor( - ( - kind: Chest("WorkerGreen1"), - stats: ( - protection: Normal(80.0), - poise_resilience: Normal(80.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/worker_orange_0.ron b/assets/common/items/npc_armor/chest/worker_orange_0.ron deleted file mode 100644 index d54dca7450..0000000000 --- a/assets/common/items/npc_armor/chest/worker_orange_0.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Orange Worker Shirt", - description: "Was used by a farmer, until recently.", - kind: Armor( - ( - kind: Chest("WorkerOrange0"), - stats: ( - protection: Normal(80.0), - poise_resilience: Normal(80.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/worker_orange_1.ron b/assets/common/items/npc_armor/chest/worker_orange_1.ron deleted file mode 100644 index a92f7c59a3..0000000000 --- a/assets/common/items/npc_armor/chest/worker_orange_1.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Orange Worker Shirt", - description: "Was used by a farmer, until recently.", - kind: Armor( - ( - kind: Chest("WorkerOrange1"), - stats: ( - protection: Normal(80.0), - poise_resilience: Normal(80.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/worker_purple_0.ron b/assets/common/items/npc_armor/chest/worker_purple_0.ron deleted file mode 100644 index 0e332ada54..0000000000 --- a/assets/common/items/npc_armor/chest/worker_purple_0.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Purple Worker Shirt", - description: "Was used by a farmer, until recently.", - kind: Armor( - ( - kind: Chest("WorkerPurple0"), - stats: ( - protection: Normal(80.0), - poise_resilience: Normal(80.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/worker_purple_1.ron b/assets/common/items/npc_armor/chest/worker_purple_1.ron deleted file mode 100644 index feeea0613e..0000000000 --- a/assets/common/items/npc_armor/chest/worker_purple_1.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Purple Worker Shirt", - description: "Was used by a farmer, until recently.", - kind: Armor( - ( - kind: Chest("WorkerPurple1"), - stats: ( - protection: Normal(80.0), - poise_resilience: Normal(80.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/worker_red_0.ron b/assets/common/items/npc_armor/chest/worker_red_0.ron deleted file mode 100644 index c5dc3d5019..0000000000 --- a/assets/common/items/npc_armor/chest/worker_red_0.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Red Worker Shirt", - description: "Was used by a farmer, until recently.", - kind: Armor( - ( - kind: Chest("WorkerRed0"), - stats: ( - protection: Normal(80.0), - poise_resilience: Normal(80.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/worker_red_1.ron b/assets/common/items/npc_armor/chest/worker_red_1.ron deleted file mode 100644 index 9eac995464..0000000000 --- a/assets/common/items/npc_armor/chest/worker_red_1.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Red Worker Shirt", - description: "Was used by a farmer, until recently.", - kind: Armor( - ( - kind: Chest("WorkerRed1"), - stats: ( - protection: Normal(80.0), - poise_resilience: Normal(80.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/worker_yellow_0.ron b/assets/common/items/npc_armor/chest/worker_yellow_0.ron deleted file mode 100644 index 121af29b35..0000000000 --- a/assets/common/items/npc_armor/chest/worker_yellow_0.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Yellow Worker Shirt", - description: "Was used by a farmer, until recently.", - kind: Armor( - ( - kind: Chest("WorkerYellow0"), - stats: ( - protection: Normal(80.0), - poise_resilience: Normal(80.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/chest/worker_yellow_1.ron b/assets/common/items/npc_armor/chest/worker_yellow_1.ron deleted file mode 100644 index 561d85f4d5..0000000000 --- a/assets/common/items/npc_armor/chest/worker_yellow_1.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Yellow Worker Shirt", - description: "Was used by a farmer, until recently.", - kind: Armor( - ( - kind: Chest("WorkerYellow1"), - stats: ( - protection: Normal(80.0), - poise_resilience: Normal(80.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/foot/cultist_boots.ron b/assets/common/items/npc_armor/foot/cultist_boots.ron deleted file mode 100644 index a61d5adf16..0000000000 --- a/assets/common/items/npc_armor/foot/cultist_boots.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Cultist Boots", - description: "Ceremonial attire used by members.", - kind: Armor( - ( - kind: Foot("Cultist"), - stats: ( - protection: Normal(1.0), - poise_resilience: Normal(1.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/hand/cultist_hands_purple.ron b/assets/common/items/npc_armor/hand/cultist_hands_purple.ron deleted file mode 100644 index dfa37f71bf..0000000000 --- a/assets/common/items/npc_armor/hand/cultist_hands_purple.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Purple Cultist Gloves", - description: "Ceremonial attire used by members.", - kind: Armor( - ( - kind: Hand("Cultist"), - stats: ( - protection: Normal(2.0), - poise_resilience: Normal(2.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/pants/cultist_legs_purple.ron b/assets/common/items/npc_armor/pants/cultist_legs_purple.ron deleted file mode 100644 index 3fe3eea349..0000000000 --- a/assets/common/items/npc_armor/pants/cultist_legs_purple.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Purple Cultist Skirt", - description: "Ceremonial attire used by members.", - kind: Armor( - ( - kind: Pants("Cultist"), - stats: ( - protection: Normal(10.0), - poise_resilience: Normal(10.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/pants/plate.ron b/assets/common/items/npc_armor/pants/plate.ron deleted file mode 100644 index cdad145aba..0000000000 --- a/assets/common/items/npc_armor/pants/plate.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Iron Legguards", - description: "Greaves forged from iron.", - kind: Armor( - ( - kind: Pants("Plate"), - stats: ( - protection: Normal(10.0), - poise_resilience: Normal(10.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/items/npc_armor/shoulder/cultist_shoulder_purple.ron b/assets/common/items/npc_armor/shoulder/cultist_shoulder_purple.ron deleted file mode 100644 index ccff4f1e5b..0000000000 --- a/assets/common/items/npc_armor/shoulder/cultist_shoulder_purple.ron +++ /dev/null @@ -1,15 +0,0 @@ -ItemDef( - name: "Purple Cultist Mantle", - description: "Ceremonial attire used by members.", - kind: Armor( - ( - kind: Shoulder("Cultist"), - stats: ( - protection: Normal(5.0), - poise_resilience: Normal(5.0), - ), - ) - ), - quality: Low, - tags: [], -) diff --git a/assets/common/loot_tables/weapons/hammer/wood.ron b/assets/common/loot_tables/weapons/hammer/wood.ron index 749bf84c53..aaf5ae10b9 100644 --- a/assets/common/loot_tables/weapons/hammer/wood.ron +++ b/assets/common/loot_tables/weapons/hammer/wood.ron @@ -4,5 +4,4 @@ //1h (1.0, Item("common.items.weapons.hammer_1h.wood-0")), (1.0, Item("common.items.weapons.hammer_1h.wood-1")), -] ] \ No newline at end of file diff --git a/server/src/migrations/V36__deduplicate_items.sql b/server/src/migrations/V36__deduplicate_items.sql index f3e0c6f244..ad2d489f75 100644 --- a/server/src/migrations/V36__deduplicate_items.sql +++ b/server/src/migrations/V36__deduplicate_items.sql @@ -17,3 +17,44 @@ UPDATE item SET item_definition_id = 'common.items.weapons.hammer_1h.iron-1' WHERE item_definition_id = 'common.items.weapons.hammer.worn_iron_hammer-2'; UPDATE item SET item_definition_id = 'common.items.weapons.hammer_1h.bronze-0' WHERE item_definition_id = 'common.items.weapons.hammer.worn_iron_hammer-3'; +-- Deduplicates npc armor duplicates +UPDATE item +SET item_definition_id = 'common.items.armor.misc.back.backpack' WHERE item_definition_id = 'common.items.npc_armor.back.backpack'; +UPDATE item +SET item_definition_id = 'common.items.armor.misc.back.dungeon_purple' WHERE item_definition_id = 'common.items.npc_armor.back.dungeon_purple'; +UPDATE item +SET item_definition_id = 'common.items.armor.cultist.belt' WHERE item_definition_id = 'common.items.npc_armor.belt.cultist_belt'; +UPDATE item +SET item_definition_id = 'common.items.armor.cultist.chest' WHERE item_definition_id = 'common.items.npc_armor.chest.cultist_chest_purple'; +UPDATE item +SET item_definition_id = 'common.items.armor.plate.chest' WHERE item_definition_id = 'common.items.npc_armor.chest.plate'; +UPDATE item +SET item_definition_id = 'common.items.armor.misc.chest.worker_green_0' WHERE item_definition_id = 'common.items.npc_armor.chest.worker_green_0'; +UPDATE item +SET item_definition_id = 'common.items.armor.misc.chest.worker_green_1' WHERE item_definition_id = 'common.items.npc_armor.chest.worker_green_1'; +UPDATE item +SET item_definition_id = 'common.items.armor.misc.chest.worker_orange_0' WHERE item_definition_id = 'common.items.npc_armor.chest.worker_orange_0'; +UPDATE item +SET item_definition_id = 'common.items.armor.misc.chest.worker_orange_1' WHERE item_definition_id = 'common.items.npc_armor.chest.worker_orange_1'; +UPDATE item +SET item_definition_id = 'common.items.armor.misc.chest.worker_purple_0' WHERE item_definition_id = 'common.items.npc_armor.chest.worker_purple_0'; +UPDATE item +SET item_definition_id = 'common.items.armor.misc.chest.worker_purple_1' WHERE item_definition_id = 'common.items.npc_armor.chest.worker_purple_1'; +UPDATE item +SET item_definition_id = 'common.items.armor.misc.chest.worker_red_0' WHERE item_definition_id = 'common.items.npc_armor.chest.worker_red_0'; +UPDATE item +SET item_definition_id = 'common.items.armor.misc.chest.worker_red_1' WHERE item_definition_id = 'common.items.npc_armor.chest.worker_red_1'; +UPDATE item +SET item_definition_id = 'common.items.armor.misc.chest.worker_yellow_0' WHERE item_definition_id = 'common.items.npc_armor.chest.worker_yellow_0'; +UPDATE item +SET item_definition_id = 'common.items.armor.misc.chest.worker_yellow_1' WHERE item_definition_id = 'common.items.npc_armor.chest.worker_yellow_1'; +UPDATE item +SET item_definition_id = 'common.items.armor.cultist.foot' WHERE item_definition_id = 'common.items.npc_armor.foot.cultist_boots'; +UPDATE item +SET item_definition_id = 'common.items.armor.cultist.hand' WHERE item_definition_id = 'common.items.npc_armor.hand.cultist_hands_purple'; +UPDATE item +SET item_definition_id = 'common.items.armor.cultist.pants' WHERE item_definition_id = 'common.items.npc_armor.pants.cultist_legs_purple'; +UPDATE item +SET item_definition_id = 'common.items.armor.plate.pants' WHERE item_definition_id = 'common.items.npc_armor.pants.plate'; +UPDATE item +SET item_definition_id = 'common.items.armor.cultist.shoulder' WHERE item_definition_id = 'common.items.npc_armor.pants.cultist_shoulder_purple'; \ No newline at end of file diff --git a/server/src/rtsim/entity.rs b/server/src/rtsim/entity.rs index f01813c6db..1e299d62c5 100644 --- a/server/src/rtsim/entity.rs +++ b/server/src/rtsim/entity.rs @@ -94,7 +94,7 @@ impl Entity { "common.items.armor.agile.back", )), 1 => Some(comp::Item::new_from_asset_expect( - "common.items.npc_armor.back.backpack", + "common.items.armor.misc.back.backpack", )), 2 => Some(comp::Item::new_from_asset_expect( "common.items.npc_armor.back.backpack_blue",