@rpg-engine/long-bow 0.3.73 → 0.3.76
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 +1400 -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 +1402 -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 +246 -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 +248 -0
- package/src/components/Item/Cards/ItemInfoDisplay.tsx +123 -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 +105 -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,69 @@ 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 = '1';
|
|
33430
|
+
}
|
|
33431
|
+
return;
|
|
33432
|
+
}, []);
|
|
33433
|
+
return React.createElement(Container$9, {
|
|
33434
|
+
ref: ref,
|
|
33435
|
+
onTouchEnd: function onTouchEnd(e) {
|
|
33436
|
+
e.stopPropagation();
|
|
33437
|
+
closeTooltip();
|
|
33438
|
+
},
|
|
33439
|
+
scale: scale
|
|
33440
|
+
}, React.createElement(ItemInfoDisplay, {
|
|
33441
|
+
item: item,
|
|
33442
|
+
atlasIMG: atlasIMG,
|
|
33443
|
+
atlasJSON: atlasJSON,
|
|
33444
|
+
equipmentSet: equipmentSet,
|
|
33445
|
+
isMobile: true
|
|
33446
|
+
}), React.createElement(OptionsContainer, null, options == null ? void 0 : options.map(function (option) {
|
|
33447
|
+
return React.createElement(Option, {
|
|
33448
|
+
key: option.id,
|
|
33449
|
+
onTouchEnd: function onTouchEnd() {
|
|
33450
|
+
return onSelected == null ? void 0 : onSelected(option.id);
|
|
33451
|
+
}
|
|
33452
|
+
}, option.text);
|
|
33453
|
+
})));
|
|
33607
33454
|
};
|
|
33608
33455
|
var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
33609
|
-
displayName: "
|
|
33610
|
-
componentId: "sc-
|
|
33611
|
-
})(["z-index:
|
|
33456
|
+
displayName: "MobileItemTooltip__Container",
|
|
33457
|
+
componentId: "sc-ku4p1j-0"
|
|
33458
|
+
})(["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;"], function (_ref2) {
|
|
33459
|
+
var scale = _ref2.scale;
|
|
33460
|
+
return "calc(100vw * 100 / " + scale * 100 + ")";
|
|
33461
|
+
}, function (_ref3) {
|
|
33462
|
+
var scale = _ref3.scale;
|
|
33463
|
+
return "calc(100vh * 100 / " + scale * 100 + ")";
|
|
33464
|
+
});
|
|
33465
|
+
var OptionsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
33466
|
+
displayName: "MobileItemTooltip__OptionsContainer",
|
|
33467
|
+
componentId: "sc-ku4p1j-1"
|
|
33468
|
+
})(["display:flex;flex-direction:column;margin-left:2rem;gap:1rem;"]);
|
|
33469
|
+
var Option = /*#__PURE__*/styled.button.withConfig({
|
|
33470
|
+
displayName: "MobileItemTooltip__Option",
|
|
33471
|
+
componentId: "sc-ku4p1j-2"
|
|
33472
|
+
})(["padding:1rem;background-color:", ";border:none;border-radius:3px;"], uiColors.lightGray);
|
|
33612
33473
|
|
|
33613
33474
|
var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
|
|
33614
33475
|
var contextMenu = actionsByTypeList.map(function (action) {
|
|
@@ -33744,32 +33605,36 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33744
33605
|
openQuantitySelector = _ref.openQuantitySelector,
|
|
33745
33606
|
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
|
|
33746
33607
|
dragScale = _ref.dragScale,
|
|
33747
|
-
isSelectingShortcut = _ref.isSelectingShortcut
|
|
33608
|
+
isSelectingShortcut = _ref.isSelectingShortcut,
|
|
33609
|
+
equipmentSet = _ref.equipmentSet;
|
|
33748
33610
|
var _useState = useState(false),
|
|
33749
33611
|
isTooltipVisible = _useState[0],
|
|
33750
33612
|
setTooltipVisible = _useState[1];
|
|
33751
33613
|
var _useState2 = useState(false),
|
|
33752
|
-
|
|
33753
|
-
|
|
33614
|
+
isTooltipMobileVisible = _useState2[0],
|
|
33615
|
+
setIsTooltipMobileVisible = _useState2[1];
|
|
33754
33616
|
var _useState3 = useState(false),
|
|
33755
|
-
|
|
33756
|
-
|
|
33617
|
+
isContextMenuVisible = _useState3[0],
|
|
33618
|
+
setIsContextMenuVisible = _useState3[1];
|
|
33757
33619
|
var _useState4 = useState(false),
|
|
33758
|
-
|
|
33759
|
-
|
|
33760
|
-
var _useState5 = useState(
|
|
33620
|
+
isFocused = _useState4[0],
|
|
33621
|
+
setIsFocused = _useState4[1];
|
|
33622
|
+
var _useState5 = useState(false),
|
|
33623
|
+
wasDragged = _useState5[0],
|
|
33624
|
+
setWasDragged = _useState5[1];
|
|
33625
|
+
var _useState6 = useState({
|
|
33761
33626
|
x: 0,
|
|
33762
33627
|
y: 0
|
|
33763
33628
|
}),
|
|
33764
|
-
dragPosition =
|
|
33765
|
-
setDragPosition =
|
|
33766
|
-
var
|
|
33767
|
-
dropPosition =
|
|
33768
|
-
setDropPosition =
|
|
33629
|
+
dragPosition = _useState6[0],
|
|
33630
|
+
setDragPosition = _useState6[1];
|
|
33631
|
+
var _useState7 = useState(null),
|
|
33632
|
+
dropPosition = _useState7[0],
|
|
33633
|
+
setDropPosition = _useState7[1];
|
|
33769
33634
|
var dragContainer = useRef(null);
|
|
33770
|
-
var
|
|
33771
|
-
contextActions =
|
|
33772
|
-
setContextActions =
|
|
33635
|
+
var _useState8 = useState([]),
|
|
33636
|
+
contextActions = _useState8[0],
|
|
33637
|
+
setContextActions = _useState8[1];
|
|
33773
33638
|
useEffect(function () {
|
|
33774
33639
|
setDragPosition({
|
|
33775
33640
|
x: 0,
|
|
@@ -33818,7 +33683,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33818
33683
|
texturePath: itemToRender.texturePath,
|
|
33819
33684
|
stackQty: itemToRender.stackQty || 1
|
|
33820
33685
|
}, atlasJSON),
|
|
33821
|
-
imgScale: 3
|
|
33686
|
+
imgScale: 3,
|
|
33687
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
33822
33688
|
})));
|
|
33823
33689
|
}
|
|
33824
33690
|
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 +33709,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33843
33709
|
texturePath: itemToRender.texturePath,
|
|
33844
33710
|
stackQty: itemToRender.stackQty || 1
|
|
33845
33711
|
}, atlasJSON),
|
|
33846
|
-
imgScale: 3
|
|
33712
|
+
imgScale: 3,
|
|
33713
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
33847
33714
|
})));
|
|
33848
33715
|
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
33716
|
if (stackInfo) {
|
|
@@ -33860,7 +33727,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33860
33727
|
spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
|
|
33861
33728
|
imgScale: 3,
|
|
33862
33729
|
grayScale: true,
|
|
33863
|
-
opacity: 0.4
|
|
33730
|
+
opacity: 0.4,
|
|
33731
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
33864
33732
|
}));
|
|
33865
33733
|
}
|
|
33866
33734
|
};
|
|
@@ -33953,7 +33821,12 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33953
33821
|
}
|
|
33954
33822
|
}, 100);
|
|
33955
33823
|
} else if (item) {
|
|
33956
|
-
|
|
33824
|
+
var isTouch = false;
|
|
33825
|
+
if (e.type === 'touchend' && !isSelectingShortcut) {
|
|
33826
|
+
isTouch = true;
|
|
33827
|
+
setIsTooltipMobileVisible(true);
|
|
33828
|
+
}
|
|
33829
|
+
if (!isContextMenuDisabled && !isSelectingShortcut && !isTouch) setIsContextMenuVisible(!isContextMenuVisible);
|
|
33957
33830
|
onPointerDown(item.type, containerType, item);
|
|
33958
33831
|
}
|
|
33959
33832
|
},
|
|
@@ -33989,7 +33862,26 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33989
33862
|
setTooltipVisible(false);
|
|
33990
33863
|
}
|
|
33991
33864
|
}, onRenderSlot(item))), isTooltipVisible && item && !isFocused && React.createElement(ItemTooltip, {
|
|
33992
|
-
|
|
33865
|
+
item: item,
|
|
33866
|
+
atlasIMG: atlasIMG,
|
|
33867
|
+
atlasJSON: atlasJSON,
|
|
33868
|
+
equipmentSet: equipmentSet
|
|
33869
|
+
}), isTooltipMobileVisible && item && React.createElement(MobileItemTooltip, {
|
|
33870
|
+
item: item,
|
|
33871
|
+
atlasIMG: atlasIMG,
|
|
33872
|
+
atlasJSON: atlasJSON,
|
|
33873
|
+
equipmentSet: equipmentSet,
|
|
33874
|
+
closeTooltip: function closeTooltip() {
|
|
33875
|
+
setIsTooltipMobileVisible(false);
|
|
33876
|
+
},
|
|
33877
|
+
scale: dragScale,
|
|
33878
|
+
options: contextActions,
|
|
33879
|
+
onSelected: function onSelected(optionId) {
|
|
33880
|
+
setIsContextMenuVisible(false);
|
|
33881
|
+
if (item) {
|
|
33882
|
+
_onSelected(optionId, item);
|
|
33883
|
+
}
|
|
33884
|
+
}
|
|
33993
33885
|
}), !isContextMenuDisabled && isContextMenuVisible && contextActions && React.createElement(RelativeListMenu, {
|
|
33994
33886
|
options: contextActions,
|
|
33995
33887
|
onSelected: function onSelected(optionId) {
|
|
@@ -34014,13 +33906,13 @@ var rarityColor = function rarityColor(item) {
|
|
|
34014
33906
|
case ItemRarities.Legendary:
|
|
34015
33907
|
return 'rgba(255, 191, 0,0.6)';
|
|
34016
33908
|
default:
|
|
34017
|
-
return
|
|
33909
|
+
return null;
|
|
34018
33910
|
}
|
|
34019
33911
|
};
|
|
34020
33912
|
var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
34021
33913
|
displayName: "ItemSlot__Container",
|
|
34022
33914
|
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) {
|
|
33915
|
+
})(["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
33916
|
var item = _ref2.item;
|
|
34025
33917
|
return rarityColor(item);
|
|
34026
33918
|
}, function (_ref3) {
|
|
@@ -34048,639 +33940,582 @@ var ItemQty = /*#__PURE__*/styled.span.withConfig({
|
|
|
34048
33940
|
componentId: "sc-l2j5ef-3"
|
|
34049
33941
|
})(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
|
|
34050
33942
|
|
|
34051
|
-
var
|
|
34052
|
-
|
|
34053
|
-
|
|
34054
|
-
|
|
34055
|
-
|
|
34056
|
-
|
|
33943
|
+
var statisticsToDisplay = [{
|
|
33944
|
+
key: 'attack'
|
|
33945
|
+
}, {
|
|
33946
|
+
key: 'defense'
|
|
33947
|
+
}, {
|
|
33948
|
+
key: 'maxRange',
|
|
33949
|
+
label: 'Range'
|
|
33950
|
+
}, {
|
|
33951
|
+
key: 'weight',
|
|
33952
|
+
higherIsWorse: true
|
|
33953
|
+
}];
|
|
33954
|
+
var ItemInfo = function ItemInfo(_ref) {
|
|
33955
|
+
var _item$stackQty;
|
|
33956
|
+
var item = _ref.item,
|
|
33957
|
+
itemToCompare = _ref.itemToCompare,
|
|
34057
33958
|
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
|
-
},
|
|
33959
|
+
atlasJSON = _ref.atlasJSON;
|
|
33960
|
+
var renderStatistics = function renderStatistics() {
|
|
33961
|
+
var statistics = [];
|
|
33962
|
+
for (var _i = 0, _statisticsToDisplay = statisticsToDisplay; _i < _statisticsToDisplay.length; _i++) {
|
|
33963
|
+
var stat = _statisticsToDisplay[_i];
|
|
33964
|
+
var itemStatistic = item[stat.key];
|
|
33965
|
+
if (itemStatistic) {
|
|
33966
|
+
var _itemToCompare$stat$k, _itemToCompare$stat$k2;
|
|
33967
|
+
var label = stat.label || stat.key[0].toUpperCase() + stat.key.slice(1);
|
|
33968
|
+
var isItemToCompare = !!itemToCompare;
|
|
33969
|
+
var isOnlyInOneItem = isItemToCompare && !(itemToCompare != null && itemToCompare[stat.key]);
|
|
33970
|
+
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');
|
|
33971
|
+
var isDifference = isItemToCompare && statDiff !== 0;
|
|
33972
|
+
var isBetter = statDiff > 0 && !stat.higherIsWorse || statDiff < 0 && stat.higherIsWorse;
|
|
33973
|
+
statistics.push(React.createElement(Statistic, {
|
|
33974
|
+
key: stat.key,
|
|
33975
|
+
className: isOnlyInOneItem ? 'better' : ''
|
|
33976
|
+
}, React.createElement("div", {
|
|
33977
|
+
className: "label"
|
|
33978
|
+
}, label, ":"), React.createElement("div", {
|
|
33979
|
+
className: "value " + (isDifference ? isBetter ? 'better' : 'worse' : '')
|
|
33980
|
+
}, itemStatistic.toString() + " " + (isDifference ? "(" + (statDiff > 0 ? '+' : '') + statDiff + ")" : ''))));
|
|
33981
|
+
}
|
|
33982
|
+
}
|
|
33983
|
+
return statistics;
|
|
33984
|
+
};
|
|
33985
|
+
var renderMissingStatistic = function renderMissingStatistic() {
|
|
33986
|
+
var statistics = [];
|
|
33987
|
+
for (var _i2 = 0, _statisticsToDisplay2 = statisticsToDisplay; _i2 < _statisticsToDisplay2.length; _i2++) {
|
|
33988
|
+
var stat = _statisticsToDisplay2[_i2];
|
|
33989
|
+
var itemToCompareStatistic = itemToCompare == null ? void 0 : itemToCompare[stat.key];
|
|
33990
|
+
if (itemToCompareStatistic && !item[stat.key]) {
|
|
33991
|
+
var label = stat.label || stat.key[0].toUpperCase() + stat.key.slice(1);
|
|
33992
|
+
statistics.push(React.createElement(Statistic, {
|
|
33993
|
+
key: stat.key,
|
|
33994
|
+
className: "worse"
|
|
33995
|
+
}, React.createElement("div", {
|
|
33996
|
+
className: "label"
|
|
33997
|
+
}, label, ":"), React.createElement("div", {
|
|
33998
|
+
className: "value worse"
|
|
33999
|
+
}, itemToCompareStatistic.toString())));
|
|
34000
|
+
}
|
|
34001
|
+
}
|
|
34002
|
+
return statistics;
|
|
34003
|
+
};
|
|
34004
|
+
var renderAvaibleSlots = function renderAvaibleSlots() {
|
|
34005
|
+
if (!item.allowedEquipSlotType) return null;
|
|
34006
|
+
return item.allowedEquipSlotType.map(function (slotType, index) {
|
|
34007
|
+
return React.createElement(ErrorBoundary, {
|
|
34008
|
+
key: index
|
|
34009
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
34119
34010
|
atlasIMG: atlasIMG,
|
|
34120
|
-
atlasJSON: atlasJSON
|
|
34121
|
-
|
|
34011
|
+
atlasJSON: atlasJSON,
|
|
34012
|
+
spriteKey: EquipmentSlotSpriteByType[slotType],
|
|
34013
|
+
imgScale: 2,
|
|
34014
|
+
grayScale: true,
|
|
34015
|
+
opacity: 0.4,
|
|
34016
|
+
containerStyle: {
|
|
34017
|
+
width: '32px',
|
|
34018
|
+
height: '32px'
|
|
34019
|
+
}
|
|
34020
|
+
}));
|
|
34122
34021
|
});
|
|
34123
34022
|
};
|
|
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))));
|
|
34023
|
+
return React.createElement(Container$b, {
|
|
34024
|
+
item: item
|
|
34025
|
+
}, React.createElement(Header, null, React.createElement("div", null, React.createElement(Title$1, null, item.name), item.rarity !== 'Common' && React.createElement(Rarity, {
|
|
34026
|
+
item: item
|
|
34027
|
+
}, 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
34028
|
};
|
|
34136
|
-
var
|
|
34137
|
-
displayName: "
|
|
34138
|
-
componentId: "sc-
|
|
34139
|
-
})(["
|
|
34140
|
-
var
|
|
34141
|
-
|
|
34142
|
-
|
|
34143
|
-
})
|
|
34144
|
-
|
|
34145
|
-
|
|
34029
|
+
var Container$b = /*#__PURE__*/styled.div.withConfig({
|
|
34030
|
+
displayName: "ItemInfo__Container",
|
|
34031
|
+
componentId: "sc-1xm4q8k-0"
|
|
34032
|
+
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;width:max-content;font-size:", ";border:3px solid ", ";"], uiFonts.size.small, function (_ref2) {
|
|
34033
|
+
var _rarityColor;
|
|
34034
|
+
var item = _ref2.item;
|
|
34035
|
+
return (_rarityColor = rarityColor(item)) != null ? _rarityColor : uiColors.lightGray;
|
|
34036
|
+
});
|
|
34037
|
+
var Title$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34038
|
+
displayName: "ItemInfo__Title",
|
|
34039
|
+
componentId: "sc-1xm4q8k-1"
|
|
34040
|
+
})(["font-size:", ";font-weight:bold;margin-bottom:0.5rem;display:flex;align-items:center;margin:0;"], uiFonts.size.medium);
|
|
34041
|
+
var Rarity = /*#__PURE__*/styled.div.withConfig({
|
|
34042
|
+
displayName: "ItemInfo__Rarity",
|
|
34043
|
+
componentId: "sc-1xm4q8k-2"
|
|
34044
|
+
})(["font-size:", ";font-weight:normal;margin-top:0.2rem;color:", ";filter:brightness(1.5);"], uiFonts.size.small, function (_ref3) {
|
|
34045
|
+
var item = _ref3.item;
|
|
34046
|
+
return rarityColor(item);
|
|
34047
|
+
});
|
|
34048
|
+
var Type = /*#__PURE__*/styled.div.withConfig({
|
|
34049
|
+
displayName: "ItemInfo__Type",
|
|
34050
|
+
componentId: "sc-1xm4q8k-3"
|
|
34051
|
+
})(["font-size:", ";margin-top:0.2rem;color:", ";"], uiFonts.size.small, uiColors.lightGray);
|
|
34052
|
+
var Statistic = /*#__PURE__*/styled.div.withConfig({
|
|
34053
|
+
displayName: "ItemInfo__Statistic",
|
|
34054
|
+
componentId: "sc-1xm4q8k-4"
|
|
34055
|
+
})(["margin-bottom:0.4rem;.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);
|
|
34056
|
+
var Description = /*#__PURE__*/styled.div.withConfig({
|
|
34057
|
+
displayName: "ItemInfo__Description",
|
|
34058
|
+
componentId: "sc-1xm4q8k-5"
|
|
34059
|
+
})(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;width:max-content;max-width:20rem;"], uiFonts.size.small, uiColors.lightGray);
|
|
34060
|
+
var Header = /*#__PURE__*/styled.div.withConfig({
|
|
34061
|
+
displayName: "ItemInfo__Header",
|
|
34062
|
+
componentId: "sc-1xm4q8k-6"
|
|
34063
|
+
})(["display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem;"]);
|
|
34064
|
+
var AllowedSlots = /*#__PURE__*/styled.div.withConfig({
|
|
34065
|
+
displayName: "ItemInfo__AllowedSlots",
|
|
34066
|
+
componentId: "sc-1xm4q8k-7"
|
|
34067
|
+
})(["display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0.5rem;margin-left:2rem;"]);
|
|
34068
|
+
var StackInfo = /*#__PURE__*/styled.div.withConfig({
|
|
34069
|
+
displayName: "ItemInfo__StackInfo",
|
|
34070
|
+
componentId: "sc-1xm4q8k-8"
|
|
34071
|
+
})(["width:100%;text-align:right;font-size:", ";color:", ";margin-top:1rem;"], uiFonts.size.small, uiColors.orange);
|
|
34072
|
+
var MissingStatistics = /*#__PURE__*/styled.div.withConfig({
|
|
34073
|
+
displayName: "ItemInfo__MissingStatistics",
|
|
34074
|
+
componentId: "sc-1xm4q8k-9"
|
|
34075
|
+
})(["margin-top:1rem;color:", ";"], uiColors.cardinal);
|
|
34146
34076
|
|
|
34147
|
-
var
|
|
34148
|
-
|
|
34077
|
+
var itemSlotTypes = ['head', 'neck', 'leftHand', 'rightHand', 'ring', 'legs', 'boot', 'accessory', 'armor', 'inventory'];
|
|
34078
|
+
var getSlotType = function getSlotType(itemSlotTypes, slotType, subType) {
|
|
34079
|
+
if (!itemSlotTypes.includes(slotType)) {
|
|
34080
|
+
return subType;
|
|
34081
|
+
}
|
|
34082
|
+
return slotType;
|
|
34083
|
+
};
|
|
34084
|
+
var ItemInfoDisplay = function ItemInfoDisplay(_ref) {
|
|
34085
|
+
var item = _ref.item,
|
|
34086
|
+
atlasIMG = _ref.atlasIMG,
|
|
34087
|
+
atlasJSON = _ref.atlasJSON,
|
|
34088
|
+
equipmentSet = _ref.equipmentSet,
|
|
34089
|
+
isMobile = _ref.isMobile;
|
|
34090
|
+
var itemToCompare = useMemo(function () {
|
|
34091
|
+
var _item$allowedEquipSlo;
|
|
34092
|
+
if (equipmentSet && (_item$allowedEquipSlo = item.allowedEquipSlotType) != null && _item$allowedEquipSlo.length) {
|
|
34093
|
+
var allowedSlotTypeCamelCase = camelCase(item.allowedEquipSlotType[0]);
|
|
34094
|
+
var itemSubTypeCamelCase = camelCase(item.subType);
|
|
34095
|
+
var slotType = getSlotType(itemSlotTypes, allowedSlotTypeCamelCase, itemSubTypeCamelCase);
|
|
34096
|
+
var itemFromEquipment = equipmentSet[slotType];
|
|
34097
|
+
if (itemFromEquipment && (!item._id || itemFromEquipment._id !== item._id)) {
|
|
34098
|
+
return itemFromEquipment;
|
|
34099
|
+
}
|
|
34100
|
+
}
|
|
34101
|
+
return undefined;
|
|
34102
|
+
}, [equipmentSet, item]);
|
|
34103
|
+
return React.createElement(Flex, {
|
|
34104
|
+
"$isMobile": isMobile
|
|
34105
|
+
}, React.createElement(ItemInfo, {
|
|
34106
|
+
item: item,
|
|
34107
|
+
itemToCompare: itemToCompare,
|
|
34108
|
+
atlasIMG: atlasIMG,
|
|
34109
|
+
atlasJSON: atlasJSON
|
|
34110
|
+
}), itemToCompare && React.createElement(CompareContainer, null, React.createElement(Equipped, null, React.createElement("span", null, "Equipped")), React.createElement(ItemInfo, {
|
|
34111
|
+
item: itemToCompare,
|
|
34112
|
+
itemToCompare: item,
|
|
34113
|
+
atlasIMG: atlasIMG,
|
|
34114
|
+
atlasJSON: atlasJSON
|
|
34115
|
+
})));
|
|
34149
34116
|
};
|
|
34117
|
+
var Flex = /*#__PURE__*/styled.div.withConfig({
|
|
34118
|
+
displayName: "ItemInfoDisplay__Flex",
|
|
34119
|
+
componentId: "sc-1lftdo8-0"
|
|
34120
|
+
})(["display:flex;gap:0.5rem;flex-direction:", ";"], function (_ref2) {
|
|
34121
|
+
var $isMobile = _ref2.$isMobile;
|
|
34122
|
+
return $isMobile ? 'row-reverse' : 'row';
|
|
34123
|
+
});
|
|
34124
|
+
var Equipped = /*#__PURE__*/styled.div.withConfig({
|
|
34125
|
+
displayName: "ItemInfoDisplay__Equipped",
|
|
34126
|
+
componentId: "sc-1lftdo8-1"
|
|
34127
|
+
})(["position:absolute;bottom:100%;left:50%;transform:translateX(-50%);"]);
|
|
34128
|
+
var CompareContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34129
|
+
displayName: "ItemInfoDisplay__CompareContainer",
|
|
34130
|
+
componentId: "sc-1lftdo8-2"
|
|
34131
|
+
})(["position:relative;"]);
|
|
34150
34132
|
|
|
34151
|
-
var
|
|
34152
|
-
|
|
34153
|
-
|
|
34154
|
-
|
|
34155
|
-
|
|
34156
|
-
|
|
34157
|
-
|
|
34133
|
+
var offset = 20;
|
|
34134
|
+
var ItemTooltip = function ItemTooltip(_ref) {
|
|
34135
|
+
var item = _ref.item,
|
|
34136
|
+
atlasIMG = _ref.atlasIMG,
|
|
34137
|
+
atlasJSON = _ref.atlasJSON,
|
|
34138
|
+
equipmentSet = _ref.equipmentSet;
|
|
34139
|
+
var ref = useRef(null);
|
|
34158
34140
|
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();
|
|
34141
|
+
var current = ref.current;
|
|
34142
|
+
var initialOffset;
|
|
34143
|
+
if (current) {
|
|
34144
|
+
var handleMouseMove = function handleMouseMove(event) {
|
|
34145
|
+
var clientX = event.clientX,
|
|
34146
|
+
clientY = event.clientY;
|
|
34147
|
+
// Adjust the position of the tooltip based on the mouse position
|
|
34148
|
+
var rect = current.getBoundingClientRect();
|
|
34149
|
+
if (!initialOffset) {
|
|
34150
|
+
initialOffset = rect;
|
|
34174
34151
|
}
|
|
34175
|
-
|
|
34176
|
-
|
|
34177
|
-
|
|
34178
|
-
|
|
34179
|
-
|
|
34180
|
-
|
|
34181
|
-
|
|
34152
|
+
var tooltipWidth = rect.width;
|
|
34153
|
+
var tooltipHeight = rect.height;
|
|
34154
|
+
var isOffScreenRight = clientX + tooltipWidth + offset > window.innerWidth;
|
|
34155
|
+
var isOffScreenBottom = clientY + tooltipHeight + offset > window.innerHeight;
|
|
34156
|
+
var x = (isOffScreenRight ? clientX - tooltipWidth - offset : clientX + offset) - initialOffset.x;
|
|
34157
|
+
var y = (isOffScreenBottom ? clientY - tooltipHeight - offset : clientY + offset) - initialOffset.y;
|
|
34158
|
+
current.style.transform = "translate(" + x + "px, " + y + "px)";
|
|
34159
|
+
current.style.opacity = '1';
|
|
34160
|
+
};
|
|
34161
|
+
window.addEventListener('mousemove', handleMouseMove);
|
|
34162
|
+
return function () {
|
|
34163
|
+
window.removeEventListener('mousemove', handleMouseMove);
|
|
34164
|
+
};
|
|
34165
|
+
}
|
|
34166
|
+
return;
|
|
34167
|
+
}, []);
|
|
34168
|
+
return React.createElement(Container$c, {
|
|
34169
|
+
ref: ref
|
|
34170
|
+
}, React.createElement(ItemInfoDisplay, {
|
|
34171
|
+
item: item,
|
|
34172
|
+
atlasIMG: atlasIMG,
|
|
34173
|
+
atlasJSON: atlasJSON,
|
|
34174
|
+
equipmentSet: equipmentSet
|
|
34175
|
+
}));
|
|
34182
34176
|
};
|
|
34183
|
-
var
|
|
34184
|
-
displayName: "
|
|
34185
|
-
componentId: "sc-
|
|
34186
|
-
})(["
|
|
34187
|
-
|
|
34188
|
-
var img$6 = 'data:image/gif;base64,R0lGODlhEAAQAPIAAAAAABQYLiw1TUBJc2hv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rzbv/YCiOlGCeaKqubMtGZiHPdG3feI6bjqD/wOBPwPAJj0ggcWFMOp+ypaI5M1it0KxNCqDKsAWDdhwt1q5fMPnJ9aJt17g4HafJ3/et+Tzn99V+aThqfTNtcHlhhIBVWG+BdDSHOmiPeHdij3aYhZONf46YkZGanzpSAV6KjaOIpqWtNwIBAAEDqqKKhZuJnHSwAgMBtqo5sGs5wcO3yM01ysTO0gXQzNPN1cXXUNnbyNna3kcmwrW3Lujp6ugD5bbn6/HyLe20Cu/t+fr7/P3+/wCF2VswrKDBgwgTKlzIsCCDBAA7';
|
|
34177
|
+
var Container$c = /*#__PURE__*/styled.div.withConfig({
|
|
34178
|
+
displayName: "ItemTooltip__Container",
|
|
34179
|
+
componentId: "sc-11d9r7x-0"
|
|
34180
|
+
})(["position:fixed;z-index:50;pointer-events:none;left:0;top:0;opacity:0;"]);
|
|
34191
34181
|
|
|
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]);
|
|
34182
|
+
var ItemInfoWrapper = function ItemInfoWrapper(_ref) {
|
|
34183
|
+
var children = _ref.children,
|
|
34184
|
+
atlasIMG = _ref.atlasIMG,
|
|
34185
|
+
atlasJSON = _ref.atlasJSON,
|
|
34186
|
+
item = _ref.item,
|
|
34187
|
+
equipmentSet = _ref.equipmentSet,
|
|
34188
|
+
scale = _ref.scale;
|
|
34189
|
+
var _useState = useState(false),
|
|
34190
|
+
isTooltipVisible = _useState[0],
|
|
34191
|
+
setIsTooltipVisible = _useState[1];
|
|
34237
34192
|
var _useState2 = useState(false),
|
|
34238
|
-
|
|
34239
|
-
|
|
34240
|
-
return React.createElement(
|
|
34241
|
-
|
|
34242
|
-
|
|
34243
|
-
setShowGoNextIndicator(true);
|
|
34244
|
-
onEndStep && onEndStep();
|
|
34193
|
+
isTooltipMobileVisible = _useState2[0],
|
|
34194
|
+
setIsTooltipMobileVisible = _useState2[1];
|
|
34195
|
+
return React.createElement("div", {
|
|
34196
|
+
onMouseEnter: function onMouseEnter() {
|
|
34197
|
+
if (!isTooltipMobileVisible) setIsTooltipVisible(true);
|
|
34245
34198
|
},
|
|
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();
|
|
34199
|
+
onMouseLeave: setIsTooltipVisible.bind(null, false),
|
|
34200
|
+
onTouchEnd: function onTouchEnd() {
|
|
34201
|
+
setIsTooltipMobileVisible(true);
|
|
34202
|
+
setIsTooltipVisible(false);
|
|
34255
34203
|
}
|
|
34204
|
+
}, children, isTooltipVisible && !isTooltipMobileVisible && React.createElement(ItemTooltip, {
|
|
34205
|
+
atlasIMG: atlasIMG,
|
|
34206
|
+
atlasJSON: atlasJSON,
|
|
34207
|
+
equipmentSet: equipmentSet,
|
|
34208
|
+
item: item
|
|
34209
|
+
}), isTooltipMobileVisible && React.createElement(MobileItemTooltip, {
|
|
34210
|
+
atlasIMG: atlasIMG,
|
|
34211
|
+
atlasJSON: atlasJSON,
|
|
34212
|
+
equipmentSet: equipmentSet,
|
|
34213
|
+
closeTooltip: function closeTooltip() {
|
|
34214
|
+
setIsTooltipMobileVisible(false);
|
|
34215
|
+
console.log('close');
|
|
34216
|
+
},
|
|
34217
|
+
item: item,
|
|
34218
|
+
scale: scale
|
|
34256
34219
|
}));
|
|
34257
34220
|
};
|
|
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
34221
|
|
|
34270
|
-
|
|
34271
|
-
var
|
|
34272
|
-
|
|
34273
|
-
|
|
34274
|
-
|
|
34275
|
-
|
|
34276
|
-
|
|
34277
|
-
|
|
34278
|
-
|
|
34279
|
-
|
|
34280
|
-
|
|
34281
|
-
|
|
34282
|
-
|
|
34283
|
-
}
|
|
34284
|
-
|
|
34285
|
-
|
|
34286
|
-
|
|
34287
|
-
|
|
34288
|
-
|
|
34289
|
-
|
|
34222
|
+
var CraftBook = function CraftBook(_ref) {
|
|
34223
|
+
var atlasIMG = _ref.atlasIMG,
|
|
34224
|
+
atlasJSON = _ref.atlasJSON,
|
|
34225
|
+
onClose = _ref.onClose,
|
|
34226
|
+
onSelect = _ref.onSelect,
|
|
34227
|
+
onCraftItem = _ref.onCraftItem,
|
|
34228
|
+
craftablesItems = _ref.craftablesItems,
|
|
34229
|
+
equipmentSet = _ref.equipmentSet,
|
|
34230
|
+
scale = _ref.scale;
|
|
34231
|
+
var optionsId = 0;
|
|
34232
|
+
var _useState = useState({
|
|
34233
|
+
show: false,
|
|
34234
|
+
index: 200
|
|
34235
|
+
}),
|
|
34236
|
+
isShown = _useState[0],
|
|
34237
|
+
setIsShown = _useState[1];
|
|
34238
|
+
var _useState2 = useState(),
|
|
34239
|
+
craftItem = _useState2[0],
|
|
34240
|
+
setCraftItem = _useState2[1];
|
|
34241
|
+
var getDropdownOptions = function getDropdownOptions() {
|
|
34242
|
+
var options = [];
|
|
34243
|
+
Object.keys(ItemSubType).forEach(function (key) {
|
|
34244
|
+
if (key === 'DeadBody') {
|
|
34245
|
+
return; // we can't craft crafting resouces...
|
|
34246
|
+
}
|
|
34290
34247
|
|
|
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;
|
|
34248
|
+
options.push({
|
|
34249
|
+
id: optionsId,
|
|
34250
|
+
value: key,
|
|
34251
|
+
option: key
|
|
34320
34252
|
});
|
|
34253
|
+
optionsId += 1;
|
|
34321
34254
|
});
|
|
34255
|
+
return options;
|
|
34322
34256
|
};
|
|
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
|
-
}
|
|
34257
|
+
var modifyString = function modifyString(str) {
|
|
34258
|
+
// Split the string by "/" and "."
|
|
34259
|
+
var parts = str.split('/');
|
|
34260
|
+
var fileName = parts[parts.length - 1];
|
|
34261
|
+
parts = fileName.split('.');
|
|
34262
|
+
var name = parts[0];
|
|
34263
|
+
// Replace all occurrences of "-" with " "
|
|
34264
|
+
name = name.replace(/-/g, ' ');
|
|
34265
|
+
// Uppercase the first word
|
|
34266
|
+
var words = name.split(' ');
|
|
34267
|
+
var firstWord = words[0].slice(0, 1).toUpperCase() + words[0].slice(1);
|
|
34268
|
+
var modifiedWords = [firstWord].concat(words.slice(1));
|
|
34269
|
+
name = modifiedWords.join(' ');
|
|
34270
|
+
return name;
|
|
34368
34271
|
};
|
|
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
|
-
}
|
|
34272
|
+
var handleClick = function handleClick(value) {
|
|
34273
|
+
setCraftItem(value);
|
|
34381
34274
|
};
|
|
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));
|
|
34275
|
+
return React.createElement(DraggableContainer, {
|
|
34276
|
+
type: RPGUIContainerTypes.Framed,
|
|
34277
|
+
width: "500px",
|
|
34278
|
+
cancelDrag: ".inputRadioCraftBook",
|
|
34279
|
+
onCloseButton: function onCloseButton() {
|
|
34280
|
+
if (onClose) {
|
|
34281
|
+
onClose();
|
|
34406
34282
|
}
|
|
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
34283
|
}
|
|
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
|
-
}
|
|
34284
|
+
}, React.createElement("div", {
|
|
34285
|
+
style: {
|
|
34286
|
+
width: '100%'
|
|
34478
34287
|
}
|
|
34479
|
-
}
|
|
34480
|
-
|
|
34481
|
-
}))
|
|
34482
|
-
|
|
34483
|
-
|
|
34484
|
-
|
|
34485
|
-
text: text || 'No text provided.',
|
|
34486
|
-
onClose: function onClose() {
|
|
34487
|
-
if (_onClose) {
|
|
34488
|
-
_onClose();
|
|
34489
|
-
}
|
|
34288
|
+
}, React.createElement(Title$2, null, "Craftbook"), React.createElement(Subtitle, null, "Select an item to craft"), React.createElement("hr", {
|
|
34289
|
+
className: "golden"
|
|
34290
|
+
})), React.createElement(Dropdown, {
|
|
34291
|
+
options: getDropdownOptions(),
|
|
34292
|
+
onChange: function onChange(value) {
|
|
34293
|
+
return onSelect(value);
|
|
34490
34294
|
}
|
|
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();
|
|
34295
|
+
}), React.createElement(RadioInputScroller, {
|
|
34296
|
+
className: "inputRadioCraftBook"
|
|
34297
|
+
}, craftablesItems == null ? void 0 : craftablesItems.map(function (option, index) {
|
|
34298
|
+
return React.createElement(RadioOptionsWrapper, {
|
|
34299
|
+
key: index
|
|
34300
|
+
}, React.createElement(SpriteAtlasWrapper, null, React.createElement(ItemInfoWrapper, {
|
|
34301
|
+
item: option,
|
|
34302
|
+
atlasIMG: atlasIMG,
|
|
34303
|
+
atlasJSON: atlasJSON,
|
|
34304
|
+
equipmentSet: equipmentSet,
|
|
34305
|
+
scale: scale
|
|
34306
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
34307
|
+
atlasIMG: atlasIMG,
|
|
34308
|
+
atlasJSON: atlasJSON,
|
|
34309
|
+
spriteKey: option.texturePath,
|
|
34310
|
+
imgScale: 3,
|
|
34311
|
+
grayScale: !option.canCraft
|
|
34312
|
+
}))), React.createElement("div", null, React.createElement("div", {
|
|
34313
|
+
onPointerDown: function onPointerDown() {
|
|
34314
|
+
return handleClick(option.key);
|
|
34539
34315
|
}
|
|
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();
|
|
34316
|
+
}, React.createElement("input", {
|
|
34317
|
+
className: "rpgui-radio",
|
|
34318
|
+
type: "radio",
|
|
34319
|
+
value: option.name,
|
|
34320
|
+
name: "test",
|
|
34321
|
+
disabled: !option.canCraft,
|
|
34322
|
+
checked: craftItem === option.key,
|
|
34323
|
+
onChange: function onChange() {
|
|
34324
|
+
return handleClick(option.key);
|
|
34565
34325
|
}
|
|
34566
|
-
}
|
|
34567
|
-
|
|
34568
|
-
|
|
34569
|
-
|
|
34570
|
-
|
|
34571
|
-
|
|
34572
|
-
|
|
34573
|
-
|
|
34574
|
-
|
|
34575
|
-
|
|
34576
|
-
|
|
34577
|
-
|
|
34578
|
-
|
|
34579
|
-
|
|
34580
|
-
|
|
34581
|
-
|
|
34582
|
-
|
|
34583
|
-
|
|
34584
|
-
|
|
34585
|
-
|
|
34586
|
-
|
|
34326
|
+
}), React.createElement("label", {
|
|
34327
|
+
onPointerDown: function onPointerDown() {
|
|
34328
|
+
handleClick(option.key);
|
|
34329
|
+
},
|
|
34330
|
+
onTouchEnd: function onTouchEnd() {
|
|
34331
|
+
setIsShown({
|
|
34332
|
+
show: true,
|
|
34333
|
+
index: index
|
|
34334
|
+
});
|
|
34335
|
+
},
|
|
34336
|
+
style: {
|
|
34337
|
+
display: 'flex',
|
|
34338
|
+
alignItems: 'center'
|
|
34339
|
+
},
|
|
34340
|
+
onMouseEnter: function onMouseEnter() {
|
|
34341
|
+
return setIsShown({
|
|
34342
|
+
show: true,
|
|
34343
|
+
index: index
|
|
34344
|
+
});
|
|
34345
|
+
},
|
|
34346
|
+
onMouseLeave: function onMouseLeave() {
|
|
34347
|
+
return setIsShown({
|
|
34348
|
+
show: false,
|
|
34349
|
+
index: index
|
|
34350
|
+
});
|
|
34587
34351
|
}
|
|
34352
|
+
}, modifyString(option.name))), isShown && isShown.index === index && option.ingredients.map(function (option, index) {
|
|
34353
|
+
return React.createElement(Recipes, {
|
|
34354
|
+
key: index
|
|
34355
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
34356
|
+
atlasIMG: atlasIMG,
|
|
34357
|
+
atlasJSON: atlasJSON,
|
|
34358
|
+
spriteKey: option.texturePath,
|
|
34359
|
+
imgScale: 1
|
|
34360
|
+
}), React.createElement(StyledItem, null, modifyString(option.key), " (", option.qty, "x)"));
|
|
34361
|
+
})));
|
|
34362
|
+
})), React.createElement(ButtonWrapper, null, React.createElement(Button, {
|
|
34363
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
34364
|
+
onPointerDown: onClose
|
|
34365
|
+
}, "Cancel"), React.createElement(Button, {
|
|
34366
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
34367
|
+
onPointerDown: function onPointerDown() {
|
|
34368
|
+
return onCraftItem(craftItem);
|
|
34588
34369
|
}
|
|
34589
|
-
}))
|
|
34590
|
-
right: '1rem',
|
|
34591
|
-
src: img$7
|
|
34592
|
-
}))), ")"));
|
|
34370
|
+
}, "Craft")));
|
|
34593
34371
|
};
|
|
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
|
-
|
|
34372
|
+
var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
34373
|
+
displayName: "CraftBook__StyledItem",
|
|
34374
|
+
componentId: "sc-19q95ue-0"
|
|
34375
|
+
})(["margin-left:10px;"]);
|
|
34376
|
+
var Recipes = /*#__PURE__*/styled.div.withConfig({
|
|
34377
|
+
displayName: "CraftBook__Recipes",
|
|
34378
|
+
componentId: "sc-19q95ue-1"
|
|
34379
|
+
})(["font-size:0.6rem;color:yellow !important;margin-bottom:3px;display:flex;align-items:center;.sprite-from-atlas-img{top:0px;left:0px;}"]);
|
|
34380
|
+
var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
34381
|
+
displayName: "CraftBook__Title",
|
|
34382
|
+
componentId: "sc-19q95ue-2"
|
|
34383
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
34384
|
+
var Subtitle = /*#__PURE__*/styled.h1.withConfig({
|
|
34385
|
+
displayName: "CraftBook__Subtitle",
|
|
34386
|
+
componentId: "sc-19q95ue-3"
|
|
34387
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
34388
|
+
var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
|
|
34389
|
+
displayName: "CraftBook__RadioInputScroller",
|
|
34390
|
+
componentId: "sc-19q95ue-4"
|
|
34391
|
+
})(["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;"]);
|
|
34392
|
+
var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
34393
|
+
displayName: "CraftBook__SpriteAtlasWrapper",
|
|
34394
|
+
componentId: "sc-19q95ue-5"
|
|
34395
|
+
})(["margin-right:40px;"]);
|
|
34396
|
+
var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
34397
|
+
displayName: "CraftBook__RadioOptionsWrapper",
|
|
34398
|
+
componentId: "sc-19q95ue-6"
|
|
34399
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
34400
|
+
var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
34401
|
+
displayName: "CraftBook__ButtonWrapper",
|
|
34402
|
+
componentId: "sc-19q95ue-7"
|
|
34403
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
34620
34404
|
|
|
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
|
-
|
|
34405
|
+
var DropdownSelectorContainer = function DropdownSelectorContainer(_ref) {
|
|
34406
|
+
var title = _ref.title,
|
|
34407
|
+
onChange = _ref.onChange,
|
|
34408
|
+
options = _ref.options,
|
|
34409
|
+
details = _ref.details;
|
|
34410
|
+
return React.createElement("div", null, React.createElement("p", null, title), React.createElement(Dropdown, {
|
|
34411
|
+
options: options.map(function (option, index) {
|
|
34412
|
+
return {
|
|
34413
|
+
option: option.name,
|
|
34414
|
+
value: option.id,
|
|
34415
|
+
id: index
|
|
34416
|
+
};
|
|
34417
|
+
}),
|
|
34418
|
+
onChange: onChange
|
|
34419
|
+
}), React.createElement(Details, null, details));
|
|
34420
|
+
};
|
|
34421
|
+
var Details = /*#__PURE__*/styled.p.withConfig({
|
|
34422
|
+
displayName: "DropdownSelectorContainer__Details",
|
|
34423
|
+
componentId: "sc-kaa0h9-0"
|
|
34424
|
+
})(["font-size:", " !important;"], uiFonts.size.xsmall);
|
|
34425
|
+
|
|
34426
|
+
var EquipmentSet = function EquipmentSet(_ref) {
|
|
34427
|
+
var equipmentSet = _ref.equipmentSet,
|
|
34428
|
+
onClose = _ref.onClose,
|
|
34429
|
+
_onMouseOver = _ref.onMouseOver,
|
|
34430
|
+
_onSelected = _ref.onSelected,
|
|
34431
|
+
onItemClick = _ref.onItemClick,
|
|
34432
|
+
atlasIMG = _ref.atlasIMG,
|
|
34433
|
+
atlasJSON = _ref.atlasJSON,
|
|
34434
|
+
onItemDragEnd = _ref.onItemDragEnd,
|
|
34435
|
+
onItemDragStart = _ref.onItemDragStart,
|
|
34436
|
+
onItemPlaceDrop = _ref.onItemPlaceDrop,
|
|
34437
|
+
onItemOutsideDrop = _ref.onItemOutsideDrop,
|
|
34438
|
+
checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
|
|
34439
|
+
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
|
|
34440
|
+
dragScale = _ref.dragScale;
|
|
34441
|
+
var neck = equipmentSet.neck,
|
|
34442
|
+
leftHand = equipmentSet.leftHand,
|
|
34443
|
+
ring = equipmentSet.ring,
|
|
34444
|
+
head = equipmentSet.head,
|
|
34445
|
+
armor = equipmentSet.armor,
|
|
34446
|
+
legs = equipmentSet.legs,
|
|
34447
|
+
boot = equipmentSet.boot,
|
|
34448
|
+
inventory = equipmentSet.inventory,
|
|
34449
|
+
rightHand = equipmentSet.rightHand,
|
|
34450
|
+
accessory = equipmentSet.accessory;
|
|
34451
|
+
var equipmentData = [neck, leftHand, ring, head, armor, legs, boot, inventory, rightHand, accessory];
|
|
34452
|
+
var equipmentMaskSlots = [ItemSlotType.Neck, ItemSlotType.LeftHand, ItemSlotType.Ring, ItemSlotType.Head, ItemSlotType.Torso, ItemSlotType.Legs, ItemSlotType.Feet, ItemSlotType.Inventory, ItemSlotType.RightHand, ItemSlotType.Accessory];
|
|
34453
|
+
var onRenderEquipmentSlotRange = function onRenderEquipmentSlotRange(start, end) {
|
|
34454
|
+
var equipmentRange = equipmentData.slice(start, end);
|
|
34455
|
+
var slotMaksRange = equipmentMaskSlots.slice(start, end);
|
|
34456
|
+
return equipmentRange.map(function (data, i) {
|
|
34457
|
+
var _ref2;
|
|
34458
|
+
var item = data;
|
|
34459
|
+
var itemContainer = (_ref2 = item && item.itemContainer) != null ? _ref2 : null;
|
|
34460
|
+
return React.createElement(ItemSlot, {
|
|
34461
|
+
key: i,
|
|
34462
|
+
slotIndex: i,
|
|
34463
|
+
item: item,
|
|
34464
|
+
itemContainer: itemContainer,
|
|
34465
|
+
itemContainerType: ItemContainerType.Equipment,
|
|
34466
|
+
slotSpriteMask: slotMaksRange[i],
|
|
34467
|
+
onMouseOver: function onMouseOver(event, slotIndex, item) {
|
|
34468
|
+
if (_onMouseOver) _onMouseOver(event, slotIndex, item);
|
|
34469
|
+
},
|
|
34470
|
+
onPointerDown: function onPointerDown(itemType, ContainerType) {
|
|
34471
|
+
if (onItemClick) onItemClick(itemType, item, ContainerType);
|
|
34472
|
+
},
|
|
34473
|
+
onSelected: function onSelected(optionId) {
|
|
34474
|
+
if (_onSelected) _onSelected(optionId);
|
|
34475
|
+
},
|
|
34476
|
+
onDragStart: function onDragStart(item, slotIndex, itemContainerType) {
|
|
34477
|
+
if (!item) {
|
|
34478
|
+
return;
|
|
34479
|
+
}
|
|
34480
|
+
if (onItemDragStart) onItemDragStart(item, slotIndex, itemContainerType);
|
|
34481
|
+
},
|
|
34482
|
+
onDragEnd: function onDragEnd(quantity) {
|
|
34483
|
+
if (onItemDragEnd) onItemDragEnd(quantity);
|
|
34484
|
+
},
|
|
34485
|
+
dragScale: dragScale,
|
|
34486
|
+
checkIfItemCanBeMoved: checkIfItemCanBeMoved,
|
|
34487
|
+
checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
|
|
34488
|
+
onPlaceDrop: function onPlaceDrop(item, slotIndex, itemContainerType) {
|
|
34489
|
+
if (onItemPlaceDrop) onItemPlaceDrop(item, slotIndex, itemContainerType);
|
|
34490
|
+
},
|
|
34491
|
+
onOutsideDrop: function onOutsideDrop(item, position) {
|
|
34492
|
+
if (onItemOutsideDrop) onItemOutsideDrop(item, position);
|
|
34493
|
+
},
|
|
34494
|
+
atlasIMG: atlasIMG,
|
|
34495
|
+
atlasJSON: atlasJSON
|
|
34496
|
+
});
|
|
34497
|
+
});
|
|
34644
34498
|
};
|
|
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
|
-
})));
|
|
34499
|
+
return React.createElement(DraggableContainer, {
|
|
34500
|
+
title: 'Equipments',
|
|
34501
|
+
type: RPGUIContainerTypes.Framed,
|
|
34502
|
+
onCloseButton: function onCloseButton() {
|
|
34503
|
+
if (onClose) onClose();
|
|
34504
|
+
},
|
|
34505
|
+
width: "330px",
|
|
34506
|
+
cancelDrag: ".equipment-container-body"
|
|
34507
|
+
}, React.createElement(EquipmentSetContainer, {
|
|
34508
|
+
className: "equipment-container-body"
|
|
34509
|
+
}, React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(0, 3)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(3, 7)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(7, 10))));
|
|
34671
34510
|
};
|
|
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;"]);
|
|
34511
|
+
var EquipmentSetContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34512
|
+
displayName: "EquipmentSet__EquipmentSetContainer",
|
|
34513
|
+
componentId: "sc-1wuddg2-0"
|
|
34514
|
+
})(["width:inherit;display:flex;justify-content:center;flex-wrap:wrap;flex-direction:row;touch-action:none;"]);
|
|
34515
|
+
var EquipmentColumn = /*#__PURE__*/styled.div.withConfig({
|
|
34516
|
+
displayName: "EquipmentSet__EquipmentColumn",
|
|
34517
|
+
componentId: "sc-1wuddg2-1"
|
|
34518
|
+
})(["display:flex;justify-content:center;flex-wrap:wrap;flex-direction:column;touch-action:none;"]);
|
|
34684
34519
|
|
|
34685
34520
|
var SlotsContainer = function SlotsContainer(_ref) {
|
|
34686
34521
|
var children = _ref.children,
|
|
@@ -34903,7 +34738,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
34903
34738
|
return word[0];
|
|
34904
34739
|
}));
|
|
34905
34740
|
};
|
|
34906
|
-
return React.createElement(Container$
|
|
34741
|
+
return React.createElement(Container$d, null, React.createElement("p", null, "Shortcuts:"), React.createElement(List, {
|
|
34907
34742
|
id: "shortcuts_list"
|
|
34908
34743
|
}, Array.from({
|
|
34909
34744
|
length: 6
|
|
@@ -34919,7 +34754,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
34919
34754
|
}, getContent(i));
|
|
34920
34755
|
})));
|
|
34921
34756
|
};
|
|
34922
|
-
var Container$
|
|
34757
|
+
var Container$d = /*#__PURE__*/styled.div.withConfig({
|
|
34923
34758
|
displayName: "ShortcutsSetter__Container",
|
|
34924
34759
|
componentId: "sc-xuouuf-0"
|
|
34925
34760
|
})(["p{margin:0;margin-left:0.5rem;}"]);
|
|
@@ -34956,7 +34791,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
34956
34791
|
dragScale = _ref.dragScale,
|
|
34957
34792
|
shortcuts = _ref.shortcuts,
|
|
34958
34793
|
setItemShortcut = _ref.setItemShortcut,
|
|
34959
|
-
removeShortcut = _ref.removeShortcut
|
|
34794
|
+
removeShortcut = _ref.removeShortcut,
|
|
34795
|
+
equipmentSet = _ref.equipmentSet;
|
|
34960
34796
|
var _useState = useState({
|
|
34961
34797
|
isOpen: false,
|
|
34962
34798
|
maxQuantity: 1,
|
|
@@ -35015,173 +34851,500 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
35015
34851
|
},
|
|
35016
34852
|
atlasIMG: atlasIMG,
|
|
35017
34853
|
atlasJSON: atlasJSON,
|
|
35018
|
-
isSelectingShortcut: settingShortcutIndex !== -1
|
|
34854
|
+
isSelectingShortcut: settingShortcutIndex !== -1,
|
|
34855
|
+
equipmentSet: equipmentSet
|
|
35019
34856
|
}));
|
|
35020
34857
|
}
|
|
35021
|
-
return slots;
|
|
34858
|
+
return slots;
|
|
34859
|
+
};
|
|
34860
|
+
return React.createElement(React.Fragment, null, React.createElement(SlotsContainer, {
|
|
34861
|
+
title: itemContainer.name || 'Container',
|
|
34862
|
+
onClose: onClose,
|
|
34863
|
+
initialPosition: initialPosition
|
|
34864
|
+
}, type === ItemContainerType.Inventory && shortcuts && removeShortcut && React.createElement(ShortcutsSetter, {
|
|
34865
|
+
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
34866
|
+
settingShortcutIndex: settingShortcutIndex,
|
|
34867
|
+
shortcuts: shortcuts,
|
|
34868
|
+
removeShortcut: removeShortcut,
|
|
34869
|
+
atlasIMG: atlasIMG,
|
|
34870
|
+
atlasJSON: atlasJSON
|
|
34871
|
+
}), React.createElement(ItemsContainer, {
|
|
34872
|
+
className: "item-container-body"
|
|
34873
|
+
}, onRenderSlots())), quantitySelect.isOpen && React.createElement(QuantitySelectorContainer, null, React.createElement(ItemQuantitySelector, {
|
|
34874
|
+
quantity: quantitySelect.maxQuantity,
|
|
34875
|
+
onConfirm: function onConfirm(quantity) {
|
|
34876
|
+
quantitySelect.callback(quantity);
|
|
34877
|
+
setQuantitySelect({
|
|
34878
|
+
isOpen: false,
|
|
34879
|
+
maxQuantity: 1,
|
|
34880
|
+
callback: function callback() {}
|
|
34881
|
+
});
|
|
34882
|
+
},
|
|
34883
|
+
onClose: function onClose() {
|
|
34884
|
+
quantitySelect.callback(-1);
|
|
34885
|
+
setQuantitySelect({
|
|
34886
|
+
isOpen: false,
|
|
34887
|
+
maxQuantity: 1,
|
|
34888
|
+
callback: function callback() {}
|
|
34889
|
+
});
|
|
34890
|
+
}
|
|
34891
|
+
})));
|
|
34892
|
+
};
|
|
34893
|
+
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34894
|
+
displayName: "ItemContainer__ItemsContainer",
|
|
34895
|
+
componentId: "sc-15y5p9l-0"
|
|
34896
|
+
})(["display:flex;justify-content:center;flex-wrap:wrap;"]);
|
|
34897
|
+
var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34898
|
+
displayName: "ItemContainer__QuantitySelectorContainer",
|
|
34899
|
+
componentId: "sc-15y5p9l-1"
|
|
34900
|
+
})(["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);"]);
|
|
34901
|
+
|
|
34902
|
+
var ItemSelector = function ItemSelector(_ref) {
|
|
34903
|
+
var atlasIMG = _ref.atlasIMG,
|
|
34904
|
+
atlasJSON = _ref.atlasJSON,
|
|
34905
|
+
options = _ref.options,
|
|
34906
|
+
onClose = _ref.onClose,
|
|
34907
|
+
onSelect = _ref.onSelect;
|
|
34908
|
+
var _useState = useState(),
|
|
34909
|
+
selectedValue = _useState[0],
|
|
34910
|
+
setSelectedValue = _useState[1];
|
|
34911
|
+
var handleClick = function handleClick() {
|
|
34912
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
34913
|
+
var elementValue = element.value;
|
|
34914
|
+
setSelectedValue(elementValue);
|
|
34915
|
+
};
|
|
34916
|
+
useEffect(function () {
|
|
34917
|
+
if (selectedValue) {
|
|
34918
|
+
onSelect(selectedValue);
|
|
34919
|
+
}
|
|
34920
|
+
}, [selectedValue]);
|
|
34921
|
+
return React.createElement(DraggableContainer, {
|
|
34922
|
+
type: RPGUIContainerTypes.Framed,
|
|
34923
|
+
width: "500px",
|
|
34924
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
34925
|
+
onCloseButton: function onCloseButton() {
|
|
34926
|
+
if (onClose) {
|
|
34927
|
+
onClose();
|
|
34928
|
+
}
|
|
34929
|
+
}
|
|
34930
|
+
}, React.createElement("div", {
|
|
34931
|
+
style: {
|
|
34932
|
+
width: '100%'
|
|
34933
|
+
}
|
|
34934
|
+
}, React.createElement(Title$3, null, 'Harvesting instruments'), React.createElement(Subtitle$1, null, 'Use the tool, you need it'), React.createElement("hr", {
|
|
34935
|
+
className: "golden"
|
|
34936
|
+
})), React.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
34937
|
+
return React.createElement(RadioOptionsWrapper$1, {
|
|
34938
|
+
key: index
|
|
34939
|
+
}, React.createElement(SpriteAtlasWrapper$1, null, React.createElement(SpriteFromAtlas, {
|
|
34940
|
+
atlasIMG: atlasIMG,
|
|
34941
|
+
atlasJSON: atlasJSON,
|
|
34942
|
+
spriteKey: option.imageKey,
|
|
34943
|
+
imgScale: 3
|
|
34944
|
+
})), React.createElement("div", null, React.createElement("input", {
|
|
34945
|
+
className: "rpgui-radio",
|
|
34946
|
+
type: "radio",
|
|
34947
|
+
value: option.name,
|
|
34948
|
+
name: "test"
|
|
34949
|
+
}), React.createElement("label", {
|
|
34950
|
+
onPointerDown: handleClick,
|
|
34951
|
+
style: {
|
|
34952
|
+
display: 'flex',
|
|
34953
|
+
alignItems: 'center'
|
|
34954
|
+
}
|
|
34955
|
+
}, option.name, " ", React.createElement("br", null), option.description)));
|
|
34956
|
+
})), React.createElement(ButtonWrapper$1, null, React.createElement(Button, {
|
|
34957
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
34958
|
+
onPointerDown: onClose
|
|
34959
|
+
}, "Cancel"), React.createElement(Button, {
|
|
34960
|
+
buttonType: ButtonTypes.RPGUIButton
|
|
34961
|
+
}, "Select")));
|
|
34962
|
+
};
|
|
34963
|
+
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
34964
|
+
displayName: "ItemSelector__Title",
|
|
34965
|
+
componentId: "sc-gptoxp-0"
|
|
34966
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
34967
|
+
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
34968
|
+
displayName: "ItemSelector__Subtitle",
|
|
34969
|
+
componentId: "sc-gptoxp-1"
|
|
34970
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
34971
|
+
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34972
|
+
displayName: "ItemSelector__RadioInputScroller",
|
|
34973
|
+
componentId: "sc-gptoxp-2"
|
|
34974
|
+
})(["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;"]);
|
|
34975
|
+
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34976
|
+
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
34977
|
+
componentId: "sc-gptoxp-3"
|
|
34978
|
+
})(["margin-right:40px;"]);
|
|
34979
|
+
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34980
|
+
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
34981
|
+
componentId: "sc-gptoxp-4"
|
|
34982
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
34983
|
+
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34984
|
+
displayName: "ItemSelector__ButtonWrapper",
|
|
34985
|
+
componentId: "sc-gptoxp-5"
|
|
34986
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
34987
|
+
|
|
34988
|
+
var ListMenu = function ListMenu(_ref) {
|
|
34989
|
+
var options = _ref.options,
|
|
34990
|
+
onSelected = _ref.onSelected,
|
|
34991
|
+
x = _ref.x,
|
|
34992
|
+
y = _ref.y;
|
|
34993
|
+
return React.createElement(Container$e, {
|
|
34994
|
+
x: x,
|
|
34995
|
+
y: y
|
|
34996
|
+
}, React.createElement("ul", {
|
|
34997
|
+
className: "rpgui-list-imp",
|
|
34998
|
+
style: {
|
|
34999
|
+
overflow: 'hidden'
|
|
35000
|
+
}
|
|
35001
|
+
}, options.map(function (params, index) {
|
|
35002
|
+
return React.createElement(ListElement$1, {
|
|
35003
|
+
key: (params == null ? void 0 : params.id) || index,
|
|
35004
|
+
onPointerDown: function onPointerDown() {
|
|
35005
|
+
onSelected(params == null ? void 0 : params.id);
|
|
35006
|
+
}
|
|
35007
|
+
}, (params == null ? void 0 : params.text) || 'No text');
|
|
35008
|
+
})));
|
|
35009
|
+
};
|
|
35010
|
+
var Container$e = /*#__PURE__*/styled.div.withConfig({
|
|
35011
|
+
displayName: "ListMenu__Container",
|
|
35012
|
+
componentId: "sc-i9097t-0"
|
|
35013
|
+
})(["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) {
|
|
35014
|
+
return props.y || 0;
|
|
35015
|
+
}, function (props) {
|
|
35016
|
+
return props.x || 0;
|
|
35017
|
+
}, uiFonts.size.xsmall);
|
|
35018
|
+
var ListElement$1 = /*#__PURE__*/styled.li.withConfig({
|
|
35019
|
+
displayName: "ListMenu__ListElement",
|
|
35020
|
+
componentId: "sc-i9097t-1"
|
|
35021
|
+
})(["margin-right:0.5rem;"]);
|
|
35022
|
+
|
|
35023
|
+
var img$6 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAP1BMVEUAAAA7FyVxQTsUEBPj5v////+5v/tCJDOOUlIiHBr1oJfptaO6dWr61rhzFy1bMTjoanMUNGQoXMQkn97+88DQ3IhAAAAAAXRSTlMAQObYZgAAAAFiS0dEBfhv6ccAAAAHdElNRQfmAw4VOBC7c5LYAAABM0lEQVQ4y3XRi5KDIAwFUAUkbrBgpP//rZsHVHQ009qZ3tPboNN0zmwzvcw8O5sX4y0NOg/Et3jRCXF+ziULorjkOQ9gE24dvuUAzq08DiCO4pe3WN7zCP56vmpubBReQYC11YPS86ySxxCsAABTSgjb5m4g8nfbxvFHBkH2OEEvAItVuCuIsgGgl+Gcr7kDXxhEAx55A2SQEEeQeZwUaIP8Tbo05B0RFPhItAjgj1w6cDnhLluDj+Egkh3pCCP4pKQAw1IPO0W9Nti5gW9RP2dKA3BZd2Dw+baYX+Nt4GM00O4S3kEpF6Alb2Bv4LeC3kkGfAW0/p0RPoJVKr63ghHsKuRh5DIUKOAlGOwrtt9fQekAEfmhZslHUDoglB0zjfkJigN7UnTQQ4GBWomoVhEN/AOPSBh38gy+fwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0xNFQyMTo1NTo1MSswMDowMJcc0eEAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMTRUMjE6NTU6NTErMDA6MDDmQWldAAAAAElFTkSuQmCC';
|
|
35024
|
+
|
|
35025
|
+
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';
|
|
35026
|
+
|
|
35027
|
+
var ImgSide;
|
|
35028
|
+
(function (ImgSide) {
|
|
35029
|
+
ImgSide["right"] = "right";
|
|
35030
|
+
ImgSide["left"] = "left";
|
|
35031
|
+
})(ImgSide || (ImgSide = {}));
|
|
35032
|
+
var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
35033
|
+
var _textAndTypeArray$sli;
|
|
35034
|
+
var _onClose = _ref.onClose,
|
|
35035
|
+
textAndTypeArray = _ref.textAndTypeArray;
|
|
35036
|
+
var _useState = useState(false),
|
|
35037
|
+
showGoNextIndicator = _useState[0],
|
|
35038
|
+
setShowGoNextIndicator = _useState[1];
|
|
35039
|
+
var _useState2 = useState(0),
|
|
35040
|
+
slide = _useState2[0],
|
|
35041
|
+
setSlide = _useState2[1];
|
|
35042
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
35043
|
+
if (event.code === 'Space') {
|
|
35044
|
+
if (slide < (textAndTypeArray == null ? void 0 : textAndTypeArray.length) - 1) {
|
|
35045
|
+
setSlide(function (prev) {
|
|
35046
|
+
return prev + 1;
|
|
35047
|
+
});
|
|
35048
|
+
} else {
|
|
35049
|
+
// if there's no more text chunks, close the dialog
|
|
35050
|
+
_onClose();
|
|
35051
|
+
}
|
|
35052
|
+
}
|
|
35053
|
+
};
|
|
35054
|
+
useEffect(function () {
|
|
35055
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
35056
|
+
return function () {
|
|
35057
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
35058
|
+
};
|
|
35059
|
+
}, [slide]);
|
|
35060
|
+
return React.createElement(RPGUIContainer, {
|
|
35061
|
+
type: RPGUIContainerTypes.FramedGold,
|
|
35062
|
+
width: '50%',
|
|
35063
|
+
height: '180px'
|
|
35064
|
+
}, 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, {
|
|
35065
|
+
flex: '70%'
|
|
35066
|
+
}, React.createElement(NPCDialogText, {
|
|
35067
|
+
onStartStep: function onStartStep() {
|
|
35068
|
+
return setShowGoNextIndicator(false);
|
|
35069
|
+
},
|
|
35070
|
+
onEndStep: function onEndStep() {
|
|
35071
|
+
return setShowGoNextIndicator(true);
|
|
35072
|
+
},
|
|
35073
|
+
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
35074
|
+
onClose: function onClose() {
|
|
35075
|
+
if (_onClose) {
|
|
35076
|
+
_onClose();
|
|
35077
|
+
}
|
|
35078
|
+
}
|
|
35079
|
+
})), React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
35080
|
+
src: textAndTypeArray[slide].imagePath || img$6
|
|
35081
|
+
})), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
|
|
35082
|
+
right: '10.5rem',
|
|
35083
|
+
src: img$7
|
|
35084
|
+
})), textAndTypeArray[slide].imageSide === 'left' && React.createElement(React.Fragment, null, React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
35085
|
+
src: textAndTypeArray[slide].imagePath || img$6
|
|
35086
|
+
})), React.createElement(TextContainer, {
|
|
35087
|
+
flex: '70%'
|
|
35088
|
+
}, React.createElement(NPCDialogText, {
|
|
35089
|
+
onStartStep: function onStartStep() {
|
|
35090
|
+
return setShowGoNextIndicator(false);
|
|
35091
|
+
},
|
|
35092
|
+
onEndStep: function onEndStep() {
|
|
35093
|
+
return setShowGoNextIndicator(true);
|
|
35094
|
+
},
|
|
35095
|
+
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
35096
|
+
onClose: function onClose() {
|
|
35097
|
+
if (_onClose) {
|
|
35098
|
+
_onClose();
|
|
35099
|
+
}
|
|
35100
|
+
}
|
|
35101
|
+
})), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
|
|
35102
|
+
right: '1rem',
|
|
35103
|
+
src: img$7
|
|
35104
|
+
}))), ")"));
|
|
35105
|
+
};
|
|
35106
|
+
var Container$f = /*#__PURE__*/styled.div.withConfig({
|
|
35107
|
+
displayName: "NPCMultiDialog__Container",
|
|
35108
|
+
componentId: "sc-rvu5wg-0"
|
|
35109
|
+
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
35110
|
+
var TextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35111
|
+
displayName: "NPCMultiDialog__TextContainer",
|
|
35112
|
+
componentId: "sc-rvu5wg-1"
|
|
35113
|
+
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
35114
|
+
var flex = _ref2.flex;
|
|
35115
|
+
return flex;
|
|
35116
|
+
});
|
|
35117
|
+
var ThumbnailContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35118
|
+
displayName: "NPCMultiDialog__ThumbnailContainer",
|
|
35119
|
+
componentId: "sc-rvu5wg-2"
|
|
35120
|
+
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
35121
|
+
var NPCThumbnail = /*#__PURE__*/styled.img.withConfig({
|
|
35122
|
+
displayName: "NPCMultiDialog__NPCThumbnail",
|
|
35123
|
+
componentId: "sc-rvu5wg-3"
|
|
35124
|
+
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
35125
|
+
var PressSpaceIndicator = /*#__PURE__*/styled.img.withConfig({
|
|
35126
|
+
displayName: "NPCMultiDialog__PressSpaceIndicator",
|
|
35127
|
+
componentId: "sc-rvu5wg-4"
|
|
35128
|
+
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref3) {
|
|
35129
|
+
var right = _ref3.right;
|
|
35130
|
+
return right;
|
|
35131
|
+
});
|
|
35132
|
+
|
|
35133
|
+
//@ts-ignore
|
|
35134
|
+
var useEventListener = function useEventListener(type, handler, el) {
|
|
35135
|
+
if (el === void 0) {
|
|
35136
|
+
el = window;
|
|
35137
|
+
}
|
|
35138
|
+
var savedHandler = React.useRef();
|
|
35139
|
+
React.useEffect(function () {
|
|
35140
|
+
savedHandler.current = handler;
|
|
35141
|
+
}, [handler]);
|
|
35142
|
+
React.useEffect(function () {
|
|
35143
|
+
//@ts-ignore
|
|
35144
|
+
var listener = function listener(e) {
|
|
35145
|
+
return savedHandler.current(e);
|
|
35146
|
+
};
|
|
35147
|
+
el.addEventListener(type, listener);
|
|
35148
|
+
return function () {
|
|
35149
|
+
el.removeEventListener(type, listener);
|
|
35150
|
+
};
|
|
35151
|
+
}, [type, el]);
|
|
35152
|
+
};
|
|
35153
|
+
|
|
35154
|
+
var DynamicText = function DynamicText(_ref) {
|
|
35155
|
+
var text = _ref.text,
|
|
35156
|
+
onFinish = _ref.onFinish,
|
|
35157
|
+
onStart = _ref.onStart;
|
|
35158
|
+
var _useState = useState(''),
|
|
35159
|
+
textState = _useState[0],
|
|
35160
|
+
setTextState = _useState[1];
|
|
35161
|
+
useEffect(function () {
|
|
35162
|
+
var i = 0;
|
|
35163
|
+
var interval = setInterval(function () {
|
|
35164
|
+
// on every interval, show one more character
|
|
35165
|
+
if (i === 0) {
|
|
35166
|
+
if (onStart) {
|
|
35167
|
+
onStart();
|
|
35168
|
+
}
|
|
35169
|
+
}
|
|
35170
|
+
if (i < text.length) {
|
|
35171
|
+
setTextState(text.substring(0, i + 1));
|
|
35172
|
+
i++;
|
|
35173
|
+
} else {
|
|
35174
|
+
clearInterval(interval);
|
|
35175
|
+
if (onFinish) {
|
|
35176
|
+
onFinish();
|
|
35177
|
+
}
|
|
35178
|
+
}
|
|
35179
|
+
}, 50);
|
|
35180
|
+
return function () {
|
|
35181
|
+
clearInterval(interval);
|
|
35182
|
+
};
|
|
35183
|
+
}, [text]);
|
|
35184
|
+
return React.createElement(TextContainer$1, null, textState);
|
|
35185
|
+
};
|
|
35186
|
+
var TextContainer$1 = /*#__PURE__*/styled.p.withConfig({
|
|
35187
|
+
displayName: "DynamicText__TextContainer",
|
|
35188
|
+
componentId: "sc-1ggl9nd-0"
|
|
35189
|
+
})(["font-size:0.7rem !important;color:white;text-shadow:1px 1px 0px #000000;letter-spacing:1.2px;word-break:normal;"]);
|
|
35190
|
+
|
|
35191
|
+
var QuestionDialog = function QuestionDialog(_ref) {
|
|
35192
|
+
var questions = _ref.questions,
|
|
35193
|
+
answers = _ref.answers,
|
|
35194
|
+
onClose = _ref.onClose;
|
|
35195
|
+
var _useState = useState(questions[0]),
|
|
35196
|
+
currentQuestion = _useState[0],
|
|
35197
|
+
setCurrentQuestion = _useState[1];
|
|
35198
|
+
var _useState2 = useState(false),
|
|
35199
|
+
canShowAnswers = _useState2[0],
|
|
35200
|
+
setCanShowAnswers = _useState2[1];
|
|
35201
|
+
var onGetFirstAnswer = function onGetFirstAnswer() {
|
|
35202
|
+
if (!currentQuestion.answerIds || currentQuestion.answerIds.length === 0) {
|
|
35203
|
+
return null;
|
|
35204
|
+
}
|
|
35205
|
+
var firstAnswerId = currentQuestion.answerIds[0];
|
|
35206
|
+
return answers.find(function (answer) {
|
|
35207
|
+
return answer.id === firstAnswerId;
|
|
35208
|
+
});
|
|
35022
35209
|
};
|
|
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() {}
|
|
35210
|
+
var _useState3 = useState(onGetFirstAnswer()),
|
|
35211
|
+
currentAnswer = _useState3[0],
|
|
35212
|
+
setCurrentAnswer = _useState3[1];
|
|
35213
|
+
useEffect(function () {
|
|
35214
|
+
setCurrentAnswer(onGetFirstAnswer());
|
|
35215
|
+
}, [currentQuestion]);
|
|
35216
|
+
var onGetAnswers = function onGetAnswers(answerIds) {
|
|
35217
|
+
return answerIds.map(function (answerId) {
|
|
35218
|
+
return answers.find(function (answer) {
|
|
35219
|
+
return answer.id === answerId;
|
|
35052
35220
|
});
|
|
35221
|
+
});
|
|
35222
|
+
};
|
|
35223
|
+
var onKeyPress = function onKeyPress(e) {
|
|
35224
|
+
switch (e.key) {
|
|
35225
|
+
case 'ArrowDown':
|
|
35226
|
+
// select next answer, if any.
|
|
35227
|
+
// if no next answer, select first answer
|
|
35228
|
+
// const nextAnswer = onGetAnswers(currentQuestion.answerIds!).find(
|
|
35229
|
+
// (answer) => answer?.id === currentAnswer!.id + 1
|
|
35230
|
+
// );
|
|
35231
|
+
var nextAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
35232
|
+
return (answer == null ? void 0 : answer.id) === currentAnswer.id + 1;
|
|
35233
|
+
});
|
|
35234
|
+
var nextAnswerID = currentQuestion.answerIds[nextAnswerIndex];
|
|
35235
|
+
var nextAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
35236
|
+
return (answer == null ? void 0 : answer.id) === nextAnswerID;
|
|
35237
|
+
});
|
|
35238
|
+
setCurrentAnswer(nextAnswer || onGetFirstAnswer());
|
|
35239
|
+
break;
|
|
35240
|
+
case 'ArrowUp':
|
|
35241
|
+
// select previous answer, if any.
|
|
35242
|
+
// if no previous answer, select last answer
|
|
35243
|
+
var previousAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
35244
|
+
return (answer == null ? void 0 : answer.id) === currentAnswer.id - 1;
|
|
35245
|
+
});
|
|
35246
|
+
var previousAnswerID = currentQuestion.answerIds && currentQuestion.answerIds[previousAnswerIndex];
|
|
35247
|
+
var previousAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
35248
|
+
return (answer == null ? void 0 : answer.id) === previousAnswerID;
|
|
35249
|
+
});
|
|
35250
|
+
if (previousAnswer) {
|
|
35251
|
+
setCurrentAnswer(previousAnswer);
|
|
35252
|
+
} else {
|
|
35253
|
+
setCurrentAnswer(onGetAnswers(currentQuestion.answerIds).pop());
|
|
35254
|
+
}
|
|
35255
|
+
break;
|
|
35256
|
+
case 'Enter':
|
|
35257
|
+
setCanShowAnswers(false);
|
|
35258
|
+
if (!(currentAnswer != null && currentAnswer.nextQuestionId)) {
|
|
35259
|
+
onClose();
|
|
35260
|
+
return;
|
|
35261
|
+
} else {
|
|
35262
|
+
setCurrentQuestion(questions.find(function (question) {
|
|
35263
|
+
return question.id === currentAnswer.nextQuestionId;
|
|
35264
|
+
}));
|
|
35265
|
+
}
|
|
35266
|
+
break;
|
|
35053
35267
|
}
|
|
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
35268
|
};
|
|
35079
|
-
|
|
35080
|
-
|
|
35081
|
-
|
|
35269
|
+
useEventListener('keydown', onKeyPress);
|
|
35270
|
+
var onAnswerClick = function onAnswerClick(answer) {
|
|
35271
|
+
setCanShowAnswers(false);
|
|
35272
|
+
if (answer.nextQuestionId) {
|
|
35273
|
+
// if there is a next question, go to it
|
|
35274
|
+
setCurrentQuestion(questions.find(function (question) {
|
|
35275
|
+
return question.id === answer.nextQuestionId;
|
|
35276
|
+
}));
|
|
35277
|
+
} else {
|
|
35278
|
+
// else, finish dialog!
|
|
35279
|
+
onClose();
|
|
35082
35280
|
}
|
|
35083
|
-
}
|
|
35084
|
-
|
|
35085
|
-
|
|
35086
|
-
|
|
35087
|
-
|
|
35088
|
-
onCloseButton: function onCloseButton() {
|
|
35089
|
-
if (onClose) {
|
|
35090
|
-
onClose();
|
|
35091
|
-
}
|
|
35281
|
+
};
|
|
35282
|
+
var onRenderCurrentAnswers = function onRenderCurrentAnswers() {
|
|
35283
|
+
var answerIds = currentQuestion.answerIds;
|
|
35284
|
+
if (!answerIds) {
|
|
35285
|
+
return null;
|
|
35092
35286
|
}
|
|
35093
|
-
|
|
35094
|
-
|
|
35095
|
-
|
|
35287
|
+
var answers = onGetAnswers(answerIds);
|
|
35288
|
+
if (!answers) {
|
|
35289
|
+
return null;
|
|
35096
35290
|
}
|
|
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'
|
|
35291
|
+
return answers.map(function (answer) {
|
|
35292
|
+
var isSelected = (currentAnswer == null ? void 0 : currentAnswer.id) === (answer == null ? void 0 : answer.id);
|
|
35293
|
+
var selectedColor = isSelected ? 'yellow' : 'white';
|
|
35294
|
+
if (answer) {
|
|
35295
|
+
return React.createElement(AnswerRow, {
|
|
35296
|
+
key: "answer_" + answer.id
|
|
35297
|
+
}, React.createElement(AnswerSelectedIcon, {
|
|
35298
|
+
color: selectedColor
|
|
35299
|
+
}, isSelected ? 'X' : null), React.createElement(Answer, {
|
|
35300
|
+
key: answer.id,
|
|
35301
|
+
onPointerDown: function onPointerDown() {
|
|
35302
|
+
return onAnswerClick(answer);
|
|
35303
|
+
},
|
|
35304
|
+
color: selectedColor
|
|
35305
|
+
}, answer.text));
|
|
35117
35306
|
}
|
|
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'
|
|
35307
|
+
return null;
|
|
35308
|
+
});
|
|
35309
|
+
};
|
|
35310
|
+
return React.createElement(Container$g, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
|
|
35311
|
+
text: currentQuestion.text,
|
|
35312
|
+
onStart: function onStart() {
|
|
35313
|
+
return setCanShowAnswers(false);
|
|
35314
|
+
},
|
|
35315
|
+
onFinish: function onFinish() {
|
|
35316
|
+
return setCanShowAnswers(true);
|
|
35163
35317
|
}
|
|
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
|
-
})));
|
|
35318
|
+
})), canShowAnswers && React.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
35172
35319
|
};
|
|
35173
35320
|
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
|
-
})(["
|
|
35321
|
+
displayName: "QuestionDialog__Container",
|
|
35322
|
+
componentId: "sc-bxc5u0-0"
|
|
35323
|
+
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
35324
|
+
var QuestionContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35325
|
+
displayName: "QuestionDialog__QuestionContainer",
|
|
35326
|
+
componentId: "sc-bxc5u0-1"
|
|
35327
|
+
})(["flex:100%;width:100%;"]);
|
|
35328
|
+
var AnswersContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35329
|
+
displayName: "QuestionDialog__AnswersContainer",
|
|
35330
|
+
componentId: "sc-bxc5u0-2"
|
|
35331
|
+
})(["flex:100%;"]);
|
|
35332
|
+
var Answer = /*#__PURE__*/styled.p.withConfig({
|
|
35333
|
+
displayName: "QuestionDialog__Answer",
|
|
35334
|
+
componentId: "sc-bxc5u0-3"
|
|
35335
|
+
})(["flex:auto;color:", " !important;font-size:0.65rem !important;background:inherit;border:none;"], function (props) {
|
|
35336
|
+
return props.color;
|
|
35337
|
+
});
|
|
35338
|
+
var AnswerSelectedIcon = /*#__PURE__*/styled.span.withConfig({
|
|
35339
|
+
displayName: "QuestionDialog__AnswerSelectedIcon",
|
|
35340
|
+
componentId: "sc-bxc5u0-4"
|
|
35341
|
+
})(["flex:5% 0 0;color:", " !important;"], function (props) {
|
|
35342
|
+
return props.color;
|
|
35343
|
+
});
|
|
35344
|
+
var AnswerRow = /*#__PURE__*/styled.div.withConfig({
|
|
35345
|
+
displayName: "QuestionDialog__AnswerRow",
|
|
35346
|
+
componentId: "sc-bxc5u0-5"
|
|
35347
|
+
})(["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
35348
|
|
|
35186
35349
|
var ProgressBar = function ProgressBar(_ref) {
|
|
35187
35350
|
var max = _ref.max,
|
|
@@ -35240,7 +35403,7 @@ var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
|
35240
35403
|
return props.style;
|
|
35241
35404
|
});
|
|
35242
35405
|
|
|
35243
|
-
var img$
|
|
35406
|
+
var img$8 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl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hEZEKbeNrG0mJJ/MlOq0m9odTKRg/W+2OaDfqRh9xkmbPbaBIMrLJfInB/R0AoN2o4+v7B3GSAkAOzAXAwW0XH59QSpEOIzLCEHanuq31Zot+r1sIYcdwNDZgahIblww2GTxrXDb02B9OAIB+r4tOqymCYXtspRQkxMZ6s82lK8SG14jPBnccYmM6W6Df62ZWSkGkNjgt59p4eXyAt1h9NvSoasMJcs5MqWqj0IjEBncuNVdmIwcSYmN/OIlSUjZTnCD2Ui7pXLqK+tKSgTCEtOikBcrAvrQAQE2HkIwwTlJj2l7CBgBERKSUUrTaHQ3lcZI6t3G2IZ0pEhvZ7ssww9E4Wym5YUi6qoQioqDZwmB6emxDtg3ej97fXv0nNN64OHQrutbpbGG8o//2/DRwpsyXFsOI9DDjCv0j+oCkNowakR6iXSks+rjURtDhWS9q+1DtMiL5eC41lar9D8w2pQMVrR1nGym7p9hA/25EcrESXchu/wbcQDzxOwDLF0pIXBCe1wAAAABJRU5ErkJggg==';
|
|
35244
35407
|
|
|
35245
35408
|
var QuestInfo = function QuestInfo(_ref) {
|
|
35246
35409
|
var quests = _ref.quests,
|
|
@@ -35281,8 +35444,8 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
35281
35444
|
onPointerDown: onRightClick
|
|
35282
35445
|
}), React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
35283
35446
|
className: "drag-handler"
|
|
35284
|
-
}, React.createElement(Title$
|
|
35285
|
-
src: quests[currentIndex].thumbnail || img$
|
|
35447
|
+
}, React.createElement(Title$4, null, React.createElement(Thumbnail, {
|
|
35448
|
+
src: quests[currentIndex].thumbnail || img$8
|
|
35286
35449
|
}), quests[currentIndex].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
35287
35450
|
className: "golden"
|
|
35288
35451
|
}))), React.createElement(Content, null, React.createElement("p", null, quests[currentIndex].description)), React.createElement(QuestColumn, {
|
|
@@ -35300,8 +35463,8 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
35300
35463
|
}, button.title);
|
|
35301
35464
|
})))) : React.createElement(QuestsContainer, null, React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
35302
35465
|
className: "drag-handler"
|
|
35303
|
-
}, React.createElement(Title$
|
|
35304
|
-
src: quests[0].thumbnail || img$
|
|
35466
|
+
}, React.createElement(Title$4, null, React.createElement(Thumbnail, {
|
|
35467
|
+
src: quests[0].thumbnail || img$8
|
|
35305
35468
|
}), quests[0].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
35306
35469
|
className: "golden"
|
|
35307
35470
|
}))), React.createElement(Content, null, React.createElement("p", null, quests[0].description)), React.createElement(QuestColumn, {
|
|
@@ -35347,7 +35510,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
35347
35510
|
displayName: "QuestInfo__TitleContainer",
|
|
35348
35511
|
componentId: "sc-15s2boc-6"
|
|
35349
35512
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
35350
|
-
var Title$
|
|
35513
|
+
var Title$4 = /*#__PURE__*/styled.h1.withConfig({
|
|
35351
35514
|
displayName: "QuestInfo__Title",
|
|
35352
35515
|
componentId: "sc-15s2boc-7"
|
|
35353
35516
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
@@ -35369,7 +35532,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
35369
35532
|
style: {
|
|
35370
35533
|
width: '100%'
|
|
35371
35534
|
}
|
|
35372
|
-
}, React.createElement(Title$
|
|
35535
|
+
}, React.createElement(Title$5, null, "Quests"), React.createElement("hr", {
|
|
35373
35536
|
className: "golden"
|
|
35374
35537
|
}), React.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
|
|
35375
35538
|
return React.createElement("div", {
|
|
@@ -35390,7 +35553,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
|
|
|
35390
35553
|
displayName: "QuestList__QuestDraggableContainer",
|
|
35391
35554
|
componentId: "sc-1a2vx6q-0"
|
|
35392
35555
|
})([".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$
|
|
35556
|
+
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
35394
35557
|
displayName: "QuestList__Title",
|
|
35395
35558
|
componentId: "sc-1a2vx6q-1"
|
|
35396
35559
|
})(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
|
|
@@ -35795,9 +35958,9 @@ var Spell = function Spell(_ref) {
|
|
|
35795
35958
|
className: "spell"
|
|
35796
35959
|
}, disabled && React.createElement(Overlay, null, charMagicLevel < minMagicLevelRequired ? 'Low magic level' : manaCost > charMana && 'No mana'), React.createElement(SpellImage, null, magicWords.split(' ').map(function (word) {
|
|
35797
35960
|
return word[0];
|
|
35798
|
-
})), React.createElement(Info, null, React.createElement(Title$
|
|
35961
|
+
})), React.createElement(Info, null, React.createElement(Title$6, null, React.createElement("span", null, name), React.createElement("span", {
|
|
35799
35962
|
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", {
|
|
35963
|
+
}, "(", 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
35964
|
className: "mana"
|
|
35802
35965
|
}, manaCost)));
|
|
35803
35966
|
};
|
|
@@ -35816,11 +35979,11 @@ var Info = /*#__PURE__*/styled.span.withConfig({
|
|
|
35816
35979
|
displayName: "Spell__Info",
|
|
35817
35980
|
componentId: "sc-j96fa2-2"
|
|
35818
35981
|
})(["width:0;flex:1;"]);
|
|
35819
|
-
var Title$
|
|
35982
|
+
var Title$6 = /*#__PURE__*/styled.p.withConfig({
|
|
35820
35983
|
displayName: "Spell__Title",
|
|
35821
35984
|
componentId: "sc-j96fa2-3"
|
|
35822
35985
|
})(["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({
|
|
35986
|
+
var Description$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35824
35987
|
displayName: "Spell__Description",
|
|
35825
35988
|
componentId: "sc-j96fa2-4"
|
|
35826
35989
|
})(["font-size:", " !important;line-height:1.1 !important;"], uiFonts.size.small);
|
|
@@ -35886,7 +36049,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
35886
36049
|
width: "inherit",
|
|
35887
36050
|
height: "inherit",
|
|
35888
36051
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell"
|
|
35889
|
-
}, React.createElement(Container$k, null, React.createElement(Title$
|
|
36052
|
+
}, React.createElement(Container$k, null, React.createElement(Title$7, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
|
|
35890
36053
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
35891
36054
|
settingShortcutIndex: settingShortcutIndex,
|
|
35892
36055
|
shortcuts: shortcuts,
|
|
@@ -35914,7 +36077,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
35914
36077
|
}, spell)));
|
|
35915
36078
|
}))));
|
|
35916
36079
|
};
|
|
35917
|
-
var Title$
|
|
36080
|
+
var Title$7 = /*#__PURE__*/styled.h1.withConfig({
|
|
35918
36081
|
displayName: "Spellbook__Title",
|
|
35919
36082
|
componentId: "sc-r02nfq-0"
|
|
35920
36083
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
@@ -35932,16 +36095,16 @@ var TextArea = function TextArea(_ref) {
|
|
|
35932
36095
|
return React.createElement("textarea", Object.assign({}, props));
|
|
35933
36096
|
};
|
|
35934
36097
|
|
|
35935
|
-
var img$
|
|
36098
|
+
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/y8uzAjvFUddEkGGRHKPZMlN8lCqXGmgpctuJs90XDdzpc2bynJWgSjh40yLP4ECE1pHZs8DB5MqPcd0ClEARlVCjTpy6kadTrWC7KpU4NaDVndeyNqTa4GpSzedBblHbcGUbSmSddlprsokV7HizYtAKsO+hBEYCCw48UTD+RAnZsw2L0aApfy2pTw48eWGczX3ZNzYsdtNAf2KVkm6tOnC2+JqXg2ytWBStiSLzWv7dh5XBHS/Pti7nj9TW2kT7u1bT03dB5SPtuuMnfMkqqXXpl79uhLR2icyj+gdSfjN3FF6Pz89kXU3itnPHO/xfXlm6VXZv3+ShnH+gOUnikAUAFpFny7/XYeGGBOssR8qQjBYQRQPpoOGgHc4WOEeY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Zz4+PSVUWdhC4KDB6D9A2hOoBeCYwQcnIggoRJ3DLnFe8gvg0GKCP8vLswI7xVHXRJBhkRyj2TJTfJQqlxpoKXLbibPdFw3c6XNm8pyVoEo4eNMiz+BAhNaR2bPAweTKj3HdApRAEZVQo06cupGnU61guyqVODWg1Z3Xsjak2uBqUs3nQW5R23BlG0pknXZaa7KJFex4s2LQCrDvoQRGAgsOPFEw/kQJ2bMNi9GgKX8tqU8OPHlhnM192Tc2LHbTQH9ilZJurTpwtvial4NsrVgUrYki81r+3YeVwR0vz7Yu54/U1tpE+7tW09N3QeUj7brjJ3zJKql16Ze/boS0donMo/oHUn4zdxRej8/PZF1N4rZzxzv8X15ZulV2b9/koZx/oDlJ4pAFABaRZ8u/12HhhgTrLEfKkIwWEEUD6aDhoB3OFjhHmBgGAeFQQQxhITE5GAiiSimqOKKLLbo4oswxijjjBdEAAA7';
|
|
35936
36099
|
|
|
35937
|
-
var img$
|
|
36100
|
+
var img$a = 'data:image/gif;base64,R0lGODlhTgBNAPMAAAAAALcILyZ31ESZ+lrC/1Ds//vvpv3wo4G8//////38+QAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAAIf4gQ3JlYXRlZCB3aXRoIGV6Z2lmLmNvbSBHSUYgbWFrZXIALAAAAABOAE0AAAT/EMhJq7046827/2AojmRpnmiqrmzrvnAsz2tg37hNq7jg/0AfbjeyAQfIpBIJ1BE5N99ySmUKbk9M4FftUn+BLMXoLXev4exWYG5/r8+te/5Nz+T0vBIu2yL+gIGCg4SFgXwvfoaLjIyILIqNkpOAjymRlAgHm5ybmZV2KHh0naWcepYlo22mradzqUUClK61nJSxIJiMrgm+v664oSKrXqa/yMmmbrkexVXHydK+y2bNULON0dPTppLXGs9UpdzlCaVt4FpsZuTm5ejWwx3iU53v753p89jtnPj49JVRZ2ELgYMFoP0DaE6gF4JjBBycSCChEncMucV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/gepSBwX8XiHdXmZsuZRf2OGZ2klekqt7rVW9lE8MNpqdZ5ziky8uTa05APEdw19yDYpympDj/+xraeuIPRgpRKTSwv/AHng3nXgbEeDwPOV6AOB/JXQw4Q7hCgMTFUOOGFGGao4YYcdujhhyCGKOIDCQAAIf8LSW1hZ2VNYWdpY2sNZ2FtbWE9MC40NTQ1NQAh+QQBFAAAACwAAAAATgBNAAAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKquI+G+sMuKsGDfuA3Pm4sHwKAQiJPxKC/bcMkkCl5HCOHWrDJvhCjDZ+1Wn9noVOANHA5loe44TZvR7uBz1o7b1eHUdMDv+/+AgYJ+cyh7g4iJiYUlh4qPkH2MNAIDBn6XkZqBkx91dwahoqFucER5nmRBZ16hZ6+vpHadHI58Z4iusLtnoZu0GbaKurzFB76RwBefAQZCzs/G0rFuyhbMVgbT28dp1kiVj9rcB4CwmYrfEthN49tW1F7qUqqt72XdZfMO7EzuxnHyddnXoN+Sf7xA6UN1rV4VhLvuVGMIrgxEWBInYjAYTf9aRo3LHLab9tEbxXUi/Xm0Aw1kQ3sAWc46GYFjkIus7BSYuTHlwZVuChzY6bICO1NAcCLNZkDomQKyBtKkB7OYzqH4TvW0CDQN0aIVqyaM09JkMJ8/Y6YpK29qTbRDlJaUqsFmR6tzmxDcAjcuybxL9vJd+xew1h59/RaWeTOA4IKJ73YF0gvsWbJKi0WtkvMxZFCZe7HlDMfzZ9DGNltGnHHUKLJy3G6lvNRw2xaqctpe2Cjybjwn7P4+HNz3ndrEDUVGfsd0XeMlnSOGPkt6LeHNjWgBMIa63jXbt/jwLgeMbDHdIxc5H557khzwd7QPFqP+/Pv48+vfz7+///8FAAbIXwIAOw==';
|
|
35940
36103
|
|
|
35941
36104
|
var DayNightPeriod = function DayNightPeriod(_ref) {
|
|
35942
36105
|
var _periodOfDaySrcFiles;
|
|
35943
36106
|
var periodOfDay = _ref.periodOfDay;
|
|
35944
|
-
var periodOfDaySrcFiles = (_periodOfDaySrcFiles = {}, _periodOfDaySrcFiles[PeriodOfDay.Morning] = img$
|
|
36107
|
+
var periodOfDaySrcFiles = (_periodOfDaySrcFiles = {}, _periodOfDaySrcFiles[PeriodOfDay.Morning] = img$a, _periodOfDaySrcFiles[PeriodOfDay.Afternoon] = img$9, _periodOfDaySrcFiles[PeriodOfDay.Night] = img$b, _periodOfDaySrcFiles);
|
|
35945
36108
|
return React.createElement(GifContainer, null, React.createElement("img", {
|
|
35946
36109
|
src: periodOfDaySrcFiles[periodOfDay]
|
|
35947
36110
|
}));
|
|
@@ -35951,7 +36114,7 @@ var GifContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
35951
36114
|
componentId: "sc-10t97fw-0"
|
|
35952
36115
|
})(["width:100%;img{width:67%;}"]);
|
|
35953
36116
|
|
|
35954
|
-
var img$
|
|
36117
|
+
var img$c = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAABHCAYAAAA0qHhdAAAAAXNSR0IArs4c6QAABGRJREFUeJztnb9PGzEUx7+JMjC0Uge6tVsVdTghQP0D2qgjzGz8D8woE2LO/5CNOcwlU9WJRCgDYmWJRAYkFgak6wDv5HPsO9/P8J79WUhicr7nzz3bOV8uHbRPXOXN2x++1LUfYnh4uu8AQK+FulLy7hbHxn96vrh22tjW0b7xPVtH+87bkMbnj1/jh6f7TqfBOmKgurwy6MJ10VRuKqNylwMl7wBy3U5WuetBOhg9om6ZSRaqEtvImJ2zRfL4/GA3eXy494LJzNwBmcpc//9w7wUAMJn1ktdt5bbnaj228qw6VeqWGbctUEXNxn40Fj+2/jn5lHpel8xUd+oqcedsUajum2HkNHEiqf1oDAD4/e1HkWrYMF8uE6GTWQ+j6aryBCh2lVhUXt77bXJpP2i/+tE41e1y5uo2W1cVmfHd4rhxiXnbdZEqReiv76/jpE1q2YbOFNmUwDxsYreO9lkLvbrtJSLp+Xy5xN9/g8TBYPSIboltv0uRWXU/X1zjbnGM08t527tUC7aM1B0UbXiryE1KNGHKUu4ZqjKarpLMpAlQkcxkIxIw7xP3DLVBnzldZbISSUgXqvtwkclSJCFNqDpu0mdqOkOUJ5O1SEKSUHVWWyQzRYgkJAml7KTMzBszRYkkJAhVu1ny49rNpuAskuAaw9VtL/d0nikwY1ZybQQb+udQ+gzKZbXFtGqiq3Y63yoR6m770Rg3wyi1gK1iel1dQNbLqazsX9M2dKib1bPNi6wkbNl5M4w2tUulGIwe8fB031nrhH0RCbzGpgrVJxSEaYXfdoWCrdxE1lUNtnJ9+6PpKrmgSxUVm45IyTIB8zncnbPF2th58nMbo+kq9zUX8t5XpC4SCQSZVpkovzy4MWiHvRRJSBFaZj0z8E6xyvQlKwE5sYbMFEQXlvHSd97apNL3YtomZKYgjDKljCFFkBBzyExBBJmCCDIFEWQKIsgURJApiCBTEEGmILqA26q4b3Bsk5CZgjDKdL1/gCQkxJzI5NitNAXXtugC6HC5NL9N3tqE1cn3MGYKIiVT7V4kjCGuqLFy7WIBw61jOAdTFikxp66bPT/YXbsnm4RF2yz0Hmgy67EcLwHDmCnlKC0D99hVmcmslntQZaCYuWYlYPgWmOkeOaeXc5bB5XF+sLs2yeMs05iC+rh5uBfF0sbO17EyHSf3HkkfMzunl3P2QZWB88SHsO246JmtpBmsSuYZoMmsJ+5Egn6CQFIvlHUkrk2GKFO5ZiiJ1AVKyEogPwDj7BbgN8M1zVwBOSIBtyDYC/VBJOAeCFuhvogEigXDTqhPIoESd4LmItQ3kUC5oKxCgc1LtUkEZIsEKvx6wnsU6rNIoFpwmUKJpsVmCVT2ARAuEqgeoJNQoH6pLhLf6gU8EAnUE2QMoPDPSxSV6ypP2T499EIkUG+gzlnaND5lo0pjv5/Ztljt2l/vRALNBl2q+y2Kj92pjTYaIDXWVZVruPree4nEJhqi6ppokGfhP6xr60VVr5O+AAAAAElFTkSuQmCC';
|
|
35955
36118
|
|
|
35956
36119
|
var TimeWidget = function TimeWidget(_ref) {
|
|
35957
36120
|
var onClose = _ref.onClose,
|
|
@@ -35966,7 +36129,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
35966
36129
|
var WidgetContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35967
36130
|
displayName: "TimeWidget__WidgetContainer",
|
|
35968
36131
|
componentId: "sc-1ja236h-0"
|
|
35969
|
-
})(["background-image:url(", ");background-size:10rem;background-repeat:no-repeat;width:10rem;position:absolute;height:100px;"], img$
|
|
36132
|
+
})(["background-image:url(", ");background-size:10rem;background-repeat:no-repeat;width:10rem;position:absolute;height:100px;"], img$c);
|
|
35970
36133
|
var Time = /*#__PURE__*/styled.div.withConfig({
|
|
35971
36134
|
displayName: "TimeWidget__Time",
|
|
35972
36135
|
componentId: "sc-1ja236h-1"
|
|
@@ -35986,7 +36149,9 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
35986
36149
|
atlasJSON = _ref.atlasJSON,
|
|
35987
36150
|
onQuantityChange = _ref.onQuantityChange,
|
|
35988
36151
|
traderItem = _ref.traderItem,
|
|
35989
|
-
selectedQty = _ref.selectedQty
|
|
36152
|
+
selectedQty = _ref.selectedQty,
|
|
36153
|
+
equipmentSet = _ref.equipmentSet,
|
|
36154
|
+
scale = _ref.scale;
|
|
35990
36155
|
var onLeftClick = function onLeftClick(qty) {
|
|
35991
36156
|
if (qty === void 0) {
|
|
35992
36157
|
qty = 1;
|
|
@@ -35994,22 +36159,28 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
35994
36159
|
onQuantityChange(traderItem, Math.max(0, selectedQty - qty));
|
|
35995
36160
|
};
|
|
35996
36161
|
var onRightClick = function onRightClick(qty) {
|
|
35997
|
-
var _traderItem$
|
|
36162
|
+
var _traderItem$stackQty;
|
|
35998
36163
|
if (qty === void 0) {
|
|
35999
36164
|
qty = 1;
|
|
36000
36165
|
}
|
|
36001
|
-
onQuantityChange(traderItem, Math.min((_traderItem$
|
|
36166
|
+
onQuantityChange(traderItem, Math.min((_traderItem$stackQty = traderItem.stackQty) != null ? _traderItem$stackQty : 999, selectedQty + qty));
|
|
36002
36167
|
};
|
|
36003
|
-
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer$1, null, React.createElement(
|
|
36168
|
+
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer$1, null, React.createElement(ItemInfoWrapper, {
|
|
36169
|
+
atlasIMG: atlasIMG,
|
|
36170
|
+
atlasJSON: atlasJSON,
|
|
36171
|
+
equipmentSet: equipmentSet,
|
|
36172
|
+
item: traderItem,
|
|
36173
|
+
scale: scale
|
|
36174
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
36004
36175
|
atlasIMG: atlasIMG,
|
|
36005
36176
|
atlasJSON: atlasJSON,
|
|
36006
36177
|
spriteKey: getItemTextureKeyPath({
|
|
36007
36178
|
key: traderItem.key,
|
|
36008
|
-
stackQty: traderItem.
|
|
36179
|
+
stackQty: traderItem.stackQty || 1,
|
|
36009
36180
|
texturePath: traderItem.texturePath
|
|
36010
36181
|
}, atlasJSON),
|
|
36011
36182
|
imgScale: 2.5
|
|
36012
|
-
}))), React.createElement(ItemNameContainer, null, React.createElement(NameValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
36183
|
+
})))), React.createElement(ItemNameContainer, null, React.createElement(NameValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
36013
36184
|
maxLines: 1,
|
|
36014
36185
|
maxWidth: "250px"
|
|
36015
36186
|
}, capitalize(traderItem.name))), React.createElement("p", null, "$", traderItem.price))), React.createElement(QuantityContainer, null, React.createElement(SelectArrow, {
|
|
@@ -36082,7 +36253,9 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36082
36253
|
atlasJSON = _ref.atlasJSON,
|
|
36083
36254
|
atlasIMG = _ref.atlasIMG,
|
|
36084
36255
|
characterAvailableGold = _ref.characterAvailableGold,
|
|
36085
|
-
onConfirm = _ref.onConfirm
|
|
36256
|
+
onConfirm = _ref.onConfirm,
|
|
36257
|
+
equipmentSet = _ref.equipmentSet,
|
|
36258
|
+
scale = _ref.scale;
|
|
36086
36259
|
var _useState = useState(0),
|
|
36087
36260
|
sum = _useState[0],
|
|
36088
36261
|
setSum = _useState[1];
|
|
@@ -36140,7 +36313,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36140
36313
|
style: {
|
|
36141
36314
|
width: '100%'
|
|
36142
36315
|
}
|
|
36143
|
-
}, React.createElement(Title$
|
|
36316
|
+
}, React.createElement(Title$8, null, Capitalize(type), " Menu"), React.createElement("hr", {
|
|
36144
36317
|
className: "golden"
|
|
36145
36318
|
})), React.createElement(TradingComponentScrollWrapper, {
|
|
36146
36319
|
id: "TraderContainer"
|
|
@@ -36153,7 +36326,9 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36153
36326
|
atlasJSON: atlasJSON,
|
|
36154
36327
|
onQuantityChange: onQuantityChange,
|
|
36155
36328
|
traderItem: tradeItem,
|
|
36156
|
-
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
|
|
36329
|
+
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0,
|
|
36330
|
+
equipmentSet: equipmentSet,
|
|
36331
|
+
scale: scale
|
|
36157
36332
|
}));
|
|
36158
36333
|
})), 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
36334
|
buttonType: ButtonTypes.RPGUIButton,
|
|
@@ -36168,7 +36343,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36168
36343
|
}
|
|
36169
36344
|
}, "Cancel"))));
|
|
36170
36345
|
};
|
|
36171
|
-
var Title$
|
|
36346
|
+
var Title$8 = /*#__PURE__*/styled.h1.withConfig({
|
|
36172
36347
|
displayName: "TradingMenu__Title",
|
|
36173
36348
|
componentId: "sc-1wjsz1l-0"
|
|
36174
36349
|
})(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
|
|
@@ -36213,5 +36388,219 @@ var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
|
36213
36388
|
return props.maxLines;
|
|
36214
36389
|
});
|
|
36215
36390
|
|
|
36216
|
-
|
|
36391
|
+
var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
|
|
36392
|
+
|
|
36393
|
+
var chunkString = function chunkString(str, length) {
|
|
36394
|
+
return str.match(new RegExp('.{1,' + length + '}', 'g'));
|
|
36395
|
+
};
|
|
36396
|
+
|
|
36397
|
+
var img$d = 'data:image/gif;base64,R0lGODlhEAAQAPIAAAAAABQYLiw1TUBJc2hvmQAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAM9CLrc/lCFGSKYJJP5AhlguDnBMIVgxXgmJapSSp3mKs/pKrT0IMCXUk+2Cgh2oSOnaDz+lswZpSOFUq2KBAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAIzhI+py90Bg4OjDrjCELxfFQhQx0mIJkaeaYRp5LJADMdnqXbyOJLYTdKBejjZoRaZJBMFACH/C0ltYWdlTWFnaWNrDWdhbW1hPTAuNDU0NTUAIfkEARQAAAAsAAAAABAAEAAAAjKEj6nL7Y+CDE6OO+QKQ/ifKYEgfR4VddPohQe7lmR0xidNTib65uacYP2AQWGuMlEUAAA7';
|
|
36398
|
+
|
|
36399
|
+
var NPCDialogText = function NPCDialogText(_ref) {
|
|
36400
|
+
var text = _ref.text,
|
|
36401
|
+
onClose = _ref.onClose,
|
|
36402
|
+
onEndStep = _ref.onEndStep,
|
|
36403
|
+
onStartStep = _ref.onStartStep,
|
|
36404
|
+
type = _ref.type;
|
|
36405
|
+
var windowSize = useRef([window.innerWidth, window.innerHeight]);
|
|
36406
|
+
function maxCharacters(width) {
|
|
36407
|
+
// Set the font size to 16 pixels
|
|
36408
|
+
var fontSize = 11.2;
|
|
36409
|
+
// Calculate the number of characters that can fit in one line
|
|
36410
|
+
var charactersPerLine = Math.floor(width / 2 / fontSize);
|
|
36411
|
+
// Calculate the number of lines that can fit in the div
|
|
36412
|
+
var linesPerDiv = Math.floor(180 / fontSize);
|
|
36413
|
+
// Calculate the maximum number of characters that can fit in the div
|
|
36414
|
+
var maxCharacters = charactersPerLine * linesPerDiv;
|
|
36415
|
+
// Return the maximum number of characters
|
|
36416
|
+
return Math.round(maxCharacters / 5);
|
|
36417
|
+
}
|
|
36418
|
+
var textChunks = chunkString(text, maxCharacters(windowSize.current[0]));
|
|
36419
|
+
var _useState = useState(0),
|
|
36420
|
+
chunkIndex = _useState[0],
|
|
36421
|
+
setChunkIndex = _useState[1];
|
|
36422
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
36423
|
+
if (event.code === 'Space') {
|
|
36424
|
+
goToNextStep();
|
|
36425
|
+
}
|
|
36426
|
+
};
|
|
36427
|
+
var goToNextStep = function goToNextStep() {
|
|
36428
|
+
var hasNextChunk = (textChunks == null ? void 0 : textChunks[chunkIndex + 1]) || false;
|
|
36429
|
+
if (hasNextChunk) {
|
|
36430
|
+
setChunkIndex(function (prev) {
|
|
36431
|
+
return prev + 1;
|
|
36432
|
+
});
|
|
36433
|
+
} else {
|
|
36434
|
+
// if there's no more text chunks, close the dialog
|
|
36435
|
+
onClose();
|
|
36436
|
+
}
|
|
36437
|
+
};
|
|
36438
|
+
useEffect(function () {
|
|
36439
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
36440
|
+
return function () {
|
|
36441
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
36442
|
+
};
|
|
36443
|
+
}, [chunkIndex]);
|
|
36444
|
+
var _useState2 = useState(false),
|
|
36445
|
+
showGoNextIndicator = _useState2[0],
|
|
36446
|
+
setShowGoNextIndicator = _useState2[1];
|
|
36447
|
+
return React.createElement(Container$m, null, React.createElement(DynamicText, {
|
|
36448
|
+
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
36449
|
+
onFinish: function onFinish() {
|
|
36450
|
+
setShowGoNextIndicator(true);
|
|
36451
|
+
onEndStep && onEndStep();
|
|
36452
|
+
},
|
|
36453
|
+
onStart: function onStart() {
|
|
36454
|
+
setShowGoNextIndicator(false);
|
|
36455
|
+
onStartStep && onStartStep();
|
|
36456
|
+
}
|
|
36457
|
+
}), showGoNextIndicator && React.createElement(PressSpaceIndicator$1, {
|
|
36458
|
+
right: type === NPCDialogType.TextOnly ? '1rem' : '10.5rem',
|
|
36459
|
+
src: IS_MOBILE_OR_TABLET ? img$d : img$7,
|
|
36460
|
+
onPointerDown: function onPointerDown() {
|
|
36461
|
+
goToNextStep();
|
|
36462
|
+
}
|
|
36463
|
+
}));
|
|
36464
|
+
};
|
|
36465
|
+
var Container$m = /*#__PURE__*/styled.div.withConfig({
|
|
36466
|
+
displayName: "NPCDialogText__Container",
|
|
36467
|
+
componentId: "sc-1cxkdh9-0"
|
|
36468
|
+
})([""]);
|
|
36469
|
+
var PressSpaceIndicator$1 = /*#__PURE__*/styled.img.withConfig({
|
|
36470
|
+
displayName: "NPCDialogText__PressSpaceIndicator",
|
|
36471
|
+
componentId: "sc-1cxkdh9-1"
|
|
36472
|
+
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref2) {
|
|
36473
|
+
var right = _ref2.right;
|
|
36474
|
+
return right;
|
|
36475
|
+
});
|
|
36476
|
+
|
|
36477
|
+
var NPCDialogType;
|
|
36478
|
+
(function (NPCDialogType) {
|
|
36479
|
+
NPCDialogType["TextOnly"] = "TextOnly";
|
|
36480
|
+
NPCDialogType["TextAndThumbnail"] = "TextAndThumbnail";
|
|
36481
|
+
})(NPCDialogType || (NPCDialogType = {}));
|
|
36482
|
+
var NPCDialog = function NPCDialog(_ref) {
|
|
36483
|
+
var text = _ref.text,
|
|
36484
|
+
type = _ref.type,
|
|
36485
|
+
_onClose = _ref.onClose,
|
|
36486
|
+
imagePath = _ref.imagePath,
|
|
36487
|
+
_ref$isQuestionDialog = _ref.isQuestionDialog,
|
|
36488
|
+
isQuestionDialog = _ref$isQuestionDialog === void 0 ? false : _ref$isQuestionDialog,
|
|
36489
|
+
questions = _ref.questions,
|
|
36490
|
+
answers = _ref.answers;
|
|
36491
|
+
return React.createElement(RPGUIContainer, {
|
|
36492
|
+
type: RPGUIContainerTypes.FramedGold,
|
|
36493
|
+
width: isQuestionDialog ? '600px' : '80%',
|
|
36494
|
+
height: '180px'
|
|
36495
|
+
}, isQuestionDialog && questions && answers ? React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
|
|
36496
|
+
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
36497
|
+
}, React.createElement(QuestionDialog, {
|
|
36498
|
+
questions: questions,
|
|
36499
|
+
answers: answers,
|
|
36500
|
+
onClose: function onClose() {
|
|
36501
|
+
if (_onClose) {
|
|
36502
|
+
_onClose();
|
|
36503
|
+
}
|
|
36504
|
+
}
|
|
36505
|
+
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
36506
|
+
src: imagePath || img$6
|
|
36507
|
+
}))) : React.createElement(React.Fragment, null, React.createElement(Container$n, null, React.createElement(TextContainer$2, {
|
|
36508
|
+
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
36509
|
+
}, React.createElement(NPCDialogText, {
|
|
36510
|
+
type: type,
|
|
36511
|
+
text: text || 'No text provided.',
|
|
36512
|
+
onClose: function onClose() {
|
|
36513
|
+
if (_onClose) {
|
|
36514
|
+
_onClose();
|
|
36515
|
+
}
|
|
36516
|
+
}
|
|
36517
|
+
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
36518
|
+
src: imagePath || img$6
|
|
36519
|
+
})))));
|
|
36520
|
+
};
|
|
36521
|
+
var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
36522
|
+
displayName: "NPCDialog__Container",
|
|
36523
|
+
componentId: "sc-1b4aw74-0"
|
|
36524
|
+
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
36525
|
+
var TextContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
36526
|
+
displayName: "NPCDialog__TextContainer",
|
|
36527
|
+
componentId: "sc-1b4aw74-1"
|
|
36528
|
+
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
36529
|
+
var flex = _ref2.flex;
|
|
36530
|
+
return flex;
|
|
36531
|
+
});
|
|
36532
|
+
var ThumbnailContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
36533
|
+
displayName: "NPCDialog__ThumbnailContainer",
|
|
36534
|
+
componentId: "sc-1b4aw74-2"
|
|
36535
|
+
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
36536
|
+
var NPCThumbnail$1 = /*#__PURE__*/styled.img.withConfig({
|
|
36537
|
+
displayName: "NPCDialog__NPCThumbnail",
|
|
36538
|
+
componentId: "sc-1b4aw74-3"
|
|
36539
|
+
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
36540
|
+
|
|
36541
|
+
var HistoryDialog = function HistoryDialog(_ref) {
|
|
36542
|
+
var backgroundImgPath = _ref.backgroundImgPath,
|
|
36543
|
+
fullCoverBackground = _ref.fullCoverBackground,
|
|
36544
|
+
questions = _ref.questions,
|
|
36545
|
+
answers = _ref.answers,
|
|
36546
|
+
text = _ref.text,
|
|
36547
|
+
imagePath = _ref.imagePath,
|
|
36548
|
+
textAndTypeArray = _ref.textAndTypeArray,
|
|
36549
|
+
onClose = _ref.onClose;
|
|
36550
|
+
var _useState = useState(0),
|
|
36551
|
+
img = _useState[0],
|
|
36552
|
+
setImage = _useState[1];
|
|
36553
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
36554
|
+
if (event.code === 'Space') {
|
|
36555
|
+
if (img < (backgroundImgPath == null ? void 0 : backgroundImgPath.length) - 1) {
|
|
36556
|
+
setImage(function (prev) {
|
|
36557
|
+
return prev + 1;
|
|
36558
|
+
});
|
|
36559
|
+
} else {
|
|
36560
|
+
// if there's no more text chunks, close the dialog
|
|
36561
|
+
onClose();
|
|
36562
|
+
}
|
|
36563
|
+
}
|
|
36564
|
+
};
|
|
36565
|
+
useEffect(function () {
|
|
36566
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
36567
|
+
return function () {
|
|
36568
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
36569
|
+
};
|
|
36570
|
+
}, [backgroundImgPath]);
|
|
36571
|
+
return React.createElement(BackgroundContainer, {
|
|
36572
|
+
imgPath: backgroundImgPath[img],
|
|
36573
|
+
fullImg: fullCoverBackground
|
|
36574
|
+
}, React.createElement(DialogContainer, null, textAndTypeArray ? React.createElement(NPCMultiDialog, {
|
|
36575
|
+
textAndTypeArray: textAndTypeArray,
|
|
36576
|
+
onClose: onClose
|
|
36577
|
+
}) : questions && answers ? React.createElement(QuestionDialog, {
|
|
36578
|
+
questions: questions,
|
|
36579
|
+
answers: answers,
|
|
36580
|
+
onClose: onClose
|
|
36581
|
+
}) : text && imagePath ? React.createElement(NPCDialog, {
|
|
36582
|
+
text: text,
|
|
36583
|
+
imagePath: imagePath,
|
|
36584
|
+
onClose: onClose,
|
|
36585
|
+
type: NPCDialogType.TextAndThumbnail
|
|
36586
|
+
}) : React.createElement(NPCDialog, {
|
|
36587
|
+
text: text,
|
|
36588
|
+
onClose: onClose,
|
|
36589
|
+
type: NPCDialogType.TextOnly
|
|
36590
|
+
})));
|
|
36591
|
+
};
|
|
36592
|
+
var BackgroundContainer = /*#__PURE__*/styled.div.withConfig({
|
|
36593
|
+
displayName: "HistoryDialog__BackgroundContainer",
|
|
36594
|
+
componentId: "sc-u6oe75-0"
|
|
36595
|
+
})(["width:100%;height:100%;background-image:url(", ");background-size:", ";display:flex;justify-content:space-evenly;align-items:center;"], function (props) {
|
|
36596
|
+
return props.imgPath;
|
|
36597
|
+
}, function (props) {
|
|
36598
|
+
return props.imgPath ? 'cover' : 'auto';
|
|
36599
|
+
});
|
|
36600
|
+
var DialogContainer = /*#__PURE__*/styled.div.withConfig({
|
|
36601
|
+
displayName: "HistoryDialog__DialogContainer",
|
|
36602
|
+
componentId: "sc-u6oe75-1"
|
|
36603
|
+
})(["display:flex;justify-content:center;padding-top:200px;"]);
|
|
36604
|
+
|
|
36605
|
+
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
36606
|
//# sourceMappingURL=long-bow.esm.js.map
|