@rpg-engine/long-bow 0.3.71 → 0.3.73
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 +1 -2
- package/dist/components/Item/Cards/ItemTooltip.d.ts +4 -7
- package/dist/components/Item/Inventory/ItemContainer.d.ts +1 -2
- package/dist/components/Item/Inventory/ItemSlot.d.ts +1 -4
- package/dist/components/TradingMenu/TradingItemRow.d.ts +1 -2
- package/dist/components/TradingMenu/TradingMenu.d.ts +3 -4
- package/dist/components/shared/SpriteFromAtlas.d.ts +0 -1
- package/dist/long-bow.cjs.development.js +958 -1225
- 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 +961 -1226
- package/dist/long-bow.esm.js.map +1 -1
- 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 +227 -237
- package/src/components/CraftBook/MockItems.ts +251 -41
- 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/ItemTooltip.tsx +33 -85
- package/src/components/Item/Inventory/ErrorBoundary.tsx +42 -42
- package/src/components/Item/Inventory/ItemContainer.tsx +210 -214
- 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 +501 -512
- package/src/components/Item/Inventory/itemContainerHelper.ts +156 -156
- package/src/components/ListMenu.tsx +63 -63
- package/src/components/Multitab/Tab.tsx +66 -66
- package/src/components/Multitab/TabBody.tsx +13 -13
- package/src/components/Multitab/TabsContainer.tsx +97 -97
- package/src/components/NPCDialog/NPCDialog.tsx +121 -121
- package/src/components/NPCDialog/NPCDialogText.tsx +113 -113
- package/src/components/NPCDialog/NPCMultiDialog.tsx +159 -159
- package/src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx +237 -237
- package/src/components/ProgressBar.tsx +92 -92
- package/src/components/PropertySelect/PropertySelect.tsx +106 -106
- package/src/components/QuestInfo/QuestInfo.tsx +230 -230
- package/src/components/QuestList.tsx +129 -129
- package/src/components/RPGUIContainer.tsx +47 -47
- package/src/components/RPGUIForceRenderStart.tsx +45 -45
- package/src/components/RPGUIRoot.tsx +14 -14
- package/src/components/RadioButton.tsx +53 -53
- package/src/components/RadioInput/RadioButton.tsx +96 -96
- package/src/components/RadioInput/RadioInput.tsx +102 -102
- package/src/components/RadioInput/instruments.ts +15 -15
- package/src/components/RangeSlider.tsx +78 -78
- package/src/components/RelativeListMenu.tsx +83 -83
- package/src/components/ScrollList.tsx +79 -79
- package/src/components/Shortcuts/Shortcuts.tsx +151 -151
- package/src/components/Shortcuts/ShortcutsSetter.tsx +132 -132
- package/src/components/Shortcuts/SingleShortcut.ts +62 -62
- package/src/components/SimpleProgressBar.tsx +62 -62
- package/src/components/SkillProgressBar.tsx +133 -133
- package/src/components/SkillsContainer.tsx +200 -198
- 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 +181 -195
- package/src/components/TradingMenu/TradingMenu.tsx +203 -211
- package/src/components/TradingMenu/items.mock.ts +96 -48
- 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 +102 -104
- 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 +393 -391
- package/src/mocks/itemContainer.mocks.ts +562 -563
- 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 +40 -42
- 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 +198 -200
- 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 +45 -47
- package/src/types/eventTypes.ts +4 -4
- package/src/types/index.d.ts +2 -2
- package/dist/components/Item/Cards/ItemInfo.d.ts +0 -10
- package/dist/components/Item/Cards/ItemInfoDisplay.d.ts +0 -9
- package/dist/components/Item/Cards/ItemInfoWrapper.d.ts +0 -11
- package/dist/stories/ItemInfoDisplay.stories.d.ts +0 -8
- package/src/components/Item/Cards/ItemInfo.tsx +0 -248
- package/src/components/Item/Cards/ItemInfoDisplay.tsx +0 -120
- package/src/components/Item/Cards/ItemInfoWrapper.tsx +0 -39
- package/src/stories/ItemInfoDisplay.stories.tsx +0 -33
package/dist/long-bow.esm.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
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, ItemContainerType, ItemType, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemRarities,
|
|
3
|
+
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemSubType, ItemContainerType, ItemType, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemRarities, ItemSlotType, isMobileOrTablet, getSPForLevel, PeriodOfDay } 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';
|
|
10
9
|
import { observer } from 'mobx-react-lite';
|
|
11
10
|
import 'rpgui/rpgui.min.css';
|
|
12
11
|
import 'rpgui/rpgui.min.js';
|
|
@@ -108,8 +107,7 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
|
|
|
108
107
|
_ref$grayScale = _ref.grayScale,
|
|
109
108
|
grayScale = _ref$grayScale === void 0 ? false : _ref$grayScale,
|
|
110
109
|
_ref$opacity = _ref.opacity,
|
|
111
|
-
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity
|
|
112
|
-
imgClassname = _ref.imgClassname;
|
|
110
|
+
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity;
|
|
113
111
|
//! 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).
|
|
114
112
|
//!Due to React's limitations, we cannot import it from the public folder directly!
|
|
115
113
|
var spriteData = atlasJSON.frames[spriteKey] || atlasJSON.frames['others/no-image.png'];
|
|
@@ -121,7 +119,7 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
|
|
|
121
119
|
onPointerDown: onPointerDown,
|
|
122
120
|
style: containerStyle
|
|
123
121
|
}, React.createElement(ImgSprite, {
|
|
124
|
-
className: "sprite-from-atlas-img
|
|
122
|
+
className: "sprite-from-atlas-img",
|
|
125
123
|
atlasIMG: atlasIMG,
|
|
126
124
|
frame: spriteData.frame,
|
|
127
125
|
scale: imgScale,
|
|
@@ -33358,6 +33356,202 @@ var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
|
|
|
33358
33356
|
return props.opened ? 'block' : 'none';
|
|
33359
33357
|
});
|
|
33360
33358
|
|
|
33359
|
+
var CraftBook = function CraftBook(_ref) {
|
|
33360
|
+
var atlasIMG = _ref.atlasIMG,
|
|
33361
|
+
atlasJSON = _ref.atlasJSON,
|
|
33362
|
+
onClose = _ref.onClose,
|
|
33363
|
+
onSelect = _ref.onSelect,
|
|
33364
|
+
onCraftItem = _ref.onCraftItem,
|
|
33365
|
+
craftablesItems = _ref.craftablesItems;
|
|
33366
|
+
var optionsId = 0;
|
|
33367
|
+
var _useState = useState({
|
|
33368
|
+
show: false,
|
|
33369
|
+
index: 200
|
|
33370
|
+
}),
|
|
33371
|
+
isShown = _useState[0],
|
|
33372
|
+
setIsShown = _useState[1];
|
|
33373
|
+
var _useState2 = useState(),
|
|
33374
|
+
craftItem = _useState2[0],
|
|
33375
|
+
setCraftItem = _useState2[1];
|
|
33376
|
+
var getDropdownOptions = function getDropdownOptions() {
|
|
33377
|
+
var options = [];
|
|
33378
|
+
Object.keys(ItemSubType).forEach(function (key) {
|
|
33379
|
+
if (key === 'DeadBody') {
|
|
33380
|
+
return; // we can't craft crafting resouces...
|
|
33381
|
+
}
|
|
33382
|
+
|
|
33383
|
+
options.push({
|
|
33384
|
+
id: optionsId,
|
|
33385
|
+
value: key,
|
|
33386
|
+
option: key
|
|
33387
|
+
});
|
|
33388
|
+
optionsId += 1;
|
|
33389
|
+
});
|
|
33390
|
+
return options;
|
|
33391
|
+
};
|
|
33392
|
+
var modifyString = function modifyString(str) {
|
|
33393
|
+
// Split the string by "/" and "."
|
|
33394
|
+
var parts = str.split('/');
|
|
33395
|
+
var fileName = parts[parts.length - 1];
|
|
33396
|
+
parts = fileName.split('.');
|
|
33397
|
+
var name = parts[0];
|
|
33398
|
+
// Replace all occurrences of "-" with " "
|
|
33399
|
+
name = name.replace(/-/g, ' ');
|
|
33400
|
+
// Uppercase the first word
|
|
33401
|
+
var words = name.split(' ');
|
|
33402
|
+
var firstWord = words[0].slice(0, 1).toUpperCase() + words[0].slice(1);
|
|
33403
|
+
var modifiedWords = [firstWord].concat(words.slice(1));
|
|
33404
|
+
name = modifiedWords.join(' ');
|
|
33405
|
+
return name;
|
|
33406
|
+
};
|
|
33407
|
+
var handleClick = function handleClick(value) {
|
|
33408
|
+
setCraftItem(value);
|
|
33409
|
+
};
|
|
33410
|
+
return React.createElement(DraggableContainer, {
|
|
33411
|
+
type: RPGUIContainerTypes.Framed,
|
|
33412
|
+
width: "500px",
|
|
33413
|
+
cancelDrag: ".inputRadioCraftBook",
|
|
33414
|
+
onCloseButton: function onCloseButton() {
|
|
33415
|
+
if (onClose) {
|
|
33416
|
+
onClose();
|
|
33417
|
+
}
|
|
33418
|
+
}
|
|
33419
|
+
}, React.createElement("div", {
|
|
33420
|
+
style: {
|
|
33421
|
+
width: '100%'
|
|
33422
|
+
}
|
|
33423
|
+
}, React.createElement(Title$1, null, 'Craftbook'), React.createElement(Subtitle, null, 'Select an item to craft'), React.createElement("hr", {
|
|
33424
|
+
className: "golden"
|
|
33425
|
+
})), React.createElement(Dropdown, {
|
|
33426
|
+
options: getDropdownOptions(),
|
|
33427
|
+
onChange: function onChange(value) {
|
|
33428
|
+
return onSelect(value);
|
|
33429
|
+
}
|
|
33430
|
+
}), React.createElement(RadioInputScroller, {
|
|
33431
|
+
className: "inputRadioCraftBook"
|
|
33432
|
+
}, craftablesItems == null ? void 0 : craftablesItems.map(function (option, index) {
|
|
33433
|
+
return React.createElement(RadioOptionsWrapper, {
|
|
33434
|
+
key: index
|
|
33435
|
+
}, React.createElement(SpriteAtlasWrapper, null, React.createElement(SpriteFromAtlas, {
|
|
33436
|
+
atlasIMG: atlasIMG,
|
|
33437
|
+
atlasJSON: atlasJSON,
|
|
33438
|
+
spriteKey: option.texturePath,
|
|
33439
|
+
imgScale: 3,
|
|
33440
|
+
grayScale: !option.canCraft
|
|
33441
|
+
})), React.createElement("div", null, React.createElement("div", {
|
|
33442
|
+
onPointerDown: function onPointerDown() {
|
|
33443
|
+
return handleClick(option.key);
|
|
33444
|
+
}
|
|
33445
|
+
}, React.createElement("input", {
|
|
33446
|
+
className: "rpgui-radio",
|
|
33447
|
+
type: "radio",
|
|
33448
|
+
value: option.name,
|
|
33449
|
+
name: "test",
|
|
33450
|
+
disabled: !option.canCraft,
|
|
33451
|
+
checked: craftItem === option.key,
|
|
33452
|
+
onChange: function onChange() {
|
|
33453
|
+
return handleClick(option.key);
|
|
33454
|
+
}
|
|
33455
|
+
}), React.createElement("label", {
|
|
33456
|
+
onPointerDown: function onPointerDown() {
|
|
33457
|
+
handleClick(option.key);
|
|
33458
|
+
},
|
|
33459
|
+
onTouchEnd: function onTouchEnd() {
|
|
33460
|
+
setIsShown({
|
|
33461
|
+
show: true,
|
|
33462
|
+
index: index
|
|
33463
|
+
});
|
|
33464
|
+
},
|
|
33465
|
+
style: {
|
|
33466
|
+
display: 'flex',
|
|
33467
|
+
alignItems: 'center'
|
|
33468
|
+
},
|
|
33469
|
+
onMouseEnter: function onMouseEnter() {
|
|
33470
|
+
return setIsShown({
|
|
33471
|
+
show: true,
|
|
33472
|
+
index: index
|
|
33473
|
+
});
|
|
33474
|
+
},
|
|
33475
|
+
onMouseLeave: function onMouseLeave() {
|
|
33476
|
+
return setIsShown({
|
|
33477
|
+
show: false,
|
|
33478
|
+
index: index
|
|
33479
|
+
});
|
|
33480
|
+
}
|
|
33481
|
+
}, modifyString(option.name))), isShown && isShown.index === index && option.ingredients.map(function (option, index) {
|
|
33482
|
+
return React.createElement(Recipes, {
|
|
33483
|
+
key: index
|
|
33484
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
33485
|
+
atlasIMG: atlasIMG,
|
|
33486
|
+
atlasJSON: atlasJSON,
|
|
33487
|
+
spriteKey: option.texturePath,
|
|
33488
|
+
imgScale: 1
|
|
33489
|
+
}), React.createElement(StyledItem, null, modifyString(option.key), " (", option.qty, "x)"));
|
|
33490
|
+
})));
|
|
33491
|
+
})), React.createElement(ButtonWrapper, null, React.createElement(Button, {
|
|
33492
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
33493
|
+
onPointerDown: onClose
|
|
33494
|
+
}, "Cancel"), React.createElement(Button, {
|
|
33495
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
33496
|
+
onPointerDown: function onPointerDown() {
|
|
33497
|
+
return onCraftItem(craftItem);
|
|
33498
|
+
}
|
|
33499
|
+
}, "Craft")));
|
|
33500
|
+
};
|
|
33501
|
+
var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
33502
|
+
displayName: "CraftBook__StyledItem",
|
|
33503
|
+
componentId: "sc-19q95ue-0"
|
|
33504
|
+
})(["margin-left:10px;"]);
|
|
33505
|
+
var Recipes = /*#__PURE__*/styled.div.withConfig({
|
|
33506
|
+
displayName: "CraftBook__Recipes",
|
|
33507
|
+
componentId: "sc-19q95ue-1"
|
|
33508
|
+
})(["font-size:0.6rem;color:yellow !important;margin-bottom:3px;display:flex;align-items:center;.sprite-from-atlas-img{top:0px;left:0px;}"]);
|
|
33509
|
+
var Title$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
33510
|
+
displayName: "CraftBook__Title",
|
|
33511
|
+
componentId: "sc-19q95ue-2"
|
|
33512
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
33513
|
+
var Subtitle = /*#__PURE__*/styled.h1.withConfig({
|
|
33514
|
+
displayName: "CraftBook__Subtitle",
|
|
33515
|
+
componentId: "sc-19q95ue-3"
|
|
33516
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
33517
|
+
var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
|
|
33518
|
+
displayName: "CraftBook__RadioInputScroller",
|
|
33519
|
+
componentId: "sc-19q95ue-4"
|
|
33520
|
+
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;-webkit-overflow-scrolling:touch;"]);
|
|
33521
|
+
var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
33522
|
+
displayName: "CraftBook__SpriteAtlasWrapper",
|
|
33523
|
+
componentId: "sc-19q95ue-5"
|
|
33524
|
+
})(["margin-right:40px;"]);
|
|
33525
|
+
var RadioOptionsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
33526
|
+
displayName: "CraftBook__RadioOptionsWrapper",
|
|
33527
|
+
componentId: "sc-19q95ue-6"
|
|
33528
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
33529
|
+
var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
33530
|
+
displayName: "CraftBook__ButtonWrapper",
|
|
33531
|
+
componentId: "sc-19q95ue-7"
|
|
33532
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
33533
|
+
|
|
33534
|
+
var DropdownSelectorContainer = function DropdownSelectorContainer(_ref) {
|
|
33535
|
+
var title = _ref.title,
|
|
33536
|
+
onChange = _ref.onChange,
|
|
33537
|
+
options = _ref.options,
|
|
33538
|
+
details = _ref.details;
|
|
33539
|
+
return React.createElement("div", null, React.createElement("p", null, title), React.createElement(Dropdown, {
|
|
33540
|
+
options: options.map(function (option, index) {
|
|
33541
|
+
return {
|
|
33542
|
+
option: option.name,
|
|
33543
|
+
value: option.id,
|
|
33544
|
+
id: index
|
|
33545
|
+
};
|
|
33546
|
+
}),
|
|
33547
|
+
onChange: onChange
|
|
33548
|
+
}), React.createElement(Details, null, details));
|
|
33549
|
+
};
|
|
33550
|
+
var Details = /*#__PURE__*/styled.p.withConfig({
|
|
33551
|
+
displayName: "DropdownSelectorContainer__Details",
|
|
33552
|
+
componentId: "sc-kaa0h9-0"
|
|
33553
|
+
})(["font-size:", " !important;"], uiFonts.size.xsmall);
|
|
33554
|
+
|
|
33361
33555
|
var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
33362
33556
|
var options = _ref.options,
|
|
33363
33557
|
onSelected = _ref.onSelected,
|
|
@@ -33407,6 +33601,15 @@ var ListElement = /*#__PURE__*/styled.li.withConfig({
|
|
|
33407
33601
|
componentId: "sc-7hohf-1"
|
|
33408
33602
|
})(["margin-right:0.5rem;"]);
|
|
33409
33603
|
|
|
33604
|
+
var ItemTooltip = function ItemTooltip(_ref) {
|
|
33605
|
+
var label = _ref.label;
|
|
33606
|
+
return React.createElement(Container$9, null, React.createElement("div", null, label));
|
|
33607
|
+
};
|
|
33608
|
+
var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
33609
|
+
displayName: "ItemTooltip__Container",
|
|
33610
|
+
componentId: "sc-11d9r7x-0"
|
|
33611
|
+
})(["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);
|
|
33612
|
+
|
|
33410
33613
|
var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
|
|
33411
33614
|
var contextMenu = actionsByTypeList.map(function (action) {
|
|
33412
33615
|
return {
|
|
@@ -33541,8 +33744,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33541
33744
|
openQuantitySelector = _ref.openQuantitySelector,
|
|
33542
33745
|
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
|
|
33543
33746
|
dragScale = _ref.dragScale,
|
|
33544
|
-
isSelectingShortcut = _ref.isSelectingShortcut
|
|
33545
|
-
equipmentSet = _ref.equipmentSet;
|
|
33747
|
+
isSelectingShortcut = _ref.isSelectingShortcut;
|
|
33546
33748
|
var _useState = useState(false),
|
|
33547
33749
|
isTooltipVisible = _useState[0],
|
|
33548
33750
|
setTooltipVisible = _useState[1];
|
|
@@ -33616,8 +33818,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33616
33818
|
texturePath: itemToRender.texturePath,
|
|
33617
33819
|
stackQty: itemToRender.stackQty || 1
|
|
33618
33820
|
}, atlasJSON),
|
|
33619
|
-
imgScale: 3
|
|
33620
|
-
imgClassname: "sprite-from-atlas-img--item"
|
|
33821
|
+
imgScale: 3
|
|
33621
33822
|
})));
|
|
33622
33823
|
}
|
|
33623
33824
|
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);
|
|
@@ -33642,8 +33843,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33642
33843
|
texturePath: itemToRender.texturePath,
|
|
33643
33844
|
stackQty: itemToRender.stackQty || 1
|
|
33644
33845
|
}, atlasJSON),
|
|
33645
|
-
imgScale: 3
|
|
33646
|
-
imgClassname: "sprite-from-atlas-img--item"
|
|
33846
|
+
imgScale: 3
|
|
33647
33847
|
})));
|
|
33648
33848
|
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);
|
|
33649
33849
|
if (stackInfo) {
|
|
@@ -33660,8 +33860,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33660
33860
|
spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
|
|
33661
33861
|
imgScale: 3,
|
|
33662
33862
|
grayScale: true,
|
|
33663
|
-
opacity: 0.4
|
|
33664
|
-
imgClassname: "sprite-from-atlas-img--item"
|
|
33863
|
+
opacity: 0.4
|
|
33665
33864
|
}));
|
|
33666
33865
|
}
|
|
33667
33866
|
};
|
|
@@ -33691,7 +33890,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33691
33890
|
onDragEnd(quantity);
|
|
33692
33891
|
}
|
|
33693
33892
|
};
|
|
33694
|
-
return React.createElement(Container$
|
|
33893
|
+
return React.createElement(Container$a, {
|
|
33695
33894
|
item: item,
|
|
33696
33895
|
className: "rpgui-icon empty-slot",
|
|
33697
33896
|
onMouseUp: function onMouseUp() {
|
|
@@ -33790,10 +33989,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33790
33989
|
setTooltipVisible(false);
|
|
33791
33990
|
}
|
|
33792
33991
|
}, onRenderSlot(item))), isTooltipVisible && item && !isFocused && React.createElement(ItemTooltip, {
|
|
33793
|
-
|
|
33794
|
-
atlasIMG: atlasIMG,
|
|
33795
|
-
atlasJSON: atlasJSON,
|
|
33796
|
-
equipmentSet: equipmentSet
|
|
33992
|
+
label: item.name
|
|
33797
33993
|
}), !isContextMenuDisabled && isContextMenuVisible && contextActions && React.createElement(RelativeListMenu, {
|
|
33798
33994
|
options: contextActions,
|
|
33799
33995
|
onSelected: function onSelected(optionId) {
|
|
@@ -33818,13 +34014,13 @@ var rarityColor = function rarityColor(item) {
|
|
|
33818
34014
|
case ItemRarities.Legendary:
|
|
33819
34015
|
return 'rgba(255, 191, 0,0.6)';
|
|
33820
34016
|
default:
|
|
33821
|
-
return
|
|
34017
|
+
return 'unset';
|
|
33822
34018
|
}
|
|
33823
34019
|
};
|
|
33824
|
-
var Container$
|
|
34020
|
+
var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
33825
34021
|
displayName: "ItemSlot__Container",
|
|
33826
34022
|
componentId: "sc-l2j5ef-0"
|
|
33827
|
-
})(["margin:0.1rem;.sprite-from-atlas-img
|
|
34023
|
+
})(["margin:0.1rem;.sprite-from-atlas-img{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}position:relative;&::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-radius:12px;pointer-events:none;animation:", ";@keyframes bg-color-change{0%{background-color:rgba(255 255 255 / 0.5);}50%{background-color:transparent;}100%{background-color:rgba(255 255 255 / 0.5);}}}"], function (_ref2) {
|
|
33828
34024
|
var item = _ref2.item;
|
|
33829
34025
|
return rarityColor(item);
|
|
33830
34026
|
}, function (_ref3) {
|
|
@@ -33852,459 +34048,6 @@ var ItemQty = /*#__PURE__*/styled.span.withConfig({
|
|
|
33852
34048
|
componentId: "sc-l2j5ef-3"
|
|
33853
34049
|
})(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
|
|
33854
34050
|
|
|
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
|
-
|
|
34308
34051
|
var EquipmentSet = function EquipmentSet(_ref) {
|
|
34309
34052
|
var equipmentSet = _ref.equipmentSet,
|
|
34310
34053
|
onClose = _ref.onClose,
|
|
@@ -34399,6 +34142,546 @@ var EquipmentColumn = /*#__PURE__*/styled.div.withConfig({
|
|
|
34399
34142
|
componentId: "sc-1wuddg2-1"
|
|
34400
34143
|
})(["display:flex;justify-content:center;flex-wrap:wrap;flex-direction:column;touch-action:none;"]);
|
|
34401
34144
|
|
|
34145
|
+
var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
|
|
34146
|
+
|
|
34147
|
+
var chunkString = function chunkString(str, length) {
|
|
34148
|
+
return str.match(new RegExp('.{1,' + length + '}', 'g'));
|
|
34149
|
+
};
|
|
34150
|
+
|
|
34151
|
+
var DynamicText = function DynamicText(_ref) {
|
|
34152
|
+
var text = _ref.text,
|
|
34153
|
+
onFinish = _ref.onFinish,
|
|
34154
|
+
onStart = _ref.onStart;
|
|
34155
|
+
var _useState = useState(''),
|
|
34156
|
+
textState = _useState[0],
|
|
34157
|
+
setTextState = _useState[1];
|
|
34158
|
+
useEffect(function () {
|
|
34159
|
+
var i = 0;
|
|
34160
|
+
var interval = setInterval(function () {
|
|
34161
|
+
// on every interval, show one more character
|
|
34162
|
+
if (i === 0) {
|
|
34163
|
+
if (onStart) {
|
|
34164
|
+
onStart();
|
|
34165
|
+
}
|
|
34166
|
+
}
|
|
34167
|
+
if (i < text.length) {
|
|
34168
|
+
setTextState(text.substring(0, i + 1));
|
|
34169
|
+
i++;
|
|
34170
|
+
} else {
|
|
34171
|
+
clearInterval(interval);
|
|
34172
|
+
if (onFinish) {
|
|
34173
|
+
onFinish();
|
|
34174
|
+
}
|
|
34175
|
+
}
|
|
34176
|
+
}, 50);
|
|
34177
|
+
return function () {
|
|
34178
|
+
clearInterval(interval);
|
|
34179
|
+
};
|
|
34180
|
+
}, [text]);
|
|
34181
|
+
return React.createElement(TextContainer, null, textState);
|
|
34182
|
+
};
|
|
34183
|
+
var TextContainer = /*#__PURE__*/styled.p.withConfig({
|
|
34184
|
+
displayName: "DynamicText__TextContainer",
|
|
34185
|
+
componentId: "sc-1ggl9nd-0"
|
|
34186
|
+
})(["font-size:0.7rem !important;color:white;text-shadow:1px 1px 0px #000000;letter-spacing:1.2px;word-break:normal;"]);
|
|
34187
|
+
|
|
34188
|
+
var img$6 = 'data:image/gif;base64,R0lGODlhEAAQAPIAAAAAABQYLiw1TUBJc2hvmQAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAALAAAAAAQABAAAAM9CLrc/lCFGSKYJJP5AhlguDnBMIVgxXgmJapSSp3mKs/pKrT0IMCXUk+2Cgh2oSOnaDz+lswZpSOFUq2KBAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAAL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wrW3Lujp6ugD5bbn6/HyLe20Cu/t+fr7/P3+/wCF2VswrKDBgwgTKlzIsCCDBAA7';
|
|
34191
|
+
|
|
34192
|
+
var NPCDialogText = function NPCDialogText(_ref) {
|
|
34193
|
+
var text = _ref.text,
|
|
34194
|
+
onClose = _ref.onClose,
|
|
34195
|
+
onEndStep = _ref.onEndStep,
|
|
34196
|
+
onStartStep = _ref.onStartStep,
|
|
34197
|
+
type = _ref.type;
|
|
34198
|
+
var windowSize = useRef([window.innerWidth, window.innerHeight]);
|
|
34199
|
+
function maxCharacters(width) {
|
|
34200
|
+
// Set the font size to 16 pixels
|
|
34201
|
+
var fontSize = 11.2;
|
|
34202
|
+
// Calculate the number of characters that can fit in one line
|
|
34203
|
+
var charactersPerLine = Math.floor(width / 2 / fontSize);
|
|
34204
|
+
// Calculate the number of lines that can fit in the div
|
|
34205
|
+
var linesPerDiv = Math.floor(180 / fontSize);
|
|
34206
|
+
// Calculate the maximum number of characters that can fit in the div
|
|
34207
|
+
var maxCharacters = charactersPerLine * linesPerDiv;
|
|
34208
|
+
// Return the maximum number of characters
|
|
34209
|
+
return Math.round(maxCharacters / 5);
|
|
34210
|
+
}
|
|
34211
|
+
var textChunks = chunkString(text, maxCharacters(windowSize.current[0]));
|
|
34212
|
+
var _useState = useState(0),
|
|
34213
|
+
chunkIndex = _useState[0],
|
|
34214
|
+
setChunkIndex = _useState[1];
|
|
34215
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
34216
|
+
if (event.code === 'Space') {
|
|
34217
|
+
goToNextStep();
|
|
34218
|
+
}
|
|
34219
|
+
};
|
|
34220
|
+
var goToNextStep = function goToNextStep() {
|
|
34221
|
+
var hasNextChunk = (textChunks == null ? void 0 : textChunks[chunkIndex + 1]) || false;
|
|
34222
|
+
if (hasNextChunk) {
|
|
34223
|
+
setChunkIndex(function (prev) {
|
|
34224
|
+
return prev + 1;
|
|
34225
|
+
});
|
|
34226
|
+
} else {
|
|
34227
|
+
// if there's no more text chunks, close the dialog
|
|
34228
|
+
onClose();
|
|
34229
|
+
}
|
|
34230
|
+
};
|
|
34231
|
+
useEffect(function () {
|
|
34232
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
34233
|
+
return function () {
|
|
34234
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
34235
|
+
};
|
|
34236
|
+
}, [chunkIndex]);
|
|
34237
|
+
var _useState2 = useState(false),
|
|
34238
|
+
showGoNextIndicator = _useState2[0],
|
|
34239
|
+
setShowGoNextIndicator = _useState2[1];
|
|
34240
|
+
return React.createElement(Container$b, null, React.createElement(DynamicText, {
|
|
34241
|
+
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
34242
|
+
onFinish: function onFinish() {
|
|
34243
|
+
setShowGoNextIndicator(true);
|
|
34244
|
+
onEndStep && onEndStep();
|
|
34245
|
+
},
|
|
34246
|
+
onStart: function onStart() {
|
|
34247
|
+
setShowGoNextIndicator(false);
|
|
34248
|
+
onStartStep && onStartStep();
|
|
34249
|
+
}
|
|
34250
|
+
}), showGoNextIndicator && React.createElement(PressSpaceIndicator, {
|
|
34251
|
+
right: type === NPCDialogType.TextOnly ? '1rem' : '10.5rem',
|
|
34252
|
+
src: IS_MOBILE_OR_TABLET ? img$6 : img$7,
|
|
34253
|
+
onPointerDown: function onPointerDown() {
|
|
34254
|
+
goToNextStep();
|
|
34255
|
+
}
|
|
34256
|
+
}));
|
|
34257
|
+
};
|
|
34258
|
+
var Container$b = /*#__PURE__*/styled.div.withConfig({
|
|
34259
|
+
displayName: "NPCDialogText__Container",
|
|
34260
|
+
componentId: "sc-1cxkdh9-0"
|
|
34261
|
+
})([""]);
|
|
34262
|
+
var PressSpaceIndicator = /*#__PURE__*/styled.img.withConfig({
|
|
34263
|
+
displayName: "NPCDialogText__PressSpaceIndicator",
|
|
34264
|
+
componentId: "sc-1cxkdh9-1"
|
|
34265
|
+
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref2) {
|
|
34266
|
+
var right = _ref2.right;
|
|
34267
|
+
return right;
|
|
34268
|
+
});
|
|
34269
|
+
|
|
34270
|
+
//@ts-ignore
|
|
34271
|
+
var useEventListener = function useEventListener(type, handler, el) {
|
|
34272
|
+
if (el === void 0) {
|
|
34273
|
+
el = window;
|
|
34274
|
+
}
|
|
34275
|
+
var savedHandler = React.useRef();
|
|
34276
|
+
React.useEffect(function () {
|
|
34277
|
+
savedHandler.current = handler;
|
|
34278
|
+
}, [handler]);
|
|
34279
|
+
React.useEffect(function () {
|
|
34280
|
+
//@ts-ignore
|
|
34281
|
+
var listener = function listener(e) {
|
|
34282
|
+
return savedHandler.current(e);
|
|
34283
|
+
};
|
|
34284
|
+
el.addEventListener(type, listener);
|
|
34285
|
+
return function () {
|
|
34286
|
+
el.removeEventListener(type, listener);
|
|
34287
|
+
};
|
|
34288
|
+
}, [type, el]);
|
|
34289
|
+
};
|
|
34290
|
+
|
|
34291
|
+
var QuestionDialog = function QuestionDialog(_ref) {
|
|
34292
|
+
var questions = _ref.questions,
|
|
34293
|
+
answers = _ref.answers,
|
|
34294
|
+
onClose = _ref.onClose;
|
|
34295
|
+
var _useState = useState(questions[0]),
|
|
34296
|
+
currentQuestion = _useState[0],
|
|
34297
|
+
setCurrentQuestion = _useState[1];
|
|
34298
|
+
var _useState2 = useState(false),
|
|
34299
|
+
canShowAnswers = _useState2[0],
|
|
34300
|
+
setCanShowAnswers = _useState2[1];
|
|
34301
|
+
var onGetFirstAnswer = function onGetFirstAnswer() {
|
|
34302
|
+
if (!currentQuestion.answerIds || currentQuestion.answerIds.length === 0) {
|
|
34303
|
+
return null;
|
|
34304
|
+
}
|
|
34305
|
+
var firstAnswerId = currentQuestion.answerIds[0];
|
|
34306
|
+
return answers.find(function (answer) {
|
|
34307
|
+
return answer.id === firstAnswerId;
|
|
34308
|
+
});
|
|
34309
|
+
};
|
|
34310
|
+
var _useState3 = useState(onGetFirstAnswer()),
|
|
34311
|
+
currentAnswer = _useState3[0],
|
|
34312
|
+
setCurrentAnswer = _useState3[1];
|
|
34313
|
+
useEffect(function () {
|
|
34314
|
+
setCurrentAnswer(onGetFirstAnswer());
|
|
34315
|
+
}, [currentQuestion]);
|
|
34316
|
+
var onGetAnswers = function onGetAnswers(answerIds) {
|
|
34317
|
+
return answerIds.map(function (answerId) {
|
|
34318
|
+
return answers.find(function (answer) {
|
|
34319
|
+
return answer.id === answerId;
|
|
34320
|
+
});
|
|
34321
|
+
});
|
|
34322
|
+
};
|
|
34323
|
+
var onKeyPress = function onKeyPress(e) {
|
|
34324
|
+
switch (e.key) {
|
|
34325
|
+
case 'ArrowDown':
|
|
34326
|
+
// select next answer, if any.
|
|
34327
|
+
// if no next answer, select first answer
|
|
34328
|
+
// const nextAnswer = onGetAnswers(currentQuestion.answerIds!).find(
|
|
34329
|
+
// (answer) => answer?.id === currentAnswer!.id + 1
|
|
34330
|
+
// );
|
|
34331
|
+
var nextAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
34332
|
+
return (answer == null ? void 0 : answer.id) === currentAnswer.id + 1;
|
|
34333
|
+
});
|
|
34334
|
+
var nextAnswerID = currentQuestion.answerIds[nextAnswerIndex];
|
|
34335
|
+
var nextAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
34336
|
+
return (answer == null ? void 0 : answer.id) === nextAnswerID;
|
|
34337
|
+
});
|
|
34338
|
+
setCurrentAnswer(nextAnswer || onGetFirstAnswer());
|
|
34339
|
+
break;
|
|
34340
|
+
case 'ArrowUp':
|
|
34341
|
+
// select previous answer, if any.
|
|
34342
|
+
// if no previous answer, select last answer
|
|
34343
|
+
var previousAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
|
|
34344
|
+
return (answer == null ? void 0 : answer.id) === currentAnswer.id - 1;
|
|
34345
|
+
});
|
|
34346
|
+
var previousAnswerID = currentQuestion.answerIds && currentQuestion.answerIds[previousAnswerIndex];
|
|
34347
|
+
var previousAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
|
|
34348
|
+
return (answer == null ? void 0 : answer.id) === previousAnswerID;
|
|
34349
|
+
});
|
|
34350
|
+
if (previousAnswer) {
|
|
34351
|
+
setCurrentAnswer(previousAnswer);
|
|
34352
|
+
} else {
|
|
34353
|
+
setCurrentAnswer(onGetAnswers(currentQuestion.answerIds).pop());
|
|
34354
|
+
}
|
|
34355
|
+
break;
|
|
34356
|
+
case 'Enter':
|
|
34357
|
+
setCanShowAnswers(false);
|
|
34358
|
+
if (!(currentAnswer != null && currentAnswer.nextQuestionId)) {
|
|
34359
|
+
onClose();
|
|
34360
|
+
return;
|
|
34361
|
+
} else {
|
|
34362
|
+
setCurrentQuestion(questions.find(function (question) {
|
|
34363
|
+
return question.id === currentAnswer.nextQuestionId;
|
|
34364
|
+
}));
|
|
34365
|
+
}
|
|
34366
|
+
break;
|
|
34367
|
+
}
|
|
34368
|
+
};
|
|
34369
|
+
useEventListener('keydown', onKeyPress);
|
|
34370
|
+
var onAnswerClick = function onAnswerClick(answer) {
|
|
34371
|
+
setCanShowAnswers(false);
|
|
34372
|
+
if (answer.nextQuestionId) {
|
|
34373
|
+
// if there is a next question, go to it
|
|
34374
|
+
setCurrentQuestion(questions.find(function (question) {
|
|
34375
|
+
return question.id === answer.nextQuestionId;
|
|
34376
|
+
}));
|
|
34377
|
+
} else {
|
|
34378
|
+
// else, finish dialog!
|
|
34379
|
+
onClose();
|
|
34380
|
+
}
|
|
34381
|
+
};
|
|
34382
|
+
var onRenderCurrentAnswers = function onRenderCurrentAnswers() {
|
|
34383
|
+
var answerIds = currentQuestion.answerIds;
|
|
34384
|
+
if (!answerIds) {
|
|
34385
|
+
return null;
|
|
34386
|
+
}
|
|
34387
|
+
var answers = onGetAnswers(answerIds);
|
|
34388
|
+
if (!answers) {
|
|
34389
|
+
return null;
|
|
34390
|
+
}
|
|
34391
|
+
return answers.map(function (answer) {
|
|
34392
|
+
var isSelected = (currentAnswer == null ? void 0 : currentAnswer.id) === (answer == null ? void 0 : answer.id);
|
|
34393
|
+
var selectedColor = isSelected ? 'yellow' : 'white';
|
|
34394
|
+
if (answer) {
|
|
34395
|
+
return React.createElement(AnswerRow, {
|
|
34396
|
+
key: "answer_" + answer.id
|
|
34397
|
+
}, React.createElement(AnswerSelectedIcon, {
|
|
34398
|
+
color: selectedColor
|
|
34399
|
+
}, isSelected ? 'X' : null), React.createElement(Answer, {
|
|
34400
|
+
key: answer.id,
|
|
34401
|
+
onPointerDown: function onPointerDown() {
|
|
34402
|
+
return onAnswerClick(answer);
|
|
34403
|
+
},
|
|
34404
|
+
color: selectedColor
|
|
34405
|
+
}, answer.text));
|
|
34406
|
+
}
|
|
34407
|
+
return null;
|
|
34408
|
+
});
|
|
34409
|
+
};
|
|
34410
|
+
return React.createElement(Container$c, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
|
|
34411
|
+
text: currentQuestion.text,
|
|
34412
|
+
onStart: function onStart() {
|
|
34413
|
+
return setCanShowAnswers(false);
|
|
34414
|
+
},
|
|
34415
|
+
onFinish: function onFinish() {
|
|
34416
|
+
return setCanShowAnswers(true);
|
|
34417
|
+
}
|
|
34418
|
+
})), canShowAnswers && React.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
34419
|
+
};
|
|
34420
|
+
var Container$c = /*#__PURE__*/styled.div.withConfig({
|
|
34421
|
+
displayName: "QuestionDialog__Container",
|
|
34422
|
+
componentId: "sc-bxc5u0-0"
|
|
34423
|
+
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
34424
|
+
var QuestionContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34425
|
+
displayName: "QuestionDialog__QuestionContainer",
|
|
34426
|
+
componentId: "sc-bxc5u0-1"
|
|
34427
|
+
})(["flex:100%;width:100%;"]);
|
|
34428
|
+
var AnswersContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34429
|
+
displayName: "QuestionDialog__AnswersContainer",
|
|
34430
|
+
componentId: "sc-bxc5u0-2"
|
|
34431
|
+
})(["flex:100%;"]);
|
|
34432
|
+
var Answer = /*#__PURE__*/styled.p.withConfig({
|
|
34433
|
+
displayName: "QuestionDialog__Answer",
|
|
34434
|
+
componentId: "sc-bxc5u0-3"
|
|
34435
|
+
})(["flex:auto;color:", " !important;font-size:0.65rem !important;background:inherit;border:none;"], function (props) {
|
|
34436
|
+
return props.color;
|
|
34437
|
+
});
|
|
34438
|
+
var AnswerSelectedIcon = /*#__PURE__*/styled.span.withConfig({
|
|
34439
|
+
displayName: "QuestionDialog__AnswerSelectedIcon",
|
|
34440
|
+
componentId: "sc-bxc5u0-4"
|
|
34441
|
+
})(["flex:5% 0 0;color:", " !important;"], function (props) {
|
|
34442
|
+
return props.color;
|
|
34443
|
+
});
|
|
34444
|
+
var AnswerRow = /*#__PURE__*/styled.div.withConfig({
|
|
34445
|
+
displayName: "QuestionDialog__AnswerRow",
|
|
34446
|
+
componentId: "sc-bxc5u0-5"
|
|
34447
|
+
})(["display:flex;flex-wrap:wrap;justify-content:center;align-items:center;margin-bottom:0.5rem;height:22px;p{line-height:unset;margin-top:0;margin-bottom:0rem;}"]);
|
|
34448
|
+
|
|
34449
|
+
var img$8 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAP1BMVEUAAAA7FyVxQTsUEBPj5v////+5v/tCJDOOUlIiHBr1oJfptaO6dWr61rhzFy1bMTjoanMUNGQoXMQkn97+88DQ3IhAAAAAAXRSTlMAQObYZgAAAAFiS0dEBfhv6ccAAAAHdElNRQfmAw4VOBC7c5LYAAABM0lEQVQ4y3XRi5KDIAwFUAUkbrBgpP//rZsHVHQ009qZ3tPboNN0zmwzvcw8O5sX4y0NOg/Et3jRCXF+ziULorjkOQ9gE24dvuUAzq08DiCO4pe3WN7zCP56vmpubBReQYC11YPS86ySxxCsAABTSgjb5m4g8nfbxvFHBkH2OEEvAItVuCuIsgGgl+Gcr7kDXxhEAx55A2SQEEeQeZwUaIP8Tbo05B0RFPhItAjgj1w6cDnhLluDj+Egkh3pCCP4pKQAw1IPO0W9Nti5gW9RP2dKA3BZd2Dw+baYX+Nt4GM00O4S3kEpF6Alb2Bv4LeC3kkGfAW0/p0RPoJVKr63ghHsKuRh5DIUKOAlGOwrtt9fQekAEfmhZslHUDoglB0zjfkJigN7UnTQQ4GBWomoVhEN/AOPSBh38gy+fwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0xNFQyMTo1NTo1MSswMDowMJcc0eEAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMTRUMjE6NTU6NTErMDA6MDDmQWldAAAAAElFTkSuQmCC';
|
|
34450
|
+
|
|
34451
|
+
var NPCDialogType;
|
|
34452
|
+
(function (NPCDialogType) {
|
|
34453
|
+
NPCDialogType["TextOnly"] = "TextOnly";
|
|
34454
|
+
NPCDialogType["TextAndThumbnail"] = "TextAndThumbnail";
|
|
34455
|
+
})(NPCDialogType || (NPCDialogType = {}));
|
|
34456
|
+
var NPCDialog = function NPCDialog(_ref) {
|
|
34457
|
+
var text = _ref.text,
|
|
34458
|
+
type = _ref.type,
|
|
34459
|
+
_onClose = _ref.onClose,
|
|
34460
|
+
imagePath = _ref.imagePath,
|
|
34461
|
+
_ref$isQuestionDialog = _ref.isQuestionDialog,
|
|
34462
|
+
isQuestionDialog = _ref$isQuestionDialog === void 0 ? false : _ref$isQuestionDialog,
|
|
34463
|
+
questions = _ref.questions,
|
|
34464
|
+
answers = _ref.answers;
|
|
34465
|
+
return React.createElement(RPGUIContainer, {
|
|
34466
|
+
type: RPGUIContainerTypes.FramedGold,
|
|
34467
|
+
width: isQuestionDialog ? '600px' : '80%',
|
|
34468
|
+
height: '180px'
|
|
34469
|
+
}, isQuestionDialog && questions && answers ? React.createElement(React.Fragment, null, React.createElement(TextContainer$1, {
|
|
34470
|
+
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
34471
|
+
}, React.createElement(QuestionDialog, {
|
|
34472
|
+
questions: questions,
|
|
34473
|
+
answers: answers,
|
|
34474
|
+
onClose: function onClose() {
|
|
34475
|
+
if (_onClose) {
|
|
34476
|
+
_onClose();
|
|
34477
|
+
}
|
|
34478
|
+
}
|
|
34479
|
+
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
34480
|
+
src: imagePath || img$8
|
|
34481
|
+
}))) : React.createElement(React.Fragment, null, React.createElement(Container$d, null, React.createElement(TextContainer$1, {
|
|
34482
|
+
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
34483
|
+
}, React.createElement(NPCDialogText, {
|
|
34484
|
+
type: type,
|
|
34485
|
+
text: text || 'No text provided.',
|
|
34486
|
+
onClose: function onClose() {
|
|
34487
|
+
if (_onClose) {
|
|
34488
|
+
_onClose();
|
|
34489
|
+
}
|
|
34490
|
+
}
|
|
34491
|
+
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
34492
|
+
src: imagePath || img$8
|
|
34493
|
+
})))));
|
|
34494
|
+
};
|
|
34495
|
+
var Container$d = /*#__PURE__*/styled.div.withConfig({
|
|
34496
|
+
displayName: "NPCDialog__Container",
|
|
34497
|
+
componentId: "sc-1b4aw74-0"
|
|
34498
|
+
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
34499
|
+
var TextContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34500
|
+
displayName: "NPCDialog__TextContainer",
|
|
34501
|
+
componentId: "sc-1b4aw74-1"
|
|
34502
|
+
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
34503
|
+
var flex = _ref2.flex;
|
|
34504
|
+
return flex;
|
|
34505
|
+
});
|
|
34506
|
+
var ThumbnailContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34507
|
+
displayName: "NPCDialog__ThumbnailContainer",
|
|
34508
|
+
componentId: "sc-1b4aw74-2"
|
|
34509
|
+
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
34510
|
+
var NPCThumbnail = /*#__PURE__*/styled.img.withConfig({
|
|
34511
|
+
displayName: "NPCDialog__NPCThumbnail",
|
|
34512
|
+
componentId: "sc-1b4aw74-3"
|
|
34513
|
+
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
34514
|
+
|
|
34515
|
+
var ImgSide;
|
|
34516
|
+
(function (ImgSide) {
|
|
34517
|
+
ImgSide["right"] = "right";
|
|
34518
|
+
ImgSide["left"] = "left";
|
|
34519
|
+
})(ImgSide || (ImgSide = {}));
|
|
34520
|
+
var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
34521
|
+
var _textAndTypeArray$sli;
|
|
34522
|
+
var _onClose = _ref.onClose,
|
|
34523
|
+
textAndTypeArray = _ref.textAndTypeArray;
|
|
34524
|
+
var _useState = useState(false),
|
|
34525
|
+
showGoNextIndicator = _useState[0],
|
|
34526
|
+
setShowGoNextIndicator = _useState[1];
|
|
34527
|
+
var _useState2 = useState(0),
|
|
34528
|
+
slide = _useState2[0],
|
|
34529
|
+
setSlide = _useState2[1];
|
|
34530
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
34531
|
+
if (event.code === 'Space') {
|
|
34532
|
+
if (slide < (textAndTypeArray == null ? void 0 : textAndTypeArray.length) - 1) {
|
|
34533
|
+
setSlide(function (prev) {
|
|
34534
|
+
return prev + 1;
|
|
34535
|
+
});
|
|
34536
|
+
} else {
|
|
34537
|
+
// if there's no more text chunks, close the dialog
|
|
34538
|
+
_onClose();
|
|
34539
|
+
}
|
|
34540
|
+
}
|
|
34541
|
+
};
|
|
34542
|
+
useEffect(function () {
|
|
34543
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
34544
|
+
return function () {
|
|
34545
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
34546
|
+
};
|
|
34547
|
+
}, [slide]);
|
|
34548
|
+
return React.createElement(RPGUIContainer, {
|
|
34549
|
+
type: RPGUIContainerTypes.FramedGold,
|
|
34550
|
+
width: '50%',
|
|
34551
|
+
height: '180px'
|
|
34552
|
+
}, React.createElement(React.Fragment, null, React.createElement(Container$e, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
|
|
34553
|
+
flex: '70%'
|
|
34554
|
+
}, React.createElement(NPCDialogText, {
|
|
34555
|
+
onStartStep: function onStartStep() {
|
|
34556
|
+
return setShowGoNextIndicator(false);
|
|
34557
|
+
},
|
|
34558
|
+
onEndStep: function onEndStep() {
|
|
34559
|
+
return setShowGoNextIndicator(true);
|
|
34560
|
+
},
|
|
34561
|
+
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
34562
|
+
onClose: function onClose() {
|
|
34563
|
+
if (_onClose) {
|
|
34564
|
+
_onClose();
|
|
34565
|
+
}
|
|
34566
|
+
}
|
|
34567
|
+
})), React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
34568
|
+
src: textAndTypeArray[slide].imagePath || img$8
|
|
34569
|
+
})), showGoNextIndicator && React.createElement(PressSpaceIndicator$1, {
|
|
34570
|
+
right: '10.5rem',
|
|
34571
|
+
src: img$7
|
|
34572
|
+
})), textAndTypeArray[slide].imageSide === 'left' && React.createElement(React.Fragment, null, React.createElement(ThumbnailContainer$1, null, React.createElement(NPCThumbnail$1, {
|
|
34573
|
+
src: textAndTypeArray[slide].imagePath || img$8
|
|
34574
|
+
})), React.createElement(TextContainer$2, {
|
|
34575
|
+
flex: '70%'
|
|
34576
|
+
}, React.createElement(NPCDialogText, {
|
|
34577
|
+
onStartStep: function onStartStep() {
|
|
34578
|
+
return setShowGoNextIndicator(false);
|
|
34579
|
+
},
|
|
34580
|
+
onEndStep: function onEndStep() {
|
|
34581
|
+
return setShowGoNextIndicator(true);
|
|
34582
|
+
},
|
|
34583
|
+
text: textAndTypeArray[slide].text || 'No text provided.',
|
|
34584
|
+
onClose: function onClose() {
|
|
34585
|
+
if (_onClose) {
|
|
34586
|
+
_onClose();
|
|
34587
|
+
}
|
|
34588
|
+
}
|
|
34589
|
+
})), showGoNextIndicator && React.createElement(PressSpaceIndicator$1, {
|
|
34590
|
+
right: '1rem',
|
|
34591
|
+
src: img$7
|
|
34592
|
+
}))), ")"));
|
|
34593
|
+
};
|
|
34594
|
+
var Container$e = /*#__PURE__*/styled.div.withConfig({
|
|
34595
|
+
displayName: "NPCMultiDialog__Container",
|
|
34596
|
+
componentId: "sc-rvu5wg-0"
|
|
34597
|
+
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
34598
|
+
var TextContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
34599
|
+
displayName: "NPCMultiDialog__TextContainer",
|
|
34600
|
+
componentId: "sc-rvu5wg-1"
|
|
34601
|
+
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
34602
|
+
var flex = _ref2.flex;
|
|
34603
|
+
return flex;
|
|
34604
|
+
});
|
|
34605
|
+
var ThumbnailContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34606
|
+
displayName: "NPCMultiDialog__ThumbnailContainer",
|
|
34607
|
+
componentId: "sc-rvu5wg-2"
|
|
34608
|
+
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
34609
|
+
var NPCThumbnail$1 = /*#__PURE__*/styled.img.withConfig({
|
|
34610
|
+
displayName: "NPCMultiDialog__NPCThumbnail",
|
|
34611
|
+
componentId: "sc-rvu5wg-3"
|
|
34612
|
+
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
34613
|
+
var PressSpaceIndicator$1 = /*#__PURE__*/styled.img.withConfig({
|
|
34614
|
+
displayName: "NPCMultiDialog__PressSpaceIndicator",
|
|
34615
|
+
componentId: "sc-rvu5wg-4"
|
|
34616
|
+
})(["position:absolute;right:", ";bottom:1rem;height:20.7px;image-rendering:-webkit-optimize-contrast;"], function (_ref3) {
|
|
34617
|
+
var right = _ref3.right;
|
|
34618
|
+
return right;
|
|
34619
|
+
});
|
|
34620
|
+
|
|
34621
|
+
var HistoryDialog = function HistoryDialog(_ref) {
|
|
34622
|
+
var backgroundImgPath = _ref.backgroundImgPath,
|
|
34623
|
+
fullCoverBackground = _ref.fullCoverBackground,
|
|
34624
|
+
questions = _ref.questions,
|
|
34625
|
+
answers = _ref.answers,
|
|
34626
|
+
text = _ref.text,
|
|
34627
|
+
imagePath = _ref.imagePath,
|
|
34628
|
+
textAndTypeArray = _ref.textAndTypeArray,
|
|
34629
|
+
onClose = _ref.onClose;
|
|
34630
|
+
var _useState = useState(0),
|
|
34631
|
+
img = _useState[0],
|
|
34632
|
+
setImage = _useState[1];
|
|
34633
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
34634
|
+
if (event.code === 'Space') {
|
|
34635
|
+
if (img < (backgroundImgPath == null ? void 0 : backgroundImgPath.length) - 1) {
|
|
34636
|
+
setImage(function (prev) {
|
|
34637
|
+
return prev + 1;
|
|
34638
|
+
});
|
|
34639
|
+
} else {
|
|
34640
|
+
// if there's no more text chunks, close the dialog
|
|
34641
|
+
onClose();
|
|
34642
|
+
}
|
|
34643
|
+
}
|
|
34644
|
+
};
|
|
34645
|
+
useEffect(function () {
|
|
34646
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
34647
|
+
return function () {
|
|
34648
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
34649
|
+
};
|
|
34650
|
+
}, [backgroundImgPath]);
|
|
34651
|
+
return React.createElement(BackgroundContainer, {
|
|
34652
|
+
imgPath: backgroundImgPath[img],
|
|
34653
|
+
fullImg: fullCoverBackground
|
|
34654
|
+
}, React.createElement(DialogContainer, null, textAndTypeArray ? React.createElement(NPCMultiDialog, {
|
|
34655
|
+
textAndTypeArray: textAndTypeArray,
|
|
34656
|
+
onClose: onClose
|
|
34657
|
+
}) : questions && answers ? React.createElement(QuestionDialog, {
|
|
34658
|
+
questions: questions,
|
|
34659
|
+
answers: answers,
|
|
34660
|
+
onClose: onClose
|
|
34661
|
+
}) : text && imagePath ? React.createElement(NPCDialog, {
|
|
34662
|
+
text: text,
|
|
34663
|
+
imagePath: imagePath,
|
|
34664
|
+
onClose: onClose,
|
|
34665
|
+
type: NPCDialogType.TextAndThumbnail
|
|
34666
|
+
}) : React.createElement(NPCDialog, {
|
|
34667
|
+
text: text,
|
|
34668
|
+
onClose: onClose,
|
|
34669
|
+
type: NPCDialogType.TextOnly
|
|
34670
|
+
})));
|
|
34671
|
+
};
|
|
34672
|
+
var BackgroundContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34673
|
+
displayName: "HistoryDialog__BackgroundContainer",
|
|
34674
|
+
componentId: "sc-u6oe75-0"
|
|
34675
|
+
})(["width:100%;height:100%;background-image:url(", ");background-size:", ";display:flex;justify-content:space-evenly;align-items:center;"], function (props) {
|
|
34676
|
+
return props.imgPath;
|
|
34677
|
+
}, function (props) {
|
|
34678
|
+
return props.imgPath ? 'cover' : 'auto';
|
|
34679
|
+
});
|
|
34680
|
+
var DialogContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34681
|
+
displayName: "HistoryDialog__DialogContainer",
|
|
34682
|
+
componentId: "sc-u6oe75-1"
|
|
34683
|
+
})(["display:flex;justify-content:center;padding-top:200px;"]);
|
|
34684
|
+
|
|
34402
34685
|
var SlotsContainer = function SlotsContainer(_ref) {
|
|
34403
34686
|
var children = _ref.children,
|
|
34404
34687
|
title = _ref.title,
|
|
@@ -34620,7 +34903,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
34620
34903
|
return word[0];
|
|
34621
34904
|
}));
|
|
34622
34905
|
};
|
|
34623
|
-
return React.createElement(Container$
|
|
34906
|
+
return React.createElement(Container$f, null, React.createElement("p", null, "Shortcuts:"), React.createElement(List, {
|
|
34624
34907
|
id: "shortcuts_list"
|
|
34625
34908
|
}, Array.from({
|
|
34626
34909
|
length: 6
|
|
@@ -34636,7 +34919,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
34636
34919
|
}, getContent(i));
|
|
34637
34920
|
})));
|
|
34638
34921
|
};
|
|
34639
|
-
var Container$
|
|
34922
|
+
var Container$f = /*#__PURE__*/styled.div.withConfig({
|
|
34640
34923
|
displayName: "ShortcutsSetter__Container",
|
|
34641
34924
|
componentId: "sc-xuouuf-0"
|
|
34642
34925
|
})(["p{margin:0;margin-left:0.5rem;}"]);
|
|
@@ -34673,8 +34956,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
34673
34956
|
dragScale = _ref.dragScale,
|
|
34674
34957
|
shortcuts = _ref.shortcuts,
|
|
34675
34958
|
setItemShortcut = _ref.setItemShortcut,
|
|
34676
|
-
removeShortcut = _ref.removeShortcut
|
|
34677
|
-
equipmentSet = _ref.equipmentSet;
|
|
34959
|
+
removeShortcut = _ref.removeShortcut;
|
|
34678
34960
|
var _useState = useState({
|
|
34679
34961
|
isOpen: false,
|
|
34680
34962
|
maxQuantity: 1,
|
|
@@ -34730,503 +35012,176 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
34730
35012
|
},
|
|
34731
35013
|
onOutsideDrop: function onOutsideDrop(item, position) {
|
|
34732
35014
|
if (_onOutsideDrop) _onOutsideDrop(item, position);
|
|
34733
|
-
},
|
|
34734
|
-
atlasIMG: atlasIMG,
|
|
34735
|
-
atlasJSON: atlasJSON,
|
|
34736
|
-
isSelectingShortcut: settingShortcutIndex !== -1
|
|
34737
|
-
|
|
34738
|
-
}));
|
|
34739
|
-
}
|
|
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+Egkh3pCCP4pKQAw1IPO0W9Nti5gW9RP2dKA3BZd2Dw+baYX+Nt4GM00O4S3kEpF6Alb2Bv4LeC3kkGfAW0/p0RPoJVKr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XUNnbyNna3kcmwrW3Lujp6ugD5bbn6/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;
|
|
35015
|
+
},
|
|
35016
|
+
atlasIMG: atlasIMG,
|
|
35017
|
+
atlasJSON: atlasJSON,
|
|
35018
|
+
isSelectingShortcut: settingShortcutIndex !== -1
|
|
35019
|
+
}));
|
|
35086
35020
|
}
|
|
35087
|
-
|
|
35088
|
-
return answers.find(function (answer) {
|
|
35089
|
-
return answer.id === firstAnswerId;
|
|
35090
|
-
});
|
|
35021
|
+
return slots;
|
|
35091
35022
|
};
|
|
35092
|
-
|
|
35093
|
-
|
|
35094
|
-
|
|
35095
|
-
|
|
35096
|
-
|
|
35097
|
-
|
|
35098
|
-
|
|
35099
|
-
|
|
35100
|
-
|
|
35101
|
-
|
|
35023
|
+
return React.createElement(React.Fragment, null, React.createElement(SlotsContainer, {
|
|
35024
|
+
title: itemContainer.name || 'Container',
|
|
35025
|
+
onClose: onClose,
|
|
35026
|
+
initialPosition: initialPosition
|
|
35027
|
+
}, type === ItemContainerType.Inventory && shortcuts && removeShortcut && React.createElement(ShortcutsSetter, {
|
|
35028
|
+
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
35029
|
+
settingShortcutIndex: settingShortcutIndex,
|
|
35030
|
+
shortcuts: shortcuts,
|
|
35031
|
+
removeShortcut: removeShortcut,
|
|
35032
|
+
atlasIMG: atlasIMG,
|
|
35033
|
+
atlasJSON: atlasJSON
|
|
35034
|
+
}), React.createElement(ItemsContainer, {
|
|
35035
|
+
className: "item-container-body"
|
|
35036
|
+
}, onRenderSlots())), quantitySelect.isOpen && React.createElement(QuantitySelectorContainer, null, React.createElement(ItemQuantitySelector, {
|
|
35037
|
+
quantity: quantitySelect.maxQuantity,
|
|
35038
|
+
onConfirm: function onConfirm(quantity) {
|
|
35039
|
+
quantitySelect.callback(quantity);
|
|
35040
|
+
setQuantitySelect({
|
|
35041
|
+
isOpen: false,
|
|
35042
|
+
maxQuantity: 1,
|
|
35043
|
+
callback: function callback() {}
|
|
35044
|
+
});
|
|
35045
|
+
},
|
|
35046
|
+
onClose: function onClose() {
|
|
35047
|
+
quantitySelect.callback(-1);
|
|
35048
|
+
setQuantitySelect({
|
|
35049
|
+
isOpen: false,
|
|
35050
|
+
maxQuantity: 1,
|
|
35051
|
+
callback: function callback() {}
|
|
35102
35052
|
});
|
|
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;
|
|
35149
35053
|
}
|
|
35054
|
+
})));
|
|
35055
|
+
};
|
|
35056
|
+
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35057
|
+
displayName: "ItemContainer__ItemsContainer",
|
|
35058
|
+
componentId: "sc-15y5p9l-0"
|
|
35059
|
+
})(["display:flex;justify-content:center;flex-wrap:wrap;"]);
|
|
35060
|
+
var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35061
|
+
displayName: "ItemContainer__QuantitySelectorContainer",
|
|
35062
|
+
componentId: "sc-15y5p9l-1"
|
|
35063
|
+
})(["position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:100;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.5);"]);
|
|
35064
|
+
|
|
35065
|
+
var ItemSelector = function ItemSelector(_ref) {
|
|
35066
|
+
var atlasIMG = _ref.atlasIMG,
|
|
35067
|
+
atlasJSON = _ref.atlasJSON,
|
|
35068
|
+
options = _ref.options,
|
|
35069
|
+
onClose = _ref.onClose,
|
|
35070
|
+
onSelect = _ref.onSelect;
|
|
35071
|
+
var _useState = useState(),
|
|
35072
|
+
selectedValue = _useState[0],
|
|
35073
|
+
setSelectedValue = _useState[1];
|
|
35074
|
+
var handleClick = function handleClick() {
|
|
35075
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
35076
|
+
var elementValue = element.value;
|
|
35077
|
+
setSelectedValue(elementValue);
|
|
35150
35078
|
};
|
|
35151
|
-
|
|
35152
|
-
|
|
35153
|
-
|
|
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();
|
|
35079
|
+
useEffect(function () {
|
|
35080
|
+
if (selectedValue) {
|
|
35081
|
+
onSelect(selectedValue);
|
|
35162
35082
|
}
|
|
35163
|
-
};
|
|
35164
|
-
|
|
35165
|
-
|
|
35166
|
-
|
|
35167
|
-
|
|
35083
|
+
}, [selectedValue]);
|
|
35084
|
+
return React.createElement(DraggableContainer, {
|
|
35085
|
+
type: RPGUIContainerTypes.Framed,
|
|
35086
|
+
width: "500px",
|
|
35087
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
35088
|
+
onCloseButton: function onCloseButton() {
|
|
35089
|
+
if (onClose) {
|
|
35090
|
+
onClose();
|
|
35091
|
+
}
|
|
35168
35092
|
}
|
|
35169
|
-
|
|
35170
|
-
|
|
35171
|
-
|
|
35093
|
+
}, React.createElement("div", {
|
|
35094
|
+
style: {
|
|
35095
|
+
width: '100%'
|
|
35172
35096
|
}
|
|
35173
|
-
|
|
35174
|
-
|
|
35175
|
-
|
|
35176
|
-
|
|
35177
|
-
|
|
35178
|
-
|
|
35179
|
-
|
|
35180
|
-
|
|
35181
|
-
|
|
35182
|
-
|
|
35183
|
-
|
|
35184
|
-
|
|
35185
|
-
|
|
35186
|
-
|
|
35187
|
-
|
|
35097
|
+
}, React.createElement(Title$2, null, 'Harvesting instruments'), React.createElement(Subtitle$1, null, 'Use the tool, you need it'), React.createElement("hr", {
|
|
35098
|
+
className: "golden"
|
|
35099
|
+
})), React.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
35100
|
+
return React.createElement(RadioOptionsWrapper$1, {
|
|
35101
|
+
key: index
|
|
35102
|
+
}, React.createElement(SpriteAtlasWrapper$1, null, React.createElement(SpriteFromAtlas, {
|
|
35103
|
+
atlasIMG: atlasIMG,
|
|
35104
|
+
atlasJSON: atlasJSON,
|
|
35105
|
+
spriteKey: option.imageKey,
|
|
35106
|
+
imgScale: 3
|
|
35107
|
+
})), React.createElement("div", null, React.createElement("input", {
|
|
35108
|
+
className: "rpgui-radio",
|
|
35109
|
+
type: "radio",
|
|
35110
|
+
value: option.name,
|
|
35111
|
+
name: "test"
|
|
35112
|
+
}), React.createElement("label", {
|
|
35113
|
+
onPointerDown: handleClick,
|
|
35114
|
+
style: {
|
|
35115
|
+
display: 'flex',
|
|
35116
|
+
alignItems: 'center'
|
|
35188
35117
|
}
|
|
35189
|
-
|
|
35190
|
-
|
|
35191
|
-
|
|
35192
|
-
|
|
35193
|
-
|
|
35194
|
-
|
|
35195
|
-
|
|
35196
|
-
|
|
35197
|
-
|
|
35198
|
-
|
|
35118
|
+
}, option.name, " ", React.createElement("br", null), option.description)));
|
|
35119
|
+
})), React.createElement(ButtonWrapper$1, null, React.createElement(Button, {
|
|
35120
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
35121
|
+
onPointerDown: onClose
|
|
35122
|
+
}, "Cancel"), React.createElement(Button, {
|
|
35123
|
+
buttonType: ButtonTypes.RPGUIButton
|
|
35124
|
+
}, "Select")));
|
|
35125
|
+
};
|
|
35126
|
+
var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
35127
|
+
displayName: "ItemSelector__Title",
|
|
35128
|
+
componentId: "sc-gptoxp-0"
|
|
35129
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
35130
|
+
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
35131
|
+
displayName: "ItemSelector__Subtitle",
|
|
35132
|
+
componentId: "sc-gptoxp-1"
|
|
35133
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
35134
|
+
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35135
|
+
displayName: "ItemSelector__RadioInputScroller",
|
|
35136
|
+
componentId: "sc-gptoxp-2"
|
|
35137
|
+
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
35138
|
+
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35139
|
+
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
35140
|
+
componentId: "sc-gptoxp-3"
|
|
35141
|
+
})(["margin-right:40px;"]);
|
|
35142
|
+
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35143
|
+
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
35144
|
+
componentId: "sc-gptoxp-4"
|
|
35145
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
35146
|
+
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35147
|
+
displayName: "ItemSelector__ButtonWrapper",
|
|
35148
|
+
componentId: "sc-gptoxp-5"
|
|
35149
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
35150
|
+
|
|
35151
|
+
var ListMenu = function ListMenu(_ref) {
|
|
35152
|
+
var options = _ref.options,
|
|
35153
|
+
onSelected = _ref.onSelected,
|
|
35154
|
+
x = _ref.x,
|
|
35155
|
+
y = _ref.y;
|
|
35156
|
+
return React.createElement(Container$g, {
|
|
35157
|
+
x: x,
|
|
35158
|
+
y: y
|
|
35159
|
+
}, React.createElement("ul", {
|
|
35160
|
+
className: "rpgui-list-imp",
|
|
35161
|
+
style: {
|
|
35162
|
+
overflow: 'hidden'
|
|
35199
35163
|
}
|
|
35200
|
-
}
|
|
35164
|
+
}, options.map(function (params, index) {
|
|
35165
|
+
return React.createElement(ListElement$1, {
|
|
35166
|
+
key: (params == null ? void 0 : params.id) || index,
|
|
35167
|
+
onPointerDown: function onPointerDown() {
|
|
35168
|
+
onSelected(params == null ? void 0 : params.id);
|
|
35169
|
+
}
|
|
35170
|
+
}, (params == null ? void 0 : params.text) || 'No text');
|
|
35171
|
+
})));
|
|
35201
35172
|
};
|
|
35202
|
-
var Container$
|
|
35203
|
-
displayName: "
|
|
35204
|
-
componentId: "sc-
|
|
35205
|
-
})(["display:flex;
|
|
35206
|
-
|
|
35207
|
-
|
|
35208
|
-
|
|
35209
|
-
})
|
|
35210
|
-
var
|
|
35211
|
-
displayName: "
|
|
35212
|
-
componentId: "sc-
|
|
35213
|
-
})(["
|
|
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;}"]);
|
|
35173
|
+
var Container$g = /*#__PURE__*/styled.div.withConfig({
|
|
35174
|
+
displayName: "ListMenu__Container",
|
|
35175
|
+
componentId: "sc-i9097t-0"
|
|
35176
|
+
})(["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) {
|
|
35177
|
+
return props.y || 0;
|
|
35178
|
+
}, function (props) {
|
|
35179
|
+
return props.x || 0;
|
|
35180
|
+
}, uiFonts.size.xsmall);
|
|
35181
|
+
var ListElement$1 = /*#__PURE__*/styled.li.withConfig({
|
|
35182
|
+
displayName: "ListMenu__ListElement",
|
|
35183
|
+
componentId: "sc-i9097t-1"
|
|
35184
|
+
})(["margin-right:0.5rem;"]);
|
|
35230
35185
|
|
|
35231
35186
|
var ProgressBar = function ProgressBar(_ref) {
|
|
35232
35187
|
var max = _ref.max,
|
|
@@ -35245,7 +35200,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
35245
35200
|
}
|
|
35246
35201
|
return value * 100 / max;
|
|
35247
35202
|
};
|
|
35248
|
-
return React.createElement(Container$
|
|
35203
|
+
return React.createElement(Container$h, {
|
|
35249
35204
|
className: "rpgui-progress",
|
|
35250
35205
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
35251
35206
|
"data-rpguitype": "progress",
|
|
@@ -35274,7 +35229,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
35274
35229
|
displayName: "ProgressBar__TextOverlay",
|
|
35275
35230
|
componentId: "sc-qa6fzh-1"
|
|
35276
35231
|
})(["width:100%;position:relative;"]);
|
|
35277
|
-
var Container$
|
|
35232
|
+
var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
35278
35233
|
displayName: "ProgressBar__Container",
|
|
35279
35234
|
componentId: "sc-qa6fzh-2"
|
|
35280
35235
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", ""], function (props) {
|
|
@@ -35285,7 +35240,7 @@ var Container$g = /*#__PURE__*/styled.div.withConfig({
|
|
|
35285
35240
|
return props.style;
|
|
35286
35241
|
});
|
|
35287
35242
|
|
|
35288
|
-
var img$
|
|
35243
|
+
var img$9 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1d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IvKbQxIILFKQjXhCPkASZN5tjd27ud9SRYOKV3u/ftN7P/VESEa4gariRuIHZEkpeUUkYhEZEKbeNrG0mJJ/MlOq0m9odTKRg/W+2OaDfqRh9xkmbPbaBIMrLJfInB/R0AoN2o4+v7B3GSAkAOzAXAwW0XH59QSpEOIzLCEHanuq31Zot+r1sIYcdwNDZgahIblww2GTxrXDb02B9OAIB+r4tOqymCYXtspRQkxMZ6s82lK8SG14jPBnccYmM6W6Df62ZWSkGkNjgt59p4eXyAt1h9NvSoasMJcs5MqWqj0IjEBncuNVdmIwcSYmN/OIlSUjZTnCD2Ui7pXLqK+tKSgTCEtOikBcrAvrQAQE2HkIwwTlJj2l7CBgBERKSUUrTaHQ3lcZI6t3G2IZ0pEhvZ7ssww9E4Wym5YUi6qoQioqDZwmB6emxDtg3ej97fXv0nNN64OHQrutbpbGG8o//2/DRwpsyXFsOI9DDjCv0j+oCkNowakR6iXSks+rjURtDhWS9q+1DtMiL5eC41lar9D8w2pQMVrR1nGym7p9hA/25EcrESXchu/wbcQDzxOwDLF0pIXBCe1wAAAABJRU5ErkJggg==';
|
|
35289
35244
|
|
|
35290
35245
|
var QuestInfo = function QuestInfo(_ref) {
|
|
35291
35246
|
var quests = _ref.quests,
|
|
@@ -35326,8 +35281,8 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
35326
35281
|
onPointerDown: onRightClick
|
|
35327
35282
|
}), React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
35328
35283
|
className: "drag-handler"
|
|
35329
|
-
}, React.createElement(Title$
|
|
35330
|
-
src: quests[currentIndex].thumbnail || img$
|
|
35284
|
+
}, React.createElement(Title$3, null, React.createElement(Thumbnail, {
|
|
35285
|
+
src: quests[currentIndex].thumbnail || img$9
|
|
35331
35286
|
}), quests[currentIndex].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
35332
35287
|
className: "golden"
|
|
35333
35288
|
}))), React.createElement(Content, null, React.createElement("p", null, quests[currentIndex].description)), React.createElement(QuestColumn, {
|
|
@@ -35345,8 +35300,8 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
35345
35300
|
}, button.title);
|
|
35346
35301
|
})))) : React.createElement(QuestsContainer, null, React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
35347
35302
|
className: "drag-handler"
|
|
35348
|
-
}, React.createElement(Title$
|
|
35349
|
-
src: quests[0].thumbnail || img$
|
|
35303
|
+
}, React.createElement(Title$3, null, React.createElement(Thumbnail, {
|
|
35304
|
+
src: quests[0].thumbnail || img$9
|
|
35350
35305
|
}), quests[0].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
35351
35306
|
className: "golden"
|
|
35352
35307
|
}))), React.createElement(Content, null, React.createElement("p", null, quests[0].description)), React.createElement(QuestColumn, {
|
|
@@ -35392,7 +35347,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
35392
35347
|
displayName: "QuestInfo__TitleContainer",
|
|
35393
35348
|
componentId: "sc-15s2boc-6"
|
|
35394
35349
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
35395
|
-
var Title$
|
|
35350
|
+
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
35396
35351
|
displayName: "QuestInfo__Title",
|
|
35397
35352
|
componentId: "sc-15s2boc-7"
|
|
35398
35353
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
@@ -35414,7 +35369,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
35414
35369
|
style: {
|
|
35415
35370
|
width: '100%'
|
|
35416
35371
|
}
|
|
35417
|
-
}, React.createElement(Title$
|
|
35372
|
+
}, React.createElement(Title$4, null, "Quests"), React.createElement("hr", {
|
|
35418
35373
|
className: "golden"
|
|
35419
35374
|
}), React.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
|
|
35420
35375
|
return React.createElement("div", {
|
|
@@ -35435,7 +35390,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
|
|
|
35435
35390
|
displayName: "QuestList__QuestDraggableContainer",
|
|
35436
35391
|
componentId: "sc-1a2vx6q-0"
|
|
35437
35392
|
})([".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;}"]);
|
|
35438
|
-
var Title$
|
|
35393
|
+
var Title$4 = /*#__PURE__*/styled.h1.withConfig({
|
|
35439
35394
|
displayName: "QuestList__Title",
|
|
35440
35395
|
componentId: "sc-1a2vx6q-1"
|
|
35441
35396
|
})(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
|
|
@@ -35595,7 +35550,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
35595
35550
|
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
|
|
35596
35551
|
_ref$margin = _ref.margin,
|
|
35597
35552
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
35598
|
-
return React.createElement(Container$
|
|
35553
|
+
return React.createElement(Container$i, {
|
|
35599
35554
|
className: "simple-progress-bar"
|
|
35600
35555
|
}, React.createElement(ProgressBarContainer, {
|
|
35601
35556
|
margin: margin
|
|
@@ -35604,7 +35559,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
35604
35559
|
bgColor: bgColor
|
|
35605
35560
|
}))));
|
|
35606
35561
|
};
|
|
35607
|
-
var Container$
|
|
35562
|
+
var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
35608
35563
|
displayName: "SimpleProgressBar__Container",
|
|
35609
35564
|
componentId: "sc-mbeil3-0"
|
|
35610
35565
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -35722,6 +35677,7 @@ var skillProps = {
|
|
|
35722
35677
|
fishing: 'foods/fish.png',
|
|
35723
35678
|
mining: 'crafting-resources/iron-ingot.png',
|
|
35724
35679
|
lumberjacking: 'crafting-resources/greater-wooden-log.png',
|
|
35680
|
+
blacksmithing: 'hammers/hammer.png',
|
|
35725
35681
|
cooking: 'foods/chickens-meat.png',
|
|
35726
35682
|
alchemy: 'potions/greater-mana-potion.png'
|
|
35727
35683
|
}
|
|
@@ -35744,6 +35700,7 @@ var skillNameMap = {
|
|
|
35744
35700
|
fishing: 'Fishing',
|
|
35745
35701
|
mining: 'Mining',
|
|
35746
35702
|
lumberjacking: 'Lumberjacking',
|
|
35703
|
+
blacksmithing: 'Blacksmithing',
|
|
35747
35704
|
cooking: 'Cooking',
|
|
35748
35705
|
alchemy: 'Alchemy'
|
|
35749
35706
|
};
|
|
@@ -35831,20 +35788,20 @@ var Spell = function Spell(_ref) {
|
|
|
35831
35788
|
isSettingShortcut = _ref.isSettingShortcut,
|
|
35832
35789
|
minMagicLevelRequired = _ref.minMagicLevelRequired;
|
|
35833
35790
|
var disabled = isSettingShortcut ? charMagicLevel < minMagicLevelRequired : manaCost > charMana || charMagicLevel < minMagicLevelRequired;
|
|
35834
|
-
return React.createElement(Container$
|
|
35791
|
+
return React.createElement(Container$j, {
|
|
35835
35792
|
disabled: disabled,
|
|
35836
35793
|
onPointerDown: onPointerDown == null ? void 0 : onPointerDown.bind(null, spellKey),
|
|
35837
35794
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
35838
35795
|
className: "spell"
|
|
35839
35796
|
}, disabled && React.createElement(Overlay, null, charMagicLevel < minMagicLevelRequired ? 'Low magic level' : manaCost > charMana && 'No mana'), React.createElement(SpellImage, null, magicWords.split(' ').map(function (word) {
|
|
35840
35797
|
return word[0];
|
|
35841
|
-
})), React.createElement(Info, null, React.createElement(Title$
|
|
35798
|
+
})), React.createElement(Info, null, React.createElement(Title$5, null, React.createElement("span", null, name), React.createElement("span", {
|
|
35842
35799
|
className: "spell"
|
|
35843
|
-
}, "(", magicWords, ")")), React.createElement(Description
|
|
35800
|
+
}, "(", magicWords, ")")), React.createElement(Description, null, description)), React.createElement(Divider, null), React.createElement(Cost, null, React.createElement("span", null, "Mana cost:"), React.createElement("span", {
|
|
35844
35801
|
className: "mana"
|
|
35845
35802
|
}, manaCost)));
|
|
35846
35803
|
};
|
|
35847
|
-
var Container$
|
|
35804
|
+
var Container$j = /*#__PURE__*/styled.button.withConfig({
|
|
35848
35805
|
displayName: "Spell__Container",
|
|
35849
35806
|
componentId: "sc-j96fa2-0"
|
|
35850
35807
|
})(["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) {
|
|
@@ -35859,11 +35816,11 @@ var Info = /*#__PURE__*/styled.span.withConfig({
|
|
|
35859
35816
|
displayName: "Spell__Info",
|
|
35860
35817
|
componentId: "sc-j96fa2-2"
|
|
35861
35818
|
})(["width:0;flex:1;"]);
|
|
35862
|
-
var Title$
|
|
35819
|
+
var Title$5 = /*#__PURE__*/styled.p.withConfig({
|
|
35863
35820
|
displayName: "Spell__Title",
|
|
35864
35821
|
componentId: "sc-j96fa2-3"
|
|
35865
35822
|
})(["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);
|
|
35866
|
-
var Description
|
|
35823
|
+
var Description = /*#__PURE__*/styled.div.withConfig({
|
|
35867
35824
|
displayName: "Spell__Description",
|
|
35868
35825
|
componentId: "sc-j96fa2-4"
|
|
35869
35826
|
})(["font-size:", " !important;line-height:1.1 !important;"], uiFonts.size.small);
|
|
@@ -35929,7 +35886,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
35929
35886
|
width: "inherit",
|
|
35930
35887
|
height: "inherit",
|
|
35931
35888
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell"
|
|
35932
|
-
}, React.createElement(Container$
|
|
35889
|
+
}, React.createElement(Container$k, null, React.createElement(Title$6, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
|
|
35933
35890
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
35934
35891
|
settingShortcutIndex: settingShortcutIndex,
|
|
35935
35892
|
shortcuts: shortcuts,
|
|
@@ -35957,11 +35914,11 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
35957
35914
|
}, spell)));
|
|
35958
35915
|
}))));
|
|
35959
35916
|
};
|
|
35960
|
-
var Title$
|
|
35917
|
+
var Title$6 = /*#__PURE__*/styled.h1.withConfig({
|
|
35961
35918
|
displayName: "Spellbook__Title",
|
|
35962
35919
|
componentId: "sc-r02nfq-0"
|
|
35963
35920
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
35964
|
-
var Container$
|
|
35921
|
+
var Container$k = /*#__PURE__*/styled.div.withConfig({
|
|
35965
35922
|
displayName: "Spellbook__Container",
|
|
35966
35923
|
componentId: "sc-r02nfq-1"
|
|
35967
35924
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -35975,16 +35932,16 @@ var TextArea = function TextArea(_ref) {
|
|
|
35975
35932
|
return React.createElement("textarea", Object.assign({}, props));
|
|
35976
35933
|
};
|
|
35977
35934
|
|
|
35978
|
-
var img$
|
|
35935
|
+
var img$a = 'data:image/gif;base64,R0lGODlhTgBNAPMAAAAAALcIL7ObdNGqnf3vnP/wl93Goerfx/Xx3vr6+vn49QAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtJbWFnZU1hZ2ljaw1nYW1tYT0wLjQ1NDU1ACH5BAEUAAAAIf4gQ3JlYXRlZCB3aXRoIGV6Z2lmLmNvbSBHSUYgbWFr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ZF1N4rZzxzv8X15ZulV2b9/koZx/oDlJ4pAFABaRZ8u/12HhhgTrLEfKkIwWEEUD6aDhoB3OFjhHmBgGAeFQQQxhITE5GAiiSimqOKKLLbo4oswxijjjBdEAAA7';
|
|
35979
35936
|
|
|
35980
|
-
var img$
|
|
35937
|
+
var img$b = '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/XYe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yh7g4iJiYUlh4qPkH2MNAIDBn6XkZqBkx91dwahoqFucER5nmRBZ16hZ6+vpHadHI58Z4iusLtnoZu0GbaKurzFB76RwBefAQZCzs/G0rFuyhbMVgbT28dp1kiVj9rcB4CwmYrfEthN49tW1F7qUqqt72XdZfMO7EzuxnHyddnXoN+Sf7xA6UN1rV4VhLvuVGMIrgxEWBInYjAYTf9aRo3LHLab9tEbxXUi/Xm0Aw1kQ3sAWc46GYFjkIus7BSYuTHlwZVuChzY6bICO1NAcCLNZkDomQKyBtKkB7OYzqH4TvW0CDQN0aIVqyaM09JkMJ8/Y6YpK29qTbRDlJaUqsFmR6tzmxDcAjcuybxL9vJd+xew1h59/RaWeTOA4IKJ73YF0gvsWbJKi0WtkvMxZFCZe7HlDMfzZ9DGNltGnHHUKLJy3G6lvNRw2xaqctpe2Cjybjwn7P4+HNz3ndrEDUVGfsd0XeMlnSOGPkt6LeHNjWgBMIa63jXbt/jwLgeMbDHdIxc5H557khzwd7QPFqP+/Pv48+vfz7+///8FAAbIXwIAOw==';
|
|
35983
35940
|
|
|
35984
35941
|
var DayNightPeriod = function DayNightPeriod(_ref) {
|
|
35985
35942
|
var _periodOfDaySrcFiles;
|
|
35986
35943
|
var periodOfDay = _ref.periodOfDay;
|
|
35987
|
-
var periodOfDaySrcFiles = (_periodOfDaySrcFiles = {}, _periodOfDaySrcFiles[PeriodOfDay.Morning] = img$
|
|
35944
|
+
var periodOfDaySrcFiles = (_periodOfDaySrcFiles = {}, _periodOfDaySrcFiles[PeriodOfDay.Morning] = img$b, _periodOfDaySrcFiles[PeriodOfDay.Afternoon] = img$a, _periodOfDaySrcFiles[PeriodOfDay.Night] = img$c, _periodOfDaySrcFiles);
|
|
35988
35945
|
return React.createElement(GifContainer, null, React.createElement("img", {
|
|
35989
35946
|
src: periodOfDaySrcFiles[periodOfDay]
|
|
35990
35947
|
}));
|
|
@@ -35994,7 +35951,7 @@ var GifContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
35994
35951
|
componentId: "sc-10t97fw-0"
|
|
35995
35952
|
})(["width:100%;img{width:67%;}"]);
|
|
35996
35953
|
|
|
35997
|
-
var img$
|
|
35954
|
+
var img$d = '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';
|
|
35998
35955
|
|
|
35999
35956
|
var TimeWidget = function TimeWidget(_ref) {
|
|
36000
35957
|
var onClose = _ref.onClose,
|
|
@@ -36009,7 +35966,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
36009
35966
|
var WidgetContainer = /*#__PURE__*/styled.div.withConfig({
|
|
36010
35967
|
displayName: "TimeWidget__WidgetContainer",
|
|
36011
35968
|
componentId: "sc-1ja236h-0"
|
|
36012
|
-
})(["background-image:url(", ");background-size:10rem;background-repeat:no-repeat;width:10rem;position:absolute;height:100px;"], img$
|
|
35969
|
+
})(["background-image:url(", ");background-size:10rem;background-repeat:no-repeat;width:10rem;position:absolute;height:100px;"], img$d);
|
|
36013
35970
|
var Time = /*#__PURE__*/styled.div.withConfig({
|
|
36014
35971
|
displayName: "TimeWidget__Time",
|
|
36015
35972
|
componentId: "sc-1ja236h-1"
|
|
@@ -36029,8 +35986,7 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
36029
35986
|
atlasJSON = _ref.atlasJSON,
|
|
36030
35987
|
onQuantityChange = _ref.onQuantityChange,
|
|
36031
35988
|
traderItem = _ref.traderItem,
|
|
36032
|
-
selectedQty = _ref.selectedQty
|
|
36033
|
-
equipmentSet = _ref.equipmentSet;
|
|
35989
|
+
selectedQty = _ref.selectedQty;
|
|
36034
35990
|
var onLeftClick = function onLeftClick(qty) {
|
|
36035
35991
|
if (qty === void 0) {
|
|
36036
35992
|
qty = 1;
|
|
@@ -36038,27 +35994,22 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
36038
35994
|
onQuantityChange(traderItem, Math.max(0, selectedQty - qty));
|
|
36039
35995
|
};
|
|
36040
35996
|
var onRightClick = function onRightClick(qty) {
|
|
36041
|
-
var _traderItem$
|
|
35997
|
+
var _traderItem$qty;
|
|
36042
35998
|
if (qty === void 0) {
|
|
36043
35999
|
qty = 1;
|
|
36044
36000
|
}
|
|
36045
|
-
onQuantityChange(traderItem, Math.min((_traderItem$
|
|
36001
|
+
onQuantityChange(traderItem, Math.min((_traderItem$qty = traderItem.qty) != null ? _traderItem$qty : 999, selectedQty + qty));
|
|
36046
36002
|
};
|
|
36047
|
-
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer$1, null, React.createElement(
|
|
36048
|
-
atlasIMG: atlasIMG,
|
|
36049
|
-
atlasJSON: atlasJSON,
|
|
36050
|
-
equipmentSet: equipmentSet,
|
|
36051
|
-
item: traderItem
|
|
36052
|
-
}, React.createElement(SpriteFromAtlas, {
|
|
36003
|
+
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer$1, null, React.createElement(SpriteFromAtlas, {
|
|
36053
36004
|
atlasIMG: atlasIMG,
|
|
36054
36005
|
atlasJSON: atlasJSON,
|
|
36055
36006
|
spriteKey: getItemTextureKeyPath({
|
|
36056
36007
|
key: traderItem.key,
|
|
36057
|
-
stackQty: traderItem.
|
|
36008
|
+
stackQty: traderItem.qty || 1,
|
|
36058
36009
|
texturePath: traderItem.texturePath
|
|
36059
36010
|
}, atlasJSON),
|
|
36060
36011
|
imgScale: 2.5
|
|
36061
|
-
})))
|
|
36012
|
+
}))), React.createElement(ItemNameContainer, null, React.createElement(NameValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
|
|
36062
36013
|
maxLines: 1,
|
|
36063
36014
|
maxWidth: "250px"
|
|
36064
36015
|
}, capitalize(traderItem.name))), React.createElement("p", null, "$", traderItem.price))), React.createElement(QuantityContainer, null, React.createElement(SelectArrow, {
|
|
@@ -36131,8 +36082,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36131
36082
|
atlasJSON = _ref.atlasJSON,
|
|
36132
36083
|
atlasIMG = _ref.atlasIMG,
|
|
36133
36084
|
characterAvailableGold = _ref.characterAvailableGold,
|
|
36134
|
-
onConfirm = _ref.onConfirm
|
|
36135
|
-
equipmentSet = _ref.equipmentSet;
|
|
36085
|
+
onConfirm = _ref.onConfirm;
|
|
36136
36086
|
var _useState = useState(0),
|
|
36137
36087
|
sum = _useState[0],
|
|
36138
36088
|
setSum = _useState[1];
|
|
@@ -36190,7 +36140,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36190
36140
|
style: {
|
|
36191
36141
|
width: '100%'
|
|
36192
36142
|
}
|
|
36193
|
-
}, React.createElement(Title$
|
|
36143
|
+
}, React.createElement(Title$7, null, Capitalize(type), " Menu"), React.createElement("hr", {
|
|
36194
36144
|
className: "golden"
|
|
36195
36145
|
})), React.createElement(TradingComponentScrollWrapper, {
|
|
36196
36146
|
id: "TraderContainer"
|
|
@@ -36203,8 +36153,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36203
36153
|
atlasJSON: atlasJSON,
|
|
36204
36154
|
onQuantityChange: onQuantityChange,
|
|
36205
36155
|
traderItem: tradeItem,
|
|
36206
|
-
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
|
|
36207
|
-
equipmentSet: equipmentSet
|
|
36156
|
+
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
|
|
36208
36157
|
}));
|
|
36209
36158
|
})), 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, {
|
|
36210
36159
|
buttonType: ButtonTypes.RPGUIButton,
|
|
@@ -36219,7 +36168,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
36219
36168
|
}
|
|
36220
36169
|
}, "Cancel"))));
|
|
36221
36170
|
};
|
|
36222
|
-
var Title$
|
|
36171
|
+
var Title$7 = /*#__PURE__*/styled.h1.withConfig({
|
|
36223
36172
|
displayName: "TradingMenu__Title",
|
|
36224
36173
|
componentId: "sc-1wjsz1l-0"
|
|
36225
36174
|
})(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
|
|
@@ -36253,230 +36202,16 @@ var Truncate = function Truncate(_ref) {
|
|
|
36253
36202
|
var _ref$maxLines = _ref.maxLines,
|
|
36254
36203
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
36255
36204
|
children = _ref.children;
|
|
36256
|
-
return React.createElement(Container$
|
|
36205
|
+
return React.createElement(Container$l, {
|
|
36257
36206
|
maxLines: maxLines
|
|
36258
36207
|
}, children);
|
|
36259
36208
|
};
|
|
36260
|
-
var Container$
|
|
36209
|
+
var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
36261
36210
|
displayName: "Truncate__Container",
|
|
36262
36211
|
componentId: "sc-6x00qb-0"
|
|
36263
36212
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|
|
36264
36213
|
return props.maxLines;
|
|
36265
36214
|
});
|
|
36266
36215
|
|
|
36267
|
-
|
|
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 };
|
|
36216
|
+
export { Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, CheckButton, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, 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, useEventListener };
|
|
36482
36217
|
//# sourceMappingURL=long-bow.esm.js.map
|