From 53585ee588425a47f6536bd0fc051f33ff6485b1 Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Sun, 8 Nov 2009 14:37:48 +0300 Subject: Remove unused check_armour_shape. --- crawl-ref/source/itemprop.cc | 139 ------------------------------------------- 1 file changed, 139 deletions(-) (limited to 'crawl-ref/source/itemprop.cc') diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index db3517ec3a..7a7647cec5 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -1162,145 +1162,6 @@ bool check_armour_size( const item_def &item, size_type size ) return (fit_armour_size( item, size ) == 0); } -// Note that this function is used to check validity of equipment -// coming out of transformations... so it shouldn't contain any -// wield/unwield only checks like two-handed weapons and shield. -bool check_armour_shape( const item_def &item, bool quiet ) -{ - ASSERT( item.base_type == OBJ_ARMOUR ); - - const int slot = get_armour_slot( item ); - - if (!player_is_shapechanged()) - { - switch (slot) - { - case EQ_BOOTS: - - if (player_mutation_level(MUT_HOOVES)) - { - if (!quiet) - mpr("You can't wear boots with hooves!"); - - return (false); - } - - if (player_mutation_level(MUT_TALONS)) - { - if (!quiet) - mpr("Boots don't fit your talons!"); - - return (false); - } - - switch (you.species) - { - case SP_NAGA: - if (item.sub_type != ARM_NAGA_BARDING) - { - if (!quiet) - mpr("You can't wear that!"); - - return (false); - } - break; - - case SP_CENTAUR: - if (item.sub_type != ARM_CENTAUR_BARDING) - { - if (!quiet) - mpr("You can't wear that!"); - - return (false); - } - break; - - case SP_MERFOLK: - if (you.in_water() && item.sub_type == ARM_BOOTS) - { - if (!quiet) - mpr("You don't currently have feet!"); - - return (false); - } - // intentional fall-through - default: - if (item.sub_type == ARM_NAGA_BARDING - || item.sub_type == ARM_CENTAUR_BARDING) - { - if (!quiet) - mpr("You can't wear barding!"); - - return (false); - } - break; - } - break; - - case EQ_HELMET: - if (!is_hard_helmet(item)) - break; - - if (player_mutation_level(MUT_HORNS)) - { - if (!quiet) - mpr("You can't wear that with your horns!"); - - return (false); - } - - if (player_mutation_level(MUT_BEAK)) - { - if (!quiet) - mpr("You can't wear that with your beak!"); - - return (false); - } - break; - - case EQ_GLOVES: - if (you.has_claws(false) >= 3) - { - if (!quiet) - mpr("You can't wear gloves with your huge claws!"); - - return (false); - } - break; - - case EQ_BODY_ARMOUR: - // Draconians are human-sized, but have wings that cause problems - // with most body armours (only very flexible fit allowed). - if (player_genus( GENPC_DRACONIAN ) - && !check_armour_size( item, SIZE_BIG )) - { - if (!quiet) - mpr("That armour doesn't fit your wings."); - - return (false); - } - break; - - default: - break; - } - } - else - { - // Note: Some transformations include all of the above as well. - if (item.sub_type == ARM_NAGA_BARDING - || item.sub_type == ARM_CENTAUR_BARDING) - { - if (!quiet) - mpr("You can't wear barding in your current form!"); - - return (false); - } - } - - return (true); -} - // Returns whether a wand or rod can be charged, or a weapon of electrocution // enchanted. // If hide_charged is true, wands known to be full will return false. -- cgit v1.2.3-54-g00ecf