ENH: Add an icon for blocked items

This commit is contained in:
bananarama92 2025-03-19 16:51:40 +01:00
parent c99c403046
commit b74e4c193f
No known key found for this signature in database
GPG key ID: E83C7D3B5DA36248
5 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,12 @@
No walking sign, Copyright (C) Artyom Rzhanov, CC0 1.0 Universal
https://openclipart.org/detail/231091/no-walking-sign
No Copyright
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. See Other Information below.
Other Information
In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.
Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law.
When using or citing the work, you should not imply endorsement by the author or the affirmer.

Binary file not shown.

After

(image error) Size: 5 KiB

View file

@ -307,6 +307,7 @@ PreviewIconBlindHeavy,Heavily blinds
PreviewIconBlindLight,Lightly blinds
PreviewIconBlindNormal,Blinds
PreviewIconBlock,Restrains hands
PreviewIconBlocked,Blocked item
PreviewIconBuyGroup,Buygroup member
PreviewIconDeafHeavy,Heavily deafens
PreviewIconDeafLight,Lightly deafens

1 's 's
307 PreviewIconBlindLight Lightly blinds
308 PreviewIconBlindNormal Blinds
309 PreviewIconBlock Restrains hands
310 PreviewIconBlocked Blocked item
311 PreviewIconBuyGroup Buygroup member
312 PreviewIconDeafHeavy Heavily deafens
313 PreviewIconDeafLight Lightly deafens

View file

@ -1379,6 +1379,7 @@ var ElementButton = {
options.icons = [
...(options.icons ?? []),
DialogGetFavoriteStateDetails(C ?? Player, asset)?.Icon,
InventoryBlockedOrLimited(C ?? Player, item) ? "Blocked" : null,
...DialogGetLockIcon(item, "Property" in item),
...DialogGetAssetIcons(asset),
...DialogEffectIcons.GetIcons(item),
@ -1467,6 +1468,7 @@ var ElementButton = {
options.image ??= (activity.Item ? `./${AssetGetPreviewPath(activity.Item.Asset)}/${activity.Item.Asset.Name}.png` : `./Assets/Female3DCG/Activity/${activity.Activity.Name}.png`);
options.icons = [
...(options.icons ?? []),
activity.Blocked === "blocked" ? "Blocked" : undefined,
activity.Blocked === "limited" ? "AllowedLimited" : undefined,
activity.Item ? "Handheld" : undefined,
];
@ -1488,8 +1490,10 @@ var ElementButton = {
const icons = Array.from(button.querySelectorAll(".button-icon"));
const iconNamesOld = icons.map(el => el.getAttribute("data-name"));
/** @type {InventoryIcon[]} */
const iconNamesNew = [
DialogGetFavoriteStateDetails(C ?? Player, asset)?.Icon,
InventoryBlockedOrLimited(C ?? Player, item) ? "Blocked" : null,
...DialogGetLockIcon(item, "Property" in item),
...DialogGetAssetIcons(asset),
...DialogEffectIcons.GetIcons(item),

View file

@ -1359,6 +1359,7 @@ type InventoryIcon = (
| "FamilyOnly"
| "OwnerOnly"
| "Unlocked"
| "Blocked"
| AssetLockType
| ShopIcon
);