@rpg-engine/long-bow 0.4.95 → 0.4.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Item/Inventory/ErrorBoundary.d.ts +1 -1
- package/dist/components/shared/Ellipsis.d.ts +1 -1
- package/dist/long-bow.cjs.development.js +17 -5
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +17 -5
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/ItemTradingComponent.stories.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/PartySystem/PartyManager/PartyManager.tsx +10 -0
- package/src/components/Shortcuts/useShortcutCooldown.ts +5 -4
|
@@ -9,4 +9,4 @@ export interface IButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
9
9
|
buttonType: ButtonTypes;
|
|
10
10
|
onPointerDown?: (e: any) => void;
|
|
11
11
|
}
|
|
12
|
-
export declare const Button: ({ disabled, children, buttonType, onPointerDown, ...props }: IButtonProps) => JSX.Element;
|
|
12
|
+
export declare const Button: ({ disabled, children, buttonType, onPointerDown, ...props }: IButtonProps) => React.JSX.Element;
|
|
@@ -9,6 +9,6 @@ export declare class ErrorBoundary extends Component<Props, State> {
|
|
|
9
9
|
state: State;
|
|
10
10
|
static getDerivedStateFromError(_: Error): State;
|
|
11
11
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
12
|
-
render(): number | boolean | React.
|
|
12
|
+
render(): number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
13
13
|
}
|
|
14
14
|
export {};
|
|
@@ -6,5 +6,5 @@ interface IProps {
|
|
|
6
6
|
fontSize?: string;
|
|
7
7
|
center?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const Ellipsis: ({ children, maxLines, maxWidth, fontSize, center, }: IProps) => JSX.Element;
|
|
9
|
+
export declare const Ellipsis: ({ children, maxLines, maxWidth, fontSize, center, }: IProps) => React.JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -12859,7 +12859,6 @@ var useShortcutCooldown = function useShortcutCooldown(onShortcutCast) {
|
|
|
12859
12859
|
setShortcutCooldown = _useState[1];
|
|
12860
12860
|
var cooldownTimeout = React.useRef(null);
|
|
12861
12861
|
var handleShortcutCast = function handleShortcutCast(index) {
|
|
12862
|
-
console.log(shortcutCooldown);
|
|
12863
12862
|
if (shortcutCooldown <= 0) setShortcutCooldown(1.5);
|
|
12864
12863
|
onShortcutCast(index);
|
|
12865
12864
|
};
|
|
@@ -13852,7 +13851,7 @@ var ItemInfo = function ItemInfo(_ref) {
|
|
|
13852
13851
|
var label = stat.label || stat.key[0].toUpperCase() + stat.key.slice(1);
|
|
13853
13852
|
var isItemToCompare = !!itemToCompare;
|
|
13854
13853
|
var isOnlyInOneItem = isItemToCompare && !(itemToCompare != null && itemToCompare[stat.key]);
|
|
13855
|
-
var statDiff = parseInt(itemStatistic.toString()) - parseInt((_itemToCompare$stat$k = itemToCompare == null
|
|
13854
|
+
var statDiff = parseInt(itemStatistic.toString()) - parseInt((_itemToCompare$stat$k = itemToCompare == null || (_itemToCompare$stat$k2 = itemToCompare[stat.key]) == null ? void 0 : _itemToCompare$stat$k2.toString()) != null ? _itemToCompare$stat$k : '0');
|
|
13856
13855
|
var isDifference = isItemToCompare && statDiff !== 0;
|
|
13857
13856
|
var isBetter = statDiff > 0 && !stat.higherIsWorse || statDiff < 0 && stat.higherIsWorse;
|
|
13858
13857
|
statistics.push(React__default.createElement(Statistic, {
|
|
@@ -14154,7 +14153,7 @@ var CraftingRecipe = function CraftingRecipe(_ref) {
|
|
|
14154
14153
|
name = modifiedWords.join(' ');
|
|
14155
14154
|
return name;
|
|
14156
14155
|
};
|
|
14157
|
-
var levelInSkill = (_skills$level = skills == null
|
|
14156
|
+
var levelInSkill = (_skills$level = skills == null || (_skills = skills[(_recipe$minCraftingRe = recipe == null || (_recipe$minCraftingRe2 = recipe.minCraftingRequirements) == null ? void 0 : _recipe$minCraftingRe2[0]) != null ? _recipe$minCraftingRe : '']) == null ? void 0 : _skills.level) != null ? _skills$level : 1;
|
|
14158
14157
|
return React__default.createElement(RadioOptionsWrapper, null, React__default.createElement(SpriteAtlasWrapper, null, React__default.createElement(ItemInfoWrapper, {
|
|
14159
14158
|
item: recipe,
|
|
14160
14159
|
atlasIMG: atlasIMG,
|
|
@@ -14184,7 +14183,7 @@ var CraftingRecipe = function CraftingRecipe(_ref) {
|
|
|
14184
14183
|
}
|
|
14185
14184
|
}, modifyString(recipe.name))), React__default.createElement(MinCraftingRequirementsText, {
|
|
14186
14185
|
levelIsOk: (_recipe$levelIsOk = recipe == null ? void 0 : recipe.levelIsOk) != null ? _recipe$levelIsOk : false
|
|
14187
|
-
}, modifyString("" + ((_recipe$minCraftingRe3 = recipe == null
|
|
14186
|
+
}, modifyString("" + ((_recipe$minCraftingRe3 = recipe == null || (_recipe$minCraftingRe4 = recipe.minCraftingRequirements) == null ? void 0 : _recipe$minCraftingRe4[0]) != null ? _recipe$minCraftingRe3 : '')), " lvl", ' ', (_recipe$minCraftingRe5 = recipe == null || (_recipe$minCraftingRe6 = recipe.minCraftingRequirements) == null ? void 0 : _recipe$minCraftingRe6[1]) != null ? _recipe$minCraftingRe5 : 0, " (", levelInSkill, ")"), recipe.ingredients.map(function (ingredient, index) {
|
|
14188
14187
|
var itemQtyInInventory = !inventory ? 0 : countItemFromInventory(ingredient.key, inventory);
|
|
14189
14188
|
return React__default.createElement(Recipe, {
|
|
14190
14189
|
key: index
|
|
@@ -16393,7 +16392,20 @@ var PartyManager = function PartyManager(_ref) {
|
|
|
16393
16392
|
className: "golden"
|
|
16394
16393
|
}))), React__default.createElement(RowsWrapper$2, {
|
|
16395
16394
|
className: "partyRows"
|
|
16396
|
-
}, partyRows && partyRows.members ? React__default.createElement(React__default.Fragment, null,
|
|
16395
|
+
}, partyRows && partyRows.members ? React__default.createElement(React__default.Fragment, null, React__default.createElement(PartyManagerRow, {
|
|
16396
|
+
key: partyRows.leader._id,
|
|
16397
|
+
id: partyRows.leader._id,
|
|
16398
|
+
leaderId: partyRows.leader._id,
|
|
16399
|
+
charName: partyRows.leader.name,
|
|
16400
|
+
charClass: partyRows.leader["class"],
|
|
16401
|
+
isLeader: true,
|
|
16402
|
+
onRemovePlayer: function onRemovePlayer() {
|
|
16403
|
+
return _onRemovePlayer(partyRows.leader._id);
|
|
16404
|
+
},
|
|
16405
|
+
onChangeLeader: function onChangeLeader() {
|
|
16406
|
+
return _onChangeLeader(partyRows.leader._id);
|
|
16407
|
+
}
|
|
16408
|
+
}), partyRows.members.map(function (partyRow) {
|
|
16397
16409
|
return React__default.createElement(PartyManagerRow, {
|
|
16398
16410
|
key: partyRow._id,
|
|
16399
16411
|
charName: partyRow.name,
|