@rpg-engine/long-bow 0.3.70 → 0.3.71
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 +2 -1
- package/dist/components/Item/Cards/ItemInfo.d.ts +10 -0
- package/dist/components/Item/Cards/ItemInfoDisplay.d.ts +9 -0
- package/dist/components/Item/Cards/ItemInfoWrapper.d.ts +11 -0
- package/dist/components/Item/Cards/ItemTooltip.d.ts +7 -4
- 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 +2 -1
- package/dist/components/TradingMenu/TradingMenu.d.ts +4 -3
- package/dist/components/shared/SpriteFromAtlas.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +1220 -951
- 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 +1222 -955
- 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 +237 -227
- package/src/components/CraftBook/MockItems.ts +41 -46
- 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 +120 -0
- package/src/components/Item/Cards/ItemInfoWrapper.tsx +39 -0
- package/src/components/Item/Cards/ItemTooltip.tsx +85 -33
- 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 +512 -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 +198 -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 +195 -181
- package/src/components/TradingMenu/TradingMenu.tsx +211 -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,200 +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: ".equipment-container-body .arrow-selector .rpgui-dropdown-imp",
|
|
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, null, craftablesItems == null ? void 0 : craftablesItems.map(function (option, index) {
|
|
33431
|
-
return React.createElement(RadioOptionsWrapper, {
|
|
33432
|
-
key: index
|
|
33433
|
-
}, React.createElement(SpriteAtlasWrapper, null, React.createElement(SpriteFromAtlas, {
|
|
33434
|
-
atlasIMG: atlasIMG,
|
|
33435
|
-
atlasJSON: atlasJSON,
|
|
33436
|
-
spriteKey: option.texturePath,
|
|
33437
|
-
imgScale: 3,
|
|
33438
|
-
grayScale: !option.canCraft
|
|
33439
|
-
})), React.createElement("div", null, React.createElement("div", {
|
|
33440
|
-
onPointerDown: function onPointerDown() {
|
|
33441
|
-
return handleClick(option.key);
|
|
33442
|
-
}
|
|
33443
|
-
}, React.createElement("input", {
|
|
33444
|
-
className: "rpgui-radio",
|
|
33445
|
-
type: "radio",
|
|
33446
|
-
value: option.name,
|
|
33447
|
-
name: "test",
|
|
33448
|
-
disabled: !option.canCraft,
|
|
33449
|
-
checked: craftItem === option.key,
|
|
33450
|
-
onChange: function onChange() {
|
|
33451
|
-
return handleClick(option.key);
|
|
33452
|
-
}
|
|
33453
|
-
}), React.createElement("label", {
|
|
33454
|
-
onPointerDown: function onPointerDown() {
|
|
33455
|
-
handleClick(option.key);
|
|
33456
|
-
},
|
|
33457
|
-
onTouchEnd: function onTouchEnd() {
|
|
33458
|
-
setIsShown({
|
|
33459
|
-
show: true,
|
|
33460
|
-
index: index
|
|
33461
|
-
});
|
|
33462
|
-
},
|
|
33463
|
-
style: {
|
|
33464
|
-
display: 'flex',
|
|
33465
|
-
alignItems: 'center'
|
|
33466
|
-
},
|
|
33467
|
-
onMouseEnter: function onMouseEnter() {
|
|
33468
|
-
return setIsShown({
|
|
33469
|
-
show: true,
|
|
33470
|
-
index: index
|
|
33471
|
-
});
|
|
33472
|
-
},
|
|
33473
|
-
onMouseLeave: function onMouseLeave() {
|
|
33474
|
-
return setIsShown({
|
|
33475
|
-
show: false,
|
|
33476
|
-
index: index
|
|
33477
|
-
});
|
|
33478
|
-
}
|
|
33479
|
-
}, modifyString(option.name))), isShown && isShown.index === index && option.ingredients.map(function (option, index) {
|
|
33480
|
-
return React.createElement(Recipes, {
|
|
33481
|
-
key: index
|
|
33482
|
-
}, React.createElement(SpriteFromAtlas, {
|
|
33483
|
-
atlasIMG: atlasIMG,
|
|
33484
|
-
atlasJSON: atlasJSON,
|
|
33485
|
-
spriteKey: option.texturePath,
|
|
33486
|
-
imgScale: 1
|
|
33487
|
-
}), React.createElement(StyledItem, null, modifyString(option.key), " (", option.qty, "x)"));
|
|
33488
|
-
})));
|
|
33489
|
-
})), React.createElement(ButtonWrapper, null, React.createElement(Button, {
|
|
33490
|
-
buttonType: ButtonTypes.RPGUIButton,
|
|
33491
|
-
onPointerDown: onClose
|
|
33492
|
-
}, "Cancel"), React.createElement(Button, {
|
|
33493
|
-
buttonType: ButtonTypes.RPGUIButton,
|
|
33494
|
-
onPointerDown: function onPointerDown() {
|
|
33495
|
-
return onCraftItem(craftItem);
|
|
33496
|
-
}
|
|
33497
|
-
}, "Craft")));
|
|
33498
|
-
};
|
|
33499
|
-
var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
33500
|
-
displayName: "CraftBook__StyledItem",
|
|
33501
|
-
componentId: "sc-19q95ue-0"
|
|
33502
|
-
})(["margin-left:10px;"]);
|
|
33503
|
-
var Recipes = /*#__PURE__*/styled.div.withConfig({
|
|
33504
|
-
displayName: "CraftBook__Recipes",
|
|
33505
|
-
componentId: "sc-19q95ue-1"
|
|
33506
|
-
})(["font-size:0.6rem;color:yellow !important;margin-bottom:3px;display:flex;align-items:center;.sprite-from-atlas-img{top:0px;left:0px;}"]);
|
|
33507
|
-
var Title$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
33508
|
-
displayName: "CraftBook__Title",
|
|
33509
|
-
componentId: "sc-19q95ue-2"
|
|
33510
|
-
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
33511
|
-
var Subtitle = /*#__PURE__*/styled.h1.withConfig({
|
|
33512
|
-
displayName: "CraftBook__Subtitle",
|
|
33513
|
-
componentId: "sc-19q95ue-3"
|
|
33514
|
-
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
33515
|
-
var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
|
|
33516
|
-
displayName: "CraftBook__RadioInputScroller",
|
|
33517
|
-
componentId: "sc-19q95ue-4"
|
|
33518
|
-
})(["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;"]);
|
|
33519
|
-
var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
33520
|
-
displayName: "CraftBook__SpriteAtlasWrapper",
|
|
33521
|
-
componentId: "sc-19q95ue-5"
|
|
33522
|
-
})(["margin-right:40px;"]);
|
|
33523
|
-
var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
33524
|
-
displayName: "CraftBook__RadioOptionsWrapper",
|
|
33525
|
-
componentId: "sc-19q95ue-6"
|
|
33526
|
-
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
33527
|
-
var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
33528
|
-
displayName: "CraftBook__ButtonWrapper",
|
|
33529
|
-
componentId: "sc-19q95ue-7"
|
|
33530
|
-
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
33531
|
-
|
|
33532
|
-
var DropdownSelectorContainer = function DropdownSelectorContainer(_ref) {
|
|
33533
|
-
var title = _ref.title,
|
|
33534
|
-
onChange = _ref.onChange,
|
|
33535
|
-
options = _ref.options,
|
|
33536
|
-
details = _ref.details;
|
|
33537
|
-
return React.createElement("div", null, React.createElement("p", null, title), React.createElement(Dropdown, {
|
|
33538
|
-
options: options.map(function (option, index) {
|
|
33539
|
-
return {
|
|
33540
|
-
option: option.name,
|
|
33541
|
-
value: option.id,
|
|
33542
|
-
id: index
|
|
33543
|
-
};
|
|
33544
|
-
}),
|
|
33545
|
-
onChange: onChange
|
|
33546
|
-
}), React.createElement(Details, null, details));
|
|
33547
|
-
};
|
|
33548
|
-
var Details = /*#__PURE__*/styled.p.withConfig({
|
|
33549
|
-
displayName: "DropdownSelectorContainer__Details",
|
|
33550
|
-
componentId: "sc-kaa0h9-0"
|
|
33551
|
-
})(["font-size:", " !important;"], uiFonts.size.xsmall);
|
|
33552
|
-
|
|
33553
33361
|
var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
33554
33362
|
var options = _ref.options,
|
|
33555
33363
|
onSelected = _ref.onSelected,
|
|
@@ -33599,15 +33407,6 @@ var ListElement = /*#__PURE__*/styled.li.withConfig({
|
|
|
33599
33407
|
componentId: "sc-7hohf-1"
|
|
33600
33408
|
})(["margin-right:0.5rem;"]);
|
|
33601
33409
|
|
|
33602
|
-
var ItemTooltip = function ItemTooltip(_ref) {
|
|
33603
|
-
var label = _ref.label;
|
|
33604
|
-
return React.createElement(Container$9, null, React.createElement("div", null, label));
|
|
33605
|
-
};
|
|
33606
|
-
var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
33607
|
-
displayName: "ItemTooltip__Container",
|
|
33608
|
-
componentId: "sc-11d9r7x-0"
|
|
33609
|
-
})(["z-index:2;position:absolute;top:1rem;left:4rem;font-size:", ";color:white;background-color:black;border-radius:5px;padding:0.5rem;min-width:20px;width:100%;text-align:center;opacity:0.75;"], uiFonts.size.xxsmall);
|
|
33610
|
-
|
|
33611
33410
|
var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
|
|
33612
33411
|
var contextMenu = actionsByTypeList.map(function (action) {
|
|
33613
33412
|
return {
|
|
@@ -33742,7 +33541,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33742
33541
|
openQuantitySelector = _ref.openQuantitySelector,
|
|
33743
33542
|
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
|
|
33744
33543
|
dragScale = _ref.dragScale,
|
|
33745
|
-
isSelectingShortcut = _ref.isSelectingShortcut
|
|
33544
|
+
isSelectingShortcut = _ref.isSelectingShortcut,
|
|
33545
|
+
equipmentSet = _ref.equipmentSet;
|
|
33746
33546
|
var _useState = useState(false),
|
|
33747
33547
|
isTooltipVisible = _useState[0],
|
|
33748
33548
|
setTooltipVisible = _useState[1];
|
|
@@ -33816,7 +33616,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33816
33616
|
texturePath: itemToRender.texturePath,
|
|
33817
33617
|
stackQty: itemToRender.stackQty || 1
|
|
33818
33618
|
}, atlasJSON),
|
|
33819
|
-
imgScale: 3
|
|
33619
|
+
imgScale: 3,
|
|
33620
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
33820
33621
|
})));
|
|
33821
33622
|
}
|
|
33822
33623
|
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);
|
|
@@ -33841,7 +33642,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33841
33642
|
texturePath: itemToRender.texturePath,
|
|
33842
33643
|
stackQty: itemToRender.stackQty || 1
|
|
33843
33644
|
}, atlasJSON),
|
|
33844
|
-
imgScale: 3
|
|
33645
|
+
imgScale: 3,
|
|
33646
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
33845
33647
|
})));
|
|
33846
33648
|
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);
|
|
33847
33649
|
if (stackInfo) {
|
|
@@ -33858,7 +33660,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33858
33660
|
spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
|
|
33859
33661
|
imgScale: 3,
|
|
33860
33662
|
grayScale: true,
|
|
33861
|
-
opacity: 0.4
|
|
33663
|
+
opacity: 0.4,
|
|
33664
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
33862
33665
|
}));
|
|
33863
33666
|
}
|
|
33864
33667
|
};
|
|
@@ -33888,7 +33691,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33888
33691
|
onDragEnd(quantity);
|
|
33889
33692
|
}
|
|
33890
33693
|
};
|
|
33891
|
-
return React.createElement(Container$
|
|
33694
|
+
return React.createElement(Container$9, {
|
|
33892
33695
|
item: item,
|
|
33893
33696
|
className: "rpgui-icon empty-slot",
|
|
33894
33697
|
onMouseUp: function onMouseUp() {
|
|
@@ -33987,7 +33790,10 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33987
33790
|
setTooltipVisible(false);
|
|
33988
33791
|
}
|
|
33989
33792
|
}, onRenderSlot(item))), isTooltipVisible && item && !isFocused && React.createElement(ItemTooltip, {
|
|
33990
|
-
|
|
33793
|
+
item: item,
|
|
33794
|
+
atlasIMG: atlasIMG,
|
|
33795
|
+
atlasJSON: atlasJSON,
|
|
33796
|
+
equipmentSet: equipmentSet
|
|
33991
33797
|
}), !isContextMenuDisabled && isContextMenuVisible && contextActions && React.createElement(RelativeListMenu, {
|
|
33992
33798
|
options: contextActions,
|
|
33993
33799
|
onSelected: function onSelected(optionId) {
|
|
@@ -34012,13 +33818,13 @@ var rarityColor = function rarityColor(item) {
|
|
|
34012
33818
|
case ItemRarities.Legendary:
|
|
34013
33819
|
return 'rgba(255, 191, 0,0.6)';
|
|
34014
33820
|
default:
|
|
34015
|
-
return
|
|
33821
|
+
return null;
|
|
34016
33822
|
}
|
|
34017
33823
|
};
|
|
34018
|
-
var Container$
|
|
33824
|
+
var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
34019
33825
|
displayName: "ItemSlot__Container",
|
|
34020
33826
|
componentId: "sc-l2j5ef-0"
|
|
34021
|
-
})(["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) {
|
|
33827
|
+
})(["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) {
|
|
34022
33828
|
var item = _ref2.item;
|
|
34023
33829
|
return rarityColor(item);
|
|
34024
33830
|
}, function (_ref3) {
|
|
@@ -34046,6 +33852,459 @@ var ItemQty = /*#__PURE__*/styled.span.withConfig({
|
|
|
34046
33852
|
componentId: "sc-l2j5ef-3"
|
|
34047
33853
|
})(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
|
|
34048
33854
|
|
|
33855
|
+
var statisticsToDisplay = [{
|
|
33856
|
+
key: 'attack'
|
|
33857
|
+
}, {
|
|
33858
|
+
key: 'defense'
|
|
33859
|
+
}, {
|
|
33860
|
+
key: 'maxRange',
|
|
33861
|
+
label: 'Range'
|
|
33862
|
+
}, {
|
|
33863
|
+
key: 'weight',
|
|
33864
|
+
higherIsWorse: true
|
|
33865
|
+
}];
|
|
33866
|
+
var ItemInfo = function ItemInfo(_ref) {
|
|
33867
|
+
var _item$stackQty;
|
|
33868
|
+
var item = _ref.item,
|
|
33869
|
+
itemToCompare = _ref.itemToCompare,
|
|
33870
|
+
atlasIMG = _ref.atlasIMG,
|
|
33871
|
+
atlasJSON = _ref.atlasJSON;
|
|
33872
|
+
var renderStatistics = function renderStatistics() {
|
|
33873
|
+
var statistics = [];
|
|
33874
|
+
for (var _i = 0, _statisticsToDisplay = statisticsToDisplay; _i < _statisticsToDisplay.length; _i++) {
|
|
33875
|
+
var stat = _statisticsToDisplay[_i];
|
|
33876
|
+
var itemStatistic = item[stat.key];
|
|
33877
|
+
if (itemStatistic) {
|
|
33878
|
+
var _itemToCompare$stat$k, _itemToCompare$stat$k2;
|
|
33879
|
+
var label = stat.label || stat.key[0].toUpperCase() + stat.key.slice(1);
|
|
33880
|
+
var isItemToCompare = !!itemToCompare;
|
|
33881
|
+
var isOnlyInOneItem = isItemToCompare && !(itemToCompare != null && itemToCompare[stat.key]);
|
|
33882
|
+
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');
|
|
33883
|
+
var isDifference = isItemToCompare && statDiff !== 0;
|
|
33884
|
+
var isBetter = statDiff > 0 && !stat.higherIsWorse || statDiff < 0 && stat.higherIsWorse;
|
|
33885
|
+
statistics.push(React.createElement(Statistic, {
|
|
33886
|
+
key: stat.key,
|
|
33887
|
+
className: isOnlyInOneItem ? 'better' : ''
|
|
33888
|
+
}, React.createElement("div", {
|
|
33889
|
+
className: "label"
|
|
33890
|
+
}, label, ":"), React.createElement("div", {
|
|
33891
|
+
className: "value " + (isDifference ? isBetter ? 'better' : 'worse' : '')
|
|
33892
|
+
}, itemStatistic.toString() + " " + (isDifference ? "(" + (statDiff > 0 ? '+' : '') + statDiff + ")" : ''))));
|
|
33893
|
+
}
|
|
33894
|
+
}
|
|
33895
|
+
return statistics;
|
|
33896
|
+
};
|
|
33897
|
+
var renderMissingStatistic = function renderMissingStatistic() {
|
|
33898
|
+
var statistics = [];
|
|
33899
|
+
for (var _i2 = 0, _statisticsToDisplay2 = statisticsToDisplay; _i2 < _statisticsToDisplay2.length; _i2++) {
|
|
33900
|
+
var stat = _statisticsToDisplay2[_i2];
|
|
33901
|
+
var itemToCompareStatistic = itemToCompare == null ? void 0 : itemToCompare[stat.key];
|
|
33902
|
+
if (itemToCompareStatistic && !item[stat.key]) {
|
|
33903
|
+
var label = stat.label || stat.key[0].toUpperCase() + stat.key.slice(1);
|
|
33904
|
+
statistics.push(React.createElement(Statistic, {
|
|
33905
|
+
key: stat.key,
|
|
33906
|
+
className: "worse"
|
|
33907
|
+
}, React.createElement("div", {
|
|
33908
|
+
className: "label"
|
|
33909
|
+
}, label, ":"), React.createElement("div", {
|
|
33910
|
+
className: "value worse"
|
|
33911
|
+
}, itemToCompareStatistic.toString())));
|
|
33912
|
+
}
|
|
33913
|
+
}
|
|
33914
|
+
return statistics;
|
|
33915
|
+
};
|
|
33916
|
+
var renderAvaibleSlots = function renderAvaibleSlots() {
|
|
33917
|
+
if (!item.allowedEquipSlotType) return null;
|
|
33918
|
+
return item.allowedEquipSlotType.map(function (slotType, index) {
|
|
33919
|
+
return React.createElement(ErrorBoundary, {
|
|
33920
|
+
key: index
|
|
33921
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
33922
|
+
atlasIMG: atlasIMG,
|
|
33923
|
+
atlasJSON: atlasJSON,
|
|
33924
|
+
spriteKey: EquipmentSlotSpriteByType[slotType],
|
|
33925
|
+
imgScale: 2,
|
|
33926
|
+
grayScale: true,
|
|
33927
|
+
opacity: 0.4,
|
|
33928
|
+
containerStyle: {
|
|
33929
|
+
width: '32px',
|
|
33930
|
+
height: '32px'
|
|
33931
|
+
}
|
|
33932
|
+
}));
|
|
33933
|
+
});
|
|
33934
|
+
};
|
|
33935
|
+
return React.createElement(Container$a, {
|
|
33936
|
+
item: item
|
|
33937
|
+
}, React.createElement(Header, null, React.createElement("div", null, React.createElement(Title$1, null, item.name), item.rarity !== 'Common' && React.createElement(Rarity, {
|
|
33938
|
+
item: item
|
|
33939
|
+
}, 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()));
|
|
33940
|
+
};
|
|
33941
|
+
var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
33942
|
+
displayName: "ItemInfo__Container",
|
|
33943
|
+
componentId: "sc-1xm4q8k-0"
|
|
33944
|
+
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;width:max-content;font-size:", ";border:3px solid ", ";"], uiFonts.size.small, function (_ref2) {
|
|
33945
|
+
var _rarityColor;
|
|
33946
|
+
var item = _ref2.item;
|
|
33947
|
+
return (_rarityColor = rarityColor(item)) != null ? _rarityColor : uiColors.lightGray;
|
|
33948
|
+
});
|
|
33949
|
+
var Title$1 = /*#__PURE__*/styled.div.withConfig({
|
|
33950
|
+
displayName: "ItemInfo__Title",
|
|
33951
|
+
componentId: "sc-1xm4q8k-1"
|
|
33952
|
+
})(["font-size:", ";font-weight:bold;margin-bottom:0.5rem;display:flex;align-items:center;margin:0;"], uiFonts.size.medium);
|
|
33953
|
+
var Rarity = /*#__PURE__*/styled.div.withConfig({
|
|
33954
|
+
displayName: "ItemInfo__Rarity",
|
|
33955
|
+
componentId: "sc-1xm4q8k-2"
|
|
33956
|
+
})(["font-size:", ";font-weight:normal;margin-top:0.2rem;color:", ";filter:brightness(1.5);"], uiFonts.size.small, function (_ref3) {
|
|
33957
|
+
var item = _ref3.item;
|
|
33958
|
+
return rarityColor(item);
|
|
33959
|
+
});
|
|
33960
|
+
var Type = /*#__PURE__*/styled.div.withConfig({
|
|
33961
|
+
displayName: "ItemInfo__Type",
|
|
33962
|
+
componentId: "sc-1xm4q8k-3"
|
|
33963
|
+
})(["font-size:", ";margin-top:0.2rem;color:", ";"], uiFonts.size.small, uiColors.lightGray);
|
|
33964
|
+
var Statistic = /*#__PURE__*/styled.div.withConfig({
|
|
33965
|
+
displayName: "ItemInfo__Statistic",
|
|
33966
|
+
componentId: "sc-1xm4q8k-4"
|
|
33967
|
+
})(["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);
|
|
33968
|
+
var Description = /*#__PURE__*/styled.div.withConfig({
|
|
33969
|
+
displayName: "ItemInfo__Description",
|
|
33970
|
+
componentId: "sc-1xm4q8k-5"
|
|
33971
|
+
})(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;width:max-content;max-width:20rem;"], uiFonts.size.small, uiColors.lightGray);
|
|
33972
|
+
var Header = /*#__PURE__*/styled.div.withConfig({
|
|
33973
|
+
displayName: "ItemInfo__Header",
|
|
33974
|
+
componentId: "sc-1xm4q8k-6"
|
|
33975
|
+
})(["display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem;"]);
|
|
33976
|
+
var AllowedSlots = /*#__PURE__*/styled.div.withConfig({
|
|
33977
|
+
displayName: "ItemInfo__AllowedSlots",
|
|
33978
|
+
componentId: "sc-1xm4q8k-7"
|
|
33979
|
+
})(["display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0.5rem;margin-left:2rem;"]);
|
|
33980
|
+
var StackInfo = /*#__PURE__*/styled.div.withConfig({
|
|
33981
|
+
displayName: "ItemInfo__StackInfo",
|
|
33982
|
+
componentId: "sc-1xm4q8k-8"
|
|
33983
|
+
})(["width:100%;text-align:right;font-size:", ";color:", ";margin-top:1rem;"], uiFonts.size.small, uiColors.orange);
|
|
33984
|
+
var MissingStatistics = /*#__PURE__*/styled.div.withConfig({
|
|
33985
|
+
displayName: "ItemInfo__MissingStatistics",
|
|
33986
|
+
componentId: "sc-1xm4q8k-9"
|
|
33987
|
+
})(["margin-top:1rem;color:", ";"], uiColors.cardinal);
|
|
33988
|
+
|
|
33989
|
+
var itemSlotTypes = ['head', 'neck', 'leftHand', 'rightHand', 'ring', 'legs', 'boot', 'accessory', 'armor', 'inventory'];
|
|
33990
|
+
var getSlotType = function getSlotType(itemSlotTypes, slotType, subType) {
|
|
33991
|
+
if (!itemSlotTypes.includes(slotType)) {
|
|
33992
|
+
return subType;
|
|
33993
|
+
}
|
|
33994
|
+
return slotType;
|
|
33995
|
+
};
|
|
33996
|
+
var ItemInfoDisplay = function ItemInfoDisplay(_ref) {
|
|
33997
|
+
var item = _ref.item,
|
|
33998
|
+
atlasIMG = _ref.atlasIMG,
|
|
33999
|
+
atlasJSON = _ref.atlasJSON,
|
|
34000
|
+
equipmentSet = _ref.equipmentSet;
|
|
34001
|
+
var itemToCompare = useMemo(function () {
|
|
34002
|
+
var _item$allowedEquipSlo;
|
|
34003
|
+
if (equipmentSet && (_item$allowedEquipSlo = item.allowedEquipSlotType) != null && _item$allowedEquipSlo.length) {
|
|
34004
|
+
var allowedSlotTypeCamelCase = camelCase(item.allowedEquipSlotType[0]);
|
|
34005
|
+
var itemSubTypeCamelCase = camelCase(item.subType);
|
|
34006
|
+
var slotType = getSlotType(itemSlotTypes, allowedSlotTypeCamelCase, itemSubTypeCamelCase);
|
|
34007
|
+
var itemFromEquipment = equipmentSet[slotType];
|
|
34008
|
+
if (itemFromEquipment && (!item._id || itemFromEquipment._id !== item._id)) {
|
|
34009
|
+
return itemFromEquipment;
|
|
34010
|
+
}
|
|
34011
|
+
}
|
|
34012
|
+
return undefined;
|
|
34013
|
+
}, [equipmentSet, item]);
|
|
34014
|
+
return React.createElement(Flex, null, React.createElement(ItemInfo, {
|
|
34015
|
+
item: item,
|
|
34016
|
+
itemToCompare: itemToCompare,
|
|
34017
|
+
atlasIMG: atlasIMG,
|
|
34018
|
+
atlasJSON: atlasJSON
|
|
34019
|
+
}), itemToCompare && React.createElement(CompareContainer, null, React.createElement(Equipped, null, React.createElement("span", null, "Equipped")), React.createElement(ItemInfo, {
|
|
34020
|
+
item: itemToCompare,
|
|
34021
|
+
itemToCompare: item,
|
|
34022
|
+
atlasIMG: atlasIMG,
|
|
34023
|
+
atlasJSON: atlasJSON
|
|
34024
|
+
})));
|
|
34025
|
+
};
|
|
34026
|
+
var Flex = /*#__PURE__*/styled.div.withConfig({
|
|
34027
|
+
displayName: "ItemInfoDisplay__Flex",
|
|
34028
|
+
componentId: "sc-1lftdo8-0"
|
|
34029
|
+
})(["display:flex;gap:0.5rem;"]);
|
|
34030
|
+
var Equipped = /*#__PURE__*/styled.div.withConfig({
|
|
34031
|
+
displayName: "ItemInfoDisplay__Equipped",
|
|
34032
|
+
componentId: "sc-1lftdo8-1"
|
|
34033
|
+
})(["position:absolute;bottom:100%;left:50%;transform:translateX(-50%);"]);
|
|
34034
|
+
var CompareContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34035
|
+
displayName: "ItemInfoDisplay__CompareContainer",
|
|
34036
|
+
componentId: "sc-1lftdo8-2"
|
|
34037
|
+
})(["position:relative;"]);
|
|
34038
|
+
|
|
34039
|
+
var offset = 20;
|
|
34040
|
+
var ItemTooltip = function ItemTooltip(_ref) {
|
|
34041
|
+
var item = _ref.item,
|
|
34042
|
+
atlasIMG = _ref.atlasIMG,
|
|
34043
|
+
atlasJSON = _ref.atlasJSON,
|
|
34044
|
+
equipmentSet = _ref.equipmentSet;
|
|
34045
|
+
var ref = useRef(null);
|
|
34046
|
+
useEffect(function () {
|
|
34047
|
+
var current = ref.current;
|
|
34048
|
+
var initialOffset;
|
|
34049
|
+
if (current) {
|
|
34050
|
+
var handleMouseMove = function handleMouseMove(event) {
|
|
34051
|
+
var clientX = event.clientX,
|
|
34052
|
+
clientY = event.clientY;
|
|
34053
|
+
// Adjust the position of the tooltip based on the mouse position
|
|
34054
|
+
var rect = current.getBoundingClientRect();
|
|
34055
|
+
if (!initialOffset) {
|
|
34056
|
+
initialOffset = rect;
|
|
34057
|
+
}
|
|
34058
|
+
var tooltipWidth = rect.width;
|
|
34059
|
+
var tooltipHeight = rect.height;
|
|
34060
|
+
var isOffScreenRight = clientX + tooltipWidth + offset > window.innerWidth;
|
|
34061
|
+
var isOffScreenBottom = clientY + tooltipHeight + offset > window.innerHeight;
|
|
34062
|
+
var x = (isOffScreenRight ? clientX - tooltipWidth - offset : clientX + offset) - initialOffset.x;
|
|
34063
|
+
var y = (isOffScreenBottom ? clientY - tooltipHeight - offset : clientY + offset) - initialOffset.y;
|
|
34064
|
+
current.style.transform = "translate(" + x + "px, " + y + "px)";
|
|
34065
|
+
current.style.opacity = '1';
|
|
34066
|
+
};
|
|
34067
|
+
window.addEventListener('mousemove', handleMouseMove);
|
|
34068
|
+
return function () {
|
|
34069
|
+
window.removeEventListener('mousemove', handleMouseMove);
|
|
34070
|
+
};
|
|
34071
|
+
}
|
|
34072
|
+
return;
|
|
34073
|
+
}, []);
|
|
34074
|
+
return React.createElement(Container$b, {
|
|
34075
|
+
ref: ref
|
|
34076
|
+
}, React.createElement(ItemInfoDisplay, {
|
|
34077
|
+
item: item,
|
|
34078
|
+
atlasIMG: atlasIMG,
|
|
34079
|
+
atlasJSON: atlasJSON,
|
|
34080
|
+
equipmentSet: equipmentSet
|
|
34081
|
+
}));
|
|
34082
|
+
};
|
|
34083
|
+
var Container$b = /*#__PURE__*/styled.div.withConfig({
|
|
34084
|
+
displayName: "ItemTooltip__Container",
|
|
34085
|
+
componentId: "sc-11d9r7x-0"
|
|
34086
|
+
})(["position:fixed;z-index:50;pointer-events:none;left:0;top:0;opacity:0;"]);
|
|
34087
|
+
|
|
34088
|
+
var ItemInfoWrapper = function ItemInfoWrapper(_ref) {
|
|
34089
|
+
var children = _ref.children,
|
|
34090
|
+
atlasIMG = _ref.atlasIMG,
|
|
34091
|
+
atlasJSON = _ref.atlasJSON,
|
|
34092
|
+
item = _ref.item,
|
|
34093
|
+
equipmentSet = _ref.equipmentSet;
|
|
34094
|
+
var _useState = useState(false),
|
|
34095
|
+
isItemInfoVisible = _useState[0],
|
|
34096
|
+
setIsItemInfoVisible = _useState[1];
|
|
34097
|
+
return React.createElement("div", {
|
|
34098
|
+
onMouseEnter: setIsItemInfoVisible.bind(null, true),
|
|
34099
|
+
onMouseLeave: setIsItemInfoVisible.bind(null, false)
|
|
34100
|
+
}, children, isItemInfoVisible && React.createElement(ItemTooltip, {
|
|
34101
|
+
atlasIMG: atlasIMG,
|
|
34102
|
+
atlasJSON: atlasJSON,
|
|
34103
|
+
equipmentSet: equipmentSet,
|
|
34104
|
+
item: item
|
|
34105
|
+
}));
|
|
34106
|
+
};
|
|
34107
|
+
|
|
34108
|
+
var CraftBook = function CraftBook(_ref) {
|
|
34109
|
+
var atlasIMG = _ref.atlasIMG,
|
|
34110
|
+
atlasJSON = _ref.atlasJSON,
|
|
34111
|
+
onClose = _ref.onClose,
|
|
34112
|
+
onSelect = _ref.onSelect,
|
|
34113
|
+
onCraftItem = _ref.onCraftItem,
|
|
34114
|
+
craftablesItems = _ref.craftablesItems,
|
|
34115
|
+
equipmentSet = _ref.equipmentSet;
|
|
34116
|
+
var optionsId = 0;
|
|
34117
|
+
var _useState = useState({
|
|
34118
|
+
show: false,
|
|
34119
|
+
index: 200
|
|
34120
|
+
}),
|
|
34121
|
+
isShown = _useState[0],
|
|
34122
|
+
setIsShown = _useState[1];
|
|
34123
|
+
var _useState2 = useState(),
|
|
34124
|
+
craftItem = _useState2[0],
|
|
34125
|
+
setCraftItem = _useState2[1];
|
|
34126
|
+
var getDropdownOptions = function getDropdownOptions() {
|
|
34127
|
+
var options = [];
|
|
34128
|
+
Object.keys(ItemSubType).forEach(function (key) {
|
|
34129
|
+
if (key === 'DeadBody') {
|
|
34130
|
+
return; // we can't craft crafting resouces...
|
|
34131
|
+
}
|
|
34132
|
+
|
|
34133
|
+
options.push({
|
|
34134
|
+
id: optionsId,
|
|
34135
|
+
value: key,
|
|
34136
|
+
option: key
|
|
34137
|
+
});
|
|
34138
|
+
optionsId += 1;
|
|
34139
|
+
});
|
|
34140
|
+
return options;
|
|
34141
|
+
};
|
|
34142
|
+
var modifyString = function modifyString(str) {
|
|
34143
|
+
// Split the string by "/" and "."
|
|
34144
|
+
var parts = str.split('/');
|
|
34145
|
+
var fileName = parts[parts.length - 1];
|
|
34146
|
+
parts = fileName.split('.');
|
|
34147
|
+
var name = parts[0];
|
|
34148
|
+
// Replace all occurrences of "-" with " "
|
|
34149
|
+
name = name.replace(/-/g, ' ');
|
|
34150
|
+
// Uppercase the first word
|
|
34151
|
+
var words = name.split(' ');
|
|
34152
|
+
var firstWord = words[0].slice(0, 1).toUpperCase() + words[0].slice(1);
|
|
34153
|
+
var modifiedWords = [firstWord].concat(words.slice(1));
|
|
34154
|
+
name = modifiedWords.join(' ');
|
|
34155
|
+
return name;
|
|
34156
|
+
};
|
|
34157
|
+
var handleClick = function handleClick(value) {
|
|
34158
|
+
setCraftItem(value);
|
|
34159
|
+
};
|
|
34160
|
+
return React.createElement(DraggableContainer, {
|
|
34161
|
+
type: RPGUIContainerTypes.Framed,
|
|
34162
|
+
width: "500px",
|
|
34163
|
+
cancelDrag: ".equipment-container-body .arrow-selector .rpgui-dropdown-imp",
|
|
34164
|
+
onCloseButton: function onCloseButton() {
|
|
34165
|
+
if (onClose) {
|
|
34166
|
+
onClose();
|
|
34167
|
+
}
|
|
34168
|
+
}
|
|
34169
|
+
}, React.createElement("div", {
|
|
34170
|
+
style: {
|
|
34171
|
+
width: '100%'
|
|
34172
|
+
}
|
|
34173
|
+
}, React.createElement(Title$2, null, "Craftbook"), React.createElement(Subtitle, null, "Select an item to craft"), React.createElement("hr", {
|
|
34174
|
+
className: "golden"
|
|
34175
|
+
})), React.createElement(Dropdown, {
|
|
34176
|
+
options: getDropdownOptions(),
|
|
34177
|
+
onChange: function onChange(value) {
|
|
34178
|
+
return onSelect(value);
|
|
34179
|
+
}
|
|
34180
|
+
}), React.createElement(RadioInputScroller, null, craftablesItems == null ? void 0 : craftablesItems.map(function (option, index) {
|
|
34181
|
+
return React.createElement(RadioOptionsWrapper, {
|
|
34182
|
+
key: index
|
|
34183
|
+
}, React.createElement(SpriteAtlasWrapper, null, React.createElement(ItemInfoWrapper, {
|
|
34184
|
+
item: option,
|
|
34185
|
+
atlasIMG: atlasIMG,
|
|
34186
|
+
atlasJSON: atlasJSON,
|
|
34187
|
+
equipmentSet: equipmentSet
|
|
34188
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
34189
|
+
atlasIMG: atlasIMG,
|
|
34190
|
+
atlasJSON: atlasJSON,
|
|
34191
|
+
spriteKey: option.texturePath,
|
|
34192
|
+
imgScale: 3,
|
|
34193
|
+
grayScale: !option.canCraft
|
|
34194
|
+
}))), React.createElement("div", null, React.createElement("div", {
|
|
34195
|
+
onPointerDown: function onPointerDown() {
|
|
34196
|
+
return handleClick(option.key);
|
|
34197
|
+
}
|
|
34198
|
+
}, React.createElement("input", {
|
|
34199
|
+
className: "rpgui-radio",
|
|
34200
|
+
type: "radio",
|
|
34201
|
+
value: option.name,
|
|
34202
|
+
name: "test",
|
|
34203
|
+
disabled: !option.canCraft,
|
|
34204
|
+
checked: craftItem === option.key,
|
|
34205
|
+
onChange: function onChange() {
|
|
34206
|
+
return handleClick(option.key);
|
|
34207
|
+
}
|
|
34208
|
+
}), React.createElement("label", {
|
|
34209
|
+
onPointerDown: function onPointerDown() {
|
|
34210
|
+
handleClick(option.key);
|
|
34211
|
+
},
|
|
34212
|
+
onTouchEnd: function onTouchEnd() {
|
|
34213
|
+
setIsShown({
|
|
34214
|
+
show: true,
|
|
34215
|
+
index: index
|
|
34216
|
+
});
|
|
34217
|
+
},
|
|
34218
|
+
style: {
|
|
34219
|
+
display: 'flex',
|
|
34220
|
+
alignItems: 'center'
|
|
34221
|
+
},
|
|
34222
|
+
onMouseEnter: function onMouseEnter() {
|
|
34223
|
+
return setIsShown({
|
|
34224
|
+
show: true,
|
|
34225
|
+
index: index
|
|
34226
|
+
});
|
|
34227
|
+
},
|
|
34228
|
+
onMouseLeave: function onMouseLeave() {
|
|
34229
|
+
return setIsShown({
|
|
34230
|
+
show: false,
|
|
34231
|
+
index: index
|
|
34232
|
+
});
|
|
34233
|
+
}
|
|
34234
|
+
}, modifyString(option.name))), isShown && isShown.index === index && option.ingredients.map(function (option, index) {
|
|
34235
|
+
return React.createElement(Recipes, {
|
|
34236
|
+
key: index
|
|
34237
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
34238
|
+
atlasIMG: atlasIMG,
|
|
34239
|
+
atlasJSON: atlasJSON,
|
|
34240
|
+
spriteKey: option.texturePath,
|
|
34241
|
+
imgScale: 1
|
|
34242
|
+
}), React.createElement(StyledItem, null, modifyString(option.key), " (", option.qty, "x)"));
|
|
34243
|
+
})));
|
|
34244
|
+
})), React.createElement(ButtonWrapper, null, React.createElement(Button, {
|
|
34245
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
34246
|
+
onPointerDown: onClose
|
|
34247
|
+
}, "Cancel"), React.createElement(Button, {
|
|
34248
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
34249
|
+
onPointerDown: function onPointerDown() {
|
|
34250
|
+
return onCraftItem(craftItem);
|
|
34251
|
+
}
|
|
34252
|
+
}, "Craft")));
|
|
34253
|
+
};
|
|
34254
|
+
var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
34255
|
+
displayName: "CraftBook__StyledItem",
|
|
34256
|
+
componentId: "sc-19q95ue-0"
|
|
34257
|
+
})(["margin-left:10px;"]);
|
|
34258
|
+
var Recipes = /*#__PURE__*/styled.div.withConfig({
|
|
34259
|
+
displayName: "CraftBook__Recipes",
|
|
34260
|
+
componentId: "sc-19q95ue-1"
|
|
34261
|
+
})(["font-size:0.6rem;color:yellow !important;margin-bottom:3px;display:flex;align-items:center;.sprite-from-atlas-img{top:0px;left:0px;}"]);
|
|
34262
|
+
var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
34263
|
+
displayName: "CraftBook__Title",
|
|
34264
|
+
componentId: "sc-19q95ue-2"
|
|
34265
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
34266
|
+
var Subtitle = /*#__PURE__*/styled.h1.withConfig({
|
|
34267
|
+
displayName: "CraftBook__Subtitle",
|
|
34268
|
+
componentId: "sc-19q95ue-3"
|
|
34269
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
34270
|
+
var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
|
|
34271
|
+
displayName: "CraftBook__RadioInputScroller",
|
|
34272
|
+
componentId: "sc-19q95ue-4"
|
|
34273
|
+
})(["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;"]);
|
|
34274
|
+
var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
34275
|
+
displayName: "CraftBook__SpriteAtlasWrapper",
|
|
34276
|
+
componentId: "sc-19q95ue-5"
|
|
34277
|
+
})(["margin-right:40px;"]);
|
|
34278
|
+
var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
34279
|
+
displayName: "CraftBook__RadioOptionsWrapper",
|
|
34280
|
+
componentId: "sc-19q95ue-6"
|
|
34281
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
34282
|
+
var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
34283
|
+
displayName: "CraftBook__ButtonWrapper",
|
|
34284
|
+
componentId: "sc-19q95ue-7"
|
|
34285
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
34286
|
+
|
|
34287
|
+
var DropdownSelectorContainer = function DropdownSelectorContainer(_ref) {
|
|
34288
|
+
var title = _ref.title,
|
|
34289
|
+
onChange = _ref.onChange,
|
|
34290
|
+
options = _ref.options,
|
|
34291
|
+
details = _ref.details;
|
|
34292
|
+
return React.createElement("div", null, React.createElement("p", null, title), React.createElement(Dropdown, {
|
|
34293
|
+
options: options.map(function (option, index) {
|
|
34294
|
+
return {
|
|
34295
|
+
option: option.name,
|
|
34296
|
+
value: option.id,
|
|
34297
|
+
id: index
|
|
34298
|
+
};
|
|
34299
|
+
}),
|
|
34300
|
+
onChange: onChange
|
|
34301
|
+
}), React.createElement(Details, null, details));
|
|
34302
|
+
};
|
|
34303
|
+
var Details = /*#__PURE__*/styled.p.withConfig({
|
|
34304
|
+
displayName: "DropdownSelectorContainer__Details",
|
|
34305
|
+
componentId: "sc-kaa0h9-0"
|
|
34306
|
+
})(["font-size:", " !important;"], uiFonts.size.xsmall);
|
|
34307
|
+
|
|
34049
34308
|
var EquipmentSet = function EquipmentSet(_ref) {
|
|
34050
34309
|
var equipmentSet = _ref.equipmentSet,
|
|
34051
34310
|
onClose = _ref.onClose,
|
|
@@ -34140,546 +34399,6 @@ var EquipmentColumn = /*#__PURE__*/styled.div.withConfig({
|
|
|
34140
34399
|
componentId: "sc-1wuddg2-1"
|
|
34141
34400
|
})(["display:flex;justify-content:center;flex-wrap:wrap;flex-direction:column;touch-action:none;"]);
|
|
34142
34401
|
|
|
34143
|
-
var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
|
|
34144
|
-
|
|
34145
|
-
var chunkString = function chunkString(str, length) {
|
|
34146
|
-
return str.match(new RegExp('.{1,' + length + '}', 'g'));
|
|
34147
|
-
};
|
|
34148
|
-
|
|
34149
|
-
var DynamicText = function DynamicText(_ref) {
|
|
34150
|
-
var text = _ref.text,
|
|
34151
|
-
onFinish = _ref.onFinish,
|
|
34152
|
-
onStart = _ref.onStart;
|
|
34153
|
-
var _useState = useState(''),
|
|
34154
|
-
textState = _useState[0],
|
|
34155
|
-
setTextState = _useState[1];
|
|
34156
|
-
useEffect(function () {
|
|
34157
|
-
var i = 0;
|
|
34158
|
-
var interval = setInterval(function () {
|
|
34159
|
-
// on every interval, show one more character
|
|
34160
|
-
if (i === 0) {
|
|
34161
|
-
if (onStart) {
|
|
34162
|
-
onStart();
|
|
34163
|
-
}
|
|
34164
|
-
}
|
|
34165
|
-
if (i < text.length) {
|
|
34166
|
-
setTextState(text.substring(0, i + 1));
|
|
34167
|
-
i++;
|
|
34168
|
-
} else {
|
|
34169
|
-
clearInterval(interval);
|
|
34170
|
-
if (onFinish) {
|
|
34171
|
-
onFinish();
|
|
34172
|
-
}
|
|
34173
|
-
}
|
|
34174
|
-
}, 50);
|
|
34175
|
-
return function () {
|
|
34176
|
-
clearInterval(interval);
|
|
34177
|
-
};
|
|
34178
|
-
}, [text]);
|
|
34179
|
-
return React.createElement(TextContainer, null, textState);
|
|
34180
|
-
};
|
|
34181
|
-
var TextContainer = /*#__PURE__*/styled.p.withConfig({
|
|
34182
|
-
displayName: "DynamicText__TextContainer",
|
|
34183
|
-
componentId: "sc-1ggl9nd-0"
|
|
34184
|
-
})(["font-size:0.7rem !important;color:white;text-shadow:1px 1px 0px #000000;letter-spacing:1.2px;word-break:normal;"]);
|
|
34185
|
-
|
|
34186
|
-
var img$6 = 'data:image/gif;base64,R0lGODlhEAAQAPIAAAAAABQYLiw1TUBJc2hvmQAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAM9CLrc/lCFGSKYJJP5AhlguDnBMIV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dDSHOmiPeHdij3aYhZONf46YkZGanzpSAV6KjaOIpqWtNwIBAAEDqqKKhZuJnHSwAgMBtqo5sGs5wcO3yM01ysTO0gXQzNPN1cXXUNnbyNna3kcmwrW3Lujp6ugD5bbn6/HyLe20Cu/t+fr7/P3+/wCF2VswrKDBgwgTKlzIsCCDBAA7';
|
|
34189
|
-
|
|
34190
|
-
var NPCDialogText = function NPCDialogText(_ref) {
|
|
34191
|
-
var text = _ref.text,
|
|
34192
|
-
onClose = _ref.onClose,
|
|
34193
|
-
onEndStep = _ref.onEndStep,
|
|
34194
|
-
onStartStep = _ref.onStartStep,
|
|
34195
|
-
type = _ref.type;
|
|
34196
|
-
var windowSize = useRef([window.innerWidth, window.innerHeight]);
|
|
34197
|
-
function maxCharacters(width) {
|
|
34198
|
-
// Set the font size to 16 pixels
|
|
34199
|
-
var fontSize = 11.2;
|
|
34200
|
-
// Calculate the number of characters that can fit in one line
|
|
34201
|
-
var charactersPerLine = Math.floor(width / 2 / fontSize);
|
|
34202
|
-
// Calculate the number of lines that can fit in the div
|
|
34203
|
-
var linesPerDiv = Math.floor(180 / fontSize);
|
|
34204
|
-
// Calculate the maximum number of characters that can fit in the div
|
|
34205
|
-
var maxCharacters = charactersPerLine * linesPerDiv;
|
|
34206
|
-
// Return the maximum number of characters
|
|
34207
|
-
return Math.round(maxCharacters / 5);
|
|
34208
|
-
}
|
|
34209
|
-
var textChunks = chunkString(text, maxCharacters(windowSize.current[0]));
|
|
34210
|
-
var _useState = useState(0),
|
|
34211
|
-
chunkIndex = _useState[0],
|
|
34212
|
-
setChunkIndex = _useState[1];
|
|
34213
|
-
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
34214
|
-
if (event.code === 'Space') {
|
|
34215
|
-
goToNextStep();
|
|
34216
|
-
}
|
|
34217
|
-
};
|
|
34218
|
-
var goToNextStep = function goToNextStep() {
|
|
34219
|
-
var hasNextChunk = (textChunks == null ? void 0 : textChunks[chunkIndex + 1]) || false;
|
|
34220
|
-
if (hasNextChunk) {
|
|
34221
|
-
setChunkIndex(function (prev) {
|
|
34222
|
-
return prev + 1;
|
|
34223
|
-
});
|
|
34224
|
-
} else {
|
|
34225
|
-
// if there's no more text chunks, close the dialog
|
|
34226
|
-
onClose();
|
|
34227
|
-
}
|
|
34228
|
-
};
|
|
34229
|
-
useEffect(function () {
|
|
34230
|
-
document.addEventListener('keydown', onHandleSpacePress);
|
|
34231
|
-
return function () {
|
|
34232
|
-
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
34233
|
-
};
|
|
34234
|
-
}, [chunkIndex]);
|
|
34235
|
-
var _useState2 = useState(false),
|
|
34236
|
-
showGoNextIndicator = _useState2[0],
|
|
34237
|
-
setShowGoNextIndicator = _useState2[1];
|
|
34238
|
-
return React.createElement(Container$b, null, React.createElement(DynamicText, {
|
|
34239
|
-
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
34240
|
-
onFinish: function onFinish() {
|
|
34241
|
-
setShowGoNextIndicator(true);
|
|
34242
|
-
onEndStep && onEndStep();
|
|
34243
|
-
},
|
|
34244
|
-
onStart: function onStart() {
|
|
34245
|
-
setShowGoNextIndicator(false);
|
|
34246
|
-
onStartStep && onStartStep();
|
|
34247
|
-
}
|
|
34248
|
-
}), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
|
|
34249
|
-
right: type === NPCDialogType.TextOnly ? '1rem' : '10.5rem',
|
|
34250
|
-
src: IS_MOBILE_OR_TABLET ? img$6 : img$7,
|
|
34251
|
-
onPointerDown: function onPointerDown() {
|
|
34252
|
-
goToNextStep();
|
|
34253
|
-
}
|
|
34254
|
-
}));
|
|
34255
|
-
};
|
|
34256
|
-
var Container$b = /*#__PURE__*/styled.div.withConfig({
|
|
34257
|
-
displayName: "NPCDialogText__Container",
|
|
34258
|
-
componentId: "sc-1cxkdh9-0"
|
|
34259
|
-
})([""]);
|
|
34260
|
-
var PressSpaceIndicator = /*#__PURE__*/styled.img.withConfig({
|
|
34261
|
-
displayName: "NPCDialogText__PressSpaceIndicator",
|
|
34262
|
-
componentId: "sc-1cxkdh9-1"
|
|
34263
|
-
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref2) {
|
|
34264
|
-
var right = _ref2.right;
|
|
34265
|
-
return right;
|
|
34266
|
-
});
|
|
34267
|
-
|
|
34268
|
-
//@ts-ignore
|
|
34269
|
-
var useEventListener = function useEventListener(type, handler, el) {
|
|
34270
|
-
if (el === void 0) {
|
|
34271
|
-
el = window;
|
|
34272
|
-
}
|
|
34273
|
-
var savedHandler = React.useRef();
|
|
34274
|
-
React.useEffect(function () {
|
|
34275
|
-
savedHandler.current = handler;
|
|
34276
|
-
}, [handler]);
|
|
34277
|
-
React.useEffect(function () {
|
|
34278
|
-
//@ts-ignore
|
|
34279
|
-
var listener = function listener(e) {
|
|
34280
|
-
return savedHandler.current(e);
|
|
34281
|
-
};
|
|
34282
|
-
el.addEventListener(type, listener);
|
|
34283
|
-
return function () {
|
|
34284
|
-
el.removeEventListener(type, listener);
|
|
34285
|
-
};
|
|
34286
|
-
}, [type, el]);
|
|
34287
|
-
};
|
|
34288
|
-
|
|
34289
|
-
var QuestionDialog = function QuestionDialog(_ref) {
|
|
34290
|
-
var questions = _ref.questions,
|
|
34291
|
-
answers = _ref.answers,
|
|
34292
|
-
onClose = _ref.onClose;
|
|
34293
|
-
var _useState = useState(questions[0]),
|
|
34294
|
-
currentQuestion = _useState[0],
|
|
34295
|
-
setCurrentQuestion = _useState[1];
|
|
34296
|
-
var _useState2 = useState(false),
|
|
34297
|
-
canShowAnswers = _useState2[0],
|
|
34298
|
-
setCanShowAnswers = _useState2[1];
|
|
34299
|
-
var onGetFirstAnswer = function onGetFirstAnswer() {
|
|
34300
|
-
if (!currentQuestion.answerIds || currentQuestion.answerIds.length === 0) {
|
|
34301
|
-
return null;
|
|
34302
|
-
}
|
|
34303
|
-
var firstAnswerId = currentQuestion.answerIds[0];
|
|
34304
|
-
return answers.find(function (answer) {
|
|
34305
|
-
return answer.id === firstAnswerId;
|
|
34306
|
-
});
|
|
34307
|
-
};
|
|
34308
|
-
var _useState3 = useState(onGetFirstAnswer()),
|
|
34309
|
-
currentAnswer = _useState3[0],
|
|
34310
|
-
setCurrentAnswer = _useState3[1];
|
|
34311
|
-
useEffect(function () {
|
|
34312
|
-
setCurrentAnswer(onGetFirstAnswer());
|
|
34313
|
-
}, [currentQuestion]);
|
|
34314
|
-
var onGetAnswers = function onGetAnswers(answerIds) {
|
|
34315
|
-
return answerIds.map(function (answerId) {
|
|
34316
|
-
return answers.find(function (answer) {
|
|
34317
|
-
return answer.id === answerId;
|
|
34318
|
-
});
|
|
34319
|
-
});
|
|
34320
|
-
};
|
|
34321
|
-
var onKeyPress = function onKeyPress(e) {
|
|
34322
|
-
switch (e.key) {
|
|
34323
|
-
case 'ArrowDown':
|
|
34324
|
-
// select next answer, if any.
|
|
34325
|
-
// if no next answer, select first answer
|
|
34326
|
-
// const nextAnswer = onGetAnswers(currentQuestion.answerIds!).find(
|
|
34327
|
-
// (answer) => answer?.id === currentAnswer!.id + 1
|
|
34328
|
-
// );
|
|
34329
|
-
var nextAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
34330
|
-
return (answer == null ? void 0 : answer.id) === currentAnswer.id + 1;
|
|
34331
|
-
});
|
|
34332
|
-
var nextAnswerID = currentQuestion.answerIds[nextAnswerIndex];
|
|
34333
|
-
var nextAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
34334
|
-
return (answer == null ? void 0 : answer.id) === nextAnswerID;
|
|
34335
|
-
});
|
|
34336
|
-
setCurrentAnswer(nextAnswer || onGetFirstAnswer());
|
|
34337
|
-
break;
|
|
34338
|
-
case 'ArrowUp':
|
|
34339
|
-
// select previous answer, if any.
|
|
34340
|
-
// if no previous answer, select last answer
|
|
34341
|
-
var previousAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
34342
|
-
return (answer == null ? void 0 : answer.id) === currentAnswer.id - 1;
|
|
34343
|
-
});
|
|
34344
|
-
var previousAnswerID = currentQuestion.answerIds && currentQuestion.answerIds[previousAnswerIndex];
|
|
34345
|
-
var previousAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
34346
|
-
return (answer == null ? void 0 : answer.id) === previousAnswerID;
|
|
34347
|
-
});
|
|
34348
|
-
if (previousAnswer) {
|
|
34349
|
-
setCurrentAnswer(previousAnswer);
|
|
34350
|
-
} else {
|
|
34351
|
-
setCurrentAnswer(onGetAnswers(currentQuestion.answerIds).pop());
|
|
34352
|
-
}
|
|
34353
|
-
break;
|
|
34354
|
-
case 'Enter':
|
|
34355
|
-
setCanShowAnswers(false);
|
|
34356
|
-
if (!(currentAnswer != null && currentAnswer.nextQuestionId)) {
|
|
34357
|
-
onClose();
|
|
34358
|
-
return;
|
|
34359
|
-
} else {
|
|
34360
|
-
setCurrentQuestion(questions.find(function (question) {
|
|
34361
|
-
return question.id === currentAnswer.nextQuestionId;
|
|
34362
|
-
}));
|
|
34363
|
-
}
|
|
34364
|
-
break;
|
|
34365
|
-
}
|
|
34366
|
-
};
|
|
34367
|
-
useEventListener('keydown', onKeyPress);
|
|
34368
|
-
var onAnswerClick = function onAnswerClick(answer) {
|
|
34369
|
-
setCanShowAnswers(false);
|
|
34370
|
-
if (answer.nextQuestionId) {
|
|
34371
|
-
// if there is a next question, go to it
|
|
34372
|
-
setCurrentQuestion(questions.find(function (question) {
|
|
34373
|
-
return question.id === answer.nextQuestionId;
|
|
34374
|
-
}));
|
|
34375
|
-
} else {
|
|
34376
|
-
// else, finish dialog!
|
|
34377
|
-
onClose();
|
|
34378
|
-
}
|
|
34379
|
-
};
|
|
34380
|
-
var onRenderCurrentAnswers = function onRenderCurrentAnswers() {
|
|
34381
|
-
var answerIds = currentQuestion.answerIds;
|
|
34382
|
-
if (!answerIds) {
|
|
34383
|
-
return null;
|
|
34384
|
-
}
|
|
34385
|
-
var answers = onGetAnswers(answerIds);
|
|
34386
|
-
if (!answers) {
|
|
34387
|
-
return null;
|
|
34388
|
-
}
|
|
34389
|
-
return answers.map(function (answer) {
|
|
34390
|
-
var isSelected = (currentAnswer == null ? void 0 : currentAnswer.id) === (answer == null ? void 0 : answer.id);
|
|
34391
|
-
var selectedColor = isSelected ? 'yellow' : 'white';
|
|
34392
|
-
if (answer) {
|
|
34393
|
-
return React.createElement(AnswerRow, {
|
|
34394
|
-
key: "answer_" + answer.id
|
|
34395
|
-
}, React.createElement(AnswerSelectedIcon, {
|
|
34396
|
-
color: selectedColor
|
|
34397
|
-
}, isSelected ? 'X' : null), React.createElement(Answer, {
|
|
34398
|
-
key: answer.id,
|
|
34399
|
-
onPointerDown: function onPointerDown() {
|
|
34400
|
-
return onAnswerClick(answer);
|
|
34401
|
-
},
|
|
34402
|
-
color: selectedColor
|
|
34403
|
-
}, answer.text));
|
|
34404
|
-
}
|
|
34405
|
-
return null;
|
|
34406
|
-
});
|
|
34407
|
-
};
|
|
34408
|
-
return React.createElement(Container$c, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
|
|
34409
|
-
text: currentQuestion.text,
|
|
34410
|
-
onStart: function onStart() {
|
|
34411
|
-
return setCanShowAnswers(false);
|
|
34412
|
-
},
|
|
34413
|
-
onFinish: function onFinish() {
|
|
34414
|
-
return setCanShowAnswers(true);
|
|
34415
|
-
}
|
|
34416
|
-
})), canShowAnswers && React.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
34417
|
-
};
|
|
34418
|
-
var Container$c = /*#__PURE__*/styled.div.withConfig({
|
|
34419
|
-
displayName: "QuestionDialog__Container",
|
|
34420
|
-
componentId: "sc-bxc5u0-0"
|
|
34421
|
-
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
34422
|
-
var QuestionContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34423
|
-
displayName: "QuestionDialog__QuestionContainer",
|
|
34424
|
-
componentId: "sc-bxc5u0-1"
|
|
34425
|
-
})(["flex:100%;width:100%;"]);
|
|
34426
|
-
var AnswersContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34427
|
-
displayName: "QuestionDialog__AnswersContainer",
|
|
34428
|
-
componentId: "sc-bxc5u0-2"
|
|
34429
|
-
})(["flex:100%;"]);
|
|
34430
|
-
var Answer = /*#__PURE__*/styled.p.withConfig({
|
|
34431
|
-
displayName: "QuestionDialog__Answer",
|
|
34432
|
-
componentId: "sc-bxc5u0-3"
|
|
34433
|
-
})(["flex:auto;color:", " !important;font-size:0.65rem !important;background:inherit;border:none;"], function (props) {
|
|
34434
|
-
return props.color;
|
|
34435
|
-
});
|
|
34436
|
-
var AnswerSelectedIcon = /*#__PURE__*/styled.span.withConfig({
|
|
34437
|
-
displayName: "QuestionDialog__AnswerSelectedIcon",
|
|
34438
|
-
componentId: "sc-bxc5u0-4"
|
|
34439
|
-
})(["flex:5% 0 0;color:", " !important;"], function (props) {
|
|
34440
|
-
return props.color;
|
|
34441
|
-
});
|
|
34442
|
-
var AnswerRow = /*#__PURE__*/styled.div.withConfig({
|
|
34443
|
-
displayName: "QuestionDialog__AnswerRow",
|
|
34444
|
-
componentId: "sc-bxc5u0-5"
|
|
34445
|
-
})(["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;}"]);
|
|
34446
|
-
|
|
34447
|
-
var img$8 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAP1BMVEUAAAA7FyVxQTsUEBPj5v////+5v/tCJDOOUlIiHBr1oJfptaO6dWr61rhzFy1bMTjoanMUNGQoXMQkn97+88DQ3IhAAAAAAXRSTlMAQObYZgAAAAFiS0dEBfhv6ccAAAAHdElNRQfmAw4VOBC7c5LYAAABM0lEQVQ4y3XRi5KDIAwFUAUkbrBgpP//rZsHVHQ009qZ3tPboNN0zmwzvcw8O5sX4y0NOg/Et3jRCXF+ziULorjkOQ9gE24dvuUAzq08DiCO4pe3WN7zCP56vmpubBReQYC11YPS86ySxxCsAABTSgjb5m4g8nfbxvFHBkH2OEEvAItVuCuIsgGgl+Gcr7kDXxhEAx55A2SQEEeQeZwUaIP8Tbo05B0RFPhItAjgj1w6cDnhLluDj+Egkh3pCCP4pKQAw1IPO0W9Nti5gW9RP2dKA3BZd2Dw+baYX+Nt4GM00O4S3kEpF6Alb2Bv4LeC3kkGfAW0/p0RPoJVKr63ghHsKuRh5DIUKOAlGOwrtt9fQekAEfmhZslHUDoglB0zjfkJigN7UnTQQ4GBWomoVhEN/AOPSBh38gy+fwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0xNFQyMTo1NTo1MSswMDowMJcc0eEAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMTRUMjE6NTU6NTErMDA6MDDmQWldAAAAAElFTkSuQmCC';
|
|
34448
|
-
|
|
34449
|
-
var NPCDialogType;
|
|
34450
|
-
(function (NPCDialogType) {
|
|
34451
|
-
NPCDialogType["TextOnly"] = "TextOnly";
|
|
34452
|
-
NPCDialogType["TextAndThumbnail"] = "TextAndThumbnail";
|
|
34453
|
-
})(NPCDialogType || (NPCDialogType = {}));
|
|
34454
|
-
var NPCDialog = function NPCDialog(_ref) {
|
|
34455
|
-
var text = _ref.text,
|
|
34456
|
-
type = _ref.type,
|
|
34457
|
-
_onClose = _ref.onClose,
|
|
34458
|
-
imagePath = _ref.imagePath,
|
|
34459
|
-
_ref$isQuestionDialog = _ref.isQuestionDialog,
|
|
34460
|
-
isQuestionDialog = _ref$isQuestionDialog === void 0 ? false : _ref$isQuestionDialog,
|
|
34461
|
-
questions = _ref.questions,
|
|
34462
|
-
answers = _ref.answers;
|
|
34463
|
-
return React.createElement(RPGUIContainer, {
|
|
34464
|
-
type: RPGUIContainerTypes.FramedGold,
|
|
34465
|
-
width: isQuestionDialog ? '600px' : '80%',
|
|
34466
|
-
height: '180px'
|
|
34467
|
-
}, isQuestionDialog && questions && answers ? React.createElement(React.Fragment, null, React.createElement(TextContainer$1, {
|
|
34468
|
-
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
34469
|
-
}, React.createElement(QuestionDialog, {
|
|
34470
|
-
questions: questions,
|
|
34471
|
-
answers: answers,
|
|
34472
|
-
onClose: function onClose() {
|
|
34473
|
-
if (_onClose) {
|
|
34474
|
-
_onClose();
|
|
34475
|
-
}
|
|
34476
|
-
}
|
|
34477
|
-
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
34478
|
-
src: imagePath || img$8
|
|
34479
|
-
}))) : React.createElement(React.Fragment, null, React.createElement(Container$d, null, React.createElement(TextContainer$1, {
|
|
34480
|
-
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
34481
|
-
}, React.createElement(NPCDialogText, {
|
|
34482
|
-
type: type,
|
|
34483
|
-
text: text || 'No text provided.',
|
|
34484
|
-
onClose: function onClose() {
|
|
34485
|
-
if (_onClose) {
|
|
34486
|
-
_onClose();
|
|
34487
|
-
}
|
|
34488
|
-
}
|
|
34489
|
-
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
34490
|
-
src: imagePath || img$8
|
|
34491
|
-
})))));
|
|
34492
|
-
};
|
|
34493
|
-
var Container$d = /*#__PURE__*/styled.div.withConfig({
|
|
34494
|
-
displayName: "NPCDialog__Container",
|
|
34495
|
-
componentId: "sc-1b4aw74-0"
|
|
34496
|
-
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
34497
|
-
var TextContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34498
|
-
displayName: "NPCDialog__TextContainer",
|
|
34499
|
-
componentId: "sc-1b4aw74-1"
|
|
34500
|
-
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
34501
|
-
var flex = _ref2.flex;
|
|
34502
|
-
return flex;
|
|
34503
|
-
});
|
|
34504
|
-
var ThumbnailContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34505
|
-
displayName: "NPCDialog__ThumbnailContainer",
|
|
34506
|
-
componentId: "sc-1b4aw74-2"
|
|
34507
|
-
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
34508
|
-
var NPCThumbnail = /*#__PURE__*/styled.img.withConfig({
|
|
34509
|
-
displayName: "NPCDialog__NPCThumbnail",
|
|
34510
|
-
componentId: "sc-1b4aw74-3"
|
|
34511
|
-
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
34512
|
-
|
|
34513
|
-
var ImgSide;
|
|
34514
|
-
(function (ImgSide) {
|
|
34515
|
-
ImgSide["right"] = "right";
|
|
34516
|
-
ImgSide["left"] = "left";
|
|
34517
|
-
})(ImgSide || (ImgSide = {}));
|
|
34518
|
-
var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
34519
|
-
var _textAndTypeArray$sli;
|
|
34520
|
-
var _onClose = _ref.onClose,
|
|
34521
|
-
textAndTypeArray = _ref.textAndTypeArray;
|
|
34522
|
-
var _useState = useState(false),
|
|
34523
|
-
showGoNextIndicator = _useState[0],
|
|
34524
|
-
setShowGoNextIndicator = _useState[1];
|
|
34525
|
-
var _useState2 = useState(0),
|
|
34526
|
-
slide = _useState2[0],
|
|
34527
|
-
setSlide = _useState2[1];
|
|
34528
|
-
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
34529
|
-
if (event.code === 'Space') {
|
|
34530
|
-
if (slide < (textAndTypeArray == null ? void 0 : textAndTypeArray.length) - 1) {
|
|
34531
|
-
setSlide(function (prev) {
|
|
34532
|
-
return prev + 1;
|
|
34533
|
-
});
|
|
34534
|
-
} else {
|
|
34535
|
-
// if there's no more text chunks, close the dialog
|
|
34536
|
-
_onClose();
|
|
34537
|
-
}
|
|
34538
|
-
}
|
|
34539
|
-
};
|
|
34540
|
-
useEffect(function () {
|
|
34541
|
-
document.addEventListener('keydown', onHandleSpacePress);
|
|
34542
|
-
return function () {
|
|
34543
|
-
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
34544
|
-
};
|
|
34545
|
-
}, [slide]);
|
|
34546
|
-
return React.createElement(RPGUIContainer, {
|
|
34547
|
-
type: RPGUIContainerTypes.FramedGold,
|
|
34548
|
-
width: '50%',
|
|
34549
|
-
height: '180px'
|
|
34550
|
-
}, 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, {
|
|
34551
|
-
flex: '70%'
|
|
34552
|
-
}, React.createElement(NPCDialogText, {
|
|
34553
|
-
onStartStep: function onStartStep() {
|
|
34554
|
-
return setShowGoNextIndicator(false);
|
|
34555
|
-
},
|
|
34556
|
-
onEndStep: function onEndStep() {
|
|
34557
|
-
return setShowGoNextIndicator(true);
|
|
34558
|
-
},
|
|
34559
|
-
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
34560
|
-
onClose: function onClose() {
|
|
34561
|
-
if (_onClose) {
|
|
34562
|
-
_onClose();
|
|
34563
|
-
}
|
|
34564
|
-
}
|
|
34565
|
-
})), React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
34566
|
-
src: textAndTypeArray[slide].imagePath || img$8
|
|
34567
|
-
})), showGoNextIndicator && React.createElement(PressSpaceIndicator$1, {
|
|
34568
|
-
right: '10.5rem',
|
|
34569
|
-
src: img$7
|
|
34570
|
-
})), textAndTypeArray[slide].imageSide === 'left' && React.createElement(React.Fragment, null, React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
34571
|
-
src: textAndTypeArray[slide].imagePath || img$8
|
|
34572
|
-
})), React.createElement(TextContainer$2, {
|
|
34573
|
-
flex: '70%'
|
|
34574
|
-
}, React.createElement(NPCDialogText, {
|
|
34575
|
-
onStartStep: function onStartStep() {
|
|
34576
|
-
return setShowGoNextIndicator(false);
|
|
34577
|
-
},
|
|
34578
|
-
onEndStep: function onEndStep() {
|
|
34579
|
-
return setShowGoNextIndicator(true);
|
|
34580
|
-
},
|
|
34581
|
-
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
34582
|
-
onClose: function onClose() {
|
|
34583
|
-
if (_onClose) {
|
|
34584
|
-
_onClose();
|
|
34585
|
-
}
|
|
34586
|
-
}
|
|
34587
|
-
})), showGoNextIndicator && React.createElement(PressSpaceIndicator$1, {
|
|
34588
|
-
right: '1rem',
|
|
34589
|
-
src: img$7
|
|
34590
|
-
}))), ")"));
|
|
34591
|
-
};
|
|
34592
|
-
var Container$e = /*#__PURE__*/styled.div.withConfig({
|
|
34593
|
-
displayName: "NPCMultiDialog__Container",
|
|
34594
|
-
componentId: "sc-rvu5wg-0"
|
|
34595
|
-
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
34596
|
-
var TextContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
34597
|
-
displayName: "NPCMultiDialog__TextContainer",
|
|
34598
|
-
componentId: "sc-rvu5wg-1"
|
|
34599
|
-
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
34600
|
-
var flex = _ref2.flex;
|
|
34601
|
-
return flex;
|
|
34602
|
-
});
|
|
34603
|
-
var ThumbnailContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34604
|
-
displayName: "NPCMultiDialog__ThumbnailContainer",
|
|
34605
|
-
componentId: "sc-rvu5wg-2"
|
|
34606
|
-
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
34607
|
-
var NPCThumbnail$1 = /*#__PURE__*/styled.img.withConfig({
|
|
34608
|
-
displayName: "NPCMultiDialog__NPCThumbnail",
|
|
34609
|
-
componentId: "sc-rvu5wg-3"
|
|
34610
|
-
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
34611
|
-
var PressSpaceIndicator$1 = /*#__PURE__*/styled.img.withConfig({
|
|
34612
|
-
displayName: "NPCMultiDialog__PressSpaceIndicator",
|
|
34613
|
-
componentId: "sc-rvu5wg-4"
|
|
34614
|
-
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref3) {
|
|
34615
|
-
var right = _ref3.right;
|
|
34616
|
-
return right;
|
|
34617
|
-
});
|
|
34618
|
-
|
|
34619
|
-
var HistoryDialog = function HistoryDialog(_ref) {
|
|
34620
|
-
var backgroundImgPath = _ref.backgroundImgPath,
|
|
34621
|
-
fullCoverBackground = _ref.fullCoverBackground,
|
|
34622
|
-
questions = _ref.questions,
|
|
34623
|
-
answers = _ref.answers,
|
|
34624
|
-
text = _ref.text,
|
|
34625
|
-
imagePath = _ref.imagePath,
|
|
34626
|
-
textAndTypeArray = _ref.textAndTypeArray,
|
|
34627
|
-
onClose = _ref.onClose;
|
|
34628
|
-
var _useState = useState(0),
|
|
34629
|
-
img = _useState[0],
|
|
34630
|
-
setImage = _useState[1];
|
|
34631
|
-
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
34632
|
-
if (event.code === 'Space') {
|
|
34633
|
-
if (img < (backgroundImgPath == null ? void 0 : backgroundImgPath.length) - 1) {
|
|
34634
|
-
setImage(function (prev) {
|
|
34635
|
-
return prev + 1;
|
|
34636
|
-
});
|
|
34637
|
-
} else {
|
|
34638
|
-
// if there's no more text chunks, close the dialog
|
|
34639
|
-
onClose();
|
|
34640
|
-
}
|
|
34641
|
-
}
|
|
34642
|
-
};
|
|
34643
|
-
useEffect(function () {
|
|
34644
|
-
document.addEventListener('keydown', onHandleSpacePress);
|
|
34645
|
-
return function () {
|
|
34646
|
-
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
34647
|
-
};
|
|
34648
|
-
}, [backgroundImgPath]);
|
|
34649
|
-
return React.createElement(BackgroundContainer, {
|
|
34650
|
-
imgPath: backgroundImgPath[img],
|
|
34651
|
-
fullImg: fullCoverBackground
|
|
34652
|
-
}, React.createElement(DialogContainer, null, textAndTypeArray ? React.createElement(NPCMultiDialog, {
|
|
34653
|
-
textAndTypeArray: textAndTypeArray,
|
|
34654
|
-
onClose: onClose
|
|
34655
|
-
}) : questions && answers ? React.createElement(QuestionDialog, {
|
|
34656
|
-
questions: questions,
|
|
34657
|
-
answers: answers,
|
|
34658
|
-
onClose: onClose
|
|
34659
|
-
}) : text && imagePath ? React.createElement(NPCDialog, {
|
|
34660
|
-
text: text,
|
|
34661
|
-
imagePath: imagePath,
|
|
34662
|
-
onClose: onClose,
|
|
34663
|
-
type: NPCDialogType.TextAndThumbnail
|
|
34664
|
-
}) : React.createElement(NPCDialog, {
|
|
34665
|
-
text: text,
|
|
34666
|
-
onClose: onClose,
|
|
34667
|
-
type: NPCDialogType.TextOnly
|
|
34668
|
-
})));
|
|
34669
|
-
};
|
|
34670
|
-
var BackgroundContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34671
|
-
displayName: "HistoryDialog__BackgroundContainer",
|
|
34672
|
-
componentId: "sc-u6oe75-0"
|
|
34673
|
-
})(["width:100%;height:100%;background-image:url(", ");background-size:", ";display:flex;justify-content:space-evenly;align-items:center;"], function (props) {
|
|
34674
|
-
return props.imgPath;
|
|
34675
|
-
}, function (props) {
|
|
34676
|
-
return props.imgPath ? 'cover' : 'auto';
|
|
34677
|
-
});
|
|
34678
|
-
var DialogContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34679
|
-
displayName: "HistoryDialog__DialogContainer",
|
|
34680
|
-
componentId: "sc-u6oe75-1"
|
|
34681
|
-
})(["display:flex;justify-content:center;padding-top:200px;"]);
|
|
34682
|
-
|
|
34683
34402
|
var SlotsContainer = function SlotsContainer(_ref) {
|
|
34684
34403
|
var children = _ref.children,
|
|
34685
34404
|
title = _ref.title,
|
|
@@ -34901,7 +34620,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
34901
34620
|
return word[0];
|
|
34902
34621
|
}));
|
|
34903
34622
|
};
|
|
34904
|
-
return React.createElement(Container$
|
|
34623
|
+
return React.createElement(Container$c, null, React.createElement("p", null, "Shortcuts:"), React.createElement(List, {
|
|
34905
34624
|
id: "shortcuts_list"
|
|
34906
34625
|
}, Array.from({
|
|
34907
34626
|
length: 6
|
|
@@ -34917,7 +34636,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
34917
34636
|
}, getContent(i));
|
|
34918
34637
|
})));
|
|
34919
34638
|
};
|
|
34920
|
-
var Container$
|
|
34639
|
+
var Container$c = /*#__PURE__*/styled.div.withConfig({
|
|
34921
34640
|
displayName: "ShortcutsSetter__Container",
|
|
34922
34641
|
componentId: "sc-xuouuf-0"
|
|
34923
34642
|
})(["p{margin:0;margin-left:0.5rem;}"]);
|
|
@@ -34954,7 +34673,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
34954
34673
|
dragScale = _ref.dragScale,
|
|
34955
34674
|
shortcuts = _ref.shortcuts,
|
|
34956
34675
|
setItemShortcut = _ref.setItemShortcut,
|
|
34957
|
-
removeShortcut = _ref.removeShortcut
|
|
34676
|
+
removeShortcut = _ref.removeShortcut,
|
|
34677
|
+
equipmentSet = _ref.equipmentSet;
|
|
34958
34678
|
var _useState = useState({
|
|
34959
34679
|
isOpen: false,
|
|
34960
34680
|
maxQuantity: 1,
|
|
@@ -35013,173 +34733,500 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
35013
34733
|
},
|
|
35014
34734
|
atlasIMG: atlasIMG,
|
|
35015
34735
|
atlasJSON: atlasJSON,
|
|
35016
|
-
isSelectingShortcut: settingShortcutIndex !== -1
|
|
34736
|
+
isSelectingShortcut: settingShortcutIndex !== -1,
|
|
34737
|
+
equipmentSet: equipmentSet
|
|
35017
34738
|
}));
|
|
35018
34739
|
}
|
|
35019
|
-
return slots;
|
|
34740
|
+
return slots;
|
|
34741
|
+
};
|
|
34742
|
+
return React.createElement(React.Fragment, null, React.createElement(SlotsContainer, {
|
|
34743
|
+
title: itemContainer.name || 'Container',
|
|
34744
|
+
onClose: onClose,
|
|
34745
|
+
initialPosition: initialPosition
|
|
34746
|
+
}, type === ItemContainerType.Inventory && shortcuts && removeShortcut && React.createElement(ShortcutsSetter, {
|
|
34747
|
+
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
34748
|
+
settingShortcutIndex: settingShortcutIndex,
|
|
34749
|
+
shortcuts: shortcuts,
|
|
34750
|
+
removeShortcut: removeShortcut,
|
|
34751
|
+
atlasIMG: atlasIMG,
|
|
34752
|
+
atlasJSON: atlasJSON
|
|
34753
|
+
}), React.createElement(ItemsContainer, {
|
|
34754
|
+
className: "item-container-body"
|
|
34755
|
+
}, onRenderSlots())), quantitySelect.isOpen && React.createElement(QuantitySelectorContainer, null, React.createElement(ItemQuantitySelector, {
|
|
34756
|
+
quantity: quantitySelect.maxQuantity,
|
|
34757
|
+
onConfirm: function onConfirm(quantity) {
|
|
34758
|
+
quantitySelect.callback(quantity);
|
|
34759
|
+
setQuantitySelect({
|
|
34760
|
+
isOpen: false,
|
|
34761
|
+
maxQuantity: 1,
|
|
34762
|
+
callback: function callback() {}
|
|
34763
|
+
});
|
|
34764
|
+
},
|
|
34765
|
+
onClose: function onClose() {
|
|
34766
|
+
quantitySelect.callback(-1);
|
|
34767
|
+
setQuantitySelect({
|
|
34768
|
+
isOpen: false,
|
|
34769
|
+
maxQuantity: 1,
|
|
34770
|
+
callback: function callback() {}
|
|
34771
|
+
});
|
|
34772
|
+
}
|
|
34773
|
+
})));
|
|
34774
|
+
};
|
|
34775
|
+
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34776
|
+
displayName: "ItemContainer__ItemsContainer",
|
|
34777
|
+
componentId: "sc-15y5p9l-0"
|
|
34778
|
+
})(["display:flex;justify-content:center;flex-wrap:wrap;"]);
|
|
34779
|
+
var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34780
|
+
displayName: "ItemContainer__QuantitySelectorContainer",
|
|
34781
|
+
componentId: "sc-15y5p9l-1"
|
|
34782
|
+
})(["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);"]);
|
|
34783
|
+
|
|
34784
|
+
var ItemSelector = function ItemSelector(_ref) {
|
|
34785
|
+
var atlasIMG = _ref.atlasIMG,
|
|
34786
|
+
atlasJSON = _ref.atlasJSON,
|
|
34787
|
+
options = _ref.options,
|
|
34788
|
+
onClose = _ref.onClose,
|
|
34789
|
+
onSelect = _ref.onSelect;
|
|
34790
|
+
var _useState = useState(),
|
|
34791
|
+
selectedValue = _useState[0],
|
|
34792
|
+
setSelectedValue = _useState[1];
|
|
34793
|
+
var handleClick = function handleClick() {
|
|
34794
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
34795
|
+
var elementValue = element.value;
|
|
34796
|
+
setSelectedValue(elementValue);
|
|
34797
|
+
};
|
|
34798
|
+
useEffect(function () {
|
|
34799
|
+
if (selectedValue) {
|
|
34800
|
+
onSelect(selectedValue);
|
|
34801
|
+
}
|
|
34802
|
+
}, [selectedValue]);
|
|
34803
|
+
return React.createElement(DraggableContainer, {
|
|
34804
|
+
type: RPGUIContainerTypes.Framed,
|
|
34805
|
+
width: "500px",
|
|
34806
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
34807
|
+
onCloseButton: function onCloseButton() {
|
|
34808
|
+
if (onClose) {
|
|
34809
|
+
onClose();
|
|
34810
|
+
}
|
|
34811
|
+
}
|
|
34812
|
+
}, React.createElement("div", {
|
|
34813
|
+
style: {
|
|
34814
|
+
width: '100%'
|
|
34815
|
+
}
|
|
34816
|
+
}, React.createElement(Title$3, null, 'Harvesting instruments'), React.createElement(Subtitle$1, null, 'Use the tool, you need it'), React.createElement("hr", {
|
|
34817
|
+
className: "golden"
|
|
34818
|
+
})), React.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
34819
|
+
return React.createElement(RadioOptionsWrapper$1, {
|
|
34820
|
+
key: index
|
|
34821
|
+
}, React.createElement(SpriteAtlasWrapper$1, null, React.createElement(SpriteFromAtlas, {
|
|
34822
|
+
atlasIMG: atlasIMG,
|
|
34823
|
+
atlasJSON: atlasJSON,
|
|
34824
|
+
spriteKey: option.imageKey,
|
|
34825
|
+
imgScale: 3
|
|
34826
|
+
})), React.createElement("div", null, React.createElement("input", {
|
|
34827
|
+
className: "rpgui-radio",
|
|
34828
|
+
type: "radio",
|
|
34829
|
+
value: option.name,
|
|
34830
|
+
name: "test"
|
|
34831
|
+
}), React.createElement("label", {
|
|
34832
|
+
onPointerDown: handleClick,
|
|
34833
|
+
style: {
|
|
34834
|
+
display: 'flex',
|
|
34835
|
+
alignItems: 'center'
|
|
34836
|
+
}
|
|
34837
|
+
}, option.name, " ", React.createElement("br", null), option.description)));
|
|
34838
|
+
})), React.createElement(ButtonWrapper$1, null, React.createElement(Button, {
|
|
34839
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
34840
|
+
onPointerDown: onClose
|
|
34841
|
+
}, "Cancel"), React.createElement(Button, {
|
|
34842
|
+
buttonType: ButtonTypes.RPGUIButton
|
|
34843
|
+
}, "Select")));
|
|
34844
|
+
};
|
|
34845
|
+
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
34846
|
+
displayName: "ItemSelector__Title",
|
|
34847
|
+
componentId: "sc-gptoxp-0"
|
|
34848
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
34849
|
+
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
34850
|
+
displayName: "ItemSelector__Subtitle",
|
|
34851
|
+
componentId: "sc-gptoxp-1"
|
|
34852
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
34853
|
+
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34854
|
+
displayName: "ItemSelector__RadioInputScroller",
|
|
34855
|
+
componentId: "sc-gptoxp-2"
|
|
34856
|
+
})(["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;"]);
|
|
34857
|
+
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34858
|
+
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
34859
|
+
componentId: "sc-gptoxp-3"
|
|
34860
|
+
})(["margin-right:40px;"]);
|
|
34861
|
+
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34862
|
+
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
34863
|
+
componentId: "sc-gptoxp-4"
|
|
34864
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
34865
|
+
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34866
|
+
displayName: "ItemSelector__ButtonWrapper",
|
|
34867
|
+
componentId: "sc-gptoxp-5"
|
|
34868
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
34869
|
+
|
|
34870
|
+
var ListMenu = function ListMenu(_ref) {
|
|
34871
|
+
var options = _ref.options,
|
|
34872
|
+
onSelected = _ref.onSelected,
|
|
34873
|
+
x = _ref.x,
|
|
34874
|
+
y = _ref.y;
|
|
34875
|
+
return React.createElement(Container$d, {
|
|
34876
|
+
x: x,
|
|
34877
|
+
y: y
|
|
34878
|
+
}, React.createElement("ul", {
|
|
34879
|
+
className: "rpgui-list-imp",
|
|
34880
|
+
style: {
|
|
34881
|
+
overflow: 'hidden'
|
|
34882
|
+
}
|
|
34883
|
+
}, options.map(function (params, index) {
|
|
34884
|
+
return React.createElement(ListElement$1, {
|
|
34885
|
+
key: (params == null ? void 0 : params.id) || index,
|
|
34886
|
+
onPointerDown: function onPointerDown() {
|
|
34887
|
+
onSelected(params == null ? void 0 : params.id);
|
|
34888
|
+
}
|
|
34889
|
+
}, (params == null ? void 0 : params.text) || 'No text');
|
|
34890
|
+
})));
|
|
34891
|
+
};
|
|
34892
|
+
var Container$d = /*#__PURE__*/styled.div.withConfig({
|
|
34893
|
+
displayName: "ListMenu__Container",
|
|
34894
|
+
componentId: "sc-i9097t-0"
|
|
34895
|
+
})(["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) {
|
|
34896
|
+
return props.y || 0;
|
|
34897
|
+
}, function (props) {
|
|
34898
|
+
return props.x || 0;
|
|
34899
|
+
}, uiFonts.size.xsmall);
|
|
34900
|
+
var ListElement$1 = /*#__PURE__*/styled.li.withConfig({
|
|
34901
|
+
displayName: "ListMenu__ListElement",
|
|
34902
|
+
componentId: "sc-i9097t-1"
|
|
34903
|
+
})(["margin-right:0.5rem;"]);
|
|
34904
|
+
|
|
34905
|
+
var img$6 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAP1BMVEUAAAA7FyVxQTsUEBPj5v////+5v/tCJDOOUlIiHBr1oJfptaO6dWr61rhzFy1bMTjoanMUNGQoXMQkn97+88DQ3IhAAAAAAXRSTlMAQObYZgAAAAFiS0dEBfhv6ccAAAAHdElNRQfmAw4VOBC7c5LYAAABM0lEQVQ4y3XRi5KDIAwFUAUkbrBgpP//rZsHVHQ009qZ3tPboNN0zmwzvcw8O5sX4y0NOg/Et3jRCXF+ziULorjkOQ9gE24dvuUAzq08DiCO4pe3WN7zCP56vmpubBReQYC11YPS86ySxxCsAABTSgjb5m4g8nfbxvFHBkH2OEEvAItVuCuIsgGgl+Gcr7kDXxhEAx55A2SQEEeQeZwUaIP8Tbo05B0RFPhItAjgj1w6cDnhLluDj+Egkh3p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PeHdij3aYhZONf46YkZGanzpSAV6KjaOIpqWtNwIBAAEDqqKKhZuJnHSwAgMBtqo5sGs5wcO3yM01ysTO0gXQzNPN1cXXUNnbyNna3kcmwrW3Lujp6ugD5bbn6/HyLe20Cu/t+fr7/P3+/wCF2VswrKDBgwgTKlzIsCCDBAA7';
|
|
34908
|
+
|
|
34909
|
+
var ImgSide;
|
|
34910
|
+
(function (ImgSide) {
|
|
34911
|
+
ImgSide["right"] = "right";
|
|
34912
|
+
ImgSide["left"] = "left";
|
|
34913
|
+
})(ImgSide || (ImgSide = {}));
|
|
34914
|
+
var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
34915
|
+
var _textAndTypeArray$sli;
|
|
34916
|
+
var _onClose = _ref.onClose,
|
|
34917
|
+
textAndTypeArray = _ref.textAndTypeArray;
|
|
34918
|
+
var _useState = useState(false),
|
|
34919
|
+
showGoNextIndicator = _useState[0],
|
|
34920
|
+
setShowGoNextIndicator = _useState[1];
|
|
34921
|
+
var _useState2 = useState(0),
|
|
34922
|
+
slide = _useState2[0],
|
|
34923
|
+
setSlide = _useState2[1];
|
|
34924
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
34925
|
+
if (event.code === 'Space') {
|
|
34926
|
+
if (slide < (textAndTypeArray == null ? void 0 : textAndTypeArray.length) - 1) {
|
|
34927
|
+
setSlide(function (prev) {
|
|
34928
|
+
return prev + 1;
|
|
34929
|
+
});
|
|
34930
|
+
} else {
|
|
34931
|
+
// if there's no more text chunks, close the dialog
|
|
34932
|
+
_onClose();
|
|
34933
|
+
}
|
|
34934
|
+
}
|
|
34935
|
+
};
|
|
34936
|
+
useEffect(function () {
|
|
34937
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
34938
|
+
return function () {
|
|
34939
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
34940
|
+
};
|
|
34941
|
+
}, [slide]);
|
|
34942
|
+
return React.createElement(RPGUIContainer, {
|
|
34943
|
+
type: RPGUIContainerTypes.FramedGold,
|
|
34944
|
+
width: '50%',
|
|
34945
|
+
height: '180px'
|
|
34946
|
+
}, 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, {
|
|
34947
|
+
flex: '70%'
|
|
34948
|
+
}, React.createElement(NPCDialogText, {
|
|
34949
|
+
onStartStep: function onStartStep() {
|
|
34950
|
+
return setShowGoNextIndicator(false);
|
|
34951
|
+
},
|
|
34952
|
+
onEndStep: function onEndStep() {
|
|
34953
|
+
return setShowGoNextIndicator(true);
|
|
34954
|
+
},
|
|
34955
|
+
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
34956
|
+
onClose: function onClose() {
|
|
34957
|
+
if (_onClose) {
|
|
34958
|
+
_onClose();
|
|
34959
|
+
}
|
|
34960
|
+
}
|
|
34961
|
+
})), React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
34962
|
+
src: textAndTypeArray[slide].imagePath || img$6
|
|
34963
|
+
})), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
|
|
34964
|
+
right: '10.5rem',
|
|
34965
|
+
src: img$7
|
|
34966
|
+
})), textAndTypeArray[slide].imageSide === 'left' && React.createElement(React.Fragment, null, React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
34967
|
+
src: textAndTypeArray[slide].imagePath || img$6
|
|
34968
|
+
})), React.createElement(TextContainer, {
|
|
34969
|
+
flex: '70%'
|
|
34970
|
+
}, React.createElement(NPCDialogText, {
|
|
34971
|
+
onStartStep: function onStartStep() {
|
|
34972
|
+
return setShowGoNextIndicator(false);
|
|
34973
|
+
},
|
|
34974
|
+
onEndStep: function onEndStep() {
|
|
34975
|
+
return setShowGoNextIndicator(true);
|
|
34976
|
+
},
|
|
34977
|
+
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
34978
|
+
onClose: function onClose() {
|
|
34979
|
+
if (_onClose) {
|
|
34980
|
+
_onClose();
|
|
34981
|
+
}
|
|
34982
|
+
}
|
|
34983
|
+
})), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
|
|
34984
|
+
right: '1rem',
|
|
34985
|
+
src: img$7
|
|
34986
|
+
}))), ")"));
|
|
34987
|
+
};
|
|
34988
|
+
var Container$e = /*#__PURE__*/styled.div.withConfig({
|
|
34989
|
+
displayName: "NPCMultiDialog__Container",
|
|
34990
|
+
componentId: "sc-rvu5wg-0"
|
|
34991
|
+
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
34992
|
+
var TextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34993
|
+
displayName: "NPCMultiDialog__TextContainer",
|
|
34994
|
+
componentId: "sc-rvu5wg-1"
|
|
34995
|
+
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
34996
|
+
var flex = _ref2.flex;
|
|
34997
|
+
return flex;
|
|
34998
|
+
});
|
|
34999
|
+
var ThumbnailContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35000
|
+
displayName: "NPCMultiDialog__ThumbnailContainer",
|
|
35001
|
+
componentId: "sc-rvu5wg-2"
|
|
35002
|
+
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
35003
|
+
var NPCThumbnail = /*#__PURE__*/styled.img.withConfig({
|
|
35004
|
+
displayName: "NPCMultiDialog__NPCThumbnail",
|
|
35005
|
+
componentId: "sc-rvu5wg-3"
|
|
35006
|
+
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
35007
|
+
var PressSpaceIndicator = /*#__PURE__*/styled.img.withConfig({
|
|
35008
|
+
displayName: "NPCMultiDialog__PressSpaceIndicator",
|
|
35009
|
+
componentId: "sc-rvu5wg-4"
|
|
35010
|
+
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref3) {
|
|
35011
|
+
var right = _ref3.right;
|
|
35012
|
+
return right;
|
|
35013
|
+
});
|
|
35014
|
+
|
|
35015
|
+
//@ts-ignore
|
|
35016
|
+
var useEventListener = function useEventListener(type, handler, el) {
|
|
35017
|
+
if (el === void 0) {
|
|
35018
|
+
el = window;
|
|
35019
|
+
}
|
|
35020
|
+
var savedHandler = React.useRef();
|
|
35021
|
+
React.useEffect(function () {
|
|
35022
|
+
savedHandler.current = handler;
|
|
35023
|
+
}, [handler]);
|
|
35024
|
+
React.useEffect(function () {
|
|
35025
|
+
//@ts-ignore
|
|
35026
|
+
var listener = function listener(e) {
|
|
35027
|
+
return savedHandler.current(e);
|
|
35028
|
+
};
|
|
35029
|
+
el.addEventListener(type, listener);
|
|
35030
|
+
return function () {
|
|
35031
|
+
el.removeEventListener(type, listener);
|
|
35032
|
+
};
|
|
35033
|
+
}, [type, el]);
|
|
35034
|
+
};
|
|
35035
|
+
|
|
35036
|
+
var DynamicText = function DynamicText(_ref) {
|
|
35037
|
+
var text = _ref.text,
|
|
35038
|
+
onFinish = _ref.onFinish,
|
|
35039
|
+
onStart = _ref.onStart;
|
|
35040
|
+
var _useState = useState(''),
|
|
35041
|
+
textState = _useState[0],
|
|
35042
|
+
setTextState = _useState[1];
|
|
35043
|
+
useEffect(function () {
|
|
35044
|
+
var i = 0;
|
|
35045
|
+
var interval = setInterval(function () {
|
|
35046
|
+
// on every interval, show one more character
|
|
35047
|
+
if (i === 0) {
|
|
35048
|
+
if (onStart) {
|
|
35049
|
+
onStart();
|
|
35050
|
+
}
|
|
35051
|
+
}
|
|
35052
|
+
if (i < text.length) {
|
|
35053
|
+
setTextState(text.substring(0, i + 1));
|
|
35054
|
+
i++;
|
|
35055
|
+
} else {
|
|
35056
|
+
clearInterval(interval);
|
|
35057
|
+
if (onFinish) {
|
|
35058
|
+
onFinish();
|
|
35059
|
+
}
|
|
35060
|
+
}
|
|
35061
|
+
}, 50);
|
|
35062
|
+
return function () {
|
|
35063
|
+
clearInterval(interval);
|
|
35064
|
+
};
|
|
35065
|
+
}, [text]);
|
|
35066
|
+
return React.createElement(TextContainer$1, null, textState);
|
|
35067
|
+
};
|
|
35068
|
+
var TextContainer$1 = /*#__PURE__*/styled.p.withConfig({
|
|
35069
|
+
displayName: "DynamicText__TextContainer",
|
|
35070
|
+
componentId: "sc-1ggl9nd-0"
|
|
35071
|
+
})(["font-size:0.7rem !important;color:white;text-shadow:1px 1px 0px #000000;letter-spacing:1.2px;word-break:normal;"]);
|
|
35072
|
+
|
|
35073
|
+
var QuestionDialog = function QuestionDialog(_ref) {
|
|
35074
|
+
var questions = _ref.questions,
|
|
35075
|
+
answers = _ref.answers,
|
|
35076
|
+
onClose = _ref.onClose;
|
|
35077
|
+
var _useState = useState(questions[0]),
|
|
35078
|
+
currentQuestion = _useState[0],
|
|
35079
|
+
setCurrentQuestion = _useState[1];
|
|
35080
|
+
var _useState2 = useState(false),
|
|
35081
|
+
canShowAnswers = _useState2[0],
|
|
35082
|
+
setCanShowAnswers = _useState2[1];
|
|
35083
|
+
var onGetFirstAnswer = function onGetFirstAnswer() {
|
|
35084
|
+
if (!currentQuestion.answerIds || currentQuestion.answerIds.length === 0) {
|
|
35085
|
+
return null;
|
|
35086
|
+
}
|
|
35087
|
+
var firstAnswerId = currentQuestion.answerIds[0];
|
|
35088
|
+
return answers.find(function (answer) {
|
|
35089
|
+
return answer.id === firstAnswerId;
|
|
35090
|
+
});
|
|
35020
35091
|
};
|
|
35021
|
-
|
|
35022
|
-
|
|
35023
|
-
|
|
35024
|
-
|
|
35025
|
-
|
|
35026
|
-
|
|
35027
|
-
|
|
35028
|
-
|
|
35029
|
-
|
|
35030
|
-
|
|
35031
|
-
atlasJSON: atlasJSON
|
|
35032
|
-
}), React.createElement(ItemsContainer, {
|
|
35033
|
-
className: "item-container-body"
|
|
35034
|
-
}, onRenderSlots())), quantitySelect.isOpen && React.createElement(QuantitySelectorContainer, null, React.createElement(ItemQuantitySelector, {
|
|
35035
|
-
quantity: quantitySelect.maxQuantity,
|
|
35036
|
-
onConfirm: function onConfirm(quantity) {
|
|
35037
|
-
quantitySelect.callback(quantity);
|
|
35038
|
-
setQuantitySelect({
|
|
35039
|
-
isOpen: false,
|
|
35040
|
-
maxQuantity: 1,
|
|
35041
|
-
callback: function callback() {}
|
|
35042
|
-
});
|
|
35043
|
-
},
|
|
35044
|
-
onClose: function onClose() {
|
|
35045
|
-
quantitySelect.callback(-1);
|
|
35046
|
-
setQuantitySelect({
|
|
35047
|
-
isOpen: false,
|
|
35048
|
-
maxQuantity: 1,
|
|
35049
|
-
callback: function callback() {}
|
|
35092
|
+
var _useState3 = useState(onGetFirstAnswer()),
|
|
35093
|
+
currentAnswer = _useState3[0],
|
|
35094
|
+
setCurrentAnswer = _useState3[1];
|
|
35095
|
+
useEffect(function () {
|
|
35096
|
+
setCurrentAnswer(onGetFirstAnswer());
|
|
35097
|
+
}, [currentQuestion]);
|
|
35098
|
+
var onGetAnswers = function onGetAnswers(answerIds) {
|
|
35099
|
+
return answerIds.map(function (answerId) {
|
|
35100
|
+
return answers.find(function (answer) {
|
|
35101
|
+
return answer.id === answerId;
|
|
35050
35102
|
});
|
|
35103
|
+
});
|
|
35104
|
+
};
|
|
35105
|
+
var onKeyPress = function onKeyPress(e) {
|
|
35106
|
+
switch (e.key) {
|
|
35107
|
+
case 'ArrowDown':
|
|
35108
|
+
// select next answer, if any.
|
|
35109
|
+
// if no next answer, select first answer
|
|
35110
|
+
// const nextAnswer = onGetAnswers(currentQuestion.answerIds!).find(
|
|
35111
|
+
// (answer) => answer?.id === currentAnswer!.id + 1
|
|
35112
|
+
// );
|
|
35113
|
+
var nextAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
35114
|
+
return (answer == null ? void 0 : answer.id) === currentAnswer.id + 1;
|
|
35115
|
+
});
|
|
35116
|
+
var nextAnswerID = currentQuestion.answerIds[nextAnswerIndex];
|
|
35117
|
+
var nextAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
35118
|
+
return (answer == null ? void 0 : answer.id) === nextAnswerID;
|
|
35119
|
+
});
|
|
35120
|
+
setCurrentAnswer(nextAnswer || onGetFirstAnswer());
|
|
35121
|
+
break;
|
|
35122
|
+
case 'ArrowUp':
|
|
35123
|
+
// select previous answer, if any.
|
|
35124
|
+
// if no previous answer, select last answer
|
|
35125
|
+
var previousAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
35126
|
+
return (answer == null ? void 0 : answer.id) === currentAnswer.id - 1;
|
|
35127
|
+
});
|
|
35128
|
+
var previousAnswerID = currentQuestion.answerIds && currentQuestion.answerIds[previousAnswerIndex];
|
|
35129
|
+
var previousAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
35130
|
+
return (answer == null ? void 0 : answer.id) === previousAnswerID;
|
|
35131
|
+
});
|
|
35132
|
+
if (previousAnswer) {
|
|
35133
|
+
setCurrentAnswer(previousAnswer);
|
|
35134
|
+
} else {
|
|
35135
|
+
setCurrentAnswer(onGetAnswers(currentQuestion.answerIds).pop());
|
|
35136
|
+
}
|
|
35137
|
+
break;
|
|
35138
|
+
case 'Enter':
|
|
35139
|
+
setCanShowAnswers(false);
|
|
35140
|
+
if (!(currentAnswer != null && currentAnswer.nextQuestionId)) {
|
|
35141
|
+
onClose();
|
|
35142
|
+
return;
|
|
35143
|
+
} else {
|
|
35144
|
+
setCurrentQuestion(questions.find(function (question) {
|
|
35145
|
+
return question.id === currentAnswer.nextQuestionId;
|
|
35146
|
+
}));
|
|
35147
|
+
}
|
|
35148
|
+
break;
|
|
35051
35149
|
}
|
|
35052
|
-
})));
|
|
35053
|
-
};
|
|
35054
|
-
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35055
|
-
displayName: "ItemContainer__ItemsContainer",
|
|
35056
|
-
componentId: "sc-15y5p9l-0"
|
|
35057
|
-
})(["display:flex;justify-content:center;flex-wrap:wrap;"]);
|
|
35058
|
-
var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35059
|
-
displayName: "ItemContainer__QuantitySelectorContainer",
|
|
35060
|
-
componentId: "sc-15y5p9l-1"
|
|
35061
|
-
})(["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);"]);
|
|
35062
|
-
|
|
35063
|
-
var ItemSelector = function ItemSelector(_ref) {
|
|
35064
|
-
var atlasIMG = _ref.atlasIMG,
|
|
35065
|
-
atlasJSON = _ref.atlasJSON,
|
|
35066
|
-
options = _ref.options,
|
|
35067
|
-
onClose = _ref.onClose,
|
|
35068
|
-
onSelect = _ref.onSelect;
|
|
35069
|
-
var _useState = useState(),
|
|
35070
|
-
selectedValue = _useState[0],
|
|
35071
|
-
setSelectedValue = _useState[1];
|
|
35072
|
-
var handleClick = function handleClick() {
|
|
35073
|
-
var element = document.querySelector("input[name='test']:checked");
|
|
35074
|
-
var elementValue = element.value;
|
|
35075
|
-
setSelectedValue(elementValue);
|
|
35076
35150
|
};
|
|
35077
|
-
|
|
35078
|
-
|
|
35079
|
-
|
|
35151
|
+
useEventListener('keydown', onKeyPress);
|
|
35152
|
+
var onAnswerClick = function onAnswerClick(answer) {
|
|
35153
|
+
setCanShowAnswers(false);
|
|
35154
|
+
if (answer.nextQuestionId) {
|
|
35155
|
+
// if there is a next question, go to it
|
|
35156
|
+
setCurrentQuestion(questions.find(function (question) {
|
|
35157
|
+
return question.id === answer.nextQuestionId;
|
|
35158
|
+
}));
|
|
35159
|
+
} else {
|
|
35160
|
+
// else, finish dialog!
|
|
35161
|
+
onClose();
|
|
35080
35162
|
}
|
|
35081
|
-
}
|
|
35082
|
-
|
|
35083
|
-
|
|
35084
|
-
|
|
35085
|
-
|
|
35086
|
-
onCloseButton: function onCloseButton() {
|
|
35087
|
-
if (onClose) {
|
|
35088
|
-
onClose();
|
|
35089
|
-
}
|
|
35163
|
+
};
|
|
35164
|
+
var onRenderCurrentAnswers = function onRenderCurrentAnswers() {
|
|
35165
|
+
var answerIds = currentQuestion.answerIds;
|
|
35166
|
+
if (!answerIds) {
|
|
35167
|
+
return null;
|
|
35090
35168
|
}
|
|
35091
|
-
|
|
35092
|
-
|
|
35093
|
-
|
|
35169
|
+
var answers = onGetAnswers(answerIds);
|
|
35170
|
+
if (!answers) {
|
|
35171
|
+
return null;
|
|
35094
35172
|
}
|
|
35095
|
-
|
|
35096
|
-
|
|
35097
|
-
|
|
35098
|
-
|
|
35099
|
-
|
|
35100
|
-
|
|
35101
|
-
|
|
35102
|
-
|
|
35103
|
-
|
|
35104
|
-
|
|
35105
|
-
|
|
35106
|
-
|
|
35107
|
-
|
|
35108
|
-
|
|
35109
|
-
|
|
35110
|
-
}), React.createElement("label", {
|
|
35111
|
-
onPointerDown: handleClick,
|
|
35112
|
-
style: {
|
|
35113
|
-
display: 'flex',
|
|
35114
|
-
alignItems: 'center'
|
|
35173
|
+
return answers.map(function (answer) {
|
|
35174
|
+
var isSelected = (currentAnswer == null ? void 0 : currentAnswer.id) === (answer == null ? void 0 : answer.id);
|
|
35175
|
+
var selectedColor = isSelected ? 'yellow' : 'white';
|
|
35176
|
+
if (answer) {
|
|
35177
|
+
return React.createElement(AnswerRow, {
|
|
35178
|
+
key: "answer_" + answer.id
|
|
35179
|
+
}, React.createElement(AnswerSelectedIcon, {
|
|
35180
|
+
color: selectedColor
|
|
35181
|
+
}, isSelected ? 'X' : null), React.createElement(Answer, {
|
|
35182
|
+
key: answer.id,
|
|
35183
|
+
onPointerDown: function onPointerDown() {
|
|
35184
|
+
return onAnswerClick(answer);
|
|
35185
|
+
},
|
|
35186
|
+
color: selectedColor
|
|
35187
|
+
}, answer.text));
|
|
35115
35188
|
}
|
|
35116
|
-
|
|
35117
|
-
|
|
35118
|
-
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
|
|
35122
|
-
|
|
35123
|
-
}
|
|
35124
|
-
|
|
35125
|
-
|
|
35126
|
-
componentId: "sc-gptoxp-0"
|
|
35127
|
-
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
35128
|
-
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
35129
|
-
displayName: "ItemSelector__Subtitle",
|
|
35130
|
-
componentId: "sc-gptoxp-1"
|
|
35131
|
-
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
35132
|
-
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35133
|
-
displayName: "ItemSelector__RadioInputScroller",
|
|
35134
|
-
componentId: "sc-gptoxp-2"
|
|
35135
|
-
})(["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;"]);
|
|
35136
|
-
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35137
|
-
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
35138
|
-
componentId: "sc-gptoxp-3"
|
|
35139
|
-
})(["margin-right:40px;"]);
|
|
35140
|
-
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35141
|
-
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
35142
|
-
componentId: "sc-gptoxp-4"
|
|
35143
|
-
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
35144
|
-
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35145
|
-
displayName: "ItemSelector__ButtonWrapper",
|
|
35146
|
-
componentId: "sc-gptoxp-5"
|
|
35147
|
-
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
35148
|
-
|
|
35149
|
-
var ListMenu = function ListMenu(_ref) {
|
|
35150
|
-
var options = _ref.options,
|
|
35151
|
-
onSelected = _ref.onSelected,
|
|
35152
|
-
x = _ref.x,
|
|
35153
|
-
y = _ref.y;
|
|
35154
|
-
return React.createElement(Container$g, {
|
|
35155
|
-
x: x,
|
|
35156
|
-
y: y
|
|
35157
|
-
}, React.createElement("ul", {
|
|
35158
|
-
className: "rpgui-list-imp",
|
|
35159
|
-
style: {
|
|
35160
|
-
overflow: 'hidden'
|
|
35189
|
+
return null;
|
|
35190
|
+
});
|
|
35191
|
+
};
|
|
35192
|
+
return React.createElement(Container$f, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
|
|
35193
|
+
text: currentQuestion.text,
|
|
35194
|
+
onStart: function onStart() {
|
|
35195
|
+
return setCanShowAnswers(false);
|
|
35196
|
+
},
|
|
35197
|
+
onFinish: function onFinish() {
|
|
35198
|
+
return setCanShowAnswers(true);
|
|
35161
35199
|
}
|
|
35162
|
-
},
|
|
35163
|
-
return React.createElement(ListElement$1, {
|
|
35164
|
-
key: (params == null ? void 0 : params.id) || index,
|
|
35165
|
-
onPointerDown: function onPointerDown() {
|
|
35166
|
-
onSelected(params == null ? void 0 : params.id);
|
|
35167
|
-
}
|
|
35168
|
-
}, (params == null ? void 0 : params.text) || 'No text');
|
|
35169
|
-
})));
|
|
35200
|
+
})), canShowAnswers && React.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
35170
35201
|
};
|
|
35171
|
-
var Container$
|
|
35172
|
-
displayName: "
|
|
35173
|
-
componentId: "sc-
|
|
35174
|
-
})(["display:flex;
|
|
35175
|
-
|
|
35176
|
-
|
|
35177
|
-
|
|
35178
|
-
}
|
|
35179
|
-
var
|
|
35180
|
-
displayName: "
|
|
35181
|
-
componentId: "sc-
|
|
35182
|
-
})(["
|
|
35202
|
+
var Container$f = /*#__PURE__*/styled.div.withConfig({
|
|
35203
|
+
displayName: "QuestionDialog__Container",
|
|
35204
|
+
componentId: "sc-bxc5u0-0"
|
|
35205
|
+
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
35206
|
+
var QuestionContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35207
|
+
displayName: "QuestionDialog__QuestionContainer",
|
|
35208
|
+
componentId: "sc-bxc5u0-1"
|
|
35209
|
+
})(["flex:100%;width:100%;"]);
|
|
35210
|
+
var AnswersContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35211
|
+
displayName: "QuestionDialog__AnswersContainer",
|
|
35212
|
+
componentId: "sc-bxc5u0-2"
|
|
35213
|
+
})(["flex:100%;"]);
|
|
35214
|
+
var Answer = /*#__PURE__*/styled.p.withConfig({
|
|
35215
|
+
displayName: "QuestionDialog__Answer",
|
|
35216
|
+
componentId: "sc-bxc5u0-3"
|
|
35217
|
+
})(["flex:auto;color:", " !important;font-size:0.65rem !important;background:inherit;border:none;"], function (props) {
|
|
35218
|
+
return props.color;
|
|
35219
|
+
});
|
|
35220
|
+
var AnswerSelectedIcon = /*#__PURE__*/styled.span.withConfig({
|
|
35221
|
+
displayName: "QuestionDialog__AnswerSelectedIcon",
|
|
35222
|
+
componentId: "sc-bxc5u0-4"
|
|
35223
|
+
})(["flex:5% 0 0;color:", " !important;"], function (props) {
|
|
35224
|
+
return props.color;
|
|
35225
|
+
});
|
|
35226
|
+
var AnswerRow = /*#__PURE__*/styled.div.withConfig({
|
|
35227
|
+
displayName: "QuestionDialog__AnswerRow",
|
|
35228
|
+
componentId: "sc-bxc5u0-5"
|
|
35229
|
+
})(["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;}"]);
|
|
35183
35230
|
|
|
35184
35231
|
var ProgressBar = function ProgressBar(_ref) {
|
|
35185
35232
|
var max = _ref.max,
|
|
@@ -35198,7 +35245,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
35198
35245
|
}
|
|
35199
35246
|
return value * 100 / max;
|
|
35200
35247
|
};
|
|
35201
|
-
return React.createElement(Container$
|
|
35248
|
+
return React.createElement(Container$g, {
|
|
35202
35249
|
className: "rpgui-progress",
|
|
35203
35250
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
35204
35251
|
"data-rpguitype": "progress",
|
|
@@ -35227,7 +35274,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
35227
35274
|
displayName: "ProgressBar__TextOverlay",
|
|
35228
35275
|
componentId: "sc-qa6fzh-1"
|
|
35229
35276
|
})(["width:100%;position:relative;"]);
|
|
35230
|
-
var Container$
|
|
35277
|
+
var Container$g = /*#__PURE__*/styled.div.withConfig({
|
|
35231
35278
|
displayName: "ProgressBar__Container",
|
|
35232
35279
|
componentId: "sc-qa6fzh-2"
|
|
35233
35280
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", ""], function (props) {
|
|
@@ -35238,7 +35285,7 @@ var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
|
35238
35285
|
return props.style;
|
|
35239
35286
|
});
|
|
35240
35287
|
|
|
35241
|
-
var img$
|
|
35288
|
+
var img$8 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7Bo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xkmbPbaBIMrLJfInB/R0AoN2o4+v7B3GSAkAOzAXAwW0XH59QSpEOIzLCEHanuq31Zot+r1sIYcdwNDZgahIblww2GTxrXDb02B9OAIB+r4tOqymCYXtspRQkxMZ6s82lK8SG14jPBnccYmM6W6Df62ZWSkGkNjgt59p4eXyAt1h9NvSoasMJcs5MqWqj0IjEBncuNVdmIwcSYmN/OIlSUjZTnCD2Ui7pXLqK+tKSgTCEtOikBcrAvrQAQE2HkIwwTlJj2l7CBgBERKSUUrTaHQ3lcZI6t3G2IZ0pEhvZ7ssww9E4Wym5YUi6qoQioqDZwmB6emxDtg3ej97fXv0nNN64OHQrutbpbGG8o//2/DRwpsyXFsOI9DDjCv0j+oCkNowakR6iXSks+rjURtDhWS9q+1DtMiL5eC41lar9D8w2pQMVrR1nGym7p9hA/25EcrESXchu/wbcQDzxOwDLF0pIXBCe1wAAAABJRU5ErkJggg==';
|
|
35242
35289
|
|
|
35243
35290
|
var QuestInfo = function QuestInfo(_ref) {
|
|
35244
35291
|
var quests = _ref.quests,
|
|
@@ -35279,8 +35326,8 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
35279
35326
|
onPointerDown: onRightClick
|
|
35280
35327
|
}), React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
35281
35328
|
className: "drag-handler"
|
|
35282
|
-
}, React.createElement(Title$
|
|
35283
|
-
src: quests[currentIndex].thumbnail || img$
|
|
35329
|
+
}, React.createElement(Title$4, null, React.createElement(Thumbnail, {
|
|
35330
|
+
src: quests[currentIndex].thumbnail || img$8
|
|
35284
35331
|
}), quests[currentIndex].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
35285
35332
|
className: "golden"
|
|
35286
35333
|
}))), React.createElement(Content, null, React.createElement("p", null, quests[currentIndex].description)), React.createElement(QuestColumn, {
|
|
@@ -35298,8 +35345,8 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
35298
35345
|
}, button.title);
|
|
35299
35346
|
})))) : React.createElement(QuestsContainer, null, React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
35300
35347
|
className: "drag-handler"
|
|
35301
|
-
}, React.createElement(Title$
|
|
35302
|
-
src: quests[0].thumbnail || img$
|
|
35348
|
+
}, React.createElement(Title$4, null, React.createElement(Thumbnail, {
|
|
35349
|
+
src: quests[0].thumbnail || img$8
|
|
35303
35350
|
}), quests[0].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
35304
35351
|
className: "golden"
|
|
35305
35352
|
}))), React.createElement(Content, null, React.createElement("p", null, quests[0].description)), React.createElement(QuestColumn, {
|
|
@@ -35345,7 +35392,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
35345
35392
|
displayName: "QuestInfo__TitleContainer",
|
|
35346
35393
|
componentId: "sc-15s2boc-6"
|
|
35347
35394
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
35348
|
-
var Title$
|
|
35395
|
+
var Title$4 = /*#__PURE__*/styled.h1.withConfig({
|
|
35349
35396
|
displayName: "QuestInfo__Title",
|
|
35350
35397
|
componentId: "sc-15s2boc-7"
|
|
35351
35398
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
@@ -35367,7 +35414,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
35367
35414
|
style: {
|
|
35368
35415
|
width: '100%'
|
|
35369
35416
|
}
|
|
35370
|
-
}, React.createElement(Title$
|
|
35417
|
+
}, React.createElement(Title$5, null, "Quests"), React.createElement("hr", {
|
|
35371
35418
|
className: "golden"
|
|
35372
35419
|
}), React.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
|
|
35373
35420
|
return React.createElement("div", {
|
|
@@ -35388,7 +35435,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
|
|
|
35388
35435
|
displayName: "QuestList__QuestDraggableContainer",
|
|
35389
35436
|
componentId: "sc-1a2vx6q-0"
|
|
35390
35437
|
})([".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;}"]);
|
|
35391
|
-
var Title$
|
|
35438
|
+
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
35392
35439
|
displayName: "QuestList__Title",
|
|
35393
35440
|
componentId: "sc-1a2vx6q-1"
|
|
35394
35441
|
})(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
|
|
@@ -35548,7 +35595,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
35548
35595
|
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
|
|
35549
35596
|
_ref$margin = _ref.margin,
|
|
35550
35597
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
35551
|
-
return React.createElement(Container$
|
|
35598
|
+
return React.createElement(Container$h, {
|
|
35552
35599
|
className: "simple-progress-bar"
|
|
35553
35600
|
}, React.createElement(ProgressBarContainer, {
|
|
35554
35601
|
margin: margin
|
|
@@ -35557,7 +35604,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
35557
35604
|
bgColor: bgColor
|
|
35558
35605
|
}))));
|
|
35559
35606
|
};
|
|
35560
|
-
var Container$
|
|
35607
|
+
var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
35561
35608
|
displayName: "SimpleProgressBar__Container",
|
|
35562
35609
|
componentId: "sc-mbeil3-0"
|
|
35563
35610
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -35675,7 +35722,6 @@ var skillProps = {
|
|
|
35675
35722
|
fishing: 'foods/fish.png',
|
|
35676
35723
|
mining: 'crafting-resources/iron-ingot.png',
|
|
35677
35724
|
lumberjacking: 'crafting-resources/greater-wooden-log.png',
|
|
35678
|
-
blacksmithing: 'hammers/hammer.png',
|
|
35679
35725
|
cooking: 'foods/chickens-meat.png',
|
|
35680
35726
|
alchemy: 'potions/greater-mana-potion.png'
|
|
35681
35727
|
}
|
|
@@ -35698,7 +35744,6 @@ var skillNameMap = {
|
|
|
35698
35744
|
fishing: 'Fishing',
|
|
35699
35745
|
mining: 'Mining',
|
|
35700
35746
|
lumberjacking: 'Lumberjacking',
|
|
35701
|
-
blacksmithing: 'Blacksmithing',
|
|
35702
35747
|
cooking: 'Cooking',
|
|
35703
35748
|
alchemy: 'Alchemy'
|
|
35704
35749
|
};
|
|
@@ -35786,20 +35831,20 @@ var Spell = function Spell(_ref) {
|
|
|
35786
35831
|
isSettingShortcut = _ref.isSettingShortcut,
|
|
35787
35832
|
minMagicLevelRequired = _ref.minMagicLevelRequired;
|
|
35788
35833
|
var disabled = isSettingShortcut ? charMagicLevel < minMagicLevelRequired : manaCost > charMana || charMagicLevel < minMagicLevelRequired;
|
|
35789
|
-
return React.createElement(Container$
|
|
35834
|
+
return React.createElement(Container$i, {
|
|
35790
35835
|
disabled: disabled,
|
|
35791
35836
|
onPointerDown: onPointerDown == null ? void 0 : onPointerDown.bind(null, spellKey),
|
|
35792
35837
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
35793
35838
|
className: "spell"
|
|
35794
35839
|
}, disabled && React.createElement(Overlay, null, charMagicLevel < minMagicLevelRequired ? 'Low magic level' : manaCost > charMana && 'No mana'), React.createElement(SpellImage, null, magicWords.split(' ').map(function (word) {
|
|
35795
35840
|
return word[0];
|
|
35796
|
-
})), React.createElement(Info, null, React.createElement(Title$
|
|
35841
|
+
})), React.createElement(Info, null, React.createElement(Title$6, null, React.createElement("span", null, name), React.createElement("span", {
|
|
35797
35842
|
className: "spell"
|
|
35798
|
-
}, "(", magicWords, ")")), React.createElement(Description, null, description)), React.createElement(Divider, null), React.createElement(Cost, null, React.createElement("span", null, "Mana cost:"), React.createElement("span", {
|
|
35843
|
+
}, "(", magicWords, ")")), React.createElement(Description$1, null, description)), React.createElement(Divider, null), React.createElement(Cost, null, React.createElement("span", null, "Mana cost:"), React.createElement("span", {
|
|
35799
35844
|
className: "mana"
|
|
35800
35845
|
}, manaCost)));
|
|
35801
35846
|
};
|
|
35802
|
-
var Container$
|
|
35847
|
+
var Container$i = /*#__PURE__*/styled.button.withConfig({
|
|
35803
35848
|
displayName: "Spell__Container",
|
|
35804
35849
|
componentId: "sc-j96fa2-0"
|
|
35805
35850
|
})(["display:block;background:none;border:2px solid transparent;border-radius:1rem;width:100%;display:flex;height:5rem;gap:1rem;align-items:center;padding:0 1rem;text-align:left;position:relative;animation:", ";@keyframes border-color-change{0%{border-color:", ";}50%{border-color:transparent;}100%{border-color:", ";}}&:hover,&:focus{background-color:", ";}&:active{background:none;}"], function (_ref2) {
|
|
@@ -35814,11 +35859,11 @@ var Info = /*#__PURE__*/styled.span.withConfig({
|
|
|
35814
35859
|
displayName: "Spell__Info",
|
|
35815
35860
|
componentId: "sc-j96fa2-2"
|
|
35816
35861
|
})(["width:0;flex:1;"]);
|
|
35817
|
-
var Title$
|
|
35862
|
+
var Title$6 = /*#__PURE__*/styled.p.withConfig({
|
|
35818
35863
|
displayName: "Spell__Title",
|
|
35819
35864
|
componentId: "sc-j96fa2-3"
|
|
35820
35865
|
})(["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);
|
|
35821
|
-
var Description = /*#__PURE__*/styled.div.withConfig({
|
|
35866
|
+
var Description$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35822
35867
|
displayName: "Spell__Description",
|
|
35823
35868
|
componentId: "sc-j96fa2-4"
|
|
35824
35869
|
})(["font-size:", " !important;line-height:1.1 !important;"], uiFonts.size.small);
|
|
@@ -35884,7 +35929,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
35884
35929
|
width: "inherit",
|
|
35885
35930
|
height: "inherit",
|
|
35886
35931
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell"
|
|
35887
|
-
}, React.createElement(Container$
|
|
35932
|
+
}, React.createElement(Container$j, null, React.createElement(Title$7, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
|
|
35888
35933
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
35889
35934
|
settingShortcutIndex: settingShortcutIndex,
|
|
35890
35935
|
shortcuts: shortcuts,
|
|
@@ -35912,11 +35957,11 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
35912
35957
|
}, spell)));
|
|
35913
35958
|
}))));
|
|
35914
35959
|
};
|
|
35915
|
-
var Title$
|
|
35960
|
+
var Title$7 = /*#__PURE__*/styled.h1.withConfig({
|
|
35916
35961
|
displayName: "Spellbook__Title",
|
|
35917
35962
|
componentId: "sc-r02nfq-0"
|
|
35918
35963
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
35919
|
-
var Container$
|
|
35964
|
+
var Container$j = /*#__PURE__*/styled.div.withConfig({
|
|
35920
35965
|
displayName: "Spellbook__Container",
|
|
35921
35966
|
componentId: "sc-r02nfq-1"
|
|
35922
35967
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -35930,16 +35975,16 @@ var TextArea = function TextArea(_ref) {
|
|
|
35930
35975
|
return React.createElement("textarea", Object.assign({}, props));
|
|
35931
35976
|
};
|
|
35932
35977
|
|
|
35933
|
-
var img$
|
|
35978
|
+
var img$9 = 'data:image/gif;base64,R0lGODlhTgBNAPMAAAAAALcIL7ObdNGqnf3vnP/wl93Goerfx/Xx3vr6+vn49QAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAAIf4gQ3JlYXRlZCB3aXRoIGV6Z2lmLmNvbSBHSUYgbWFrZXIALAAAAABOAE0AAAT/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2b9/koZx/oDlJ4pAFABaRZ8u/12HhhgTrLEfKkIwWEEUD6aDhoB3OFjhHmBgGAeFQQQxhITE5GAiiSimqOKKLLbo4oswxijjjBdEAAA7';
|
|
35934
35979
|
|
|
35935
|
-
var img$
|
|
35980
|
+
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+y2bNULON0dPTppLXGs9UpdzlCaVt4FpsZuTm5ejWwx3iU53v753p89jtnPj49JVRZ2ELgYMFoP0DaE6gF4JjBBycSCChEncMucV7yC+DQYoI/y8uzAjvFUddEkGGRHKPZMlN8lCqXDmgpctuJs90XDdzpc2bynJWgSjh40yLP4ECE1pHZs8CB5MqPcd0ClEARlVCjTpy6kadTrWC7KpU4NaDVndeyNqT64GpSzedBblHbcGUbSmSddlprsokV7HizUtAKsO+hAkMCCw48UTD+RAnZsw2L0aApfy2pTw48eWGczX3ZNzYsdtNAf2KVkm6tOnC2+JqXg2ytWBStiSLzWv7dh5XBnS/Pti7nj9TW2kT7u1bT03dBZSPtuuMnfMkqqXXpl79uhLR2icyj+gdSfjN3FF6Pz89kXU3itnPHO/xfXlm6VXZv3+ShnH+gOUnikAUAFpFny7/XYeGGBOssR8qQjBYQRQPpo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MNAIDBn6XkZqBkx91dwahoqFucER5nmRBZ16hZ6+vpHadHI58Z4iusLtnoZu0GbaKurzFB76RwBefAQZCzs/G0rFuyhbMVgbT28dp1kiVj9rcB4CwmYrfEthN49tW1F7qUqqt72XdZfMO7EzuxnHyddnXoN+Sf7xA6UN1rV4VhLvuVGMIrgxEWBInYjAYTf9aRo3LHLab9tEbxXUi/Xm0Aw1kQ3sAWc46GYFjkIus7BSYuTHlwZVuChzY6bICO1NAcCLNZkDomQKyBtKkB7OYzqH4TvW0CDQN0aIVqyaM09JkMJ8/Y6YpK29qTbRDlJaUqsFmR6tzmxDcAjcuybxL9vJd+xew1h59/RaWeTOA4IKJ73YF0gvsWbJKi0WtkvMxZFCZe7HlDMfzZ9DGNltGnHHUKLJy3G6lvNRw2xaqctpe2Cjybjwn7P4+HNz3ndrEDUVGfsd0XeMlnSOGPkt6LeHNjWgBMIa63jXbt/jwLgeMbDHdIxc5H557khzwd7QPFqP+/Pv48+vfz7+///8FAAbIXwIAOw==';
|
|
35938
35983
|
|
|
35939
35984
|
var DayNightPeriod = function DayNightPeriod(_ref) {
|
|
35940
35985
|
var _periodOfDaySrcFiles;
|
|
35941
35986
|
var periodOfDay = _ref.periodOfDay;
|
|
35942
|
-
var periodOfDaySrcFiles = (_periodOfDaySrcFiles = {}, _periodOfDaySrcFiles[PeriodOfDay.Morning] = img$
|
|
35987
|
+
var periodOfDaySrcFiles = (_periodOfDaySrcFiles = {}, _periodOfDaySrcFiles[PeriodOfDay.Morning] = img$a, _periodOfDaySrcFiles[PeriodOfDay.Afternoon] = img$9, _periodOfDaySrcFiles[PeriodOfDay.Night] = img$b, _periodOfDaySrcFiles);
|
|
35943
35988
|
return React.createElement(GifContainer, null, React.createElement("img", {
|
|
35944
35989
|
src: periodOfDaySrcFiles[periodOfDay]
|
|
35945
35990
|
}));
|
|
@@ -35949,7 +35994,7 @@ var GifContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
35949
35994
|
componentId: "sc-10t97fw-0"
|
|
35950
35995
|
})(["width:100%;img{width:67%;}"]);
|
|
35951
35996
|
|
|
35952
|
-
var img$
|
|
35997
|
+
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';
|
|
35953
35998
|
|
|
35954
35999
|
var TimeWidget = function TimeWidget(_ref) {
|
|
35955
36000
|
var onClose = _ref.onClose,
|
|
@@ -35964,7 +36009,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
35964
36009
|
var WidgetContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35965
36010
|
displayName: "TimeWidget__WidgetContainer",
|
|
35966
36011
|
componentId: "sc-1ja236h-0"
|
|
35967
|
-
})(["background-image:url(", ");background-size:10rem;background-repeat:no-repeat;width:10rem;position:absolute;height:100px;"], img$
|
|
36012
|
+
})(["background-image:url(", ");background-size:10rem;background-repeat:no-repeat;width:10rem;position:absolute;height:100px;"], img$c);
|
|
35968
36013
|
var Time = /*#__PURE__*/styled.div.withConfig({
|
|
35969
36014
|
displayName: "TimeWidget__Time",
|
|
35970
36015
|
componentId: "sc-1ja236h-1"
|
|
@@ -35984,7 +36029,8 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
35984
36029
|
atlasJSON = _ref.atlasJSON,
|
|
35985
36030
|
onQuantityChange = _ref.onQuantityChange,
|
|
35986
36031
|
traderItem = _ref.traderItem,
|
|
35987
|
-
selectedQty = _ref.selectedQty
|
|
36032
|
+
selectedQty = _ref.selectedQty,
|
|
36033
|
+
equipmentSet = _ref.equipmentSet;
|
|
35988
36034
|
var onLeftClick = function onLeftClick(qty) {
|
|
35989
36035
|
if (qty === void 0) {
|
|
35990
36036
|
qty = 1;
|
|
@@ -35992,22 +36038,27 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
35992
36038
|
onQuantityChange(traderItem, Math.max(0, selectedQty - qty));
|
|
35993
36039
|
};
|
|
35994
36040
|
var onRightClick = function onRightClick(qty) {
|
|
35995
|
-
var _traderItem$
|
|
36041
|
+
var _traderItem$stackQty;
|
|
35996
36042
|
if (qty === void 0) {
|
|
35997
36043
|
qty = 1;
|
|
35998
36044
|
}
|
|
35999
|
-
onQuantityChange(traderItem, Math.min((_traderItem$
|
|
36045
|
+
onQuantityChange(traderItem, Math.min((_traderItem$stackQty = traderItem.stackQty) != null ? _traderItem$stackQty : 999, selectedQty + qty));
|
|
36000
36046
|
};
|
|
36001
|
-
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer$1, null, React.createElement(
|
|
36047
|
+
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer$1, null, React.createElement(ItemInfoWrapper, {
|
|
36048
|
+
atlasIMG: atlasIMG,
|
|
36049
|
+
atlasJSON: atlasJSON,
|
|
36050
|
+
equipmentSet: equipmentSet,
|
|
36051
|
+
item: traderItem
|
|
36052
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
36002
36053
|
atlasIMG: atlasIMG,
|
|
36003
36054
|
atlasJSON: atlasJSON,
|
|
36004
36055
|
spriteKey: getItemTextureKeyPath({
|
|
36005
36056
|
key: traderItem.key,
|
|
36006
|
-
stackQty: traderItem.
|
|
36057
|
+
stackQty: traderItem.stackQty || 1,
|
|
36007
36058
|
texturePath: traderItem.texturePath
|
|
36008
36059
|
}, atlasJSON),
|
|
36009
36060
|
imgScale: 2.5
|
|
36010
|
-
}))), React.createElement(ItemNameContainer, null, React.createElement(NameValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
36061
|
+
})))), React.createElement(ItemNameContainer, null, React.createElement(NameValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
36011
36062
|
maxLines: 1,
|
|
36012
36063
|
maxWidth: "250px"
|
|
36013
36064
|
}, capitalize(traderItem.name))), React.createElement("p", null, "$", traderItem.price))), React.createElement(QuantityContainer, null, React.createElement(SelectArrow, {
|
|
@@ -36080,7 +36131,8 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36080
36131
|
atlasJSON = _ref.atlasJSON,
|
|
36081
36132
|
atlasIMG = _ref.atlasIMG,
|
|
36082
36133
|
characterAvailableGold = _ref.characterAvailableGold,
|
|
36083
|
-
onConfirm = _ref.onConfirm
|
|
36134
|
+
onConfirm = _ref.onConfirm,
|
|
36135
|
+
equipmentSet = _ref.equipmentSet;
|
|
36084
36136
|
var _useState = useState(0),
|
|
36085
36137
|
sum = _useState[0],
|
|
36086
36138
|
setSum = _useState[1];
|
|
@@ -36138,7 +36190,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36138
36190
|
style: {
|
|
36139
36191
|
width: '100%'
|
|
36140
36192
|
}
|
|
36141
|
-
}, React.createElement(Title$
|
|
36193
|
+
}, React.createElement(Title$8, null, Capitalize(type), " Menu"), React.createElement("hr", {
|
|
36142
36194
|
className: "golden"
|
|
36143
36195
|
})), React.createElement(TradingComponentScrollWrapper, {
|
|
36144
36196
|
id: "TraderContainer"
|
|
@@ -36151,7 +36203,8 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36151
36203
|
atlasJSON: atlasJSON,
|
|
36152
36204
|
onQuantityChange: onQuantityChange,
|
|
36153
36205
|
traderItem: tradeItem,
|
|
36154
|
-
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
|
|
36206
|
+
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0,
|
|
36207
|
+
equipmentSet: equipmentSet
|
|
36155
36208
|
}));
|
|
36156
36209
|
})), 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, {
|
|
36157
36210
|
buttonType: ButtonTypes.RPGUIButton,
|
|
@@ -36166,7 +36219,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36166
36219
|
}
|
|
36167
36220
|
}, "Cancel"))));
|
|
36168
36221
|
};
|
|
36169
|
-
var Title$
|
|
36222
|
+
var Title$8 = /*#__PURE__*/styled.h1.withConfig({
|
|
36170
36223
|
displayName: "TradingMenu__Title",
|
|
36171
36224
|
componentId: "sc-1wjsz1l-0"
|
|
36172
36225
|
})(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
|
|
@@ -36200,16 +36253,230 @@ var Truncate = function Truncate(_ref) {
|
|
|
36200
36253
|
var _ref$maxLines = _ref.maxLines,
|
|
36201
36254
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
36202
36255
|
children = _ref.children;
|
|
36203
|
-
return React.createElement(Container$
|
|
36256
|
+
return React.createElement(Container$k, {
|
|
36204
36257
|
maxLines: maxLines
|
|
36205
36258
|
}, children);
|
|
36206
36259
|
};
|
|
36207
|
-
var Container$
|
|
36260
|
+
var Container$k = /*#__PURE__*/styled.div.withConfig({
|
|
36208
36261
|
displayName: "Truncate__Container",
|
|
36209
36262
|
componentId: "sc-6x00qb-0"
|
|
36210
36263
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|
|
36211
36264
|
return props.maxLines;
|
|
36212
36265
|
});
|
|
36213
36266
|
|
|
36214
|
-
|
|
36267
|
+
var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
|
|
36268
|
+
|
|
36269
|
+
var chunkString = function chunkString(str, length) {
|
|
36270
|
+
return str.match(new RegExp('.{1,' + length + '}', 'g'));
|
|
36271
|
+
};
|
|
36272
|
+
|
|
36273
|
+
var img$d = 'data:image/gif;base64,R0lGODlhEAAQAPIAAAAAABQYLiw1TUBJc2hvmQAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAM9CLrc/lCFGSKYJJP5AhlguDnBMIVgxXgmJapSSp3mKs/pKrT0IMCXUk+2Cgh2oSOnaDz+lswZpSOFUq2KBAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAIzhI+py90Bg4OjDrjCELxfFQhQx0mIJkaeaYRp5LJADMdnqXbyOJLYTdKBejjZoRaZJBMFACH/C0ltYWdlTWFnaWNrDWdhbW1hPTAuNDU0NTUAIfkEARQAAAAsAAAAABAAEAAAAjKEj6nL7Y+CDE6OO+QKQ/ifKYEgfR4VddPohQe7lmR0xidNTib65uacYP2AQWGuMlEUAAA7';
|
|
36274
|
+
|
|
36275
|
+
var NPCDialogText = function NPCDialogText(_ref) {
|
|
36276
|
+
var text = _ref.text,
|
|
36277
|
+
onClose = _ref.onClose,
|
|
36278
|
+
onEndStep = _ref.onEndStep,
|
|
36279
|
+
onStartStep = _ref.onStartStep,
|
|
36280
|
+
type = _ref.type;
|
|
36281
|
+
var windowSize = useRef([window.innerWidth, window.innerHeight]);
|
|
36282
|
+
function maxCharacters(width) {
|
|
36283
|
+
// Set the font size to 16 pixels
|
|
36284
|
+
var fontSize = 11.2;
|
|
36285
|
+
// Calculate the number of characters that can fit in one line
|
|
36286
|
+
var charactersPerLine = Math.floor(width / 2 / fontSize);
|
|
36287
|
+
// Calculate the number of lines that can fit in the div
|
|
36288
|
+
var linesPerDiv = Math.floor(180 / fontSize);
|
|
36289
|
+
// Calculate the maximum number of characters that can fit in the div
|
|
36290
|
+
var maxCharacters = charactersPerLine * linesPerDiv;
|
|
36291
|
+
// Return the maximum number of characters
|
|
36292
|
+
return Math.round(maxCharacters / 5);
|
|
36293
|
+
}
|
|
36294
|
+
var textChunks = chunkString(text, maxCharacters(windowSize.current[0]));
|
|
36295
|
+
var _useState = useState(0),
|
|
36296
|
+
chunkIndex = _useState[0],
|
|
36297
|
+
setChunkIndex = _useState[1];
|
|
36298
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
36299
|
+
if (event.code === 'Space') {
|
|
36300
|
+
goToNextStep();
|
|
36301
|
+
}
|
|
36302
|
+
};
|
|
36303
|
+
var goToNextStep = function goToNextStep() {
|
|
36304
|
+
var hasNextChunk = (textChunks == null ? void 0 : textChunks[chunkIndex + 1]) || false;
|
|
36305
|
+
if (hasNextChunk) {
|
|
36306
|
+
setChunkIndex(function (prev) {
|
|
36307
|
+
return prev + 1;
|
|
36308
|
+
});
|
|
36309
|
+
} else {
|
|
36310
|
+
// if there's no more text chunks, close the dialog
|
|
36311
|
+
onClose();
|
|
36312
|
+
}
|
|
36313
|
+
};
|
|
36314
|
+
useEffect(function () {
|
|
36315
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
36316
|
+
return function () {
|
|
36317
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
36318
|
+
};
|
|
36319
|
+
}, [chunkIndex]);
|
|
36320
|
+
var _useState2 = useState(false),
|
|
36321
|
+
showGoNextIndicator = _useState2[0],
|
|
36322
|
+
setShowGoNextIndicator = _useState2[1];
|
|
36323
|
+
return React.createElement(Container$l, null, React.createElement(DynamicText, {
|
|
36324
|
+
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
36325
|
+
onFinish: function onFinish() {
|
|
36326
|
+
setShowGoNextIndicator(true);
|
|
36327
|
+
onEndStep && onEndStep();
|
|
36328
|
+
},
|
|
36329
|
+
onStart: function onStart() {
|
|
36330
|
+
setShowGoNextIndicator(false);
|
|
36331
|
+
onStartStep && onStartStep();
|
|
36332
|
+
}
|
|
36333
|
+
}), showGoNextIndicator && React.createElement(PressSpaceIndicator$1, {
|
|
36334
|
+
right: type === NPCDialogType.TextOnly ? '1rem' : '10.5rem',
|
|
36335
|
+
src: IS_MOBILE_OR_TABLET ? img$d : img$7,
|
|
36336
|
+
onPointerDown: function onPointerDown() {
|
|
36337
|
+
goToNextStep();
|
|
36338
|
+
}
|
|
36339
|
+
}));
|
|
36340
|
+
};
|
|
36341
|
+
var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
36342
|
+
displayName: "NPCDialogText__Container",
|
|
36343
|
+
componentId: "sc-1cxkdh9-0"
|
|
36344
|
+
})([""]);
|
|
36345
|
+
var PressSpaceIndicator$1 = /*#__PURE__*/styled.img.withConfig({
|
|
36346
|
+
displayName: "NPCDialogText__PressSpaceIndicator",
|
|
36347
|
+
componentId: "sc-1cxkdh9-1"
|
|
36348
|
+
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref2) {
|
|
36349
|
+
var right = _ref2.right;
|
|
36350
|
+
return right;
|
|
36351
|
+
});
|
|
36352
|
+
|
|
36353
|
+
var NPCDialogType;
|
|
36354
|
+
(function (NPCDialogType) {
|
|
36355
|
+
NPCDialogType["TextOnly"] = "TextOnly";
|
|
36356
|
+
NPCDialogType["TextAndThumbnail"] = "TextAndThumbnail";
|
|
36357
|
+
})(NPCDialogType || (NPCDialogType = {}));
|
|
36358
|
+
var NPCDialog = function NPCDialog(_ref) {
|
|
36359
|
+
var text = _ref.text,
|
|
36360
|
+
type = _ref.type,
|
|
36361
|
+
_onClose = _ref.onClose,
|
|
36362
|
+
imagePath = _ref.imagePath,
|
|
36363
|
+
_ref$isQuestionDialog = _ref.isQuestionDialog,
|
|
36364
|
+
isQuestionDialog = _ref$isQuestionDialog === void 0 ? false : _ref$isQuestionDialog,
|
|
36365
|
+
questions = _ref.questions,
|
|
36366
|
+
answers = _ref.answers;
|
|
36367
|
+
return React.createElement(RPGUIContainer, {
|
|
36368
|
+
type: RPGUIContainerTypes.FramedGold,
|
|
36369
|
+
width: isQuestionDialog ? '600px' : '80%',
|
|
36370
|
+
height: '180px'
|
|
36371
|
+
}, isQuestionDialog && questions && answers ? React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
|
|
36372
|
+
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
36373
|
+
}, React.createElement(QuestionDialog, {
|
|
36374
|
+
questions: questions,
|
|
36375
|
+
answers: answers,
|
|
36376
|
+
onClose: function onClose() {
|
|
36377
|
+
if (_onClose) {
|
|
36378
|
+
_onClose();
|
|
36379
|
+
}
|
|
36380
|
+
}
|
|
36381
|
+
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
36382
|
+
src: imagePath || img$6
|
|
36383
|
+
}))) : React.createElement(React.Fragment, null, React.createElement(Container$m, null, React.createElement(TextContainer$2, {
|
|
36384
|
+
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
36385
|
+
}, React.createElement(NPCDialogText, {
|
|
36386
|
+
type: type,
|
|
36387
|
+
text: text || 'No text provided.',
|
|
36388
|
+
onClose: function onClose() {
|
|
36389
|
+
if (_onClose) {
|
|
36390
|
+
_onClose();
|
|
36391
|
+
}
|
|
36392
|
+
}
|
|
36393
|
+
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
36394
|
+
src: imagePath || img$6
|
|
36395
|
+
})))));
|
|
36396
|
+
};
|
|
36397
|
+
var Container$m = /*#__PURE__*/styled.div.withConfig({
|
|
36398
|
+
displayName: "NPCDialog__Container",
|
|
36399
|
+
componentId: "sc-1b4aw74-0"
|
|
36400
|
+
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
36401
|
+
var TextContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
36402
|
+
displayName: "NPCDialog__TextContainer",
|
|
36403
|
+
componentId: "sc-1b4aw74-1"
|
|
36404
|
+
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
36405
|
+
var flex = _ref2.flex;
|
|
36406
|
+
return flex;
|
|
36407
|
+
});
|
|
36408
|
+
var ThumbnailContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
36409
|
+
displayName: "NPCDialog__ThumbnailContainer",
|
|
36410
|
+
componentId: "sc-1b4aw74-2"
|
|
36411
|
+
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
36412
|
+
var NPCThumbnail$1 = /*#__PURE__*/styled.img.withConfig({
|
|
36413
|
+
displayName: "NPCDialog__NPCThumbnail",
|
|
36414
|
+
componentId: "sc-1b4aw74-3"
|
|
36415
|
+
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
36416
|
+
|
|
36417
|
+
var HistoryDialog = function HistoryDialog(_ref) {
|
|
36418
|
+
var backgroundImgPath = _ref.backgroundImgPath,
|
|
36419
|
+
fullCoverBackground = _ref.fullCoverBackground,
|
|
36420
|
+
questions = _ref.questions,
|
|
36421
|
+
answers = _ref.answers,
|
|
36422
|
+
text = _ref.text,
|
|
36423
|
+
imagePath = _ref.imagePath,
|
|
36424
|
+
textAndTypeArray = _ref.textAndTypeArray,
|
|
36425
|
+
onClose = _ref.onClose;
|
|
36426
|
+
var _useState = useState(0),
|
|
36427
|
+
img = _useState[0],
|
|
36428
|
+
setImage = _useState[1];
|
|
36429
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
36430
|
+
if (event.code === 'Space') {
|
|
36431
|
+
if (img < (backgroundImgPath == null ? void 0 : backgroundImgPath.length) - 1) {
|
|
36432
|
+
setImage(function (prev) {
|
|
36433
|
+
return prev + 1;
|
|
36434
|
+
});
|
|
36435
|
+
} else {
|
|
36436
|
+
// if there's no more text chunks, close the dialog
|
|
36437
|
+
onClose();
|
|
36438
|
+
}
|
|
36439
|
+
}
|
|
36440
|
+
};
|
|
36441
|
+
useEffect(function () {
|
|
36442
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
36443
|
+
return function () {
|
|
36444
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
36445
|
+
};
|
|
36446
|
+
}, [backgroundImgPath]);
|
|
36447
|
+
return React.createElement(BackgroundContainer, {
|
|
36448
|
+
imgPath: backgroundImgPath[img],
|
|
36449
|
+
fullImg: fullCoverBackground
|
|
36450
|
+
}, React.createElement(DialogContainer, null, textAndTypeArray ? React.createElement(NPCMultiDialog, {
|
|
36451
|
+
textAndTypeArray: textAndTypeArray,
|
|
36452
|
+
onClose: onClose
|
|
36453
|
+
}) : questions && answers ? React.createElement(QuestionDialog, {
|
|
36454
|
+
questions: questions,
|
|
36455
|
+
answers: answers,
|
|
36456
|
+
onClose: onClose
|
|
36457
|
+
}) : text && imagePath ? React.createElement(NPCDialog, {
|
|
36458
|
+
text: text,
|
|
36459
|
+
imagePath: imagePath,
|
|
36460
|
+
onClose: onClose,
|
|
36461
|
+
type: NPCDialogType.TextAndThumbnail
|
|
36462
|
+
}) : React.createElement(NPCDialog, {
|
|
36463
|
+
text: text,
|
|
36464
|
+
onClose: onClose,
|
|
36465
|
+
type: NPCDialogType.TextOnly
|
|
36466
|
+
})));
|
|
36467
|
+
};
|
|
36468
|
+
var BackgroundContainer = /*#__PURE__*/styled.div.withConfig({
|
|
36469
|
+
displayName: "HistoryDialog__BackgroundContainer",
|
|
36470
|
+
componentId: "sc-u6oe75-0"
|
|
36471
|
+
})(["width:100%;height:100%;background-image:url(", ");background-size:", ";display:flex;justify-content:space-evenly;align-items:center;"], function (props) {
|
|
36472
|
+
return props.imgPath;
|
|
36473
|
+
}, function (props) {
|
|
36474
|
+
return props.imgPath ? 'cover' : 'auto';
|
|
36475
|
+
});
|
|
36476
|
+
var DialogContainer = /*#__PURE__*/styled.div.withConfig({
|
|
36477
|
+
displayName: "HistoryDialog__DialogContainer",
|
|
36478
|
+
componentId: "sc-u6oe75-1"
|
|
36479
|
+
})(["display:flex;justify-content:center;padding-top:200px;"]);
|
|
36480
|
+
|
|
36481
|
+
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 };
|
|
36215
36482
|
//# sourceMappingURL=long-bow.esm.js.map
|