Make HasItemEquipped return true on substrings
example
if ( player->HasItemEquipped "common_pants_01" ) elseif ( player->HasItemEquipped "common_pants_02" ) elseif ( player->HasItemEquipped "common_pants_03 ) [...] endif
If HasItemEquipped would work like GetPCCell already does this would simply become
player->HasItemEquipped "common_pants_0"
; to see if the PC wears pants at all player->HasItemEquipped "pants"
Like pants I'd like to give items different looks (color, shape…) there's nothing else different. Now there is the same script attached to all of them. To check if (further) action shall be taken by the script the equipped status of common_pants_* would be checked, if true nothing is done. While OnPCEquipped works on the instance level, HasItemEquipped could work on the object level.
In the best case there would be a way to create a type of item and assign different looks, so the object ID would stay the same. What I ask for would not be needed then.
openmw-future, I know ;)
(RM-3005 from redmine: created on 2015-11-10 by Who Knows, )