ivan icon indicating copy to clipboard operation
ivan copied to clipboard

More info when looking at items on floor

Open andrewtweber opened this issue 6 years ago • 3 comments

When looking, and viewing information about items, it only shows the item name and material. For armor it shows the AV value.

Screen Shot 2020-03-27 at 12 34 23 PM

It would be nice to also show the weight for both, and the damage for weapons.

Particular use case I'm thinking of is when you're at a shop and want to know if something is worth buying. I'm not familiar with this "electrum" material, so I'd like to know how much they weigh to see if they will affect my agility. If they're heavy I don't want to spend money on them

Screen Shot 2020-03-27 at 12 35 06 PM

It could be argued that you can't know the weight because you haven't picked it up so it adds a little bit of that IVAN risk factor, but I think if you were in a real shop, the shopkeeper would probably let you hold it and try it out.

andrewtweber avatar Mar 27 '20 17:03 andrewtweber

I approve of more info.

Also the boots' info seems to be bugged, with only one bracket being displayed.

red-kangaroo avatar Mar 27 '20 20:03 red-kangaroo

On shop always made me not buy some stuff, really doesnt make much sense.

But out of the shop I think it is ok to have to move over it to be sure.

at cmdswapweap.cpp there is this: if(hasItem(iv,it) || (it->GetSquareUnder()==Char->GetSquareUnder() && !it->GetRoom()) ) { basically, an item can only be taken if it has no room assigned to it !it->GetRoom(), so I think it could show all info if there is a room assigned and no info if there is no room (a not owned item).

obs.: Look for the usage of this define: NO_SPECIAL_INFO there is this at game.cpp

v2 game::LookKeyHandler(v2 CursorPos, int Key){ ...
        if(LSquare->IsTransparent() && Stack->GetVisibleItems(Player)){
          Stack->DrawContents(Player, "Items here", NO_SELECT|(GetSeeWholeMapCheatMode() ? 0 : NO_SPECIAL_INFO));   

EDIT: see next post

AquariusPower avatar Mar 27 '20 21:03 AquariusPower

I tested this code:

          Stack->DrawContents(Player, "Items here", 
            NO_SELECT|
            (GetSeeWholeMapCheatMode() || Stack->GetItem(0)->GetRoom() || Player->GetLSquareUnder()==LSquare ?
              0 : NO_SPECIAL_INFO)
          );

you will see full info if:

  • the 1st item is assigned to a room
  • the player is on the same square being looked at

you will see little info if:

  • the 1st item has no assigned room
  • the player is somewhere else

is it ok? or should be different?

I will commit it at: https://github.com/AquariusPower/ivan/tree/SomeFixes1234 so you can test it more :)

AquariusPower avatar Mar 27 '20 22:03 AquariusPower