Add removed items to migration.

This commit is contained in:
Sam 2022-05-09 22:45:43 -04:00
parent 54a6c31c63
commit bcf36d08b0
2 changed files with 12 additions and 2 deletions

View File

@ -976,7 +976,7 @@ pub fn weapon_rating<T: ItemDesc>(item: &T, _msm: &MaterialStatManifest) -> f32
const ENERGY_EFFICIENCY_WEIGHT: f32 = 1.5;
const BUFF_STRENGTH_WEIGHT: f32 = 1.5;
if let ItemKind::Tool(tool) = &*item.kind() {
let rating = if let ItemKind::Tool(tool) = &*item.kind() {
let stats = tool.stats;
// TODO: Look into changing the 0.5 to reflect armor later maybe?
@ -1002,7 +1002,8 @@ pub fn weapon_rating<T: ItemDesc>(item: &T, _msm: &MaterialStatManifest) -> f32
+ buff_strength_rating * BUFF_STRENGTH_WEIGHT
} else {
0.0
}
};
rating.max(0.0)
}
#[cfg(not(target_arch = "wasm32"))]

View File

@ -1,3 +1,12 @@
-- Remove old test items
DELETE FROM item WHERE item_definition_id = 'common.items.crafting_ing.modular.damage.sword.metal_blade';
DELETE FROM item WHERE item_definition_id = 'common.items.tag_examples.cloth_item';
DELETE FROM item WHERE item_definition_id = 'common.items.tag_examples.leather';
DELETE FROM item WHERE item_definition_id = 'common.items.tag_examples.leather_item';
DELETE FROM item WHERE item_definition_id = 'common.items.tag_examples.metal_ingot';
DELETE FROM item WHERE item_definition_id = 'common.items.tag_examples.placeholder';
DELETE FROM item WHERE item_definition_id = 'common.items.tag_examples.textile';
CREATE TEMP TABLE _temp_modular_items
(
existing_item_definition_id TEXT NOT NULL,