@rpg-engine/long-bow 0.3.77 → 0.3.78
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/LICENSE +20 -20
- package/README.md +181 -181
- package/dist/components/CraftBook/CraftBook.d.ts +3 -1
- package/dist/components/Item/Cards/ItemInfo.d.ts +10 -0
- package/dist/components/Item/Cards/ItemInfoDisplay.d.ts +10 -0
- package/dist/components/Item/Cards/ItemInfoWrapper.d.ts +12 -0
- package/dist/components/Item/Cards/ItemTooltip.d.ts +7 -4
- package/dist/components/Item/Cards/MobileItemTooltip.d.ts +18 -0
- package/dist/components/Item/Inventory/ItemContainer.d.ts +2 -1
- package/dist/components/Item/Inventory/ItemSlot.d.ts +4 -1
- package/dist/components/TradingMenu/TradingItemRow.d.ts +3 -1
- package/dist/components/TradingMenu/TradingMenu.d.ts +6 -4
- package/dist/components/shared/SpriteFromAtlas.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +1404 -1009
- 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 +1406 -1013
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/ItemInfoDisplay.stories.d.ts +8 -0
- package/dist/stories/TradingMenu.stories.d.ts +2 -2
- package/package.json +100 -100
- package/src/components/Abstractions/SlotsContainer.tsx +45 -45
- package/src/components/Arrow/SelectArrow.tsx +69 -69
- package/src/components/Arrow/img/arrow01-left-clicked.png +0 -0
- package/src/components/Arrow/img/arrow01-left.png +0 -0
- package/src/components/Arrow/img/arrow01-right-clicked.png +0 -0
- package/src/components/Arrow/img/arrow01-right.png +0 -0
- package/src/components/Arrow/img/arrow02-left-clicked.png +0 -0
- package/src/components/Arrow/img/arrow02-left.png +0 -0
- package/src/components/Arrow/img/arrow02-right-clicked.png +0 -0
- package/src/components/Arrow/img/arrow02-right.png +0 -0
- package/src/components/Button.tsx +40 -40
- package/src/components/Character/CharacterSelection.tsx +96 -96
- package/src/components/CharacterStatus/CharacterStatus.tsx +120 -120
- package/src/components/Chat/Chat.tsx +195 -195
- package/src/components/Chatdeprecated/ChatDeprecated.tsx +198 -198
- package/src/components/CheckButton.tsx +65 -65
- package/src/components/CircularController/CircularController.tsx +248 -248
- package/src/components/CraftBook/CraftBook.tsx +240 -227
- package/src/components/CraftBook/MockItems.ts +77 -251
- package/src/components/DraggableContainer.tsx +153 -153
- package/src/components/Dropdown.tsx +90 -90
- package/src/components/DropdownSelectorContainer.tsx +42 -42
- package/src/components/Equipment/EquipmentSet.tsx +190 -190
- package/src/components/HistoryDialog.tsx +104 -104
- package/src/components/Input.tsx +15 -15
- package/src/components/Item/Cards/ItemInfo.tsx +252 -0
- package/src/components/Item/Cards/ItemInfoDisplay.tsx +128 -0
- package/src/components/Item/Cards/ItemInfoWrapper.tsx +62 -0
- package/src/components/Item/Cards/ItemTooltip.tsx +85 -33
- package/src/components/Item/Cards/MobileItemTooltip.tsx +134 -0
- package/src/components/Item/Inventory/ErrorBoundary.tsx +42 -42
- package/src/components/Item/Inventory/ItemContainer.tsx +214 -210
- package/src/components/Item/Inventory/ItemContainerTypes.ts +6 -6
- package/src/components/Item/Inventory/ItemQuantitySelector.tsx +138 -138
- package/src/components/Item/Inventory/ItemSlot.tsx +540 -501
- package/src/components/Item/Inventory/itemContainerHelper.ts +156 -156
- package/src/components/ListMenu.tsx +63 -63
- package/src/components/Multitab/Tab.tsx +66 -66
- package/src/components/Multitab/TabBody.tsx +13 -13
- package/src/components/Multitab/TabsContainer.tsx +97 -97
- package/src/components/NPCDialog/NPCDialog.tsx +121 -121
- package/src/components/NPCDialog/NPCDialogText.tsx +113 -113
- package/src/components/NPCDialog/NPCMultiDialog.tsx +159 -159
- package/src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx +237 -237
- package/src/components/ProgressBar.tsx +92 -92
- package/src/components/PropertySelect/PropertySelect.tsx +106 -106
- package/src/components/QuestInfo/QuestInfo.tsx +230 -230
- package/src/components/QuestList.tsx +129 -129
- package/src/components/RPGUIContainer.tsx +47 -47
- package/src/components/RPGUIForceRenderStart.tsx +45 -45
- package/src/components/RPGUIRoot.tsx +14 -14
- package/src/components/RadioButton.tsx +53 -53
- package/src/components/RadioInput/RadioButton.tsx +96 -96
- package/src/components/RadioInput/RadioInput.tsx +102 -102
- package/src/components/RadioInput/instruments.ts +15 -15
- package/src/components/RangeSlider.tsx +78 -78
- package/src/components/RelativeListMenu.tsx +83 -83
- package/src/components/ScrollList.tsx +79 -79
- package/src/components/Shortcuts/Shortcuts.tsx +151 -151
- package/src/components/Shortcuts/ShortcutsSetter.tsx +132 -132
- package/src/components/Shortcuts/SingleShortcut.ts +62 -62
- package/src/components/SimpleProgressBar.tsx +62 -62
- package/src/components/SkillProgressBar.tsx +133 -133
- package/src/components/SkillsContainer.tsx +200 -200
- package/src/components/Spellbook/Spell.tsx +201 -201
- package/src/components/Spellbook/Spellbook.tsx +150 -150
- package/src/components/Spellbook/constants.ts +8 -8
- package/src/components/Spellbook/mockSpells.ts +60 -60
- package/src/components/StaticBook/StaticBook.tsx +103 -103
- package/src/components/TextArea.tsx +11 -11
- package/src/components/TimeWidget/DayNightPeriod/DayNightPeriod.tsx +35 -35
- package/src/components/TimeWidget/TimeWidget.tsx +63 -63
- package/src/components/TradingMenu/TradingItemRow.tsx +198 -181
- package/src/components/TradingMenu/TradingMenu.tsx +215 -203
- package/src/components/TradingMenu/items.mock.ts +48 -96
- package/src/components/Truncate.tsx +25 -25
- package/src/components/itemSelector/ItemSelector.tsx +136 -136
- package/src/components/shared/Column.tsx +16 -16
- package/src/components/shared/Ellipsis.tsx +65 -65
- package/src/components/shared/SpriteFromAtlas.tsx +104 -102
- package/src/components/typography/DynamicText.tsx +49 -49
- package/src/constants/uiColors.ts +20 -20
- package/src/constants/uiDevices.ts +3 -3
- package/src/constants/uiFonts.ts +12 -12
- package/src/hooks/useEventListener.ts +21 -21
- package/src/hooks/useOutsideAlerter.ts +25 -25
- package/src/index.tsx +40 -40
- package/src/libs/StringHelpers.ts +3 -3
- package/src/mocks/atlas/entities/entities.json +20215 -20215
- package/src/mocks/atlas/icons/icons.json +735 -735
- package/src/mocks/atlas/items/items.json +12086 -12086
- package/src/mocks/equipmentSet.mocks.ts +391 -393
- package/src/mocks/itemContainer.mocks.ts +563 -562
- package/src/mocks/skills.mocks.ts +128 -128
- package/src/stories/Arrow.stories.tsx +26 -26
- package/src/stories/Button.stories.tsx +36 -36
- package/src/stories/CharacterSelection.stories.tsx +45 -45
- package/src/stories/CharacterStatus.stories.tsx +29 -29
- package/src/stories/Chat.stories.tsx +187 -187
- package/src/stories/ChatDeprecated.stories.tsx +170 -170
- package/src/stories/CheckButton.stories.tsx +48 -48
- package/src/stories/CircullarController.stories.tsx +37 -37
- package/src/stories/CraftBook.stories.tsx +42 -40
- package/src/stories/DayNightPeriod.stories.tsx +27 -27
- package/src/stories/DraggableContainer.stories.tsx +28 -28
- package/src/stories/Dropdown.stories.tsx +46 -46
- package/src/stories/DropdownSelectorContainer.stories.tsx +41 -41
- package/src/stories/EquipmentSet.stories.tsx +65 -65
- package/src/stories/HistoryDialog.stories.tsx +61 -61
- package/src/stories/ItemContainer.stories.tsx +200 -198
- package/src/stories/ItemInfoDisplay.stories.tsx +33 -0
- package/src/stories/ItemQuantitySelector.stories.tsx +26 -26
- package/src/stories/ItemSelector.stories.tsx +77 -77
- package/src/stories/ItemTradingComponent.stories.tsx +35 -35
- package/src/stories/ListMenu.stories.tsx +56 -56
- package/src/stories/Multitab.stories.tsx +51 -51
- package/src/stories/NPCDialog.stories.tsx +130 -130
- package/src/stories/NPCMultiDialog.stories.tsx +71 -71
- package/src/stories/ProgressBar.stories.tsx +23 -23
- package/src/stories/PropertySelect.stories.tsx +40 -40
- package/src/stories/QuestInfo.stories.tsx +107 -107
- package/src/stories/QuestList.stories.tsx +82 -82
- package/src/stories/RPGUIContainers.stories.tsx +42 -42
- package/src/stories/RadioButton.stories.tsx +49 -49
- package/src/stories/RadioInput.stories.tsx +34 -34
- package/src/stories/RangeSlider.stories.tsx +64 -64
- package/src/stories/ScrollList.stories.tsx +85 -85
- package/src/stories/Shortcuts.stories.tsx +39 -39
- package/src/stories/SimpleProgressBar.stories.tsx +22 -22
- package/src/stories/SkillProgressBar.stories.tsx +34 -34
- package/src/stories/SkillsContainer.stories.tsx +35 -35
- package/src/stories/Spellbook.stories.tsx +104 -104
- package/src/stories/StaticBook.stories.tsx +32 -32
- package/src/stories/Text.stories.tsx +42 -42
- package/src/stories/TimeWidget.stories.tsx +27 -27
- package/src/stories/TradingMenu.stories.tsx +47 -45
- package/src/types/eventTypes.ts +4 -4
- package/src/types/index.d.ts +2 -2
package/dist/long-bow.esm.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { Component, useState, useEffect, useRef, useMemo, Fragment } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath,
|
|
3
|
+
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemRarities, ItemSubType, ItemSlotType, getSPForLevel, PeriodOfDay, isMobileOrTablet } from '@rpg-engine/shared';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
6
6
|
import { RxPaperPlane } from 'react-icons/rx';
|
|
7
7
|
import Draggable from 'react-draggable';
|
|
8
8
|
import { v4 } from 'uuid';
|
|
9
|
+
import { camelCase } from 'lodash-es';
|
|
9
10
|
import { observer } from 'mobx-react-lite';
|
|
10
11
|
import 'rpgui/rpgui.min.css';
|
|
11
12
|
import 'rpgui/rpgui.min.js';
|
|
@@ -107,7 +108,8 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
|
|
|
107
108
|
_ref$grayScale = _ref.grayScale,
|
|
108
109
|
grayScale = _ref$grayScale === void 0 ? false : _ref$grayScale,
|
|
109
110
|
_ref$opacity = _ref.opacity,
|
|
110
|
-
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity
|
|
111
|
+
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity,
|
|
112
|
+
imgClassname = _ref.imgClassname;
|
|
111
113
|
//! If an item is not showing, remember that you MUST run yarn atlas:copy everytime you add a new item to the atlas (it will sync our public folder atlas with src/atlas).
|
|
112
114
|
//!Due to React's limitations, we cannot import it from the public folder directly!
|
|
113
115
|
var spriteData = atlasJSON.frames[spriteKey] || atlasJSON.frames['others/no-image.png'];
|
|
@@ -119,7 +121,7 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
|
|
|
119
121
|
onPointerDown: onPointerDown,
|
|
120
122
|
style: containerStyle
|
|
121
123
|
}, React.createElement(ImgSprite, {
|
|
122
|
-
className: "sprite-from-atlas-img",
|
|
124
|
+
className: "sprite-from-atlas-img " + (imgClassname || ''),
|
|
123
125
|
atlasIMG: atlasIMG,
|
|
124
126
|
frame: spriteData.frame,
|
|
125
127
|
scale: imgScale,
|
|
@@ -33356,202 +33358,6 @@ var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
|
|
|
33356
33358
|
return props.opened ? 'block' : 'none';
|
|
33357
33359
|
});
|
|
33358
33360
|
|
|
33359
|
-
var CraftBook = function CraftBook(_ref) {
|
|
33360
|
-
var atlasIMG = _ref.atlasIMG,
|
|
33361
|
-
atlasJSON = _ref.atlasJSON,
|
|
33362
|
-
onClose = _ref.onClose,
|
|
33363
|
-
onSelect = _ref.onSelect,
|
|
33364
|
-
onCraftItem = _ref.onCraftItem,
|
|
33365
|
-
craftablesItems = _ref.craftablesItems;
|
|
33366
|
-
var optionsId = 0;
|
|
33367
|
-
var _useState = useState({
|
|
33368
|
-
show: false,
|
|
33369
|
-
index: 200
|
|
33370
|
-
}),
|
|
33371
|
-
isShown = _useState[0],
|
|
33372
|
-
setIsShown = _useState[1];
|
|
33373
|
-
var _useState2 = useState(),
|
|
33374
|
-
craftItem = _useState2[0],
|
|
33375
|
-
setCraftItem = _useState2[1];
|
|
33376
|
-
var getDropdownOptions = function getDropdownOptions() {
|
|
33377
|
-
var options = [];
|
|
33378
|
-
Object.keys(ItemSubType).forEach(function (key) {
|
|
33379
|
-
if (key === 'DeadBody') {
|
|
33380
|
-
return; // we can't craft crafting resouces...
|
|
33381
|
-
}
|
|
33382
|
-
|
|
33383
|
-
options.push({
|
|
33384
|
-
id: optionsId,
|
|
33385
|
-
value: key,
|
|
33386
|
-
option: key
|
|
33387
|
-
});
|
|
33388
|
-
optionsId += 1;
|
|
33389
|
-
});
|
|
33390
|
-
return options;
|
|
33391
|
-
};
|
|
33392
|
-
var modifyString = function modifyString(str) {
|
|
33393
|
-
// Split the string by "/" and "."
|
|
33394
|
-
var parts = str.split('/');
|
|
33395
|
-
var fileName = parts[parts.length - 1];
|
|
33396
|
-
parts = fileName.split('.');
|
|
33397
|
-
var name = parts[0];
|
|
33398
|
-
// Replace all occurrences of "-" with " "
|
|
33399
|
-
name = name.replace(/-/g, ' ');
|
|
33400
|
-
// Uppercase the first word
|
|
33401
|
-
var words = name.split(' ');
|
|
33402
|
-
var firstWord = words[0].slice(0, 1).toUpperCase() + words[0].slice(1);
|
|
33403
|
-
var modifiedWords = [firstWord].concat(words.slice(1));
|
|
33404
|
-
name = modifiedWords.join(' ');
|
|
33405
|
-
return name;
|
|
33406
|
-
};
|
|
33407
|
-
var handleClick = function handleClick(value) {
|
|
33408
|
-
setCraftItem(value);
|
|
33409
|
-
};
|
|
33410
|
-
return React.createElement(DraggableContainer, {
|
|
33411
|
-
type: RPGUIContainerTypes.Framed,
|
|
33412
|
-
width: "500px",
|
|
33413
|
-
cancelDrag: ".inputRadioCraftBook",
|
|
33414
|
-
onCloseButton: function onCloseButton() {
|
|
33415
|
-
if (onClose) {
|
|
33416
|
-
onClose();
|
|
33417
|
-
}
|
|
33418
|
-
}
|
|
33419
|
-
}, React.createElement("div", {
|
|
33420
|
-
style: {
|
|
33421
|
-
width: '100%'
|
|
33422
|
-
}
|
|
33423
|
-
}, React.createElement(Title$1, null, 'Craftbook'), React.createElement(Subtitle, null, 'Select an item to craft'), React.createElement("hr", {
|
|
33424
|
-
className: "golden"
|
|
33425
|
-
})), React.createElement(Dropdown, {
|
|
33426
|
-
options: getDropdownOptions(),
|
|
33427
|
-
onChange: function onChange(value) {
|
|
33428
|
-
return onSelect(value);
|
|
33429
|
-
}
|
|
33430
|
-
}), React.createElement(RadioInputScroller, {
|
|
33431
|
-
className: "inputRadioCraftBook"
|
|
33432
|
-
}, craftablesItems == null ? void 0 : craftablesItems.map(function (option, index) {
|
|
33433
|
-
return React.createElement(RadioOptionsWrapper, {
|
|
33434
|
-
key: index
|
|
33435
|
-
}, React.createElement(SpriteAtlasWrapper, null, React.createElement(SpriteFromAtlas, {
|
|
33436
|
-
atlasIMG: atlasIMG,
|
|
33437
|
-
atlasJSON: atlasJSON,
|
|
33438
|
-
spriteKey: option.texturePath,
|
|
33439
|
-
imgScale: 3,
|
|
33440
|
-
grayScale: !option.canCraft
|
|
33441
|
-
})), React.createElement("div", null, React.createElement("div", {
|
|
33442
|
-
onPointerDown: function onPointerDown() {
|
|
33443
|
-
return handleClick(option.key);
|
|
33444
|
-
}
|
|
33445
|
-
}, React.createElement("input", {
|
|
33446
|
-
className: "rpgui-radio",
|
|
33447
|
-
type: "radio",
|
|
33448
|
-
value: option.name,
|
|
33449
|
-
name: "test",
|
|
33450
|
-
disabled: !option.canCraft,
|
|
33451
|
-
checked: craftItem === option.key,
|
|
33452
|
-
onChange: function onChange() {
|
|
33453
|
-
return handleClick(option.key);
|
|
33454
|
-
}
|
|
33455
|
-
}), React.createElement("label", {
|
|
33456
|
-
onPointerDown: function onPointerDown() {
|
|
33457
|
-
handleClick(option.key);
|
|
33458
|
-
},
|
|
33459
|
-
onTouchEnd: function onTouchEnd() {
|
|
33460
|
-
setIsShown({
|
|
33461
|
-
show: true,
|
|
33462
|
-
index: index
|
|
33463
|
-
});
|
|
33464
|
-
},
|
|
33465
|
-
style: {
|
|
33466
|
-
display: 'flex',
|
|
33467
|
-
alignItems: 'center'
|
|
33468
|
-
},
|
|
33469
|
-
onMouseEnter: function onMouseEnter() {
|
|
33470
|
-
return setIsShown({
|
|
33471
|
-
show: true,
|
|
33472
|
-
index: index
|
|
33473
|
-
});
|
|
33474
|
-
},
|
|
33475
|
-
onMouseLeave: function onMouseLeave() {
|
|
33476
|
-
return setIsShown({
|
|
33477
|
-
show: false,
|
|
33478
|
-
index: index
|
|
33479
|
-
});
|
|
33480
|
-
}
|
|
33481
|
-
}, modifyString(option.name))), isShown && isShown.index === index && option.ingredients.map(function (option, index) {
|
|
33482
|
-
return React.createElement(Recipes, {
|
|
33483
|
-
key: index
|
|
33484
|
-
}, React.createElement(SpriteFromAtlas, {
|
|
33485
|
-
atlasIMG: atlasIMG,
|
|
33486
|
-
atlasJSON: atlasJSON,
|
|
33487
|
-
spriteKey: option.texturePath,
|
|
33488
|
-
imgScale: 1
|
|
33489
|
-
}), React.createElement(StyledItem, null, modifyString(option.key), " (", option.qty, "x)"));
|
|
33490
|
-
})));
|
|
33491
|
-
})), React.createElement(ButtonWrapper, null, React.createElement(Button, {
|
|
33492
|
-
buttonType: ButtonTypes.RPGUIButton,
|
|
33493
|
-
onPointerDown: onClose
|
|
33494
|
-
}, "Cancel"), React.createElement(Button, {
|
|
33495
|
-
buttonType: ButtonTypes.RPGUIButton,
|
|
33496
|
-
onPointerDown: function onPointerDown() {
|
|
33497
|
-
return onCraftItem(craftItem);
|
|
33498
|
-
}
|
|
33499
|
-
}, "Craft")));
|
|
33500
|
-
};
|
|
33501
|
-
var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
33502
|
-
displayName: "CraftBook__StyledItem",
|
|
33503
|
-
componentId: "sc-19q95ue-0"
|
|
33504
|
-
})(["margin-left:10px;"]);
|
|
33505
|
-
var Recipes = /*#__PURE__*/styled.div.withConfig({
|
|
33506
|
-
displayName: "CraftBook__Recipes",
|
|
33507
|
-
componentId: "sc-19q95ue-1"
|
|
33508
|
-
})(["font-size:0.6rem;color:yellow !important;margin-bottom:3px;display:flex;align-items:center;.sprite-from-atlas-img{top:0px;left:0px;}"]);
|
|
33509
|
-
var Title$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
33510
|
-
displayName: "CraftBook__Title",
|
|
33511
|
-
componentId: "sc-19q95ue-2"
|
|
33512
|
-
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
33513
|
-
var Subtitle = /*#__PURE__*/styled.h1.withConfig({
|
|
33514
|
-
displayName: "CraftBook__Subtitle",
|
|
33515
|
-
componentId: "sc-19q95ue-3"
|
|
33516
|
-
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
33517
|
-
var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
|
|
33518
|
-
displayName: "CraftBook__RadioInputScroller",
|
|
33519
|
-
componentId: "sc-19q95ue-4"
|
|
33520
|
-
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;-webkit-overflow-scrolling:touch;"]);
|
|
33521
|
-
var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
33522
|
-
displayName: "CraftBook__SpriteAtlasWrapper",
|
|
33523
|
-
componentId: "sc-19q95ue-5"
|
|
33524
|
-
})(["margin-right:40px;"]);
|
|
33525
|
-
var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
33526
|
-
displayName: "CraftBook__RadioOptionsWrapper",
|
|
33527
|
-
componentId: "sc-19q95ue-6"
|
|
33528
|
-
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
33529
|
-
var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
33530
|
-
displayName: "CraftBook__ButtonWrapper",
|
|
33531
|
-
componentId: "sc-19q95ue-7"
|
|
33532
|
-
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
33533
|
-
|
|
33534
|
-
var DropdownSelectorContainer = function DropdownSelectorContainer(_ref) {
|
|
33535
|
-
var title = _ref.title,
|
|
33536
|
-
onChange = _ref.onChange,
|
|
33537
|
-
options = _ref.options,
|
|
33538
|
-
details = _ref.details;
|
|
33539
|
-
return React.createElement("div", null, React.createElement("p", null, title), React.createElement(Dropdown, {
|
|
33540
|
-
options: options.map(function (option, index) {
|
|
33541
|
-
return {
|
|
33542
|
-
option: option.name,
|
|
33543
|
-
value: option.id,
|
|
33544
|
-
id: index
|
|
33545
|
-
};
|
|
33546
|
-
}),
|
|
33547
|
-
onChange: onChange
|
|
33548
|
-
}), React.createElement(Details, null, details));
|
|
33549
|
-
};
|
|
33550
|
-
var Details = /*#__PURE__*/styled.p.withConfig({
|
|
33551
|
-
displayName: "DropdownSelectorContainer__Details",
|
|
33552
|
-
componentId: "sc-kaa0h9-0"
|
|
33553
|
-
})(["font-size:", " !important;"], uiFonts.size.xsmall);
|
|
33554
|
-
|
|
33555
33361
|
var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
33556
33362
|
var options = _ref.options,
|
|
33557
33363
|
onSelected = _ref.onSelected,
|
|
@@ -33601,14 +33407,73 @@ var ListElement = /*#__PURE__*/styled.li.withConfig({
|
|
|
33601
33407
|
componentId: "sc-7hohf-1"
|
|
33602
33408
|
})(["margin-right:0.5rem;"]);
|
|
33603
33409
|
|
|
33604
|
-
var
|
|
33605
|
-
var
|
|
33606
|
-
|
|
33410
|
+
var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
33411
|
+
var item = _ref.item,
|
|
33412
|
+
atlasIMG = _ref.atlasIMG,
|
|
33413
|
+
atlasJSON = _ref.atlasJSON,
|
|
33414
|
+
closeTooltip = _ref.closeTooltip,
|
|
33415
|
+
equipmentSet = _ref.equipmentSet,
|
|
33416
|
+
_ref$scale = _ref.scale,
|
|
33417
|
+
scale = _ref$scale === void 0 ? 1 : _ref$scale,
|
|
33418
|
+
options = _ref.options,
|
|
33419
|
+
onSelected = _ref.onSelected;
|
|
33420
|
+
var ref = useRef(null);
|
|
33421
|
+
useEffect(function () {
|
|
33422
|
+
var current = ref.current;
|
|
33423
|
+
if (current) {
|
|
33424
|
+
// Adjust the position to be on whole window
|
|
33425
|
+
var rect = current.getBoundingClientRect();
|
|
33426
|
+
var x = -rect.x * 100 / (scale * 100);
|
|
33427
|
+
var y = -rect.y * 100 / (scale * 100);
|
|
33428
|
+
current.style.transform = "translate(" + x + "px, " + y + "px)";
|
|
33429
|
+
current.style.opacity = '0.92';
|
|
33430
|
+
}
|
|
33431
|
+
return;
|
|
33432
|
+
}, []);
|
|
33433
|
+
return React.createElement(Container$9, {
|
|
33434
|
+
ref: ref,
|
|
33435
|
+
onTouchEnd: function onTouchEnd() {
|
|
33436
|
+
setTimeout(function () {
|
|
33437
|
+
closeTooltip();
|
|
33438
|
+
}, 10);
|
|
33439
|
+
},
|
|
33440
|
+
scale: scale
|
|
33441
|
+
}, React.createElement(ItemInfoDisplay, {
|
|
33442
|
+
item: item,
|
|
33443
|
+
atlasIMG: atlasIMG,
|
|
33444
|
+
atlasJSON: atlasJSON,
|
|
33445
|
+
equipmentSet: equipmentSet,
|
|
33446
|
+
isMobile: true
|
|
33447
|
+
}), React.createElement(OptionsContainer, null, options == null ? void 0 : options.map(function (option) {
|
|
33448
|
+
return React.createElement(Option, {
|
|
33449
|
+
key: option.id,
|
|
33450
|
+
onTouchEnd: function onTouchEnd() {
|
|
33451
|
+
setTimeout(function () {
|
|
33452
|
+
onSelected == null ? void 0 : onSelected(option.id);
|
|
33453
|
+
closeTooltip();
|
|
33454
|
+
}, 10);
|
|
33455
|
+
}
|
|
33456
|
+
}, option.text);
|
|
33457
|
+
})));
|
|
33607
33458
|
};
|
|
33608
33459
|
var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
33609
|
-
displayName: "
|
|
33610
|
-
componentId: "sc-
|
|
33611
|
-
})(["z-index:
|
|
33460
|
+
displayName: "MobileItemTooltip__Container",
|
|
33461
|
+
componentId: "sc-ku4p1j-0"
|
|
33462
|
+
})(["position:fixed;z-index:50;left:0;top:0;opacity:0;width:", ";height:", ";background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;@media (max-width:580px){flex-direction:column;}"], function (_ref2) {
|
|
33463
|
+
var scale = _ref2.scale;
|
|
33464
|
+
return "calc(100vw * 100 / " + scale * 100 + ")";
|
|
33465
|
+
}, function (_ref3) {
|
|
33466
|
+
var scale = _ref3.scale;
|
|
33467
|
+
return "calc(100vh * 100 / " + scale * 100 + ")";
|
|
33468
|
+
});
|
|
33469
|
+
var OptionsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
33470
|
+
displayName: "MobileItemTooltip__OptionsContainer",
|
|
33471
|
+
componentId: "sc-ku4p1j-1"
|
|
33472
|
+
})(["display:flex;flex-direction:column;gap:0.5rem;flex-wrap:wrap;@media (max-width:580px){flex-direction:row;justify-content:center;}"]);
|
|
33473
|
+
var Option = /*#__PURE__*/styled.button.withConfig({
|
|
33474
|
+
displayName: "MobileItemTooltip__Option",
|
|
33475
|
+
componentId: "sc-ku4p1j-2"
|
|
33476
|
+
})(["padding:1rem;background-color:#333;color:white;border:none;border-radius:3px;width:8rem;transition:background-color 0.2s;&:hover{background-color:#555;}@media (max-width:580px){padding:1rem 0.5rem;}"]);
|
|
33612
33477
|
|
|
33613
33478
|
var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
|
|
33614
33479
|
var contextMenu = actionsByTypeList.map(function (action) {
|
|
@@ -33744,32 +33609,36 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33744
33609
|
openQuantitySelector = _ref.openQuantitySelector,
|
|
33745
33610
|
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
|
|
33746
33611
|
dragScale = _ref.dragScale,
|
|
33747
|
-
isSelectingShortcut = _ref.isSelectingShortcut
|
|
33612
|
+
isSelectingShortcut = _ref.isSelectingShortcut,
|
|
33613
|
+
equipmentSet = _ref.equipmentSet;
|
|
33748
33614
|
var _useState = useState(false),
|
|
33749
33615
|
isTooltipVisible = _useState[0],
|
|
33750
33616
|
setTooltipVisible = _useState[1];
|
|
33751
33617
|
var _useState2 = useState(false),
|
|
33752
|
-
|
|
33753
|
-
|
|
33618
|
+
isTooltipMobileVisible = _useState2[0],
|
|
33619
|
+
setIsTooltipMobileVisible = _useState2[1];
|
|
33754
33620
|
var _useState3 = useState(false),
|
|
33755
|
-
|
|
33756
|
-
|
|
33621
|
+
isContextMenuVisible = _useState3[0],
|
|
33622
|
+
setIsContextMenuVisible = _useState3[1];
|
|
33757
33623
|
var _useState4 = useState(false),
|
|
33758
|
-
|
|
33759
|
-
|
|
33760
|
-
var _useState5 = useState(
|
|
33624
|
+
isFocused = _useState4[0],
|
|
33625
|
+
setIsFocused = _useState4[1];
|
|
33626
|
+
var _useState5 = useState(false),
|
|
33627
|
+
wasDragged = _useState5[0],
|
|
33628
|
+
setWasDragged = _useState5[1];
|
|
33629
|
+
var _useState6 = useState({
|
|
33761
33630
|
x: 0,
|
|
33762
33631
|
y: 0
|
|
33763
33632
|
}),
|
|
33764
|
-
dragPosition =
|
|
33765
|
-
setDragPosition =
|
|
33766
|
-
var
|
|
33767
|
-
dropPosition =
|
|
33768
|
-
setDropPosition =
|
|
33633
|
+
dragPosition = _useState6[0],
|
|
33634
|
+
setDragPosition = _useState6[1];
|
|
33635
|
+
var _useState7 = useState(null),
|
|
33636
|
+
dropPosition = _useState7[0],
|
|
33637
|
+
setDropPosition = _useState7[1];
|
|
33769
33638
|
var dragContainer = useRef(null);
|
|
33770
|
-
var
|
|
33771
|
-
contextActions =
|
|
33772
|
-
setContextActions =
|
|
33639
|
+
var _useState8 = useState([]),
|
|
33640
|
+
contextActions = _useState8[0],
|
|
33641
|
+
setContextActions = _useState8[1];
|
|
33773
33642
|
useEffect(function () {
|
|
33774
33643
|
setDragPosition({
|
|
33775
33644
|
x: 0,
|
|
@@ -33818,7 +33687,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33818
33687
|
texturePath: itemToRender.texturePath,
|
|
33819
33688
|
stackQty: itemToRender.stackQty || 1
|
|
33820
33689
|
}, atlasJSON),
|
|
33821
|
-
imgScale: 3
|
|
33690
|
+
imgScale: 3,
|
|
33691
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
33822
33692
|
})));
|
|
33823
33693
|
}
|
|
33824
33694
|
var stackInfo = getStackInfo((_itemToRender$_id = itemToRender == null ? void 0 : itemToRender._id) != null ? _itemToRender$_id : '', (_itemToRender$stackQt = itemToRender == null ? void 0 : itemToRender.stackQty) != null ? _itemToRender$stackQt : 0);
|
|
@@ -33843,7 +33713,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33843
33713
|
texturePath: itemToRender.texturePath,
|
|
33844
33714
|
stackQty: itemToRender.stackQty || 1
|
|
33845
33715
|
}, atlasJSON),
|
|
33846
|
-
imgScale: 3
|
|
33716
|
+
imgScale: 3,
|
|
33717
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
33847
33718
|
})));
|
|
33848
33719
|
var stackInfo = getStackInfo((_itemToRender$_id2 = itemToRender == null ? void 0 : itemToRender._id) != null ? _itemToRender$_id2 : '', (_itemToRender$stackQt2 = itemToRender == null ? void 0 : itemToRender.stackQty) != null ? _itemToRender$stackQt2 : 0);
|
|
33849
33720
|
if (stackInfo) {
|
|
@@ -33860,7 +33731,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33860
33731
|
spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
|
|
33861
33732
|
imgScale: 3,
|
|
33862
33733
|
grayScale: true,
|
|
33863
|
-
opacity: 0.4
|
|
33734
|
+
opacity: 0.4,
|
|
33735
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
33864
33736
|
}));
|
|
33865
33737
|
}
|
|
33866
33738
|
};
|
|
@@ -33953,7 +33825,12 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33953
33825
|
}
|
|
33954
33826
|
}, 100);
|
|
33955
33827
|
} else if (item) {
|
|
33956
|
-
|
|
33828
|
+
var isTouch = false;
|
|
33829
|
+
if (e.type === 'touchend' && !isSelectingShortcut) {
|
|
33830
|
+
isTouch = true;
|
|
33831
|
+
setIsTooltipMobileVisible(true);
|
|
33832
|
+
}
|
|
33833
|
+
if (!isContextMenuDisabled && !isSelectingShortcut && !isTouch) setIsContextMenuVisible(!isContextMenuVisible);
|
|
33957
33834
|
onPointerDown(item.type, containerType, item);
|
|
33958
33835
|
}
|
|
33959
33836
|
},
|
|
@@ -33989,7 +33866,26 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33989
33866
|
setTooltipVisible(false);
|
|
33990
33867
|
}
|
|
33991
33868
|
}, onRenderSlot(item))), isTooltipVisible && item && !isFocused && React.createElement(ItemTooltip, {
|
|
33992
|
-
|
|
33869
|
+
item: item,
|
|
33870
|
+
atlasIMG: atlasIMG,
|
|
33871
|
+
atlasJSON: atlasJSON,
|
|
33872
|
+
equipmentSet: equipmentSet
|
|
33873
|
+
}), isTooltipMobileVisible && item && React.createElement(MobileItemTooltip, {
|
|
33874
|
+
item: item,
|
|
33875
|
+
atlasIMG: atlasIMG,
|
|
33876
|
+
atlasJSON: atlasJSON,
|
|
33877
|
+
equipmentSet: equipmentSet,
|
|
33878
|
+
closeTooltip: function closeTooltip() {
|
|
33879
|
+
setIsTooltipMobileVisible(false);
|
|
33880
|
+
},
|
|
33881
|
+
scale: dragScale,
|
|
33882
|
+
options: contextActions,
|
|
33883
|
+
onSelected: function onSelected(optionId) {
|
|
33884
|
+
setIsContextMenuVisible(false);
|
|
33885
|
+
if (item) {
|
|
33886
|
+
_onSelected(optionId, item);
|
|
33887
|
+
}
|
|
33888
|
+
}
|
|
33993
33889
|
}), !isContextMenuDisabled && isContextMenuVisible && contextActions && React.createElement(RelativeListMenu, {
|
|
33994
33890
|
options: contextActions,
|
|
33995
33891
|
onSelected: function onSelected(optionId) {
|
|
@@ -34014,13 +33910,13 @@ var rarityColor = function rarityColor(item) {
|
|
|
34014
33910
|
case ItemRarities.Legendary:
|
|
34015
33911
|
return 'rgba(255, 191, 0,0.6)';
|
|
34016
33912
|
default:
|
|
34017
|
-
return
|
|
33913
|
+
return null;
|
|
34018
33914
|
}
|
|
34019
33915
|
};
|
|
34020
33916
|
var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
34021
33917
|
displayName: "ItemSlot__Container",
|
|
34022
33918
|
componentId: "sc-l2j5ef-0"
|
|
34023
|
-
})(["margin:0.1rem;.sprite-from-atlas-img{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}position:relative;&::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-radius:12px;pointer-events:none;animation:", ";@keyframes bg-color-change{0%{background-color:rgba(255 255 255 / 0.5);}50%{background-color:transparent;}100%{background-color:rgba(255 255 255 / 0.5);}}}"], function (_ref2) {
|
|
33919
|
+
})(["margin:0.1rem;.sprite-from-atlas-img--item{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}position:relative;&::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-radius:12px;pointer-events:none;animation:", ";@keyframes bg-color-change{0%{background-color:rgba(255 255 255 / 0.5);}50%{background-color:transparent;}100%{background-color:rgba(255 255 255 / 0.5);}}}"], function (_ref2) {
|
|
34024
33920
|
var item = _ref2.item;
|
|
34025
33921
|
return rarityColor(item);
|
|
34026
33922
|
}, function (_ref3) {
|
|
@@ -34048,639 +33944,582 @@ var ItemQty = /*#__PURE__*/styled.span.withConfig({
|
|
|
34048
33944
|
componentId: "sc-l2j5ef-3"
|
|
34049
33945
|
})(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
|
|
34050
33946
|
|
|
34051
|
-
var
|
|
34052
|
-
|
|
34053
|
-
|
|
34054
|
-
|
|
34055
|
-
|
|
34056
|
-
|
|
33947
|
+
var statisticsToDisplay = [{
|
|
33948
|
+
key: 'attack'
|
|
33949
|
+
}, {
|
|
33950
|
+
key: 'defense'
|
|
33951
|
+
}, {
|
|
33952
|
+
key: 'maxRange',
|
|
33953
|
+
label: 'Range'
|
|
33954
|
+
}, {
|
|
33955
|
+
key: 'weight',
|
|
33956
|
+
higherIsWorse: true
|
|
33957
|
+
}];
|
|
33958
|
+
var ItemInfo = function ItemInfo(_ref) {
|
|
33959
|
+
var _item$stackQty;
|
|
33960
|
+
var item = _ref.item,
|
|
33961
|
+
itemToCompare = _ref.itemToCompare,
|
|
34057
33962
|
atlasIMG = _ref.atlasIMG,
|
|
34058
|
-
atlasJSON = _ref.atlasJSON
|
|
34059
|
-
|
|
34060
|
-
|
|
34061
|
-
|
|
34062
|
-
|
|
34063
|
-
|
|
34064
|
-
|
|
34065
|
-
|
|
34066
|
-
|
|
34067
|
-
|
|
34068
|
-
|
|
34069
|
-
|
|
34070
|
-
|
|
34071
|
-
|
|
34072
|
-
|
|
34073
|
-
|
|
34074
|
-
|
|
34075
|
-
|
|
34076
|
-
|
|
34077
|
-
|
|
34078
|
-
|
|
34079
|
-
|
|
34080
|
-
|
|
34081
|
-
|
|
34082
|
-
|
|
34083
|
-
|
|
34084
|
-
|
|
34085
|
-
|
|
34086
|
-
|
|
34087
|
-
|
|
34088
|
-
|
|
34089
|
-
|
|
34090
|
-
|
|
34091
|
-
|
|
34092
|
-
|
|
34093
|
-
|
|
34094
|
-
},
|
|
34095
|
-
|
|
34096
|
-
|
|
34097
|
-
|
|
34098
|
-
|
|
34099
|
-
|
|
34100
|
-
|
|
34101
|
-
|
|
34102
|
-
|
|
34103
|
-
|
|
34104
|
-
|
|
34105
|
-
|
|
34106
|
-
|
|
34107
|
-
|
|
34108
|
-
|
|
34109
|
-
},
|
|
34110
|
-
dragScale: dragScale,
|
|
34111
|
-
checkIfItemCanBeMoved: checkIfItemCanBeMoved,
|
|
34112
|
-
checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
|
|
34113
|
-
onPlaceDrop: function onPlaceDrop(item, slotIndex, itemContainerType) {
|
|
34114
|
-
if (onItemPlaceDrop) onItemPlaceDrop(item, slotIndex, itemContainerType);
|
|
34115
|
-
},
|
|
34116
|
-
onOutsideDrop: function onOutsideDrop(item, position) {
|
|
34117
|
-
if (onItemOutsideDrop) onItemOutsideDrop(item, position);
|
|
34118
|
-
},
|
|
33963
|
+
atlasJSON = _ref.atlasJSON;
|
|
33964
|
+
var renderStatistics = function renderStatistics() {
|
|
33965
|
+
var statistics = [];
|
|
33966
|
+
for (var _i = 0, _statisticsToDisplay = statisticsToDisplay; _i < _statisticsToDisplay.length; _i++) {
|
|
33967
|
+
var stat = _statisticsToDisplay[_i];
|
|
33968
|
+
var itemStatistic = item[stat.key];
|
|
33969
|
+
if (itemStatistic) {
|
|
33970
|
+
var _itemToCompare$stat$k, _itemToCompare$stat$k2;
|
|
33971
|
+
var label = stat.label || stat.key[0].toUpperCase() + stat.key.slice(1);
|
|
33972
|
+
var isItemToCompare = !!itemToCompare;
|
|
33973
|
+
var isOnlyInOneItem = isItemToCompare && !(itemToCompare != null && itemToCompare[stat.key]);
|
|
33974
|
+
var statDiff = parseInt(itemStatistic.toString()) - parseInt((_itemToCompare$stat$k = itemToCompare == null ? void 0 : (_itemToCompare$stat$k2 = itemToCompare[stat.key]) == null ? void 0 : _itemToCompare$stat$k2.toString()) != null ? _itemToCompare$stat$k : '0');
|
|
33975
|
+
var isDifference = isItemToCompare && statDiff !== 0;
|
|
33976
|
+
var isBetter = statDiff > 0 && !stat.higherIsWorse || statDiff < 0 && stat.higherIsWorse;
|
|
33977
|
+
statistics.push(React.createElement(Statistic, {
|
|
33978
|
+
key: stat.key,
|
|
33979
|
+
className: isOnlyInOneItem ? 'better' : ''
|
|
33980
|
+
}, React.createElement("div", {
|
|
33981
|
+
className: "label"
|
|
33982
|
+
}, label, ":"), React.createElement("div", {
|
|
33983
|
+
className: "value " + (isDifference ? isBetter ? 'better' : 'worse' : '')
|
|
33984
|
+
}, itemStatistic.toString() + " " + (isDifference ? "(" + (statDiff > 0 ? '+' : '') + statDiff + ")" : ''))));
|
|
33985
|
+
}
|
|
33986
|
+
}
|
|
33987
|
+
return statistics;
|
|
33988
|
+
};
|
|
33989
|
+
var renderMissingStatistic = function renderMissingStatistic() {
|
|
33990
|
+
var statistics = [];
|
|
33991
|
+
for (var _i2 = 0, _statisticsToDisplay2 = statisticsToDisplay; _i2 < _statisticsToDisplay2.length; _i2++) {
|
|
33992
|
+
var stat = _statisticsToDisplay2[_i2];
|
|
33993
|
+
var itemToCompareStatistic = itemToCompare == null ? void 0 : itemToCompare[stat.key];
|
|
33994
|
+
if (itemToCompareStatistic && !item[stat.key]) {
|
|
33995
|
+
var label = stat.label || stat.key[0].toUpperCase() + stat.key.slice(1);
|
|
33996
|
+
statistics.push(React.createElement(Statistic, {
|
|
33997
|
+
key: stat.key,
|
|
33998
|
+
className: "worse"
|
|
33999
|
+
}, React.createElement("div", {
|
|
34000
|
+
className: "label"
|
|
34001
|
+
}, label, ":"), React.createElement("div", {
|
|
34002
|
+
className: "value worse"
|
|
34003
|
+
}, itemToCompareStatistic.toString())));
|
|
34004
|
+
}
|
|
34005
|
+
}
|
|
34006
|
+
return statistics;
|
|
34007
|
+
};
|
|
34008
|
+
var renderAvaibleSlots = function renderAvaibleSlots() {
|
|
34009
|
+
if (!item.allowedEquipSlotType) return null;
|
|
34010
|
+
return item.allowedEquipSlotType.map(function (slotType, index) {
|
|
34011
|
+
return React.createElement(ErrorBoundary, {
|
|
34012
|
+
key: index
|
|
34013
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
34119
34014
|
atlasIMG: atlasIMG,
|
|
34120
|
-
atlasJSON: atlasJSON
|
|
34121
|
-
|
|
34015
|
+
atlasJSON: atlasJSON,
|
|
34016
|
+
spriteKey: EquipmentSlotSpriteByType[slotType],
|
|
34017
|
+
imgScale: 2,
|
|
34018
|
+
grayScale: true,
|
|
34019
|
+
opacity: 0.4,
|
|
34020
|
+
containerStyle: {
|
|
34021
|
+
width: '32px',
|
|
34022
|
+
height: '32px'
|
|
34023
|
+
}
|
|
34024
|
+
}));
|
|
34122
34025
|
});
|
|
34123
34026
|
};
|
|
34124
|
-
return React.createElement(
|
|
34125
|
-
|
|
34126
|
-
|
|
34127
|
-
|
|
34128
|
-
|
|
34129
|
-
},
|
|
34130
|
-
width: "330px",
|
|
34131
|
-
cancelDrag: ".equipment-container-body"
|
|
34132
|
-
}, React.createElement(EquipmentSetContainer, {
|
|
34133
|
-
className: "equipment-container-body"
|
|
34134
|
-
}, React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(0, 3)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(3, 7)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(7, 10))));
|
|
34027
|
+
return React.createElement(Container$b, {
|
|
34028
|
+
item: item
|
|
34029
|
+
}, React.createElement(Header, null, React.createElement("div", null, React.createElement(Title$1, null, item.name), item.rarity !== 'Common' && React.createElement(Rarity, {
|
|
34030
|
+
item: item
|
|
34031
|
+
}, item.rarity), React.createElement(Type, null, item.subType)), React.createElement(AllowedSlots, null, renderAvaibleSlots())), renderStatistics(), item.isTwoHanded && React.createElement(Statistic, null, "Two handed"), React.createElement(Description, null, item.description), item.maxStackSize && item.maxStackSize !== 1 && React.createElement(StackInfo, null, "x", (_item$stackQty = item.stackQty) != null ? _item$stackQty : 1, "(", item.maxStackSize, ")"), renderMissingStatistic().length > 0 && React.createElement(MissingStatistics, null, React.createElement(Statistic, null, "Equipped Diff"), itemToCompare && renderMissingStatistic()));
|
|
34135
34032
|
};
|
|
34136
|
-
var
|
|
34137
|
-
displayName: "
|
|
34138
|
-
componentId: "sc-
|
|
34139
|
-
})(["
|
|
34140
|
-
var
|
|
34141
|
-
|
|
34142
|
-
|
|
34143
|
-
})
|
|
34144
|
-
|
|
34145
|
-
|
|
34033
|
+
var Container$b = /*#__PURE__*/styled.div.withConfig({
|
|
34034
|
+
displayName: "ItemInfo__Container",
|
|
34035
|
+
componentId: "sc-1xm4q8k-0"
|
|
34036
|
+
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:15rem;@media (max-width:580px){width:80vw;}"], uiFonts.size.small, function (_ref2) {
|
|
34037
|
+
var _rarityColor;
|
|
34038
|
+
var item = _ref2.item;
|
|
34039
|
+
return (_rarityColor = rarityColor(item)) != null ? _rarityColor : uiColors.lightGray;
|
|
34040
|
+
});
|
|
34041
|
+
var Title$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34042
|
+
displayName: "ItemInfo__Title",
|
|
34043
|
+
componentId: "sc-1xm4q8k-1"
|
|
34044
|
+
})(["font-size:", ";font-weight:bold;margin-bottom:0.5rem;display:flex;align-items:center;margin:0;"], uiFonts.size.medium);
|
|
34045
|
+
var Rarity = /*#__PURE__*/styled.div.withConfig({
|
|
34046
|
+
displayName: "ItemInfo__Rarity",
|
|
34047
|
+
componentId: "sc-1xm4q8k-2"
|
|
34048
|
+
})(["font-size:", ";font-weight:normal;margin-top:0.2rem;color:", ";filter:brightness(1.5);"], uiFonts.size.small, function (_ref3) {
|
|
34049
|
+
var item = _ref3.item;
|
|
34050
|
+
return rarityColor(item);
|
|
34051
|
+
});
|
|
34052
|
+
var Type = /*#__PURE__*/styled.div.withConfig({
|
|
34053
|
+
displayName: "ItemInfo__Type",
|
|
34054
|
+
componentId: "sc-1xm4q8k-3"
|
|
34055
|
+
})(["font-size:", ";margin-top:0.2rem;color:", ";"], uiFonts.size.small, uiColors.lightGray);
|
|
34056
|
+
var Statistic = /*#__PURE__*/styled.div.withConfig({
|
|
34057
|
+
displayName: "ItemInfo__Statistic",
|
|
34058
|
+
componentId: "sc-1xm4q8k-4"
|
|
34059
|
+
})(["margin-bottom:0.4rem;width:max-content;.label{display:inline-block;margin-right:0.5rem;color:inherit;}.value{display:inline-block;color:inherit;}&.better,.better{color:", ";}&.worse,.worse{color:", ";}"], uiColors.lightGreen, uiColors.cardinal);
|
|
34060
|
+
var Description = /*#__PURE__*/styled.div.withConfig({
|
|
34061
|
+
displayName: "ItemInfo__Description",
|
|
34062
|
+
componentId: "sc-1xm4q8k-5"
|
|
34063
|
+
})(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;"], uiFonts.size.small, uiColors.lightGray);
|
|
34064
|
+
var Header = /*#__PURE__*/styled.div.withConfig({
|
|
34065
|
+
displayName: "ItemInfo__Header",
|
|
34066
|
+
componentId: "sc-1xm4q8k-6"
|
|
34067
|
+
})(["display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem;"]);
|
|
34068
|
+
var AllowedSlots = /*#__PURE__*/styled.div.withConfig({
|
|
34069
|
+
displayName: "ItemInfo__AllowedSlots",
|
|
34070
|
+
componentId: "sc-1xm4q8k-7"
|
|
34071
|
+
})(["display:flex;align-items:center;justify-content:center;gap:0.5rem;margin-left:auto;align-self:flex-start;"]);
|
|
34072
|
+
var StackInfo = /*#__PURE__*/styled.div.withConfig({
|
|
34073
|
+
displayName: "ItemInfo__StackInfo",
|
|
34074
|
+
componentId: "sc-1xm4q8k-8"
|
|
34075
|
+
})(["width:100%;text-align:right;font-size:", ";color:", ";margin-top:1rem;"], uiFonts.size.small, uiColors.orange);
|
|
34076
|
+
var MissingStatistics = /*#__PURE__*/styled.div.withConfig({
|
|
34077
|
+
displayName: "ItemInfo__MissingStatistics",
|
|
34078
|
+
componentId: "sc-1xm4q8k-9"
|
|
34079
|
+
})(["margin-top:1rem;color:", ";"], uiColors.cardinal);
|
|
34146
34080
|
|
|
34147
|
-
var
|
|
34148
|
-
|
|
34081
|
+
var itemSlotTypes = ['head', 'neck', 'leftHand', 'rightHand', 'ring', 'legs', 'boot', 'accessory', 'armor', 'inventory'];
|
|
34082
|
+
var getSlotType = function getSlotType(itemSlotTypes, slotType, subType) {
|
|
34083
|
+
if (!itemSlotTypes.includes(slotType)) {
|
|
34084
|
+
return subType;
|
|
34085
|
+
}
|
|
34086
|
+
return slotType;
|
|
34087
|
+
};
|
|
34088
|
+
var ItemInfoDisplay = function ItemInfoDisplay(_ref) {
|
|
34089
|
+
var item = _ref.item,
|
|
34090
|
+
atlasIMG = _ref.atlasIMG,
|
|
34091
|
+
atlasJSON = _ref.atlasJSON,
|
|
34092
|
+
equipmentSet = _ref.equipmentSet,
|
|
34093
|
+
isMobile = _ref.isMobile;
|
|
34094
|
+
var itemToCompare = useMemo(function () {
|
|
34095
|
+
var _item$allowedEquipSlo;
|
|
34096
|
+
if (equipmentSet && (_item$allowedEquipSlo = item.allowedEquipSlotType) != null && _item$allowedEquipSlo.length) {
|
|
34097
|
+
var allowedSlotTypeCamelCase = camelCase(item.allowedEquipSlotType[0]);
|
|
34098
|
+
var itemSubTypeCamelCase = camelCase(item.subType);
|
|
34099
|
+
var slotType = getSlotType(itemSlotTypes, allowedSlotTypeCamelCase, itemSubTypeCamelCase);
|
|
34100
|
+
var itemFromEquipment = equipmentSet[slotType];
|
|
34101
|
+
if (itemFromEquipment && (!item._id || itemFromEquipment._id !== item._id)) {
|
|
34102
|
+
return itemFromEquipment;
|
|
34103
|
+
}
|
|
34104
|
+
}
|
|
34105
|
+
return undefined;
|
|
34106
|
+
}, [equipmentSet, item]);
|
|
34107
|
+
return React.createElement(Flex, {
|
|
34108
|
+
"$isMobile": isMobile
|
|
34109
|
+
}, React.createElement(ItemInfo, {
|
|
34110
|
+
item: item,
|
|
34111
|
+
itemToCompare: itemToCompare,
|
|
34112
|
+
atlasIMG: atlasIMG,
|
|
34113
|
+
atlasJSON: atlasJSON
|
|
34114
|
+
}), itemToCompare && React.createElement(CompareContainer, null, React.createElement(Equipped, null, React.createElement("span", null, "Equipped")), React.createElement(ItemInfo, {
|
|
34115
|
+
item: itemToCompare,
|
|
34116
|
+
itemToCompare: item,
|
|
34117
|
+
atlasIMG: atlasIMG,
|
|
34118
|
+
atlasJSON: atlasJSON
|
|
34119
|
+
})));
|
|
34149
34120
|
};
|
|
34121
|
+
var Flex = /*#__PURE__*/styled.div.withConfig({
|
|
34122
|
+
displayName: "ItemInfoDisplay__Flex",
|
|
34123
|
+
componentId: "sc-1lftdo8-0"
|
|
34124
|
+
})(["display:flex;gap:0.5rem;flex-direction:", ";@media (max-width:580px){flex-direction:column-reverse;align-items:center;}"], function (_ref2) {
|
|
34125
|
+
var $isMobile = _ref2.$isMobile;
|
|
34126
|
+
return $isMobile ? 'row-reverse' : 'row';
|
|
34127
|
+
});
|
|
34128
|
+
var Equipped = /*#__PURE__*/styled.div.withConfig({
|
|
34129
|
+
displayName: "ItemInfoDisplay__Equipped",
|
|
34130
|
+
componentId: "sc-1lftdo8-1"
|
|
34131
|
+
})(["position:absolute;bottom:100%;left:50%;transform:translateX(-50%);"]);
|
|
34132
|
+
var CompareContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34133
|
+
displayName: "ItemInfoDisplay__CompareContainer",
|
|
34134
|
+
componentId: "sc-1lftdo8-2"
|
|
34135
|
+
})(["position:relative;"]);
|
|
34150
34136
|
|
|
34151
|
-
var
|
|
34152
|
-
|
|
34153
|
-
|
|
34154
|
-
|
|
34155
|
-
|
|
34156
|
-
|
|
34157
|
-
|
|
34137
|
+
var offset = 20;
|
|
34138
|
+
var ItemTooltip = function ItemTooltip(_ref) {
|
|
34139
|
+
var item = _ref.item,
|
|
34140
|
+
atlasIMG = _ref.atlasIMG,
|
|
34141
|
+
atlasJSON = _ref.atlasJSON,
|
|
34142
|
+
equipmentSet = _ref.equipmentSet;
|
|
34143
|
+
var ref = useRef(null);
|
|
34158
34144
|
useEffect(function () {
|
|
34159
|
-
var
|
|
34160
|
-
var
|
|
34161
|
-
|
|
34162
|
-
|
|
34163
|
-
|
|
34164
|
-
|
|
34165
|
-
|
|
34166
|
-
|
|
34167
|
-
|
|
34168
|
-
|
|
34169
|
-
i++;
|
|
34170
|
-
} else {
|
|
34171
|
-
clearInterval(interval);
|
|
34172
|
-
if (onFinish) {
|
|
34173
|
-
onFinish();
|
|
34145
|
+
var current = ref.current;
|
|
34146
|
+
var initialOffset;
|
|
34147
|
+
if (current) {
|
|
34148
|
+
var handleMouseMove = function handleMouseMove(event) {
|
|
34149
|
+
var clientX = event.clientX,
|
|
34150
|
+
clientY = event.clientY;
|
|
34151
|
+
// Adjust the position of the tooltip based on the mouse position
|
|
34152
|
+
var rect = current.getBoundingClientRect();
|
|
34153
|
+
if (!initialOffset) {
|
|
34154
|
+
initialOffset = rect;
|
|
34174
34155
|
}
|
|
34175
|
-
|
|
34176
|
-
|
|
34177
|
-
|
|
34178
|
-
|
|
34179
|
-
|
|
34180
|
-
|
|
34181
|
-
|
|
34156
|
+
var tooltipWidth = rect.width;
|
|
34157
|
+
var tooltipHeight = rect.height;
|
|
34158
|
+
var isOffScreenRight = clientX + tooltipWidth + offset > window.innerWidth;
|
|
34159
|
+
var isOffScreenBottom = clientY + tooltipHeight + offset > window.innerHeight;
|
|
34160
|
+
var x = (isOffScreenRight ? clientX - tooltipWidth - offset : clientX + offset) - initialOffset.x;
|
|
34161
|
+
var y = (isOffScreenBottom ? clientY - tooltipHeight - offset : clientY + offset) - initialOffset.y;
|
|
34162
|
+
current.style.transform = "translate(" + x + "px, " + y + "px)";
|
|
34163
|
+
current.style.opacity = '1';
|
|
34164
|
+
};
|
|
34165
|
+
window.addEventListener('mousemove', handleMouseMove);
|
|
34166
|
+
return function () {
|
|
34167
|
+
window.removeEventListener('mousemove', handleMouseMove);
|
|
34168
|
+
};
|
|
34169
|
+
}
|
|
34170
|
+
return;
|
|
34171
|
+
}, []);
|
|
34172
|
+
return React.createElement(Container$c, {
|
|
34173
|
+
ref: ref
|
|
34174
|
+
}, React.createElement(ItemInfoDisplay, {
|
|
34175
|
+
item: item,
|
|
34176
|
+
atlasIMG: atlasIMG,
|
|
34177
|
+
atlasJSON: atlasJSON,
|
|
34178
|
+
equipmentSet: equipmentSet
|
|
34179
|
+
}));
|
|
34182
34180
|
};
|
|
34183
|
-
var
|
|
34184
|
-
displayName: "
|
|
34185
|
-
componentId: "sc-
|
|
34186
|
-
})(["
|
|
34187
|
-
|
|
34188
|
-
var img$6 = 'data:image/gif;base64,R0lGODlhEAAQAPIAAAAAABQYLiw1TUBJc2hvmQAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAM9CLrc/lCFGSKYJJP5AhlguDnBMIVgxXgmJapSSp3mKs/pKrT0IMCXUk+2Cgh2oSOnaDz+lswZpSOFUq2KBAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAIzhI+py90Bg4OjDrjCELxfFQhQx0mIJkaeaYRp5LJADMdnqXbyOJLYTdKBejjZoRaZJBMFACH/C0ltYWdlTWFnaWNrDWdhbW1hPTAuNDU0NTUAIfkEARQAAAAsAAAAABAAEAAAAjKEj6nL7Y+CDE6OO+QKQ/ifKYEgfR4VddPohQe7lmR0xidNTib65uacYP2AQWGuMlEUAAA7';
|
|
34189
|
-
|
|
34190
|
-
var img$7 = 'data:image/gif;base64,R0lGODlhQAAgAPIAAAAAAA0NDRERESIiIigoKFlZWf///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw5nYW1tYT0wLjQ1NDU0NQAh+QQBFAAAACwAAAAAQAAgAAAD/wi63P4wykmrvTjrzbv/YAgIZGmeaKquakQWcCzPdG3fNukIeO//PQGDBywafcIF8chswpKKZcxApTqvNOiIZi0YsODncFaFlcNOrdTbJVff0/c3Lp/Xs2N37cy2ndt6ZnhKXHdsc4d7VnwyfIxqPWWOXXWLgHSGYoSNbZKVZp2WiJyjg1GFcaClqaqJhasyUAFrh3Cur3KqubWXBQIBAAEDtDeMaEEDAcLEx2gCycvN0jHPysPT09XR2M3a19zH3gTM4EYCBNDD4yzs7e4r48nB6gT19vf4+fr7/P3P8sKGvRtIkMUAeQoCHlzIsKHDhxAjSoTWQJnFixgzatzIsQWjRQYJAAAh/wtJbWFnZU1hZ2ljaw5nYW1tYT0wLjQ1NDU0NQAh+QQBFAAAACwAAAAAQAAgAAAD8Ai63P4wykmrvTjrzbv/YCiOlGCeaKqubMtGZiHPdG3feI6bjqD/wOBPwPAJj0ggcWFMOp+ypaI5M1it0KxNCqDKsAWDdhwt1q5fMPnJ9aJt17g4HafJ3/et+Tzn99V+aThqfTNtcHlhhIBVWG+BdDSHOmiPeHdij3aYhZONf46YkZGanzpSAV6KjaOIpqWtNwIBAAEDqqKKhZuJnHSwAgMBtqo5sGs5wcO3yM01ysTO0gXQzNPN1cXXUNnbyNna3kcmwrW3Lujp6ugD5bbn6/HyLe20Cu/t+fr7/P3+/wCF2VswrKDBgwgTKlzIsCCDBAA7';
|
|
34181
|
+
var Container$c = /*#__PURE__*/styled.div.withConfig({
|
|
34182
|
+
displayName: "ItemTooltip__Container",
|
|
34183
|
+
componentId: "sc-11d9r7x-0"
|
|
34184
|
+
})(["position:fixed;z-index:50;pointer-events:none;left:0;top:0;opacity:0;"]);
|
|
34191
34185
|
|
|
34192
|
-
var
|
|
34193
|
-
var
|
|
34194
|
-
|
|
34195
|
-
|
|
34196
|
-
|
|
34197
|
-
|
|
34198
|
-
|
|
34199
|
-
|
|
34200
|
-
|
|
34201
|
-
|
|
34202
|
-
// Calculate the number of characters that can fit in one line
|
|
34203
|
-
var charactersPerLine = Math.floor(width / 2 / fontSize);
|
|
34204
|
-
// Calculate the number of lines that can fit in the div
|
|
34205
|
-
var linesPerDiv = Math.floor(180 / fontSize);
|
|
34206
|
-
// Calculate the maximum number of characters that can fit in the div
|
|
34207
|
-
var maxCharacters = charactersPerLine * linesPerDiv;
|
|
34208
|
-
// Return the maximum number of characters
|
|
34209
|
-
return Math.round(maxCharacters / 5);
|
|
34210
|
-
}
|
|
34211
|
-
var textChunks = chunkString(text, maxCharacters(windowSize.current[0]));
|
|
34212
|
-
var _useState = useState(0),
|
|
34213
|
-
chunkIndex = _useState[0],
|
|
34214
|
-
setChunkIndex = _useState[1];
|
|
34215
|
-
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
34216
|
-
if (event.code === 'Space') {
|
|
34217
|
-
goToNextStep();
|
|
34218
|
-
}
|
|
34219
|
-
};
|
|
34220
|
-
var goToNextStep = function goToNextStep() {
|
|
34221
|
-
var hasNextChunk = (textChunks == null ? void 0 : textChunks[chunkIndex + 1]) || false;
|
|
34222
|
-
if (hasNextChunk) {
|
|
34223
|
-
setChunkIndex(function (prev) {
|
|
34224
|
-
return prev + 1;
|
|
34225
|
-
});
|
|
34226
|
-
} else {
|
|
34227
|
-
// if there's no more text chunks, close the dialog
|
|
34228
|
-
onClose();
|
|
34229
|
-
}
|
|
34230
|
-
};
|
|
34231
|
-
useEffect(function () {
|
|
34232
|
-
document.addEventListener('keydown', onHandleSpacePress);
|
|
34233
|
-
return function () {
|
|
34234
|
-
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
34235
|
-
};
|
|
34236
|
-
}, [chunkIndex]);
|
|
34186
|
+
var ItemInfoWrapper = function ItemInfoWrapper(_ref) {
|
|
34187
|
+
var children = _ref.children,
|
|
34188
|
+
atlasIMG = _ref.atlasIMG,
|
|
34189
|
+
atlasJSON = _ref.atlasJSON,
|
|
34190
|
+
item = _ref.item,
|
|
34191
|
+
equipmentSet = _ref.equipmentSet,
|
|
34192
|
+
scale = _ref.scale;
|
|
34193
|
+
var _useState = useState(false),
|
|
34194
|
+
isTooltipVisible = _useState[0],
|
|
34195
|
+
setIsTooltipVisible = _useState[1];
|
|
34237
34196
|
var _useState2 = useState(false),
|
|
34238
|
-
|
|
34239
|
-
|
|
34240
|
-
return React.createElement(
|
|
34241
|
-
|
|
34242
|
-
|
|
34243
|
-
setShowGoNextIndicator(true);
|
|
34244
|
-
onEndStep && onEndStep();
|
|
34197
|
+
isTooltipMobileVisible = _useState2[0],
|
|
34198
|
+
setIsTooltipMobileVisible = _useState2[1];
|
|
34199
|
+
return React.createElement("div", {
|
|
34200
|
+
onMouseEnter: function onMouseEnter() {
|
|
34201
|
+
if (!isTooltipMobileVisible) setIsTooltipVisible(true);
|
|
34245
34202
|
},
|
|
34246
|
-
|
|
34247
|
-
|
|
34248
|
-
|
|
34249
|
-
|
|
34250
|
-
}), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
|
|
34251
|
-
right: type === NPCDialogType.TextOnly ? '1rem' : '10.5rem',
|
|
34252
|
-
src: IS_MOBILE_OR_TABLET ? img$6 : img$7,
|
|
34253
|
-
onPointerDown: function onPointerDown() {
|
|
34254
|
-
goToNextStep();
|
|
34203
|
+
onMouseLeave: setIsTooltipVisible.bind(null, false),
|
|
34204
|
+
onTouchEnd: function onTouchEnd() {
|
|
34205
|
+
setIsTooltipMobileVisible(true);
|
|
34206
|
+
setIsTooltipVisible(false);
|
|
34255
34207
|
}
|
|
34208
|
+
}, children, isTooltipVisible && !isTooltipMobileVisible && React.createElement(ItemTooltip, {
|
|
34209
|
+
atlasIMG: atlasIMG,
|
|
34210
|
+
atlasJSON: atlasJSON,
|
|
34211
|
+
equipmentSet: equipmentSet,
|
|
34212
|
+
item: item
|
|
34213
|
+
}), isTooltipMobileVisible && React.createElement(MobileItemTooltip, {
|
|
34214
|
+
atlasIMG: atlasIMG,
|
|
34215
|
+
atlasJSON: atlasJSON,
|
|
34216
|
+
equipmentSet: equipmentSet,
|
|
34217
|
+
closeTooltip: function closeTooltip() {
|
|
34218
|
+
setIsTooltipMobileVisible(false);
|
|
34219
|
+
console.log('close');
|
|
34220
|
+
},
|
|
34221
|
+
item: item,
|
|
34222
|
+
scale: scale
|
|
34256
34223
|
}));
|
|
34257
34224
|
};
|
|
34258
|
-
var Container$b = /*#__PURE__*/styled.div.withConfig({
|
|
34259
|
-
displayName: "NPCDialogText__Container",
|
|
34260
|
-
componentId: "sc-1cxkdh9-0"
|
|
34261
|
-
})([""]);
|
|
34262
|
-
var PressSpaceIndicator = /*#__PURE__*/styled.img.withConfig({
|
|
34263
|
-
displayName: "NPCDialogText__PressSpaceIndicator",
|
|
34264
|
-
componentId: "sc-1cxkdh9-1"
|
|
34265
|
-
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref2) {
|
|
34266
|
-
var right = _ref2.right;
|
|
34267
|
-
return right;
|
|
34268
|
-
});
|
|
34269
34225
|
|
|
34270
|
-
|
|
34271
|
-
var
|
|
34272
|
-
|
|
34273
|
-
|
|
34274
|
-
|
|
34275
|
-
|
|
34276
|
-
|
|
34277
|
-
|
|
34278
|
-
|
|
34279
|
-
|
|
34280
|
-
|
|
34281
|
-
|
|
34282
|
-
|
|
34283
|
-
}
|
|
34284
|
-
|
|
34285
|
-
|
|
34286
|
-
|
|
34287
|
-
|
|
34288
|
-
|
|
34289
|
-
|
|
34226
|
+
var CraftBook = function CraftBook(_ref) {
|
|
34227
|
+
var atlasIMG = _ref.atlasIMG,
|
|
34228
|
+
atlasJSON = _ref.atlasJSON,
|
|
34229
|
+
onClose = _ref.onClose,
|
|
34230
|
+
onSelect = _ref.onSelect,
|
|
34231
|
+
onCraftItem = _ref.onCraftItem,
|
|
34232
|
+
craftablesItems = _ref.craftablesItems,
|
|
34233
|
+
equipmentSet = _ref.equipmentSet,
|
|
34234
|
+
scale = _ref.scale;
|
|
34235
|
+
var optionsId = 0;
|
|
34236
|
+
var _useState = useState({
|
|
34237
|
+
show: false,
|
|
34238
|
+
index: 200
|
|
34239
|
+
}),
|
|
34240
|
+
isShown = _useState[0],
|
|
34241
|
+
setIsShown = _useState[1];
|
|
34242
|
+
var _useState2 = useState(),
|
|
34243
|
+
craftItem = _useState2[0],
|
|
34244
|
+
setCraftItem = _useState2[1];
|
|
34245
|
+
var getDropdownOptions = function getDropdownOptions() {
|
|
34246
|
+
var options = [];
|
|
34247
|
+
Object.keys(ItemSubType).forEach(function (key) {
|
|
34248
|
+
if (key === 'DeadBody') {
|
|
34249
|
+
return; // we can't craft crafting resouces...
|
|
34250
|
+
}
|
|
34290
34251
|
|
|
34291
|
-
|
|
34292
|
-
|
|
34293
|
-
|
|
34294
|
-
|
|
34295
|
-
var _useState = useState(questions[0]),
|
|
34296
|
-
currentQuestion = _useState[0],
|
|
34297
|
-
setCurrentQuestion = _useState[1];
|
|
34298
|
-
var _useState2 = useState(false),
|
|
34299
|
-
canShowAnswers = _useState2[0],
|
|
34300
|
-
setCanShowAnswers = _useState2[1];
|
|
34301
|
-
var onGetFirstAnswer = function onGetFirstAnswer() {
|
|
34302
|
-
if (!currentQuestion.answerIds || currentQuestion.answerIds.length === 0) {
|
|
34303
|
-
return null;
|
|
34304
|
-
}
|
|
34305
|
-
var firstAnswerId = currentQuestion.answerIds[0];
|
|
34306
|
-
return answers.find(function (answer) {
|
|
34307
|
-
return answer.id === firstAnswerId;
|
|
34308
|
-
});
|
|
34309
|
-
};
|
|
34310
|
-
var _useState3 = useState(onGetFirstAnswer()),
|
|
34311
|
-
currentAnswer = _useState3[0],
|
|
34312
|
-
setCurrentAnswer = _useState3[1];
|
|
34313
|
-
useEffect(function () {
|
|
34314
|
-
setCurrentAnswer(onGetFirstAnswer());
|
|
34315
|
-
}, [currentQuestion]);
|
|
34316
|
-
var onGetAnswers = function onGetAnswers(answerIds) {
|
|
34317
|
-
return answerIds.map(function (answerId) {
|
|
34318
|
-
return answers.find(function (answer) {
|
|
34319
|
-
return answer.id === answerId;
|
|
34252
|
+
options.push({
|
|
34253
|
+
id: optionsId,
|
|
34254
|
+
value: key,
|
|
34255
|
+
option: key
|
|
34320
34256
|
});
|
|
34257
|
+
optionsId += 1;
|
|
34321
34258
|
});
|
|
34259
|
+
return options;
|
|
34322
34260
|
};
|
|
34323
|
-
var
|
|
34324
|
-
|
|
34325
|
-
|
|
34326
|
-
|
|
34327
|
-
|
|
34328
|
-
|
|
34329
|
-
|
|
34330
|
-
|
|
34331
|
-
|
|
34332
|
-
|
|
34333
|
-
|
|
34334
|
-
|
|
34335
|
-
|
|
34336
|
-
|
|
34337
|
-
});
|
|
34338
|
-
setCurrentAnswer(nextAnswer || onGetFirstAnswer());
|
|
34339
|
-
break;
|
|
34340
|
-
case 'ArrowUp':
|
|
34341
|
-
// select previous answer, if any.
|
|
34342
|
-
// if no previous answer, select last answer
|
|
34343
|
-
var previousAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
34344
|
-
return (answer == null ? void 0 : answer.id) === currentAnswer.id - 1;
|
|
34345
|
-
});
|
|
34346
|
-
var previousAnswerID = currentQuestion.answerIds && currentQuestion.answerIds[previousAnswerIndex];
|
|
34347
|
-
var previousAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
34348
|
-
return (answer == null ? void 0 : answer.id) === previousAnswerID;
|
|
34349
|
-
});
|
|
34350
|
-
if (previousAnswer) {
|
|
34351
|
-
setCurrentAnswer(previousAnswer);
|
|
34352
|
-
} else {
|
|
34353
|
-
setCurrentAnswer(onGetAnswers(currentQuestion.answerIds).pop());
|
|
34354
|
-
}
|
|
34355
|
-
break;
|
|
34356
|
-
case 'Enter':
|
|
34357
|
-
setCanShowAnswers(false);
|
|
34358
|
-
if (!(currentAnswer != null && currentAnswer.nextQuestionId)) {
|
|
34359
|
-
onClose();
|
|
34360
|
-
return;
|
|
34361
|
-
} else {
|
|
34362
|
-
setCurrentQuestion(questions.find(function (question) {
|
|
34363
|
-
return question.id === currentAnswer.nextQuestionId;
|
|
34364
|
-
}));
|
|
34365
|
-
}
|
|
34366
|
-
break;
|
|
34367
|
-
}
|
|
34261
|
+
var modifyString = function modifyString(str) {
|
|
34262
|
+
// Split the string by "/" and "."
|
|
34263
|
+
var parts = str.split('/');
|
|
34264
|
+
var fileName = parts[parts.length - 1];
|
|
34265
|
+
parts = fileName.split('.');
|
|
34266
|
+
var name = parts[0];
|
|
34267
|
+
// Replace all occurrences of "-" with " "
|
|
34268
|
+
name = name.replace(/-/g, ' ');
|
|
34269
|
+
// Uppercase the first word
|
|
34270
|
+
var words = name.split(' ');
|
|
34271
|
+
var firstWord = words[0].slice(0, 1).toUpperCase() + words[0].slice(1);
|
|
34272
|
+
var modifiedWords = [firstWord].concat(words.slice(1));
|
|
34273
|
+
name = modifiedWords.join(' ');
|
|
34274
|
+
return name;
|
|
34368
34275
|
};
|
|
34369
|
-
|
|
34370
|
-
|
|
34371
|
-
setCanShowAnswers(false);
|
|
34372
|
-
if (answer.nextQuestionId) {
|
|
34373
|
-
// if there is a next question, go to it
|
|
34374
|
-
setCurrentQuestion(questions.find(function (question) {
|
|
34375
|
-
return question.id === answer.nextQuestionId;
|
|
34376
|
-
}));
|
|
34377
|
-
} else {
|
|
34378
|
-
// else, finish dialog!
|
|
34379
|
-
onClose();
|
|
34380
|
-
}
|
|
34276
|
+
var handleClick = function handleClick(value) {
|
|
34277
|
+
setCraftItem(value);
|
|
34381
34278
|
};
|
|
34382
|
-
|
|
34383
|
-
|
|
34384
|
-
|
|
34385
|
-
|
|
34386
|
-
|
|
34387
|
-
|
|
34388
|
-
|
|
34389
|
-
return null;
|
|
34390
|
-
}
|
|
34391
|
-
return answers.map(function (answer) {
|
|
34392
|
-
var isSelected = (currentAnswer == null ? void 0 : currentAnswer.id) === (answer == null ? void 0 : answer.id);
|
|
34393
|
-
var selectedColor = isSelected ? 'yellow' : 'white';
|
|
34394
|
-
if (answer) {
|
|
34395
|
-
return React.createElement(AnswerRow, {
|
|
34396
|
-
key: "answer_" + answer.id
|
|
34397
|
-
}, React.createElement(AnswerSelectedIcon, {
|
|
34398
|
-
color: selectedColor
|
|
34399
|
-
}, isSelected ? 'X' : null), React.createElement(Answer, {
|
|
34400
|
-
key: answer.id,
|
|
34401
|
-
onPointerDown: function onPointerDown() {
|
|
34402
|
-
return onAnswerClick(answer);
|
|
34403
|
-
},
|
|
34404
|
-
color: selectedColor
|
|
34405
|
-
}, answer.text));
|
|
34279
|
+
return React.createElement(DraggableContainer, {
|
|
34280
|
+
type: RPGUIContainerTypes.Framed,
|
|
34281
|
+
width: "500px",
|
|
34282
|
+
cancelDrag: ".inputRadioCraftBook",
|
|
34283
|
+
onCloseButton: function onCloseButton() {
|
|
34284
|
+
if (onClose) {
|
|
34285
|
+
onClose();
|
|
34406
34286
|
}
|
|
34407
|
-
return null;
|
|
34408
|
-
});
|
|
34409
|
-
};
|
|
34410
|
-
return React.createElement(Container$c, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
|
|
34411
|
-
text: currentQuestion.text,
|
|
34412
|
-
onStart: function onStart() {
|
|
34413
|
-
return setCanShowAnswers(false);
|
|
34414
|
-
},
|
|
34415
|
-
onFinish: function onFinish() {
|
|
34416
|
-
return setCanShowAnswers(true);
|
|
34417
34287
|
}
|
|
34418
|
-
}
|
|
34419
|
-
|
|
34420
|
-
|
|
34421
|
-
displayName: "QuestionDialog__Container",
|
|
34422
|
-
componentId: "sc-bxc5u0-0"
|
|
34423
|
-
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
34424
|
-
var QuestionContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34425
|
-
displayName: "QuestionDialog__QuestionContainer",
|
|
34426
|
-
componentId: "sc-bxc5u0-1"
|
|
34427
|
-
})(["flex:100%;width:100%;"]);
|
|
34428
|
-
var AnswersContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34429
|
-
displayName: "QuestionDialog__AnswersContainer",
|
|
34430
|
-
componentId: "sc-bxc5u0-2"
|
|
34431
|
-
})(["flex:100%;"]);
|
|
34432
|
-
var Answer = /*#__PURE__*/styled.p.withConfig({
|
|
34433
|
-
displayName: "QuestionDialog__Answer",
|
|
34434
|
-
componentId: "sc-bxc5u0-3"
|
|
34435
|
-
})(["flex:auto;color:", " !important;font-size:0.65rem !important;background:inherit;border:none;"], function (props) {
|
|
34436
|
-
return props.color;
|
|
34437
|
-
});
|
|
34438
|
-
var AnswerSelectedIcon = /*#__PURE__*/styled.span.withConfig({
|
|
34439
|
-
displayName: "QuestionDialog__AnswerSelectedIcon",
|
|
34440
|
-
componentId: "sc-bxc5u0-4"
|
|
34441
|
-
})(["flex:5% 0 0;color:", " !important;"], function (props) {
|
|
34442
|
-
return props.color;
|
|
34443
|
-
});
|
|
34444
|
-
var AnswerRow = /*#__PURE__*/styled.div.withConfig({
|
|
34445
|
-
displayName: "QuestionDialog__AnswerRow",
|
|
34446
|
-
componentId: "sc-bxc5u0-5"
|
|
34447
|
-
})(["display:flex;flex-wrap:wrap;justify-content:center;align-items:center;margin-bottom:0.5rem;height:22px;p{line-height:unset;margin-top:0;margin-bottom:0rem;}"]);
|
|
34448
|
-
|
|
34449
|
-
var img$8 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAP1BMVEUAAAA7FyVxQTsUEBPj5v////+5v/tCJDOOUlIiHBr1oJfptaO6dWr61rhzFy1bMTjoanMUNGQoXMQkn97+88DQ3IhAAAAAAXRSTlMAQObYZgAAAAFiS0dEBfhv6ccAAAAHdElNRQfmAw4VOBC7c5LYAAABM0lEQVQ4y3XRi5KDIAwFUAUkbrBgpP//rZsHVHQ009qZ3tPboNN0zmwzvcw8O5sX4y0NOg/Et3jRCXF+ziULorjkOQ9gE24dvuUAzq08DiCO4pe3WN7zCP56vmpubBReQYC11YPS86ySxxCsAABTSgjb5m4g8nfbxvFHBkH2OEEvAItVuCuIsgGgl+Gcr7kDXxhEAx55A2SQEEeQeZwUaIP8Tbo05B0RFPhItAjgj1w6cDnhLluDj+Egkh3pCCP4pKQAw1IPO0W9Nti5gW9RP2dKA3BZd2Dw+baYX+Nt4GM00O4S3kEpF6Alb2Bv4LeC3kkGfAW0/p0RPoJVKr63ghHsKuRh5DIUKOAlGOwrtt9fQekAEfmhZslHUDoglB0zjfkJigN7UnTQQ4GBWomoVhEN/AOPSBh38gy+fwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0xNFQyMTo1NTo1MSswMDowMJcc0eEAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMTRUMjE6NTU6NTErMDA6MDDmQWldAAAAAElFTkSuQmCC';
|
|
34450
|
-
|
|
34451
|
-
var NPCDialogType;
|
|
34452
|
-
(function (NPCDialogType) {
|
|
34453
|
-
NPCDialogType["TextOnly"] = "TextOnly";
|
|
34454
|
-
NPCDialogType["TextAndThumbnail"] = "TextAndThumbnail";
|
|
34455
|
-
})(NPCDialogType || (NPCDialogType = {}));
|
|
34456
|
-
var NPCDialog = function NPCDialog(_ref) {
|
|
34457
|
-
var text = _ref.text,
|
|
34458
|
-
type = _ref.type,
|
|
34459
|
-
_onClose = _ref.onClose,
|
|
34460
|
-
imagePath = _ref.imagePath,
|
|
34461
|
-
_ref$isQuestionDialog = _ref.isQuestionDialog,
|
|
34462
|
-
isQuestionDialog = _ref$isQuestionDialog === void 0 ? false : _ref$isQuestionDialog,
|
|
34463
|
-
questions = _ref.questions,
|
|
34464
|
-
answers = _ref.answers;
|
|
34465
|
-
return React.createElement(RPGUIContainer, {
|
|
34466
|
-
type: RPGUIContainerTypes.FramedGold,
|
|
34467
|
-
width: isQuestionDialog ? '600px' : '80%',
|
|
34468
|
-
height: '180px'
|
|
34469
|
-
}, isQuestionDialog && questions && answers ? React.createElement(React.Fragment, null, React.createElement(TextContainer$1, {
|
|
34470
|
-
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
34471
|
-
}, React.createElement(QuestionDialog, {
|
|
34472
|
-
questions: questions,
|
|
34473
|
-
answers: answers,
|
|
34474
|
-
onClose: function onClose() {
|
|
34475
|
-
if (_onClose) {
|
|
34476
|
-
_onClose();
|
|
34477
|
-
}
|
|
34288
|
+
}, React.createElement("div", {
|
|
34289
|
+
style: {
|
|
34290
|
+
width: '100%'
|
|
34478
34291
|
}
|
|
34479
|
-
}
|
|
34480
|
-
|
|
34481
|
-
}))
|
|
34482
|
-
|
|
34483
|
-
|
|
34484
|
-
|
|
34485
|
-
text: text || 'No text provided.',
|
|
34486
|
-
onClose: function onClose() {
|
|
34487
|
-
if (_onClose) {
|
|
34488
|
-
_onClose();
|
|
34489
|
-
}
|
|
34292
|
+
}, React.createElement(Title$2, null, "Craftbook"), React.createElement(Subtitle, null, "Select an item to craft"), React.createElement("hr", {
|
|
34293
|
+
className: "golden"
|
|
34294
|
+
})), React.createElement(Dropdown, {
|
|
34295
|
+
options: getDropdownOptions(),
|
|
34296
|
+
onChange: function onChange(value) {
|
|
34297
|
+
return onSelect(value);
|
|
34490
34298
|
}
|
|
34491
|
-
})
|
|
34492
|
-
|
|
34493
|
-
})
|
|
34494
|
-
|
|
34495
|
-
|
|
34496
|
-
|
|
34497
|
-
|
|
34498
|
-
|
|
34499
|
-
|
|
34500
|
-
|
|
34501
|
-
|
|
34502
|
-
}
|
|
34503
|
-
|
|
34504
|
-
|
|
34505
|
-
|
|
34506
|
-
|
|
34507
|
-
|
|
34508
|
-
|
|
34509
|
-
|
|
34510
|
-
|
|
34511
|
-
displayName: "NPCDialog__NPCThumbnail",
|
|
34512
|
-
componentId: "sc-1b4aw74-3"
|
|
34513
|
-
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
34514
|
-
|
|
34515
|
-
var ImgSide;
|
|
34516
|
-
(function (ImgSide) {
|
|
34517
|
-
ImgSide["right"] = "right";
|
|
34518
|
-
ImgSide["left"] = "left";
|
|
34519
|
-
})(ImgSide || (ImgSide = {}));
|
|
34520
|
-
var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
34521
|
-
var _textAndTypeArray$sli;
|
|
34522
|
-
var _onClose = _ref.onClose,
|
|
34523
|
-
textAndTypeArray = _ref.textAndTypeArray;
|
|
34524
|
-
var _useState = useState(false),
|
|
34525
|
-
showGoNextIndicator = _useState[0],
|
|
34526
|
-
setShowGoNextIndicator = _useState[1];
|
|
34527
|
-
var _useState2 = useState(0),
|
|
34528
|
-
slide = _useState2[0],
|
|
34529
|
-
setSlide = _useState2[1];
|
|
34530
|
-
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
34531
|
-
if (event.code === 'Space') {
|
|
34532
|
-
if (slide < (textAndTypeArray == null ? void 0 : textAndTypeArray.length) - 1) {
|
|
34533
|
-
setSlide(function (prev) {
|
|
34534
|
-
return prev + 1;
|
|
34535
|
-
});
|
|
34536
|
-
} else {
|
|
34537
|
-
// if there's no more text chunks, close the dialog
|
|
34538
|
-
_onClose();
|
|
34299
|
+
}), React.createElement(RadioInputScroller, {
|
|
34300
|
+
className: "inputRadioCraftBook"
|
|
34301
|
+
}, craftablesItems == null ? void 0 : craftablesItems.map(function (option, index) {
|
|
34302
|
+
return React.createElement(RadioOptionsWrapper, {
|
|
34303
|
+
key: index
|
|
34304
|
+
}, React.createElement(SpriteAtlasWrapper, null, React.createElement(ItemInfoWrapper, {
|
|
34305
|
+
item: option,
|
|
34306
|
+
atlasIMG: atlasIMG,
|
|
34307
|
+
atlasJSON: atlasJSON,
|
|
34308
|
+
equipmentSet: equipmentSet,
|
|
34309
|
+
scale: scale
|
|
34310
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
34311
|
+
atlasIMG: atlasIMG,
|
|
34312
|
+
atlasJSON: atlasJSON,
|
|
34313
|
+
spriteKey: option.texturePath,
|
|
34314
|
+
imgScale: 3,
|
|
34315
|
+
grayScale: !option.canCraft
|
|
34316
|
+
}))), React.createElement("div", null, React.createElement("div", {
|
|
34317
|
+
onPointerDown: function onPointerDown() {
|
|
34318
|
+
return handleClick(option.key);
|
|
34539
34319
|
}
|
|
34540
|
-
}
|
|
34541
|
-
|
|
34542
|
-
|
|
34543
|
-
|
|
34544
|
-
|
|
34545
|
-
|
|
34546
|
-
|
|
34547
|
-
|
|
34548
|
-
|
|
34549
|
-
type: RPGUIContainerTypes.FramedGold,
|
|
34550
|
-
width: '50%',
|
|
34551
|
-
height: '180px'
|
|
34552
|
-
}, React.createElement(React.Fragment, null, React.createElement(Container$e, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
|
|
34553
|
-
flex: '70%'
|
|
34554
|
-
}, React.createElement(NPCDialogText, {
|
|
34555
|
-
onStartStep: function onStartStep() {
|
|
34556
|
-
return setShowGoNextIndicator(false);
|
|
34557
|
-
},
|
|
34558
|
-
onEndStep: function onEndStep() {
|
|
34559
|
-
return setShowGoNextIndicator(true);
|
|
34560
|
-
},
|
|
34561
|
-
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
34562
|
-
onClose: function onClose() {
|
|
34563
|
-
if (_onClose) {
|
|
34564
|
-
_onClose();
|
|
34320
|
+
}, React.createElement("input", {
|
|
34321
|
+
className: "rpgui-radio",
|
|
34322
|
+
type: "radio",
|
|
34323
|
+
value: option.name,
|
|
34324
|
+
name: "test",
|
|
34325
|
+
disabled: !option.canCraft,
|
|
34326
|
+
checked: craftItem === option.key,
|
|
34327
|
+
onChange: function onChange() {
|
|
34328
|
+
return handleClick(option.key);
|
|
34565
34329
|
}
|
|
34566
|
-
}
|
|
34567
|
-
|
|
34568
|
-
|
|
34569
|
-
|
|
34570
|
-
|
|
34571
|
-
|
|
34572
|
-
|
|
34573
|
-
|
|
34574
|
-
|
|
34575
|
-
|
|
34576
|
-
|
|
34577
|
-
|
|
34578
|
-
|
|
34579
|
-
|
|
34580
|
-
|
|
34581
|
-
|
|
34582
|
-
|
|
34583
|
-
|
|
34584
|
-
|
|
34585
|
-
|
|
34586
|
-
|
|
34330
|
+
}), React.createElement("label", {
|
|
34331
|
+
onPointerDown: function onPointerDown() {
|
|
34332
|
+
handleClick(option.key);
|
|
34333
|
+
},
|
|
34334
|
+
onTouchEnd: function onTouchEnd() {
|
|
34335
|
+
setIsShown({
|
|
34336
|
+
show: true,
|
|
34337
|
+
index: index
|
|
34338
|
+
});
|
|
34339
|
+
},
|
|
34340
|
+
style: {
|
|
34341
|
+
display: 'flex',
|
|
34342
|
+
alignItems: 'center'
|
|
34343
|
+
},
|
|
34344
|
+
onMouseEnter: function onMouseEnter() {
|
|
34345
|
+
return setIsShown({
|
|
34346
|
+
show: true,
|
|
34347
|
+
index: index
|
|
34348
|
+
});
|
|
34349
|
+
},
|
|
34350
|
+
onMouseLeave: function onMouseLeave() {
|
|
34351
|
+
return setIsShown({
|
|
34352
|
+
show: false,
|
|
34353
|
+
index: index
|
|
34354
|
+
});
|
|
34587
34355
|
}
|
|
34356
|
+
}, modifyString(option.name))), isShown && isShown.index === index && option.ingredients.map(function (option, index) {
|
|
34357
|
+
return React.createElement(Recipes, {
|
|
34358
|
+
key: index
|
|
34359
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
34360
|
+
atlasIMG: atlasIMG,
|
|
34361
|
+
atlasJSON: atlasJSON,
|
|
34362
|
+
spriteKey: option.texturePath,
|
|
34363
|
+
imgScale: 1
|
|
34364
|
+
}), React.createElement(StyledItem, null, modifyString(option.key), " (", option.qty, "x)"));
|
|
34365
|
+
})));
|
|
34366
|
+
})), React.createElement(ButtonWrapper, null, React.createElement(Button, {
|
|
34367
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
34368
|
+
onPointerDown: onClose
|
|
34369
|
+
}, "Cancel"), React.createElement(Button, {
|
|
34370
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
34371
|
+
onPointerDown: function onPointerDown() {
|
|
34372
|
+
return onCraftItem(craftItem);
|
|
34588
34373
|
}
|
|
34589
|
-
}))
|
|
34590
|
-
right: '1rem',
|
|
34591
|
-
src: img$7
|
|
34592
|
-
}))), ")"));
|
|
34374
|
+
}, "Craft")));
|
|
34593
34375
|
};
|
|
34594
|
-
var
|
|
34595
|
-
displayName: "
|
|
34596
|
-
componentId: "sc-
|
|
34597
|
-
})(["
|
|
34598
|
-
var
|
|
34599
|
-
displayName: "
|
|
34600
|
-
componentId: "sc-
|
|
34601
|
-
})(["
|
|
34602
|
-
|
|
34603
|
-
|
|
34604
|
-
|
|
34605
|
-
|
|
34606
|
-
|
|
34607
|
-
|
|
34608
|
-
|
|
34609
|
-
|
|
34610
|
-
|
|
34611
|
-
|
|
34612
|
-
|
|
34613
|
-
|
|
34614
|
-
|
|
34615
|
-
|
|
34616
|
-
|
|
34617
|
-
|
|
34618
|
-
|
|
34619
|
-
|
|
34376
|
+
var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
34377
|
+
displayName: "CraftBook__StyledItem",
|
|
34378
|
+
componentId: "sc-19q95ue-0"
|
|
34379
|
+
})(["margin-left:10px;"]);
|
|
34380
|
+
var Recipes = /*#__PURE__*/styled.div.withConfig({
|
|
34381
|
+
displayName: "CraftBook__Recipes",
|
|
34382
|
+
componentId: "sc-19q95ue-1"
|
|
34383
|
+
})(["font-size:0.6rem;color:yellow !important;margin-bottom:3px;display:flex;align-items:center;.sprite-from-atlas-img{top:0px;left:0px;}"]);
|
|
34384
|
+
var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
34385
|
+
displayName: "CraftBook__Title",
|
|
34386
|
+
componentId: "sc-19q95ue-2"
|
|
34387
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
34388
|
+
var Subtitle = /*#__PURE__*/styled.h1.withConfig({
|
|
34389
|
+
displayName: "CraftBook__Subtitle",
|
|
34390
|
+
componentId: "sc-19q95ue-3"
|
|
34391
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
34392
|
+
var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
|
|
34393
|
+
displayName: "CraftBook__RadioInputScroller",
|
|
34394
|
+
componentId: "sc-19q95ue-4"
|
|
34395
|
+
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;-webkit-overflow-scrolling:touch;"]);
|
|
34396
|
+
var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
34397
|
+
displayName: "CraftBook__SpriteAtlasWrapper",
|
|
34398
|
+
componentId: "sc-19q95ue-5"
|
|
34399
|
+
})(["margin-right:40px;"]);
|
|
34400
|
+
var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
34401
|
+
displayName: "CraftBook__RadioOptionsWrapper",
|
|
34402
|
+
componentId: "sc-19q95ue-6"
|
|
34403
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
34404
|
+
var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
34405
|
+
displayName: "CraftBook__ButtonWrapper",
|
|
34406
|
+
componentId: "sc-19q95ue-7"
|
|
34407
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
34620
34408
|
|
|
34621
|
-
var
|
|
34622
|
-
var
|
|
34623
|
-
|
|
34624
|
-
|
|
34625
|
-
|
|
34626
|
-
|
|
34627
|
-
|
|
34628
|
-
|
|
34629
|
-
|
|
34630
|
-
|
|
34631
|
-
|
|
34632
|
-
|
|
34633
|
-
|
|
34634
|
-
|
|
34635
|
-
|
|
34636
|
-
|
|
34637
|
-
|
|
34638
|
-
|
|
34639
|
-
|
|
34640
|
-
|
|
34641
|
-
|
|
34642
|
-
|
|
34643
|
-
|
|
34409
|
+
var DropdownSelectorContainer = function DropdownSelectorContainer(_ref) {
|
|
34410
|
+
var title = _ref.title,
|
|
34411
|
+
onChange = _ref.onChange,
|
|
34412
|
+
options = _ref.options,
|
|
34413
|
+
details = _ref.details;
|
|
34414
|
+
return React.createElement("div", null, React.createElement("p", null, title), React.createElement(Dropdown, {
|
|
34415
|
+
options: options.map(function (option, index) {
|
|
34416
|
+
return {
|
|
34417
|
+
option: option.name,
|
|
34418
|
+
value: option.id,
|
|
34419
|
+
id: index
|
|
34420
|
+
};
|
|
34421
|
+
}),
|
|
34422
|
+
onChange: onChange
|
|
34423
|
+
}), React.createElement(Details, null, details));
|
|
34424
|
+
};
|
|
34425
|
+
var Details = /*#__PURE__*/styled.p.withConfig({
|
|
34426
|
+
displayName: "DropdownSelectorContainer__Details",
|
|
34427
|
+
componentId: "sc-kaa0h9-0"
|
|
34428
|
+
})(["font-size:", " !important;"], uiFonts.size.xsmall);
|
|
34429
|
+
|
|
34430
|
+
var EquipmentSet = function EquipmentSet(_ref) {
|
|
34431
|
+
var equipmentSet = _ref.equipmentSet,
|
|
34432
|
+
onClose = _ref.onClose,
|
|
34433
|
+
_onMouseOver = _ref.onMouseOver,
|
|
34434
|
+
_onSelected = _ref.onSelected,
|
|
34435
|
+
onItemClick = _ref.onItemClick,
|
|
34436
|
+
atlasIMG = _ref.atlasIMG,
|
|
34437
|
+
atlasJSON = _ref.atlasJSON,
|
|
34438
|
+
onItemDragEnd = _ref.onItemDragEnd,
|
|
34439
|
+
onItemDragStart = _ref.onItemDragStart,
|
|
34440
|
+
onItemPlaceDrop = _ref.onItemPlaceDrop,
|
|
34441
|
+
onItemOutsideDrop = _ref.onItemOutsideDrop,
|
|
34442
|
+
checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
|
|
34443
|
+
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
|
|
34444
|
+
dragScale = _ref.dragScale;
|
|
34445
|
+
var neck = equipmentSet.neck,
|
|
34446
|
+
leftHand = equipmentSet.leftHand,
|
|
34447
|
+
ring = equipmentSet.ring,
|
|
34448
|
+
head = equipmentSet.head,
|
|
34449
|
+
armor = equipmentSet.armor,
|
|
34450
|
+
legs = equipmentSet.legs,
|
|
34451
|
+
boot = equipmentSet.boot,
|
|
34452
|
+
inventory = equipmentSet.inventory,
|
|
34453
|
+
rightHand = equipmentSet.rightHand,
|
|
34454
|
+
accessory = equipmentSet.accessory;
|
|
34455
|
+
var equipmentData = [neck, leftHand, ring, head, armor, legs, boot, inventory, rightHand, accessory];
|
|
34456
|
+
var equipmentMaskSlots = [ItemSlotType.Neck, ItemSlotType.LeftHand, ItemSlotType.Ring, ItemSlotType.Head, ItemSlotType.Torso, ItemSlotType.Legs, ItemSlotType.Feet, ItemSlotType.Inventory, ItemSlotType.RightHand, ItemSlotType.Accessory];
|
|
34457
|
+
var onRenderEquipmentSlotRange = function onRenderEquipmentSlotRange(start, end) {
|
|
34458
|
+
var equipmentRange = equipmentData.slice(start, end);
|
|
34459
|
+
var slotMaksRange = equipmentMaskSlots.slice(start, end);
|
|
34460
|
+
return equipmentRange.map(function (data, i) {
|
|
34461
|
+
var _ref2;
|
|
34462
|
+
var item = data;
|
|
34463
|
+
var itemContainer = (_ref2 = item && item.itemContainer) != null ? _ref2 : null;
|
|
34464
|
+
return React.createElement(ItemSlot, {
|
|
34465
|
+
key: i,
|
|
34466
|
+
slotIndex: i,
|
|
34467
|
+
item: item,
|
|
34468
|
+
itemContainer: itemContainer,
|
|
34469
|
+
itemContainerType: ItemContainerType.Equipment,
|
|
34470
|
+
slotSpriteMask: slotMaksRange[i],
|
|
34471
|
+
onMouseOver: function onMouseOver(event, slotIndex, item) {
|
|
34472
|
+
if (_onMouseOver) _onMouseOver(event, slotIndex, item);
|
|
34473
|
+
},
|
|
34474
|
+
onPointerDown: function onPointerDown(itemType, ContainerType) {
|
|
34475
|
+
if (onItemClick) onItemClick(itemType, item, ContainerType);
|
|
34476
|
+
},
|
|
34477
|
+
onSelected: function onSelected(optionId) {
|
|
34478
|
+
if (_onSelected) _onSelected(optionId);
|
|
34479
|
+
},
|
|
34480
|
+
onDragStart: function onDragStart(item, slotIndex, itemContainerType) {
|
|
34481
|
+
if (!item) {
|
|
34482
|
+
return;
|
|
34483
|
+
}
|
|
34484
|
+
if (onItemDragStart) onItemDragStart(item, slotIndex, itemContainerType);
|
|
34485
|
+
},
|
|
34486
|
+
onDragEnd: function onDragEnd(quantity) {
|
|
34487
|
+
if (onItemDragEnd) onItemDragEnd(quantity);
|
|
34488
|
+
},
|
|
34489
|
+
dragScale: dragScale,
|
|
34490
|
+
checkIfItemCanBeMoved: checkIfItemCanBeMoved,
|
|
34491
|
+
checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
|
|
34492
|
+
onPlaceDrop: function onPlaceDrop(item, slotIndex, itemContainerType) {
|
|
34493
|
+
if (onItemPlaceDrop) onItemPlaceDrop(item, slotIndex, itemContainerType);
|
|
34494
|
+
},
|
|
34495
|
+
onOutsideDrop: function onOutsideDrop(item, position) {
|
|
34496
|
+
if (onItemOutsideDrop) onItemOutsideDrop(item, position);
|
|
34497
|
+
},
|
|
34498
|
+
atlasIMG: atlasIMG,
|
|
34499
|
+
atlasJSON: atlasJSON
|
|
34500
|
+
});
|
|
34501
|
+
});
|
|
34644
34502
|
};
|
|
34645
|
-
|
|
34646
|
-
|
|
34647
|
-
|
|
34648
|
-
|
|
34649
|
-
|
|
34650
|
-
|
|
34651
|
-
|
|
34652
|
-
|
|
34653
|
-
|
|
34654
|
-
|
|
34655
|
-
|
|
34656
|
-
onClose: onClose
|
|
34657
|
-
}) : questions && answers ? React.createElement(QuestionDialog, {
|
|
34658
|
-
questions: questions,
|
|
34659
|
-
answers: answers,
|
|
34660
|
-
onClose: onClose
|
|
34661
|
-
}) : text && imagePath ? React.createElement(NPCDialog, {
|
|
34662
|
-
text: text,
|
|
34663
|
-
imagePath: imagePath,
|
|
34664
|
-
onClose: onClose,
|
|
34665
|
-
type: NPCDialogType.TextAndThumbnail
|
|
34666
|
-
}) : React.createElement(NPCDialog, {
|
|
34667
|
-
text: text,
|
|
34668
|
-
onClose: onClose,
|
|
34669
|
-
type: NPCDialogType.TextOnly
|
|
34670
|
-
})));
|
|
34503
|
+
return React.createElement(DraggableContainer, {
|
|
34504
|
+
title: 'Equipments',
|
|
34505
|
+
type: RPGUIContainerTypes.Framed,
|
|
34506
|
+
onCloseButton: function onCloseButton() {
|
|
34507
|
+
if (onClose) onClose();
|
|
34508
|
+
},
|
|
34509
|
+
width: "330px",
|
|
34510
|
+
cancelDrag: ".equipment-container-body"
|
|
34511
|
+
}, React.createElement(EquipmentSetContainer, {
|
|
34512
|
+
className: "equipment-container-body"
|
|
34513
|
+
}, React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(0, 3)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(3, 7)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(7, 10))));
|
|
34671
34514
|
};
|
|
34672
|
-
var
|
|
34673
|
-
displayName: "
|
|
34674
|
-
componentId: "sc-
|
|
34675
|
-
})(["width:
|
|
34676
|
-
|
|
34677
|
-
|
|
34678
|
-
|
|
34679
|
-
});
|
|
34680
|
-
var DialogContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34681
|
-
displayName: "HistoryDialog__DialogContainer",
|
|
34682
|
-
componentId: "sc-u6oe75-1"
|
|
34683
|
-
})(["display:flex;justify-content:center;padding-top:200px;"]);
|
|
34515
|
+
var EquipmentSetContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34516
|
+
displayName: "EquipmentSet__EquipmentSetContainer",
|
|
34517
|
+
componentId: "sc-1wuddg2-0"
|
|
34518
|
+
})(["width:inherit;display:flex;justify-content:center;flex-wrap:wrap;flex-direction:row;touch-action:none;"]);
|
|
34519
|
+
var EquipmentColumn = /*#__PURE__*/styled.div.withConfig({
|
|
34520
|
+
displayName: "EquipmentSet__EquipmentColumn",
|
|
34521
|
+
componentId: "sc-1wuddg2-1"
|
|
34522
|
+
})(["display:flex;justify-content:center;flex-wrap:wrap;flex-direction:column;touch-action:none;"]);
|
|
34684
34523
|
|
|
34685
34524
|
var SlotsContainer = function SlotsContainer(_ref) {
|
|
34686
34525
|
var children = _ref.children,
|
|
@@ -34903,7 +34742,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
34903
34742
|
return word[0];
|
|
34904
34743
|
}));
|
|
34905
34744
|
};
|
|
34906
|
-
return React.createElement(Container$
|
|
34745
|
+
return React.createElement(Container$d, null, React.createElement("p", null, "Shortcuts:"), React.createElement(List, {
|
|
34907
34746
|
id: "shortcuts_list"
|
|
34908
34747
|
}, Array.from({
|
|
34909
34748
|
length: 6
|
|
@@ -34919,7 +34758,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
34919
34758
|
}, getContent(i));
|
|
34920
34759
|
})));
|
|
34921
34760
|
};
|
|
34922
|
-
var Container$
|
|
34761
|
+
var Container$d = /*#__PURE__*/styled.div.withConfig({
|
|
34923
34762
|
displayName: "ShortcutsSetter__Container",
|
|
34924
34763
|
componentId: "sc-xuouuf-0"
|
|
34925
34764
|
})(["p{margin:0;margin-left:0.5rem;}"]);
|
|
@@ -34956,7 +34795,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
34956
34795
|
dragScale = _ref.dragScale,
|
|
34957
34796
|
shortcuts = _ref.shortcuts,
|
|
34958
34797
|
setItemShortcut = _ref.setItemShortcut,
|
|
34959
|
-
removeShortcut = _ref.removeShortcut
|
|
34798
|
+
removeShortcut = _ref.removeShortcut,
|
|
34799
|
+
equipmentSet = _ref.equipmentSet;
|
|
34960
34800
|
var _useState = useState({
|
|
34961
34801
|
isOpen: false,
|
|
34962
34802
|
maxQuantity: 1,
|
|
@@ -35015,173 +34855,500 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
35015
34855
|
},
|
|
35016
34856
|
atlasIMG: atlasIMG,
|
|
35017
34857
|
atlasJSON: atlasJSON,
|
|
35018
|
-
isSelectingShortcut: settingShortcutIndex !== -1
|
|
34858
|
+
isSelectingShortcut: settingShortcutIndex !== -1,
|
|
34859
|
+
equipmentSet: equipmentSet
|
|
35019
34860
|
}));
|
|
35020
34861
|
}
|
|
35021
|
-
return slots;
|
|
34862
|
+
return slots;
|
|
34863
|
+
};
|
|
34864
|
+
return React.createElement(React.Fragment, null, React.createElement(SlotsContainer, {
|
|
34865
|
+
title: itemContainer.name || 'Container',
|
|
34866
|
+
onClose: onClose,
|
|
34867
|
+
initialPosition: initialPosition
|
|
34868
|
+
}, type === ItemContainerType.Inventory && shortcuts && removeShortcut && React.createElement(ShortcutsSetter, {
|
|
34869
|
+
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
34870
|
+
settingShortcutIndex: settingShortcutIndex,
|
|
34871
|
+
shortcuts: shortcuts,
|
|
34872
|
+
removeShortcut: removeShortcut,
|
|
34873
|
+
atlasIMG: atlasIMG,
|
|
34874
|
+
atlasJSON: atlasJSON
|
|
34875
|
+
}), React.createElement(ItemsContainer, {
|
|
34876
|
+
className: "item-container-body"
|
|
34877
|
+
}, onRenderSlots())), quantitySelect.isOpen && React.createElement(QuantitySelectorContainer, null, React.createElement(ItemQuantitySelector, {
|
|
34878
|
+
quantity: quantitySelect.maxQuantity,
|
|
34879
|
+
onConfirm: function onConfirm(quantity) {
|
|
34880
|
+
quantitySelect.callback(quantity);
|
|
34881
|
+
setQuantitySelect({
|
|
34882
|
+
isOpen: false,
|
|
34883
|
+
maxQuantity: 1,
|
|
34884
|
+
callback: function callback() {}
|
|
34885
|
+
});
|
|
34886
|
+
},
|
|
34887
|
+
onClose: function onClose() {
|
|
34888
|
+
quantitySelect.callback(-1);
|
|
34889
|
+
setQuantitySelect({
|
|
34890
|
+
isOpen: false,
|
|
34891
|
+
maxQuantity: 1,
|
|
34892
|
+
callback: function callback() {}
|
|
34893
|
+
});
|
|
34894
|
+
}
|
|
34895
|
+
})));
|
|
34896
|
+
};
|
|
34897
|
+
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34898
|
+
displayName: "ItemContainer__ItemsContainer",
|
|
34899
|
+
componentId: "sc-15y5p9l-0"
|
|
34900
|
+
})(["display:flex;justify-content:center;flex-wrap:wrap;"]);
|
|
34901
|
+
var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34902
|
+
displayName: "ItemContainer__QuantitySelectorContainer",
|
|
34903
|
+
componentId: "sc-15y5p9l-1"
|
|
34904
|
+
})(["position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:100;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.5);"]);
|
|
34905
|
+
|
|
34906
|
+
var ItemSelector = function ItemSelector(_ref) {
|
|
34907
|
+
var atlasIMG = _ref.atlasIMG,
|
|
34908
|
+
atlasJSON = _ref.atlasJSON,
|
|
34909
|
+
options = _ref.options,
|
|
34910
|
+
onClose = _ref.onClose,
|
|
34911
|
+
onSelect = _ref.onSelect;
|
|
34912
|
+
var _useState = useState(),
|
|
34913
|
+
selectedValue = _useState[0],
|
|
34914
|
+
setSelectedValue = _useState[1];
|
|
34915
|
+
var handleClick = function handleClick() {
|
|
34916
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
34917
|
+
var elementValue = element.value;
|
|
34918
|
+
setSelectedValue(elementValue);
|
|
34919
|
+
};
|
|
34920
|
+
useEffect(function () {
|
|
34921
|
+
if (selectedValue) {
|
|
34922
|
+
onSelect(selectedValue);
|
|
34923
|
+
}
|
|
34924
|
+
}, [selectedValue]);
|
|
34925
|
+
return React.createElement(DraggableContainer, {
|
|
34926
|
+
type: RPGUIContainerTypes.Framed,
|
|
34927
|
+
width: "500px",
|
|
34928
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
34929
|
+
onCloseButton: function onCloseButton() {
|
|
34930
|
+
if (onClose) {
|
|
34931
|
+
onClose();
|
|
34932
|
+
}
|
|
34933
|
+
}
|
|
34934
|
+
}, React.createElement("div", {
|
|
34935
|
+
style: {
|
|
34936
|
+
width: '100%'
|
|
34937
|
+
}
|
|
34938
|
+
}, React.createElement(Title$3, null, 'Harvesting instruments'), React.createElement(Subtitle$1, null, 'Use the tool, you need it'), React.createElement("hr", {
|
|
34939
|
+
className: "golden"
|
|
34940
|
+
})), React.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
34941
|
+
return React.createElement(RadioOptionsWrapper$1, {
|
|
34942
|
+
key: index
|
|
34943
|
+
}, React.createElement(SpriteAtlasWrapper$1, null, React.createElement(SpriteFromAtlas, {
|
|
34944
|
+
atlasIMG: atlasIMG,
|
|
34945
|
+
atlasJSON: atlasJSON,
|
|
34946
|
+
spriteKey: option.imageKey,
|
|
34947
|
+
imgScale: 3
|
|
34948
|
+
})), React.createElement("div", null, React.createElement("input", {
|
|
34949
|
+
className: "rpgui-radio",
|
|
34950
|
+
type: "radio",
|
|
34951
|
+
value: option.name,
|
|
34952
|
+
name: "test"
|
|
34953
|
+
}), React.createElement("label", {
|
|
34954
|
+
onPointerDown: handleClick,
|
|
34955
|
+
style: {
|
|
34956
|
+
display: 'flex',
|
|
34957
|
+
alignItems: 'center'
|
|
34958
|
+
}
|
|
34959
|
+
}, option.name, " ", React.createElement("br", null), option.description)));
|
|
34960
|
+
})), React.createElement(ButtonWrapper$1, null, React.createElement(Button, {
|
|
34961
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
34962
|
+
onPointerDown: onClose
|
|
34963
|
+
}, "Cancel"), React.createElement(Button, {
|
|
34964
|
+
buttonType: ButtonTypes.RPGUIButton
|
|
34965
|
+
}, "Select")));
|
|
34966
|
+
};
|
|
34967
|
+
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
34968
|
+
displayName: "ItemSelector__Title",
|
|
34969
|
+
componentId: "sc-gptoxp-0"
|
|
34970
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
34971
|
+
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
34972
|
+
displayName: "ItemSelector__Subtitle",
|
|
34973
|
+
componentId: "sc-gptoxp-1"
|
|
34974
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
34975
|
+
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34976
|
+
displayName: "ItemSelector__RadioInputScroller",
|
|
34977
|
+
componentId: "sc-gptoxp-2"
|
|
34978
|
+
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
34979
|
+
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34980
|
+
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
34981
|
+
componentId: "sc-gptoxp-3"
|
|
34982
|
+
})(["margin-right:40px;"]);
|
|
34983
|
+
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34984
|
+
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
34985
|
+
componentId: "sc-gptoxp-4"
|
|
34986
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
34987
|
+
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34988
|
+
displayName: "ItemSelector__ButtonWrapper",
|
|
34989
|
+
componentId: "sc-gptoxp-5"
|
|
34990
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
34991
|
+
|
|
34992
|
+
var ListMenu = function ListMenu(_ref) {
|
|
34993
|
+
var options = _ref.options,
|
|
34994
|
+
onSelected = _ref.onSelected,
|
|
34995
|
+
x = _ref.x,
|
|
34996
|
+
y = _ref.y;
|
|
34997
|
+
return React.createElement(Container$e, {
|
|
34998
|
+
x: x,
|
|
34999
|
+
y: y
|
|
35000
|
+
}, React.createElement("ul", {
|
|
35001
|
+
className: "rpgui-list-imp",
|
|
35002
|
+
style: {
|
|
35003
|
+
overflow: 'hidden'
|
|
35004
|
+
}
|
|
35005
|
+
}, options.map(function (params, index) {
|
|
35006
|
+
return React.createElement(ListElement$1, {
|
|
35007
|
+
key: (params == null ? void 0 : params.id) || index,
|
|
35008
|
+
onPointerDown: function onPointerDown() {
|
|
35009
|
+
onSelected(params == null ? void 0 : params.id);
|
|
35010
|
+
}
|
|
35011
|
+
}, (params == null ? void 0 : params.text) || 'No text');
|
|
35012
|
+
})));
|
|
35013
|
+
};
|
|
35014
|
+
var Container$e = /*#__PURE__*/styled.div.withConfig({
|
|
35015
|
+
displayName: "ListMenu__Container",
|
|
35016
|
+
componentId: "sc-i9097t-0"
|
|
35017
|
+
})(["display:flex;flex-direction:column;width:100%;justify-content:start;align-items:flex-start;position:absolute;top:", "px;left:", "px;li{font-size:", ";}"], function (props) {
|
|
35018
|
+
return props.y || 0;
|
|
35019
|
+
}, function (props) {
|
|
35020
|
+
return props.x || 0;
|
|
35021
|
+
}, uiFonts.size.xsmall);
|
|
35022
|
+
var ListElement$1 = /*#__PURE__*/styled.li.withConfig({
|
|
35023
|
+
displayName: "ListMenu__ListElement",
|
|
35024
|
+
componentId: "sc-i9097t-1"
|
|
35025
|
+
})(["margin-right:0.5rem;"]);
|
|
35026
|
+
|
|
35027
|
+
var img$6 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAP1BMVEUAAAA7FyVxQTsUEBPj5v////+5v/tCJDOOUlIiHBr1oJfptaO6dWr61rhzFy1bMTjoanMUNGQoXMQkn97+88DQ3IhAAAAAAXRSTlMAQObYZgAAAAFiS0dEBfhv6ccAAAAHdElNRQfmAw4VOBC7c5LYAAABM0lEQVQ4y3XRi5KDIAwFUAUkbrBgpP//rZsHVHQ009qZ3tPboNN0zmwzvcw8O5sX4y0NOg/Et3jRCXF+ziULorjkOQ9gE24dvuUAzq08DiCO4pe3WN7zCP56vmpubBReQYC11YPS86ySxxCsAABTSgjb5m4g8nfbxvFHBkH2OEEvAItVuCuIsgGgl+Gcr7kDXxhEAx55A2SQEEeQeZwUaIP8Tbo05B0RFPhItAjgj1w6cDnhLluDj+Egkh3pCCP4pKQAw1IPO0W9Nti5gW9RP2dKA3BZd2Dw+baYX+Nt4GM00O4S3kEpF6Alb2Bv4LeC3kkGfAW0/p0RPoJVKr63ghHsKuRh5DIUKOAlGOwrtt9fQekAEfmhZslHUDoglB0zjfkJigN7UnTQQ4GBWomoVhEN/AOPSBh38gy+fwAAACV0RVh0ZGF0ZTpjcmVhdGU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ide;
|
|
35032
|
+
(function (ImgSide) {
|
|
35033
|
+
ImgSide["right"] = "right";
|
|
35034
|
+
ImgSide["left"] = "left";
|
|
35035
|
+
})(ImgSide || (ImgSide = {}));
|
|
35036
|
+
var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
35037
|
+
var _textAndTypeArray$sli;
|
|
35038
|
+
var _onClose = _ref.onClose,
|
|
35039
|
+
textAndTypeArray = _ref.textAndTypeArray;
|
|
35040
|
+
var _useState = useState(false),
|
|
35041
|
+
showGoNextIndicator = _useState[0],
|
|
35042
|
+
setShowGoNextIndicator = _useState[1];
|
|
35043
|
+
var _useState2 = useState(0),
|
|
35044
|
+
slide = _useState2[0],
|
|
35045
|
+
setSlide = _useState2[1];
|
|
35046
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
35047
|
+
if (event.code === 'Space') {
|
|
35048
|
+
if (slide < (textAndTypeArray == null ? void 0 : textAndTypeArray.length) - 1) {
|
|
35049
|
+
setSlide(function (prev) {
|
|
35050
|
+
return prev + 1;
|
|
35051
|
+
});
|
|
35052
|
+
} else {
|
|
35053
|
+
// if there's no more text chunks, close the dialog
|
|
35054
|
+
_onClose();
|
|
35055
|
+
}
|
|
35056
|
+
}
|
|
35057
|
+
};
|
|
35058
|
+
useEffect(function () {
|
|
35059
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
35060
|
+
return function () {
|
|
35061
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
35062
|
+
};
|
|
35063
|
+
}, [slide]);
|
|
35064
|
+
return React.createElement(RPGUIContainer, {
|
|
35065
|
+
type: RPGUIContainerTypes.FramedGold,
|
|
35066
|
+
width: '50%',
|
|
35067
|
+
height: '180px'
|
|
35068
|
+
}, React.createElement(React.Fragment, null, React.createElement(Container$f, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React.createElement(React.Fragment, null, React.createElement(TextContainer, {
|
|
35069
|
+
flex: '70%'
|
|
35070
|
+
}, React.createElement(NPCDialogText, {
|
|
35071
|
+
onStartStep: function onStartStep() {
|
|
35072
|
+
return setShowGoNextIndicator(false);
|
|
35073
|
+
},
|
|
35074
|
+
onEndStep: function onEndStep() {
|
|
35075
|
+
return setShowGoNextIndicator(true);
|
|
35076
|
+
},
|
|
35077
|
+
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
35078
|
+
onClose: function onClose() {
|
|
35079
|
+
if (_onClose) {
|
|
35080
|
+
_onClose();
|
|
35081
|
+
}
|
|
35082
|
+
}
|
|
35083
|
+
})), React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
35084
|
+
src: textAndTypeArray[slide].imagePath || img$6
|
|
35085
|
+
})), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
|
|
35086
|
+
right: '10.5rem',
|
|
35087
|
+
src: img$7
|
|
35088
|
+
})), textAndTypeArray[slide].imageSide === 'left' && React.createElement(React.Fragment, null, React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
35089
|
+
src: textAndTypeArray[slide].imagePath || img$6
|
|
35090
|
+
})), React.createElement(TextContainer, {
|
|
35091
|
+
flex: '70%'
|
|
35092
|
+
}, React.createElement(NPCDialogText, {
|
|
35093
|
+
onStartStep: function onStartStep() {
|
|
35094
|
+
return setShowGoNextIndicator(false);
|
|
35095
|
+
},
|
|
35096
|
+
onEndStep: function onEndStep() {
|
|
35097
|
+
return setShowGoNextIndicator(true);
|
|
35098
|
+
},
|
|
35099
|
+
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
35100
|
+
onClose: function onClose() {
|
|
35101
|
+
if (_onClose) {
|
|
35102
|
+
_onClose();
|
|
35103
|
+
}
|
|
35104
|
+
}
|
|
35105
|
+
})), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
|
|
35106
|
+
right: '1rem',
|
|
35107
|
+
src: img$7
|
|
35108
|
+
}))), ")"));
|
|
35109
|
+
};
|
|
35110
|
+
var Container$f = /*#__PURE__*/styled.div.withConfig({
|
|
35111
|
+
displayName: "NPCMultiDialog__Container",
|
|
35112
|
+
componentId: "sc-rvu5wg-0"
|
|
35113
|
+
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
35114
|
+
var TextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35115
|
+
displayName: "NPCMultiDialog__TextContainer",
|
|
35116
|
+
componentId: "sc-rvu5wg-1"
|
|
35117
|
+
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
35118
|
+
var flex = _ref2.flex;
|
|
35119
|
+
return flex;
|
|
35120
|
+
});
|
|
35121
|
+
var ThumbnailContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35122
|
+
displayName: "NPCMultiDialog__ThumbnailContainer",
|
|
35123
|
+
componentId: "sc-rvu5wg-2"
|
|
35124
|
+
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
35125
|
+
var NPCThumbnail = /*#__PURE__*/styled.img.withConfig({
|
|
35126
|
+
displayName: "NPCMultiDialog__NPCThumbnail",
|
|
35127
|
+
componentId: "sc-rvu5wg-3"
|
|
35128
|
+
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
35129
|
+
var PressSpaceIndicator = /*#__PURE__*/styled.img.withConfig({
|
|
35130
|
+
displayName: "NPCMultiDialog__PressSpaceIndicator",
|
|
35131
|
+
componentId: "sc-rvu5wg-4"
|
|
35132
|
+
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref3) {
|
|
35133
|
+
var right = _ref3.right;
|
|
35134
|
+
return right;
|
|
35135
|
+
});
|
|
35136
|
+
|
|
35137
|
+
//@ts-ignore
|
|
35138
|
+
var useEventListener = function useEventListener(type, handler, el) {
|
|
35139
|
+
if (el === void 0) {
|
|
35140
|
+
el = window;
|
|
35141
|
+
}
|
|
35142
|
+
var savedHandler = React.useRef();
|
|
35143
|
+
React.useEffect(function () {
|
|
35144
|
+
savedHandler.current = handler;
|
|
35145
|
+
}, [handler]);
|
|
35146
|
+
React.useEffect(function () {
|
|
35147
|
+
//@ts-ignore
|
|
35148
|
+
var listener = function listener(e) {
|
|
35149
|
+
return savedHandler.current(e);
|
|
35150
|
+
};
|
|
35151
|
+
el.addEventListener(type, listener);
|
|
35152
|
+
return function () {
|
|
35153
|
+
el.removeEventListener(type, listener);
|
|
35154
|
+
};
|
|
35155
|
+
}, [type, el]);
|
|
35156
|
+
};
|
|
35157
|
+
|
|
35158
|
+
var DynamicText = function DynamicText(_ref) {
|
|
35159
|
+
var text = _ref.text,
|
|
35160
|
+
onFinish = _ref.onFinish,
|
|
35161
|
+
onStart = _ref.onStart;
|
|
35162
|
+
var _useState = useState(''),
|
|
35163
|
+
textState = _useState[0],
|
|
35164
|
+
setTextState = _useState[1];
|
|
35165
|
+
useEffect(function () {
|
|
35166
|
+
var i = 0;
|
|
35167
|
+
var interval = setInterval(function () {
|
|
35168
|
+
// on every interval, show one more character
|
|
35169
|
+
if (i === 0) {
|
|
35170
|
+
if (onStart) {
|
|
35171
|
+
onStart();
|
|
35172
|
+
}
|
|
35173
|
+
}
|
|
35174
|
+
if (i < text.length) {
|
|
35175
|
+
setTextState(text.substring(0, i + 1));
|
|
35176
|
+
i++;
|
|
35177
|
+
} else {
|
|
35178
|
+
clearInterval(interval);
|
|
35179
|
+
if (onFinish) {
|
|
35180
|
+
onFinish();
|
|
35181
|
+
}
|
|
35182
|
+
}
|
|
35183
|
+
}, 50);
|
|
35184
|
+
return function () {
|
|
35185
|
+
clearInterval(interval);
|
|
35186
|
+
};
|
|
35187
|
+
}, [text]);
|
|
35188
|
+
return React.createElement(TextContainer$1, null, textState);
|
|
35189
|
+
};
|
|
35190
|
+
var TextContainer$1 = /*#__PURE__*/styled.p.withConfig({
|
|
35191
|
+
displayName: "DynamicText__TextContainer",
|
|
35192
|
+
componentId: "sc-1ggl9nd-0"
|
|
35193
|
+
})(["font-size:0.7rem !important;color:white;text-shadow:1px 1px 0px #000000;letter-spacing:1.2px;word-break:normal;"]);
|
|
35194
|
+
|
|
35195
|
+
var QuestionDialog = function QuestionDialog(_ref) {
|
|
35196
|
+
var questions = _ref.questions,
|
|
35197
|
+
answers = _ref.answers,
|
|
35198
|
+
onClose = _ref.onClose;
|
|
35199
|
+
var _useState = useState(questions[0]),
|
|
35200
|
+
currentQuestion = _useState[0],
|
|
35201
|
+
setCurrentQuestion = _useState[1];
|
|
35202
|
+
var _useState2 = useState(false),
|
|
35203
|
+
canShowAnswers = _useState2[0],
|
|
35204
|
+
setCanShowAnswers = _useState2[1];
|
|
35205
|
+
var onGetFirstAnswer = function onGetFirstAnswer() {
|
|
35206
|
+
if (!currentQuestion.answerIds || currentQuestion.answerIds.length === 0) {
|
|
35207
|
+
return null;
|
|
35208
|
+
}
|
|
35209
|
+
var firstAnswerId = currentQuestion.answerIds[0];
|
|
35210
|
+
return answers.find(function (answer) {
|
|
35211
|
+
return answer.id === firstAnswerId;
|
|
35212
|
+
});
|
|
35022
35213
|
};
|
|
35023
|
-
|
|
35024
|
-
|
|
35025
|
-
|
|
35026
|
-
|
|
35027
|
-
|
|
35028
|
-
|
|
35029
|
-
|
|
35030
|
-
|
|
35031
|
-
|
|
35032
|
-
|
|
35033
|
-
atlasJSON: atlasJSON
|
|
35034
|
-
}), React.createElement(ItemsContainer, {
|
|
35035
|
-
className: "item-container-body"
|
|
35036
|
-
}, onRenderSlots())), quantitySelect.isOpen && React.createElement(QuantitySelectorContainer, null, React.createElement(ItemQuantitySelector, {
|
|
35037
|
-
quantity: quantitySelect.maxQuantity,
|
|
35038
|
-
onConfirm: function onConfirm(quantity) {
|
|
35039
|
-
quantitySelect.callback(quantity);
|
|
35040
|
-
setQuantitySelect({
|
|
35041
|
-
isOpen: false,
|
|
35042
|
-
maxQuantity: 1,
|
|
35043
|
-
callback: function callback() {}
|
|
35044
|
-
});
|
|
35045
|
-
},
|
|
35046
|
-
onClose: function onClose() {
|
|
35047
|
-
quantitySelect.callback(-1);
|
|
35048
|
-
setQuantitySelect({
|
|
35049
|
-
isOpen: false,
|
|
35050
|
-
maxQuantity: 1,
|
|
35051
|
-
callback: function callback() {}
|
|
35214
|
+
var _useState3 = useState(onGetFirstAnswer()),
|
|
35215
|
+
currentAnswer = _useState3[0],
|
|
35216
|
+
setCurrentAnswer = _useState3[1];
|
|
35217
|
+
useEffect(function () {
|
|
35218
|
+
setCurrentAnswer(onGetFirstAnswer());
|
|
35219
|
+
}, [currentQuestion]);
|
|
35220
|
+
var onGetAnswers = function onGetAnswers(answerIds) {
|
|
35221
|
+
return answerIds.map(function (answerId) {
|
|
35222
|
+
return answers.find(function (answer) {
|
|
35223
|
+
return answer.id === answerId;
|
|
35052
35224
|
});
|
|
35225
|
+
});
|
|
35226
|
+
};
|
|
35227
|
+
var onKeyPress = function onKeyPress(e) {
|
|
35228
|
+
switch (e.key) {
|
|
35229
|
+
case 'ArrowDown':
|
|
35230
|
+
// select next answer, if any.
|
|
35231
|
+
// if no next answer, select first answer
|
|
35232
|
+
// const nextAnswer = onGetAnswers(currentQuestion.answerIds!).find(
|
|
35233
|
+
// (answer) => answer?.id === currentAnswer!.id + 1
|
|
35234
|
+
// );
|
|
35235
|
+
var nextAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
35236
|
+
return (answer == null ? void 0 : answer.id) === currentAnswer.id + 1;
|
|
35237
|
+
});
|
|
35238
|
+
var nextAnswerID = currentQuestion.answerIds[nextAnswerIndex];
|
|
35239
|
+
var nextAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
35240
|
+
return (answer == null ? void 0 : answer.id) === nextAnswerID;
|
|
35241
|
+
});
|
|
35242
|
+
setCurrentAnswer(nextAnswer || onGetFirstAnswer());
|
|
35243
|
+
break;
|
|
35244
|
+
case 'ArrowUp':
|
|
35245
|
+
// select previous answer, if any.
|
|
35246
|
+
// if no previous answer, select last answer
|
|
35247
|
+
var previousAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
35248
|
+
return (answer == null ? void 0 : answer.id) === currentAnswer.id - 1;
|
|
35249
|
+
});
|
|
35250
|
+
var previousAnswerID = currentQuestion.answerIds && currentQuestion.answerIds[previousAnswerIndex];
|
|
35251
|
+
var previousAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
35252
|
+
return (answer == null ? void 0 : answer.id) === previousAnswerID;
|
|
35253
|
+
});
|
|
35254
|
+
if (previousAnswer) {
|
|
35255
|
+
setCurrentAnswer(previousAnswer);
|
|
35256
|
+
} else {
|
|
35257
|
+
setCurrentAnswer(onGetAnswers(currentQuestion.answerIds).pop());
|
|
35258
|
+
}
|
|
35259
|
+
break;
|
|
35260
|
+
case 'Enter':
|
|
35261
|
+
setCanShowAnswers(false);
|
|
35262
|
+
if (!(currentAnswer != null && currentAnswer.nextQuestionId)) {
|
|
35263
|
+
onClose();
|
|
35264
|
+
return;
|
|
35265
|
+
} else {
|
|
35266
|
+
setCurrentQuestion(questions.find(function (question) {
|
|
35267
|
+
return question.id === currentAnswer.nextQuestionId;
|
|
35268
|
+
}));
|
|
35269
|
+
}
|
|
35270
|
+
break;
|
|
35053
35271
|
}
|
|
35054
|
-
})));
|
|
35055
|
-
};
|
|
35056
|
-
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35057
|
-
displayName: "ItemContainer__ItemsContainer",
|
|
35058
|
-
componentId: "sc-15y5p9l-0"
|
|
35059
|
-
})(["display:flex;justify-content:center;flex-wrap:wrap;"]);
|
|
35060
|
-
var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35061
|
-
displayName: "ItemContainer__QuantitySelectorContainer",
|
|
35062
|
-
componentId: "sc-15y5p9l-1"
|
|
35063
|
-
})(["position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:100;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.5);"]);
|
|
35064
|
-
|
|
35065
|
-
var ItemSelector = function ItemSelector(_ref) {
|
|
35066
|
-
var atlasIMG = _ref.atlasIMG,
|
|
35067
|
-
atlasJSON = _ref.atlasJSON,
|
|
35068
|
-
options = _ref.options,
|
|
35069
|
-
onClose = _ref.onClose,
|
|
35070
|
-
onSelect = _ref.onSelect;
|
|
35071
|
-
var _useState = useState(),
|
|
35072
|
-
selectedValue = _useState[0],
|
|
35073
|
-
setSelectedValue = _useState[1];
|
|
35074
|
-
var handleClick = function handleClick() {
|
|
35075
|
-
var element = document.querySelector("input[name='test']:checked");
|
|
35076
|
-
var elementValue = element.value;
|
|
35077
|
-
setSelectedValue(elementValue);
|
|
35078
35272
|
};
|
|
35079
|
-
|
|
35080
|
-
|
|
35081
|
-
|
|
35273
|
+
useEventListener('keydown', onKeyPress);
|
|
35274
|
+
var onAnswerClick = function onAnswerClick(answer) {
|
|
35275
|
+
setCanShowAnswers(false);
|
|
35276
|
+
if (answer.nextQuestionId) {
|
|
35277
|
+
// if there is a next question, go to it
|
|
35278
|
+
setCurrentQuestion(questions.find(function (question) {
|
|
35279
|
+
return question.id === answer.nextQuestionId;
|
|
35280
|
+
}));
|
|
35281
|
+
} else {
|
|
35282
|
+
// else, finish dialog!
|
|
35283
|
+
onClose();
|
|
35082
35284
|
}
|
|
35083
|
-
}
|
|
35084
|
-
|
|
35085
|
-
|
|
35086
|
-
|
|
35087
|
-
|
|
35088
|
-
onCloseButton: function onCloseButton() {
|
|
35089
|
-
if (onClose) {
|
|
35090
|
-
onClose();
|
|
35091
|
-
}
|
|
35285
|
+
};
|
|
35286
|
+
var onRenderCurrentAnswers = function onRenderCurrentAnswers() {
|
|
35287
|
+
var answerIds = currentQuestion.answerIds;
|
|
35288
|
+
if (!answerIds) {
|
|
35289
|
+
return null;
|
|
35092
35290
|
}
|
|
35093
|
-
|
|
35094
|
-
|
|
35095
|
-
|
|
35291
|
+
var answers = onGetAnswers(answerIds);
|
|
35292
|
+
if (!answers) {
|
|
35293
|
+
return null;
|
|
35096
35294
|
}
|
|
35097
|
-
|
|
35098
|
-
|
|
35099
|
-
|
|
35100
|
-
|
|
35101
|
-
|
|
35102
|
-
|
|
35103
|
-
|
|
35104
|
-
|
|
35105
|
-
|
|
35106
|
-
|
|
35107
|
-
|
|
35108
|
-
|
|
35109
|
-
|
|
35110
|
-
|
|
35111
|
-
|
|
35112
|
-
}), React.createElement("label", {
|
|
35113
|
-
onPointerDown: handleClick,
|
|
35114
|
-
style: {
|
|
35115
|
-
display: 'flex',
|
|
35116
|
-
alignItems: 'center'
|
|
35295
|
+
return answers.map(function (answer) {
|
|
35296
|
+
var isSelected = (currentAnswer == null ? void 0 : currentAnswer.id) === (answer == null ? void 0 : answer.id);
|
|
35297
|
+
var selectedColor = isSelected ? 'yellow' : 'white';
|
|
35298
|
+
if (answer) {
|
|
35299
|
+
return React.createElement(AnswerRow, {
|
|
35300
|
+
key: "answer_" + answer.id
|
|
35301
|
+
}, React.createElement(AnswerSelectedIcon, {
|
|
35302
|
+
color: selectedColor
|
|
35303
|
+
}, isSelected ? 'X' : null), React.createElement(Answer, {
|
|
35304
|
+
key: answer.id,
|
|
35305
|
+
onPointerDown: function onPointerDown() {
|
|
35306
|
+
return onAnswerClick(answer);
|
|
35307
|
+
},
|
|
35308
|
+
color: selectedColor
|
|
35309
|
+
}, answer.text));
|
|
35117
35310
|
}
|
|
35118
|
-
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
|
|
35122
|
-
|
|
35123
|
-
|
|
35124
|
-
|
|
35125
|
-
}
|
|
35126
|
-
|
|
35127
|
-
|
|
35128
|
-
componentId: "sc-gptoxp-0"
|
|
35129
|
-
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
35130
|
-
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
35131
|
-
displayName: "ItemSelector__Subtitle",
|
|
35132
|
-
componentId: "sc-gptoxp-1"
|
|
35133
|
-
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
35134
|
-
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35135
|
-
displayName: "ItemSelector__RadioInputScroller",
|
|
35136
|
-
componentId: "sc-gptoxp-2"
|
|
35137
|
-
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
35138
|
-
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35139
|
-
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
35140
|
-
componentId: "sc-gptoxp-3"
|
|
35141
|
-
})(["margin-right:40px;"]);
|
|
35142
|
-
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35143
|
-
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
35144
|
-
componentId: "sc-gptoxp-4"
|
|
35145
|
-
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
35146
|
-
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35147
|
-
displayName: "ItemSelector__ButtonWrapper",
|
|
35148
|
-
componentId: "sc-gptoxp-5"
|
|
35149
|
-
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
35150
|
-
|
|
35151
|
-
var ListMenu = function ListMenu(_ref) {
|
|
35152
|
-
var options = _ref.options,
|
|
35153
|
-
onSelected = _ref.onSelected,
|
|
35154
|
-
x = _ref.x,
|
|
35155
|
-
y = _ref.y;
|
|
35156
|
-
return React.createElement(Container$g, {
|
|
35157
|
-
x: x,
|
|
35158
|
-
y: y
|
|
35159
|
-
}, React.createElement("ul", {
|
|
35160
|
-
className: "rpgui-list-imp",
|
|
35161
|
-
style: {
|
|
35162
|
-
overflow: 'hidden'
|
|
35311
|
+
return null;
|
|
35312
|
+
});
|
|
35313
|
+
};
|
|
35314
|
+
return React.createElement(Container$g, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
|
|
35315
|
+
text: currentQuestion.text,
|
|
35316
|
+
onStart: function onStart() {
|
|
35317
|
+
return setCanShowAnswers(false);
|
|
35318
|
+
},
|
|
35319
|
+
onFinish: function onFinish() {
|
|
35320
|
+
return setCanShowAnswers(true);
|
|
35163
35321
|
}
|
|
35164
|
-
},
|
|
35165
|
-
return React.createElement(ListElement$1, {
|
|
35166
|
-
key: (params == null ? void 0 : params.id) || index,
|
|
35167
|
-
onPointerDown: function onPointerDown() {
|
|
35168
|
-
onSelected(params == null ? void 0 : params.id);
|
|
35169
|
-
}
|
|
35170
|
-
}, (params == null ? void 0 : params.text) || 'No text');
|
|
35171
|
-
})));
|
|
35322
|
+
})), canShowAnswers && React.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
35172
35323
|
};
|
|
35173
35324
|
var Container$g = /*#__PURE__*/styled.div.withConfig({
|
|
35174
|
-
displayName: "
|
|
35175
|
-
componentId: "sc-
|
|
35176
|
-
})(["display:flex;
|
|
35177
|
-
|
|
35178
|
-
|
|
35179
|
-
|
|
35180
|
-
}
|
|
35181
|
-
var
|
|
35182
|
-
displayName: "
|
|
35183
|
-
componentId: "sc-
|
|
35184
|
-
})(["
|
|
35325
|
+
displayName: "QuestionDialog__Container",
|
|
35326
|
+
componentId: "sc-bxc5u0-0"
|
|
35327
|
+
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
35328
|
+
var QuestionContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35329
|
+
displayName: "QuestionDialog__QuestionContainer",
|
|
35330
|
+
componentId: "sc-bxc5u0-1"
|
|
35331
|
+
})(["flex:100%;width:100%;"]);
|
|
35332
|
+
var AnswersContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35333
|
+
displayName: "QuestionDialog__AnswersContainer",
|
|
35334
|
+
componentId: "sc-bxc5u0-2"
|
|
35335
|
+
})(["flex:100%;"]);
|
|
35336
|
+
var Answer = /*#__PURE__*/styled.p.withConfig({
|
|
35337
|
+
displayName: "QuestionDialog__Answer",
|
|
35338
|
+
componentId: "sc-bxc5u0-3"
|
|
35339
|
+
})(["flex:auto;color:", " !important;font-size:0.65rem !important;background:inherit;border:none;"], function (props) {
|
|
35340
|
+
return props.color;
|
|
35341
|
+
});
|
|
35342
|
+
var AnswerSelectedIcon = /*#__PURE__*/styled.span.withConfig({
|
|
35343
|
+
displayName: "QuestionDialog__AnswerSelectedIcon",
|
|
35344
|
+
componentId: "sc-bxc5u0-4"
|
|
35345
|
+
})(["flex:5% 0 0;color:", " !important;"], function (props) {
|
|
35346
|
+
return props.color;
|
|
35347
|
+
});
|
|
35348
|
+
var AnswerRow = /*#__PURE__*/styled.div.withConfig({
|
|
35349
|
+
displayName: "QuestionDialog__AnswerRow",
|
|
35350
|
+
componentId: "sc-bxc5u0-5"
|
|
35351
|
+
})(["display:flex;flex-wrap:wrap;justify-content:center;align-items:center;margin-bottom:0.5rem;height:22px;p{line-height:unset;margin-top:0;margin-bottom:0rem;}"]);
|
|
35185
35352
|
|
|
35186
35353
|
var ProgressBar = function ProgressBar(_ref) {
|
|
35187
35354
|
var max = _ref.max,
|
|
@@ -35240,7 +35407,7 @@ var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
|
35240
35407
|
return props.style;
|
|
35241
35408
|
});
|
|
35242
35409
|
|
|
35243
|
-
var img$
|
|
35410
|
+
var img$8 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZT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T0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAHcSURBVHja7Ji/agJBEId/K/cCdoKFFjZCbGxCekmVOunzCil8hhS+gr3WVmIvKbQxIILFKQjXhCPkASZN5tjd27ud9SRYOKV3u/ftN7P/VESEa4gariRuIHZEkpeUUkYhEZEKbeNrG0mJJ/MlOq0m9odTKRg/W+2OaDfqRh9xkmbPbaBIMrLJfInB/R0AoN2o4+v7B3GSAkAOzAXAwW0XH59QSpEOIzLCEHanuq31Zot+r1sIYcdwNDZgahIblww2GTxrXDb02B9OAIB+r4tOqymCYXtspRQkxMZ6s82lK8SG14jPBnccYmM6W6Df62ZWSkGkNjgt59p4eXyAt1h9NvSoasMJcs5MqWqj0IjEBncuNVdmIwcSYmN/OIlSUjZTnCD2Ui7pXLqK+tKSgTCEtOikBcrAvrQAQE2HkIwwTlJj2l7CBgBERKSUUrTaHQ3lcZI6t3G2IZ0pEhvZ7ssww9E4Wym5YUi6qoQioqDZwmB6emxDtg3ej97fXv0nNN64OHQrutbpbGG8o//2/DRwpsyXFsOI9DDjCv0j+oCkNowakR6iXSks+rjURtDhWS9q+1DtMiL5eC41lar9D8w2pQMVrR1nGym7p9hA/25EcrESXchu/wbcQDzxOwDLF0pIXBCe1wAAAABJRU5ErkJggg==';
|
|
35244
35411
|
|
|
35245
35412
|
var QuestInfo = function QuestInfo(_ref) {
|
|
35246
35413
|
var quests = _ref.quests,
|
|
@@ -35281,8 +35448,8 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
35281
35448
|
onPointerDown: onRightClick
|
|
35282
35449
|
}), React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
35283
35450
|
className: "drag-handler"
|
|
35284
|
-
}, React.createElement(Title$
|
|
35285
|
-
src: quests[currentIndex].thumbnail || img$
|
|
35451
|
+
}, React.createElement(Title$4, null, React.createElement(Thumbnail, {
|
|
35452
|
+
src: quests[currentIndex].thumbnail || img$8
|
|
35286
35453
|
}), quests[currentIndex].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
35287
35454
|
className: "golden"
|
|
35288
35455
|
}))), React.createElement(Content, null, React.createElement("p", null, quests[currentIndex].description)), React.createElement(QuestColumn, {
|
|
@@ -35300,8 +35467,8 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
35300
35467
|
}, button.title);
|
|
35301
35468
|
})))) : React.createElement(QuestsContainer, null, React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
35302
35469
|
className: "drag-handler"
|
|
35303
|
-
}, React.createElement(Title$
|
|
35304
|
-
src: quests[0].thumbnail || img$
|
|
35470
|
+
}, React.createElement(Title$4, null, React.createElement(Thumbnail, {
|
|
35471
|
+
src: quests[0].thumbnail || img$8
|
|
35305
35472
|
}), quests[0].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
35306
35473
|
className: "golden"
|
|
35307
35474
|
}))), React.createElement(Content, null, React.createElement("p", null, quests[0].description)), React.createElement(QuestColumn, {
|
|
@@ -35347,7 +35514,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
35347
35514
|
displayName: "QuestInfo__TitleContainer",
|
|
35348
35515
|
componentId: "sc-15s2boc-6"
|
|
35349
35516
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
35350
|
-
var Title$
|
|
35517
|
+
var Title$4 = /*#__PURE__*/styled.h1.withConfig({
|
|
35351
35518
|
displayName: "QuestInfo__Title",
|
|
35352
35519
|
componentId: "sc-15s2boc-7"
|
|
35353
35520
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
@@ -35369,7 +35536,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
35369
35536
|
style: {
|
|
35370
35537
|
width: '100%'
|
|
35371
35538
|
}
|
|
35372
|
-
}, React.createElement(Title$
|
|
35539
|
+
}, React.createElement(Title$5, null, "Quests"), React.createElement("hr", {
|
|
35373
35540
|
className: "golden"
|
|
35374
35541
|
}), React.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
|
|
35375
35542
|
return React.createElement("div", {
|
|
@@ -35390,7 +35557,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
|
|
|
35390
35557
|
displayName: "QuestList__QuestDraggableContainer",
|
|
35391
35558
|
componentId: "sc-1a2vx6q-0"
|
|
35392
35559
|
})([".container-close{top:10px;right:10px;}.quest-title{text-align:left;margin-left:44px;margin-top:20px;color:yellow;}.quest-desc{margin-top:12px;margin-left:44px;}.rpgui-progress{min-width:80%;margin:0 auto;}"]);
|
|
35393
|
-
var Title$
|
|
35560
|
+
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
35394
35561
|
displayName: "QuestList__Title",
|
|
35395
35562
|
componentId: "sc-1a2vx6q-1"
|
|
35396
35563
|
})(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
|
|
@@ -35795,9 +35962,9 @@ var Spell = function Spell(_ref) {
|
|
|
35795
35962
|
className: "spell"
|
|
35796
35963
|
}, disabled && React.createElement(Overlay, null, charMagicLevel < minMagicLevelRequired ? 'Low magic level' : manaCost > charMana && 'No mana'), React.createElement(SpellImage, null, magicWords.split(' ').map(function (word) {
|
|
35797
35964
|
return word[0];
|
|
35798
|
-
})), React.createElement(Info, null, React.createElement(Title$
|
|
35965
|
+
})), React.createElement(Info, null, React.createElement(Title$6, null, React.createElement("span", null, name), React.createElement("span", {
|
|
35799
35966
|
className: "spell"
|
|
35800
|
-
}, "(", magicWords, ")")), React.createElement(Description, null, description)), React.createElement(Divider, null), React.createElement(Cost, null, React.createElement("span", null, "Mana cost:"), React.createElement("span", {
|
|
35967
|
+
}, "(", magicWords, ")")), React.createElement(Description$1, null, description)), React.createElement(Divider, null), React.createElement(Cost, null, React.createElement("span", null, "Mana cost:"), React.createElement("span", {
|
|
35801
35968
|
className: "mana"
|
|
35802
35969
|
}, manaCost)));
|
|
35803
35970
|
};
|
|
@@ -35816,11 +35983,11 @@ var Info = /*#__PURE__*/styled.span.withConfig({
|
|
|
35816
35983
|
displayName: "Spell__Info",
|
|
35817
35984
|
componentId: "sc-j96fa2-2"
|
|
35818
35985
|
})(["width:0;flex:1;"]);
|
|
35819
|
-
var Title$
|
|
35986
|
+
var Title$6 = /*#__PURE__*/styled.p.withConfig({
|
|
35820
35987
|
displayName: "Spell__Title",
|
|
35821
35988
|
componentId: "sc-j96fa2-3"
|
|
35822
35989
|
})(["display:flex;flex-wrap:wrap;align-items:center;margin-bottom:5px;margin:0;span{font-size:", " !important;font-weight:bold !important;color:", " !important;margin-right:0.5rem;}.spell{font-size:", " !important;font-weight:normal !important;color:", " !important;}"], uiFonts.size.medium, uiColors.yellow, uiFonts.size.small, uiColors.lightGray);
|
|
35823
|
-
var Description = /*#__PURE__*/styled.div.withConfig({
|
|
35990
|
+
var Description$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35824
35991
|
displayName: "Spell__Description",
|
|
35825
35992
|
componentId: "sc-j96fa2-4"
|
|
35826
35993
|
})(["font-size:", " !important;line-height:1.1 !important;"], uiFonts.size.small);
|
|
@@ -35886,7 +36053,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
35886
36053
|
width: "inherit",
|
|
35887
36054
|
height: "inherit",
|
|
35888
36055
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell"
|
|
35889
|
-
}, React.createElement(Container$k, null, React.createElement(Title$
|
|
36056
|
+
}, React.createElement(Container$k, null, React.createElement(Title$7, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
|
|
35890
36057
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
35891
36058
|
settingShortcutIndex: settingShortcutIndex,
|
|
35892
36059
|
shortcuts: shortcuts,
|
|
@@ -35914,7 +36081,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
35914
36081
|
}, spell)));
|
|
35915
36082
|
}))));
|
|
35916
36083
|
};
|
|
35917
|
-
var Title$
|
|
36084
|
+
var Title$7 = /*#__PURE__*/styled.h1.withConfig({
|
|
35918
36085
|
displayName: "Spellbook__Title",
|
|
35919
36086
|
componentId: "sc-r02nfq-0"
|
|
35920
36087
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
@@ -35932,16 +36099,16 @@ var TextArea = function TextArea(_ref) {
|
|
|
35932
36099
|
return React.createElement("textarea", Object.assign({}, props));
|
|
35933
36100
|
};
|
|
35934
36101
|
|
|
35935
|
-
var img$
|
|
36102
|
+
var img$9 = 'data:image/gif;base64,R0lGODlhTgBNAPMAAAAAALcIL7ObdNGqnf3vnP/wl93Goerfx/Xx3vr6+vn49QAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAAIf4gQ3JlYXRlZCB3aXRoIGV6Z2lmLmNvbSBHSUYgbWFrZXIALAAAAABOAE0AAAT/EMhJq7046827/2AojmRpnmiqrmzrvnAsz2tg37hNq7jg/0AfbjeyAQ3IpBIJ1BE5N99ySmUKbk9M4FftUn+BLMXoLXev4exWYG5/r8+te/5Nz+T0vBIu2w7+gIGCg4SFgXwvfoaLjIyILIqNkpOAjymRlAMFm5ybmZV2KHh0naWcepYlo22mradzqUUClK61nJSxIJiMrgm+v664oSKrXqa/yMmmbrkexVXHydK+y2bNULON0dPTppLXGs9UpdzlCaVt4FpsZuTm5ejWwx3iU53v753p89jtnPj49JVRZ2ELgoMHoP0DaE6gF4JjBByciCChEncMucV7yC+DQYoI/y8uzAjvFUddEkGGRHKPZMlN8lCqXGmgpctuJs90XDdzpc2bynJWgSjh40yLP4ECE1pHZs8DB5MqPcd0ClEARlVCjTpy6kadTrWC7KpU4NaDVndeyNqTa4GpSzedBblHbcGUbSmSddlprsokV7HizYtA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Pkt6LeHNjWgBMIa63jXbt/jwLgeMbDHdIxc5H557khzwd7QPFqP+/Pv48+vfz7+///8FAAbIXwIAOw==';
|
|
35940
36107
|
|
|
35941
36108
|
var DayNightPeriod = function DayNightPeriod(_ref) {
|
|
35942
36109
|
var _periodOfDaySrcFiles;
|
|
35943
36110
|
var periodOfDay = _ref.periodOfDay;
|
|
35944
|
-
var periodOfDaySrcFiles = (_periodOfDaySrcFiles = {}, _periodOfDaySrcFiles[PeriodOfDay.Morning] = img$
|
|
36111
|
+
var periodOfDaySrcFiles = (_periodOfDaySrcFiles = {}, _periodOfDaySrcFiles[PeriodOfDay.Morning] = img$a, _periodOfDaySrcFiles[PeriodOfDay.Afternoon] = img$9, _periodOfDaySrcFiles[PeriodOfDay.Night] = img$b, _periodOfDaySrcFiles);
|
|
35945
36112
|
return React.createElement(GifContainer, null, React.createElement("img", {
|
|
35946
36113
|
src: periodOfDaySrcFiles[periodOfDay]
|
|
35947
36114
|
}));
|
|
@@ -35951,7 +36118,7 @@ var GifContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
35951
36118
|
componentId: "sc-10t97fw-0"
|
|
35952
36119
|
})(["width:100%;img{width:67%;}"]);
|
|
35953
36120
|
|
|
35954
|
-
var img$
|
|
36121
|
+
var img$c = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAABHCAYAAAA0qHhdAAAAAXNSR0IArs4c6QAABGRJREFUeJztnb9PGzEUx7+JMjC0Uge6tVsVdTghQP0D2qgjzGz8D8woE2LO/5CNOcwlU9WJRCgDYmWJRAYkFgak6wDv5HPsO9/P8J79WUhicr7nzz3bOV8uHbRPXOXN2x++1LUfYnh4uu8AQK+FulLy7hbHxn96vrh22tjW0b7xPVtH+87bkMbnj1/jh6f7TqfBOmKgurwy6MJ10VRuKqNylwMl7wBy3U5WuetBOhg9om6ZSRaqEtvImJ2zRfL4/GA3eXy494LJzNwBmcpc//9w7wUAMJn1ktdt5bbnaj228qw6VeqWGbctUEXNxn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AnUE2QMoPDPSxSV6ypP2T499EIkUG+gzlnaND5lo0pjv5/Ztljt2l/vRALNBl2q+y2Kj92pjTYaIDXWVZVruPree4nEJhqi6ppokGfhP6xr60VVr5O+AAAAAElFTkSuQmCC';
|
|
35955
36122
|
|
|
35956
36123
|
var TimeWidget = function TimeWidget(_ref) {
|
|
35957
36124
|
var onClose = _ref.onClose,
|
|
@@ -35966,7 +36133,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
35966
36133
|
var WidgetContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35967
36134
|
displayName: "TimeWidget__WidgetContainer",
|
|
35968
36135
|
componentId: "sc-1ja236h-0"
|
|
35969
|
-
})(["background-image:url(", ");background-size:10rem;background-repeat:no-repeat;width:10rem;position:absolute;height:100px;"], img$
|
|
36136
|
+
})(["background-image:url(", ");background-size:10rem;background-repeat:no-repeat;width:10rem;position:absolute;height:100px;"], img$c);
|
|
35970
36137
|
var Time = /*#__PURE__*/styled.div.withConfig({
|
|
35971
36138
|
displayName: "TimeWidget__Time",
|
|
35972
36139
|
componentId: "sc-1ja236h-1"
|
|
@@ -35986,7 +36153,9 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
35986
36153
|
atlasJSON = _ref.atlasJSON,
|
|
35987
36154
|
onQuantityChange = _ref.onQuantityChange,
|
|
35988
36155
|
traderItem = _ref.traderItem,
|
|
35989
|
-
selectedQty = _ref.selectedQty
|
|
36156
|
+
selectedQty = _ref.selectedQty,
|
|
36157
|
+
equipmentSet = _ref.equipmentSet,
|
|
36158
|
+
scale = _ref.scale;
|
|
35990
36159
|
var onLeftClick = function onLeftClick(qty) {
|
|
35991
36160
|
if (qty === void 0) {
|
|
35992
36161
|
qty = 1;
|
|
@@ -35994,22 +36163,28 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
35994
36163
|
onQuantityChange(traderItem, Math.max(0, selectedQty - qty));
|
|
35995
36164
|
};
|
|
35996
36165
|
var onRightClick = function onRightClick(qty) {
|
|
35997
|
-
var _traderItem$
|
|
36166
|
+
var _traderItem$stackQty;
|
|
35998
36167
|
if (qty === void 0) {
|
|
35999
36168
|
qty = 1;
|
|
36000
36169
|
}
|
|
36001
|
-
onQuantityChange(traderItem, Math.min((_traderItem$
|
|
36170
|
+
onQuantityChange(traderItem, Math.min((_traderItem$stackQty = traderItem.stackQty) != null ? _traderItem$stackQty : 999, selectedQty + qty));
|
|
36002
36171
|
};
|
|
36003
|
-
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer$1, null, React.createElement(
|
|
36172
|
+
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer$1, null, React.createElement(ItemInfoWrapper, {
|
|
36173
|
+
atlasIMG: atlasIMG,
|
|
36174
|
+
atlasJSON: atlasJSON,
|
|
36175
|
+
equipmentSet: equipmentSet,
|
|
36176
|
+
item: traderItem,
|
|
36177
|
+
scale: scale
|
|
36178
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
36004
36179
|
atlasIMG: atlasIMG,
|
|
36005
36180
|
atlasJSON: atlasJSON,
|
|
36006
36181
|
spriteKey: getItemTextureKeyPath({
|
|
36007
36182
|
key: traderItem.key,
|
|
36008
|
-
stackQty: traderItem.
|
|
36183
|
+
stackQty: traderItem.stackQty || 1,
|
|
36009
36184
|
texturePath: traderItem.texturePath
|
|
36010
36185
|
}, atlasJSON),
|
|
36011
36186
|
imgScale: 2.5
|
|
36012
|
-
}))), React.createElement(ItemNameContainer, null, React.createElement(NameValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
36187
|
+
})))), React.createElement(ItemNameContainer, null, React.createElement(NameValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
36013
36188
|
maxLines: 1,
|
|
36014
36189
|
maxWidth: "250px"
|
|
36015
36190
|
}, capitalize(traderItem.name))), React.createElement("p", null, "$", traderItem.price))), React.createElement(QuantityContainer, null, React.createElement(SelectArrow, {
|
|
@@ -36082,7 +36257,9 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36082
36257
|
atlasJSON = _ref.atlasJSON,
|
|
36083
36258
|
atlasIMG = _ref.atlasIMG,
|
|
36084
36259
|
characterAvailableGold = _ref.characterAvailableGold,
|
|
36085
|
-
onConfirm = _ref.onConfirm
|
|
36260
|
+
onConfirm = _ref.onConfirm,
|
|
36261
|
+
equipmentSet = _ref.equipmentSet,
|
|
36262
|
+
scale = _ref.scale;
|
|
36086
36263
|
var _useState = useState(0),
|
|
36087
36264
|
sum = _useState[0],
|
|
36088
36265
|
setSum = _useState[1];
|
|
@@ -36140,7 +36317,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36140
36317
|
style: {
|
|
36141
36318
|
width: '100%'
|
|
36142
36319
|
}
|
|
36143
|
-
}, React.createElement(Title$
|
|
36320
|
+
}, React.createElement(Title$8, null, Capitalize(type), " Menu"), React.createElement("hr", {
|
|
36144
36321
|
className: "golden"
|
|
36145
36322
|
})), React.createElement(TradingComponentScrollWrapper, {
|
|
36146
36323
|
id: "TraderContainer"
|
|
@@ -36153,7 +36330,9 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36153
36330
|
atlasJSON: atlasJSON,
|
|
36154
36331
|
onQuantityChange: onQuantityChange,
|
|
36155
36332
|
traderItem: tradeItem,
|
|
36156
|
-
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
|
|
36333
|
+
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0,
|
|
36334
|
+
equipmentSet: equipmentSet,
|
|
36335
|
+
scale: scale
|
|
36157
36336
|
}));
|
|
36158
36337
|
})), React.createElement(GoldWrapper, null, React.createElement("p", null, "Available Gold:"), React.createElement("p", null, "$", characterAvailableGold)), React.createElement(TotalWrapper, null, React.createElement("p", null, "Total:"), React.createElement("p", null, "$", sum)), !hasGoldForSale() ? React.createElement(AlertWrapper, null, React.createElement("p", null, " Sorry, not enough money.")) : React.createElement(GoldWrapper, null, React.createElement("p", null, "Final Gold:"), React.createElement("p", null, "$", getFinalGold())), React.createElement(ButtonWrapper$2, null, React.createElement(Button, {
|
|
36159
36338
|
buttonType: ButtonTypes.RPGUIButton,
|
|
@@ -36168,7 +36347,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36168
36347
|
}
|
|
36169
36348
|
}, "Cancel"))));
|
|
36170
36349
|
};
|
|
36171
|
-
var Title$
|
|
36350
|
+
var Title$8 = /*#__PURE__*/styled.h1.withConfig({
|
|
36172
36351
|
displayName: "TradingMenu__Title",
|
|
36173
36352
|
componentId: "sc-1wjsz1l-0"
|
|
36174
36353
|
})(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
|
|
@@ -36213,5 +36392,219 @@ var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
|
36213
36392
|
return props.maxLines;
|
|
36214
36393
|
});
|
|
36215
36394
|
|
|
36216
|
-
|
|
36395
|
+
var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
|
|
36396
|
+
|
|
36397
|
+
var chunkString = function chunkString(str, length) {
|
|
36398
|
+
return str.match(new RegExp('.{1,' + length + '}', 'g'));
|
|
36399
|
+
};
|
|
36400
|
+
|
|
36401
|
+
var img$d = 'data:image/gif;base64,R0lGODlhEAAQAPIAAAAAABQYLiw1TUBJc2hvmQAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAM9CLrc/lCFGSKYJJP5AhlguDnBMIVgxXgmJapSSp3mKs/pKrT0IMCXUk+2Cgh2oSOnaDz+lswZpSOFUq2KBAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAIzhI+py90Bg4OjDrjCELxfFQhQx0mIJkaeaYRp5LJADMdnqXbyOJLYTdKBejjZoRaZJBMFACH/C0ltYWdlTWFnaWNrDWdhbW1hPTAuNDU0NTUAIfkEARQAAAAsAAAAABAAEAAAAjKEj6nL7Y+CDE6OO+QKQ/ifKYEgfR4VddPohQe7lmR0xidNTib65uacYP2AQWGuMlEUAAA7';
|
|
36402
|
+
|
|
36403
|
+
var NPCDialogText = function NPCDialogText(_ref) {
|
|
36404
|
+
var text = _ref.text,
|
|
36405
|
+
onClose = _ref.onClose,
|
|
36406
|
+
onEndStep = _ref.onEndStep,
|
|
36407
|
+
onStartStep = _ref.onStartStep,
|
|
36408
|
+
type = _ref.type;
|
|
36409
|
+
var windowSize = useRef([window.innerWidth, window.innerHeight]);
|
|
36410
|
+
function maxCharacters(width) {
|
|
36411
|
+
// Set the font size to 16 pixels
|
|
36412
|
+
var fontSize = 11.2;
|
|
36413
|
+
// Calculate the number of characters that can fit in one line
|
|
36414
|
+
var charactersPerLine = Math.floor(width / 2 / fontSize);
|
|
36415
|
+
// Calculate the number of lines that can fit in the div
|
|
36416
|
+
var linesPerDiv = Math.floor(180 / fontSize);
|
|
36417
|
+
// Calculate the maximum number of characters that can fit in the div
|
|
36418
|
+
var maxCharacters = charactersPerLine * linesPerDiv;
|
|
36419
|
+
// Return the maximum number of characters
|
|
36420
|
+
return Math.round(maxCharacters / 5);
|
|
36421
|
+
}
|
|
36422
|
+
var textChunks = chunkString(text, maxCharacters(windowSize.current[0]));
|
|
36423
|
+
var _useState = useState(0),
|
|
36424
|
+
chunkIndex = _useState[0],
|
|
36425
|
+
setChunkIndex = _useState[1];
|
|
36426
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
36427
|
+
if (event.code === 'Space') {
|
|
36428
|
+
goToNextStep();
|
|
36429
|
+
}
|
|
36430
|
+
};
|
|
36431
|
+
var goToNextStep = function goToNextStep() {
|
|
36432
|
+
var hasNextChunk = (textChunks == null ? void 0 : textChunks[chunkIndex + 1]) || false;
|
|
36433
|
+
if (hasNextChunk) {
|
|
36434
|
+
setChunkIndex(function (prev) {
|
|
36435
|
+
return prev + 1;
|
|
36436
|
+
});
|
|
36437
|
+
} else {
|
|
36438
|
+
// if there's no more text chunks, close the dialog
|
|
36439
|
+
onClose();
|
|
36440
|
+
}
|
|
36441
|
+
};
|
|
36442
|
+
useEffect(function () {
|
|
36443
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
36444
|
+
return function () {
|
|
36445
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
36446
|
+
};
|
|
36447
|
+
}, [chunkIndex]);
|
|
36448
|
+
var _useState2 = useState(false),
|
|
36449
|
+
showGoNextIndicator = _useState2[0],
|
|
36450
|
+
setShowGoNextIndicator = _useState2[1];
|
|
36451
|
+
return React.createElement(Container$m, null, React.createElement(DynamicText, {
|
|
36452
|
+
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
36453
|
+
onFinish: function onFinish() {
|
|
36454
|
+
setShowGoNextIndicator(true);
|
|
36455
|
+
onEndStep && onEndStep();
|
|
36456
|
+
},
|
|
36457
|
+
onStart: function onStart() {
|
|
36458
|
+
setShowGoNextIndicator(false);
|
|
36459
|
+
onStartStep && onStartStep();
|
|
36460
|
+
}
|
|
36461
|
+
}), showGoNextIndicator && React.createElement(PressSpaceIndicator$1, {
|
|
36462
|
+
right: type === NPCDialogType.TextOnly ? '1rem' : '10.5rem',
|
|
36463
|
+
src: IS_MOBILE_OR_TABLET ? img$d : img$7,
|
|
36464
|
+
onPointerDown: function onPointerDown() {
|
|
36465
|
+
goToNextStep();
|
|
36466
|
+
}
|
|
36467
|
+
}));
|
|
36468
|
+
};
|
|
36469
|
+
var Container$m = /*#__PURE__*/styled.div.withConfig({
|
|
36470
|
+
displayName: "NPCDialogText__Container",
|
|
36471
|
+
componentId: "sc-1cxkdh9-0"
|
|
36472
|
+
})([""]);
|
|
36473
|
+
var PressSpaceIndicator$1 = /*#__PURE__*/styled.img.withConfig({
|
|
36474
|
+
displayName: "NPCDialogText__PressSpaceIndicator",
|
|
36475
|
+
componentId: "sc-1cxkdh9-1"
|
|
36476
|
+
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref2) {
|
|
36477
|
+
var right = _ref2.right;
|
|
36478
|
+
return right;
|
|
36479
|
+
});
|
|
36480
|
+
|
|
36481
|
+
var NPCDialogType;
|
|
36482
|
+
(function (NPCDialogType) {
|
|
36483
|
+
NPCDialogType["TextOnly"] = "TextOnly";
|
|
36484
|
+
NPCDialogType["TextAndThumbnail"] = "TextAndThumbnail";
|
|
36485
|
+
})(NPCDialogType || (NPCDialogType = {}));
|
|
36486
|
+
var NPCDialog = function NPCDialog(_ref) {
|
|
36487
|
+
var text = _ref.text,
|
|
36488
|
+
type = _ref.type,
|
|
36489
|
+
_onClose = _ref.onClose,
|
|
36490
|
+
imagePath = _ref.imagePath,
|
|
36491
|
+
_ref$isQuestionDialog = _ref.isQuestionDialog,
|
|
36492
|
+
isQuestionDialog = _ref$isQuestionDialog === void 0 ? false : _ref$isQuestionDialog,
|
|
36493
|
+
questions = _ref.questions,
|
|
36494
|
+
answers = _ref.answers;
|
|
36495
|
+
return React.createElement(RPGUIContainer, {
|
|
36496
|
+
type: RPGUIContainerTypes.FramedGold,
|
|
36497
|
+
width: isQuestionDialog ? '600px' : '80%',
|
|
36498
|
+
height: '180px'
|
|
36499
|
+
}, isQuestionDialog && questions && answers ? React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
|
|
36500
|
+
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
36501
|
+
}, React.createElement(QuestionDialog, {
|
|
36502
|
+
questions: questions,
|
|
36503
|
+
answers: answers,
|
|
36504
|
+
onClose: function onClose() {
|
|
36505
|
+
if (_onClose) {
|
|
36506
|
+
_onClose();
|
|
36507
|
+
}
|
|
36508
|
+
}
|
|
36509
|
+
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
36510
|
+
src: imagePath || img$6
|
|
36511
|
+
}))) : React.createElement(React.Fragment, null, React.createElement(Container$n, null, React.createElement(TextContainer$2, {
|
|
36512
|
+
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
36513
|
+
}, React.createElement(NPCDialogText, {
|
|
36514
|
+
type: type,
|
|
36515
|
+
text: text || 'No text provided.',
|
|
36516
|
+
onClose: function onClose() {
|
|
36517
|
+
if (_onClose) {
|
|
36518
|
+
_onClose();
|
|
36519
|
+
}
|
|
36520
|
+
}
|
|
36521
|
+
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
36522
|
+
src: imagePath || img$6
|
|
36523
|
+
})))));
|
|
36524
|
+
};
|
|
36525
|
+
var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
36526
|
+
displayName: "NPCDialog__Container",
|
|
36527
|
+
componentId: "sc-1b4aw74-0"
|
|
36528
|
+
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
36529
|
+
var TextContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
36530
|
+
displayName: "NPCDialog__TextContainer",
|
|
36531
|
+
componentId: "sc-1b4aw74-1"
|
|
36532
|
+
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
36533
|
+
var flex = _ref2.flex;
|
|
36534
|
+
return flex;
|
|
36535
|
+
});
|
|
36536
|
+
var ThumbnailContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
36537
|
+
displayName: "NPCDialog__ThumbnailContainer",
|
|
36538
|
+
componentId: "sc-1b4aw74-2"
|
|
36539
|
+
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
36540
|
+
var NPCThumbnail$1 = /*#__PURE__*/styled.img.withConfig({
|
|
36541
|
+
displayName: "NPCDialog__NPCThumbnail",
|
|
36542
|
+
componentId: "sc-1b4aw74-3"
|
|
36543
|
+
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
36544
|
+
|
|
36545
|
+
var HistoryDialog = function HistoryDialog(_ref) {
|
|
36546
|
+
var backgroundImgPath = _ref.backgroundImgPath,
|
|
36547
|
+
fullCoverBackground = _ref.fullCoverBackground,
|
|
36548
|
+
questions = _ref.questions,
|
|
36549
|
+
answers = _ref.answers,
|
|
36550
|
+
text = _ref.text,
|
|
36551
|
+
imagePath = _ref.imagePath,
|
|
36552
|
+
textAndTypeArray = _ref.textAndTypeArray,
|
|
36553
|
+
onClose = _ref.onClose;
|
|
36554
|
+
var _useState = useState(0),
|
|
36555
|
+
img = _useState[0],
|
|
36556
|
+
setImage = _useState[1];
|
|
36557
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
36558
|
+
if (event.code === 'Space') {
|
|
36559
|
+
if (img < (backgroundImgPath == null ? void 0 : backgroundImgPath.length) - 1) {
|
|
36560
|
+
setImage(function (prev) {
|
|
36561
|
+
return prev + 1;
|
|
36562
|
+
});
|
|
36563
|
+
} else {
|
|
36564
|
+
// if there's no more text chunks, close the dialog
|
|
36565
|
+
onClose();
|
|
36566
|
+
}
|
|
36567
|
+
}
|
|
36568
|
+
};
|
|
36569
|
+
useEffect(function () {
|
|
36570
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
36571
|
+
return function () {
|
|
36572
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
36573
|
+
};
|
|
36574
|
+
}, [backgroundImgPath]);
|
|
36575
|
+
return React.createElement(BackgroundContainer, {
|
|
36576
|
+
imgPath: backgroundImgPath[img],
|
|
36577
|
+
fullImg: fullCoverBackground
|
|
36578
|
+
}, React.createElement(DialogContainer, null, textAndTypeArray ? React.createElement(NPCMultiDialog, {
|
|
36579
|
+
textAndTypeArray: textAndTypeArray,
|
|
36580
|
+
onClose: onClose
|
|
36581
|
+
}) : questions && answers ? React.createElement(QuestionDialog, {
|
|
36582
|
+
questions: questions,
|
|
36583
|
+
answers: answers,
|
|
36584
|
+
onClose: onClose
|
|
36585
|
+
}) : text && imagePath ? React.createElement(NPCDialog, {
|
|
36586
|
+
text: text,
|
|
36587
|
+
imagePath: imagePath,
|
|
36588
|
+
onClose: onClose,
|
|
36589
|
+
type: NPCDialogType.TextAndThumbnail
|
|
36590
|
+
}) : React.createElement(NPCDialog, {
|
|
36591
|
+
text: text,
|
|
36592
|
+
onClose: onClose,
|
|
36593
|
+
type: NPCDialogType.TextOnly
|
|
36594
|
+
})));
|
|
36595
|
+
};
|
|
36596
|
+
var BackgroundContainer = /*#__PURE__*/styled.div.withConfig({
|
|
36597
|
+
displayName: "HistoryDialog__BackgroundContainer",
|
|
36598
|
+
componentId: "sc-u6oe75-0"
|
|
36599
|
+
})(["width:100%;height:100%;background-image:url(", ");background-size:", ";display:flex;justify-content:space-evenly;align-items:center;"], function (props) {
|
|
36600
|
+
return props.imgPath;
|
|
36601
|
+
}, function (props) {
|
|
36602
|
+
return props.imgPath ? 'cover' : 'auto';
|
|
36603
|
+
});
|
|
36604
|
+
var DialogContainer = /*#__PURE__*/styled.div.withConfig({
|
|
36605
|
+
displayName: "HistoryDialog__DialogContainer",
|
|
36606
|
+
componentId: "sc-u6oe75-1"
|
|
36607
|
+
})(["display:flex;justify-content:center;padding-top:200px;"]);
|
|
36608
|
+
|
|
36609
|
+
export { Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, CheckButton, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, HistoryDialog, ImgSide, Input, InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, ListMenu, NPCDialog, NPCDialogType, NPCMultiDialog, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, rarityColor, useEventListener };
|
|
36217
36610
|
//# sourceMappingURL=long-bow.esm.js.map
|