Attnam / ivan

Iter Vehemens ad Necem - a continuation of the graphical roguelike by members of http://attnam.com
GNU General Public License v2.0
297 stars 42 forks source link

More info when looking at items on floor #588

Open andrewtweber opened 4 years ago

andrewtweber commented 4 years ago

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.

red-kangaroo commented 4 years ago

I approve of more info.

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

AquariusPower commented 4 years ago

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 commented 4 years ago

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:

you will see little info if:

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 :)