@rpg-engine/long-bow 0.3.28 → 0.3.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Chat/Chat.d.ts +9 -5
- package/dist/components/Equipment/EquipmentSet.d.ts +1 -0
- package/dist/components/Item/Inventory/ItemContainer.d.ts +1 -0
- package/dist/components/Item/Inventory/ItemSlot.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +41 -26
- 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 +41 -26
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/mocks/skills.mocks.d.ts +2 -121
- package/package.json +2 -2
- package/src/components/Chat/Chat.tsx +36 -23
- package/src/components/Chatdeprecated/ChatDeprecated.tsx +1 -1
- package/src/components/CraftBook/CraftBook.tsx +14 -2
- package/src/components/Equipment/EquipmentSet.tsx +3 -0
- package/src/components/Item/Inventory/ItemContainer.tsx +3 -0
- package/src/components/Item/Inventory/ItemSlot.tsx +3 -0
- package/src/mocks/equipmentSet.mocks.ts +20 -9
- package/src/mocks/itemContainer.mocks.ts +16 -2
- package/src/mocks/skills.mocks.ts +8 -2
- package/src/stories/Chat.stories.tsx +3 -1
|
@@ -1,121 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const skillMock:
|
|
3
|
-
_id: string;
|
|
4
|
-
stamina: {
|
|
5
|
-
type: SkillType;
|
|
6
|
-
level: number;
|
|
7
|
-
skillPoints: number;
|
|
8
|
-
skillPointsToNextLevel: number;
|
|
9
|
-
};
|
|
10
|
-
magic: {
|
|
11
|
-
type: SkillType;
|
|
12
|
-
level: number;
|
|
13
|
-
skillPoints: number;
|
|
14
|
-
skillPointsToNextLevel: number;
|
|
15
|
-
};
|
|
16
|
-
magicResistance: {
|
|
17
|
-
type: SkillType;
|
|
18
|
-
level: number;
|
|
19
|
-
skillPoints: number;
|
|
20
|
-
skillPointsToNextLevel: number;
|
|
21
|
-
};
|
|
22
|
-
strength: {
|
|
23
|
-
type: SkillType;
|
|
24
|
-
level: number;
|
|
25
|
-
skillPoints: number;
|
|
26
|
-
skillPointsToNextLevel: number;
|
|
27
|
-
};
|
|
28
|
-
resistance: {
|
|
29
|
-
type: SkillType;
|
|
30
|
-
level: number;
|
|
31
|
-
skillPoints: number;
|
|
32
|
-
skillPointsToNextLevel: number;
|
|
33
|
-
};
|
|
34
|
-
dexterity: {
|
|
35
|
-
type: SkillType;
|
|
36
|
-
level: number;
|
|
37
|
-
skillPoints: number;
|
|
38
|
-
skillPointsToNextLevel: number;
|
|
39
|
-
};
|
|
40
|
-
first: {
|
|
41
|
-
type: SkillType;
|
|
42
|
-
level: number;
|
|
43
|
-
skillPoints: number;
|
|
44
|
-
skillPointsToNextLevel: number;
|
|
45
|
-
};
|
|
46
|
-
club: {
|
|
47
|
-
type: SkillType;
|
|
48
|
-
level: number;
|
|
49
|
-
skillPoints: number;
|
|
50
|
-
skillPointsToNextLevel: number;
|
|
51
|
-
};
|
|
52
|
-
sword: {
|
|
53
|
-
type: SkillType;
|
|
54
|
-
level: number;
|
|
55
|
-
skillPoints: number;
|
|
56
|
-
skillPointsToNextLevel: number;
|
|
57
|
-
};
|
|
58
|
-
dagger: {
|
|
59
|
-
type: SkillType;
|
|
60
|
-
level: number;
|
|
61
|
-
skillPoints: number;
|
|
62
|
-
skillPointsToNextLevel: number;
|
|
63
|
-
};
|
|
64
|
-
axe: {
|
|
65
|
-
type: SkillType;
|
|
66
|
-
level: number;
|
|
67
|
-
skillPoints: number;
|
|
68
|
-
skillPointsToNextLevel: number;
|
|
69
|
-
};
|
|
70
|
-
distance: {
|
|
71
|
-
type: SkillType;
|
|
72
|
-
level: number;
|
|
73
|
-
skillPoints: number;
|
|
74
|
-
skillPointsToNextLevel: number;
|
|
75
|
-
};
|
|
76
|
-
shielding: {
|
|
77
|
-
type: SkillType;
|
|
78
|
-
level: number;
|
|
79
|
-
skillPoints: number;
|
|
80
|
-
skillPointsToNextLevel: number;
|
|
81
|
-
};
|
|
82
|
-
fishing: {
|
|
83
|
-
type: SkillType;
|
|
84
|
-
level: number;
|
|
85
|
-
skillPoints: number;
|
|
86
|
-
skillPointsToNextLevel: number;
|
|
87
|
-
};
|
|
88
|
-
mining: {
|
|
89
|
-
type: SkillType;
|
|
90
|
-
level: number;
|
|
91
|
-
skillPoints: number;
|
|
92
|
-
skillPointsToNextLevel: number;
|
|
93
|
-
};
|
|
94
|
-
lumberjacking: {
|
|
95
|
-
type: SkillType;
|
|
96
|
-
level: number;
|
|
97
|
-
skillPoints: number;
|
|
98
|
-
skillPointsToNextLevel: number;
|
|
99
|
-
};
|
|
100
|
-
cooking: {
|
|
101
|
-
type: SkillType;
|
|
102
|
-
level: number;
|
|
103
|
-
skillPoints: number;
|
|
104
|
-
skillPointsToNextLevel: number;
|
|
105
|
-
};
|
|
106
|
-
alchemy: {
|
|
107
|
-
type: SkillType;
|
|
108
|
-
level: number;
|
|
109
|
-
skillPoints: number;
|
|
110
|
-
skillPointsToNextLevel: number;
|
|
111
|
-
};
|
|
112
|
-
level: number;
|
|
113
|
-
xpGainRate: number;
|
|
114
|
-
experience: number;
|
|
115
|
-
xpToNextLevel: number;
|
|
116
|
-
ownerType: string;
|
|
117
|
-
owner: string;
|
|
118
|
-
createdAt: string;
|
|
119
|
-
updatedAt: string;
|
|
120
|
-
__v: number;
|
|
121
|
-
};
|
|
1
|
+
import { ISkill } from '@rpg-engine/shared';
|
|
2
|
+
export declare const skillMock: ISkill;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpg-engine/long-bow",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.32",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@rollup/plugin-image": "^2.1.1",
|
|
86
|
-
"@rpg-engine/shared": "^0.6.
|
|
86
|
+
"@rpg-engine/shared": "^0.6.66",
|
|
87
87
|
"dayjs": "^1.11.2",
|
|
88
88
|
"font-awesome": "^4.7.0",
|
|
89
89
|
"fs-extra": "^10.1.0",
|
|
@@ -2,7 +2,7 @@ import { IChatMessage } from '@rpg-engine/shared';
|
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
4
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
5
|
-
import {
|
|
5
|
+
import { RxPaperPlane } from 'react-icons/rx';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
import { Column } from '../shared/Column';
|
|
8
8
|
|
|
@@ -11,6 +11,14 @@ interface IEmitter {
|
|
|
11
11
|
name: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
interface IStyles {
|
|
15
|
+
textColor?: string;
|
|
16
|
+
buttonColor?: string;
|
|
17
|
+
buttonBackgroundColor?: string;
|
|
18
|
+
width?: string;
|
|
19
|
+
height?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
14
22
|
export interface IChatProps {
|
|
15
23
|
chatMessages: IChatMessage[];
|
|
16
24
|
onSendChatMessage: (message: string) => void;
|
|
@@ -18,24 +26,22 @@ export interface IChatProps {
|
|
|
18
26
|
onFocus?: () => void;
|
|
19
27
|
onBlur?: () => void;
|
|
20
28
|
opacity?: number;
|
|
21
|
-
width?: string;
|
|
22
|
-
height?: string;
|
|
23
29
|
sendMessage: boolean;
|
|
24
|
-
|
|
25
|
-
buttonColor?: string;
|
|
26
|
-
buttonBackgroundColor?: string;
|
|
30
|
+
styles?: IStyles;
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
export const Chat: React.FC<IChatProps> = ({
|
|
30
34
|
chatMessages,
|
|
31
35
|
onSendChatMessage,
|
|
32
|
-
width = '80%',
|
|
33
|
-
height = '250px',
|
|
34
36
|
onFocus,
|
|
35
37
|
onBlur,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
styles = {
|
|
39
|
+
textColor: '#c65102',
|
|
40
|
+
buttonColor: '#005b96',
|
|
41
|
+
buttonBackgroundColor: 'rgba(0,0,0,.2)',
|
|
42
|
+
width: '80%',
|
|
43
|
+
height: 'auto',
|
|
44
|
+
},
|
|
39
45
|
}) => {
|
|
40
46
|
const [message, setMessage] = useState('');
|
|
41
47
|
|
|
@@ -76,17 +82,22 @@ export const Chat: React.FC<IChatProps> = ({
|
|
|
76
82
|
const onRenderChatMessages = (chatMessages: IChatMessage[]) => {
|
|
77
83
|
return chatMessages?.length ? (
|
|
78
84
|
chatMessages?.map(({ _id, createdAt, emitter, message }, index) => (
|
|
79
|
-
<Message color={
|
|
80
|
-
{onRenderMessageLines(emitter, createdAt, message)}
|
|
85
|
+
<Message color={styles?.textColor || '#c65102'} key={`${_id}_${index}`}>
|
|
86
|
+
{onRenderMessageLines(emitter, createdAt as string, message)}
|
|
81
87
|
</Message>
|
|
82
88
|
))
|
|
83
89
|
) : (
|
|
84
|
-
<Message color={
|
|
90
|
+
<Message color={styles?.textColor || '#c65102'}>
|
|
91
|
+
No messages available.
|
|
92
|
+
</Message>
|
|
85
93
|
);
|
|
86
94
|
};
|
|
87
95
|
|
|
88
96
|
return (
|
|
89
|
-
<ChatContainer
|
|
97
|
+
<ChatContainer
|
|
98
|
+
width={styles?.width || '80%'}
|
|
99
|
+
height={styles?.height || 'auto'}
|
|
100
|
+
>
|
|
90
101
|
<ErrorBoundary fallback={<p>Oops! Your chat has crashed.</p>}>
|
|
91
102
|
<MessagesContainer className="chat-body">
|
|
92
103
|
{onRenderChatMessages(chatMessages)}
|
|
@@ -107,12 +118,14 @@ export const Chat: React.FC<IChatProps> = ({
|
|
|
107
118
|
</Column>
|
|
108
119
|
<Column justifyContent="flex-end">
|
|
109
120
|
<Button
|
|
110
|
-
buttonColor={buttonColor}
|
|
111
|
-
buttonBackgroundColor={
|
|
121
|
+
buttonColor={styles?.buttonColor || '#005b96'}
|
|
122
|
+
buttonBackgroundColor={
|
|
123
|
+
styles?.buttonBackgroundColor || 'rgba(0,0,0,.5)'
|
|
124
|
+
}
|
|
112
125
|
id="chat-send-button"
|
|
113
126
|
style={{ borderRadius: '20%' }}
|
|
114
127
|
>
|
|
115
|
-
<
|
|
128
|
+
<RxPaperPlane size={15} />
|
|
116
129
|
</Button>
|
|
117
130
|
</Column>
|
|
118
131
|
</Form>
|
|
@@ -139,12 +152,8 @@ const ChatContainer = styled.div<IContainerProps>`
|
|
|
139
152
|
height: ${props => props.height};
|
|
140
153
|
width: ${({ width }) => width};
|
|
141
154
|
padding: 10px;
|
|
142
|
-
margin-top: 100px;
|
|
143
155
|
background-color: rgba(0, 0, 0, 0.2);
|
|
144
|
-
|
|
145
|
-
max-height: 170px;
|
|
146
|
-
overflow-y: auto;
|
|
147
|
-
}
|
|
156
|
+
height: auto;
|
|
148
157
|
`;
|
|
149
158
|
|
|
150
159
|
const TextField = styled.input`
|
|
@@ -157,6 +166,10 @@ const TextField = styled.input`
|
|
|
157
166
|
const MessagesContainer = styled.div`
|
|
158
167
|
height: 70%;
|
|
159
168
|
margin-bottom: 10px;
|
|
169
|
+
.chat-body {
|
|
170
|
+
max-height: auto;
|
|
171
|
+
overflow-y: auto;
|
|
172
|
+
}
|
|
160
173
|
`;
|
|
161
174
|
|
|
162
175
|
const Message = styled.div<IMessageProps>`
|
|
@@ -75,7 +75,7 @@ export const ChatDeprecated: React.FC<IChatDeprecatedProps> = ({
|
|
|
75
75
|
return chatMessages?.length ? (
|
|
76
76
|
chatMessages?.map(({ _id, createdAt, emitter, message }, index) => (
|
|
77
77
|
<MessageText key={`${_id}_${index}`}>
|
|
78
|
-
{onRenderMessageLines(emitter, createdAt, message)}
|
|
78
|
+
{onRenderMessageLines(emitter, createdAt as string, message)}
|
|
79
79
|
</MessageText>
|
|
80
80
|
))
|
|
81
81
|
) : (
|
|
@@ -121,7 +121,13 @@ export const CraftBook: React.FC<IItemCraftSelectorProps> = ({
|
|
|
121
121
|
onChange={() => handleClick(option.key)}
|
|
122
122
|
/>
|
|
123
123
|
<label
|
|
124
|
-
onClick={() =>
|
|
124
|
+
onClick={() => {
|
|
125
|
+
handleClick(option.key);
|
|
126
|
+
}}
|
|
127
|
+
onTouchStart={() => {
|
|
128
|
+
handleClick(option.key);
|
|
129
|
+
setIsShown({ show: true, index: index });
|
|
130
|
+
}}
|
|
125
131
|
style={{ display: 'flex', alignItems: 'center' }}
|
|
126
132
|
onMouseEnter={() => setIsShown({ show: true, index: index })}
|
|
127
133
|
onMouseLeave={() => setIsShown({ show: false, index: index })}
|
|
@@ -149,12 +155,17 @@ export const CraftBook: React.FC<IItemCraftSelectorProps> = ({
|
|
|
149
155
|
))}
|
|
150
156
|
</RadioInputScroller>
|
|
151
157
|
<ButtonWrapper>
|
|
152
|
-
<Button
|
|
158
|
+
<Button
|
|
159
|
+
buttonType={ButtonTypes.RPGUIButton}
|
|
160
|
+
onClick={onClose}
|
|
161
|
+
onTouchStart={onClose}
|
|
162
|
+
>
|
|
153
163
|
Cancel
|
|
154
164
|
</Button>
|
|
155
165
|
<Button
|
|
156
166
|
buttonType={ButtonTypes.RPGUIButton}
|
|
157
167
|
onClick={() => onCraftItem(craftItem)}
|
|
168
|
+
onTouchStart={() => onCraftItem(craftItem)}
|
|
158
169
|
>
|
|
159
170
|
Craft
|
|
160
171
|
</Button>
|
|
@@ -199,6 +210,7 @@ const RadioInputScroller = styled.div`
|
|
|
199
210
|
align-items: flex-start;
|
|
200
211
|
overflow-y: scroll;
|
|
201
212
|
height: 360px;
|
|
213
|
+
-webkit-overflow-scrolling: touch;
|
|
202
214
|
`;
|
|
203
215
|
|
|
204
216
|
const SpriteAtlasWrapper = styled.div`
|
|
@@ -33,6 +33,7 @@ export interface IEquipmentSetProps {
|
|
|
33
33
|
itemContainerType: ItemContainerType | null
|
|
34
34
|
) => void;
|
|
35
35
|
onItemOutsideDrop?: (item: IItem, position: IPosition) => void;
|
|
36
|
+
dragScale?: number;
|
|
36
37
|
checkIfItemCanBeMoved: () => boolean;
|
|
37
38
|
checkIfItemShouldDragEnd?: () => boolean;
|
|
38
39
|
onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;
|
|
@@ -57,6 +58,7 @@ export const EquipmentSet: React.FC<IEquipmentSetProps> = ({
|
|
|
57
58
|
onItemOutsideDrop,
|
|
58
59
|
checkIfItemCanBeMoved,
|
|
59
60
|
checkIfItemShouldDragEnd,
|
|
61
|
+
dragScale,
|
|
60
62
|
}) => {
|
|
61
63
|
const {
|
|
62
64
|
neck,
|
|
@@ -134,6 +136,7 @@ export const EquipmentSet: React.FC<IEquipmentSetProps> = ({
|
|
|
134
136
|
onDragEnd={quantity => {
|
|
135
137
|
if (onItemDragEnd) onItemDragEnd(quantity);
|
|
136
138
|
}}
|
|
139
|
+
dragScale={dragScale}
|
|
137
140
|
checkIfItemCanBeMoved={checkIfItemCanBeMoved}
|
|
138
141
|
checkIfItemShouldDragEnd={checkIfItemShouldDragEnd}
|
|
139
142
|
onPlaceDrop={(item, slotIndex, itemContainerType) => {
|
|
@@ -27,6 +27,7 @@ export interface IItemContainerProps {
|
|
|
27
27
|
slotIndex: number,
|
|
28
28
|
itemContainerType: ItemContainerType | null
|
|
29
29
|
) => void;
|
|
30
|
+
dragScale?: number;
|
|
30
31
|
checkIfItemCanBeMoved: () => boolean;
|
|
31
32
|
checkIfItemShouldDragEnd?: () => boolean;
|
|
32
33
|
onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;
|
|
@@ -55,6 +56,7 @@ export const ItemContainer: React.FC<IItemContainerProps> = ({
|
|
|
55
56
|
checkIfItemCanBeMoved,
|
|
56
57
|
initialPosition,
|
|
57
58
|
checkIfItemShouldDragEnd,
|
|
59
|
+
dragScale,
|
|
58
60
|
}) => {
|
|
59
61
|
const [quantitySelect, setQuantitySelect] = useState({
|
|
60
62
|
isOpen: false,
|
|
@@ -89,6 +91,7 @@ export const ItemContainer: React.FC<IItemContainerProps> = ({
|
|
|
89
91
|
onDragEnd={quantity => {
|
|
90
92
|
if (onItemDragEnd) onItemDragEnd(quantity);
|
|
91
93
|
}}
|
|
94
|
+
dragScale={dragScale}
|
|
92
95
|
checkIfItemCanBeMoved={checkIfItemCanBeMoved}
|
|
93
96
|
checkIfItemShouldDragEnd={checkIfItemShouldDragEnd}
|
|
94
97
|
openQuantitySelector={(maxQuantity, callback) => {
|
|
@@ -61,6 +61,7 @@ interface IProps {
|
|
|
61
61
|
) => void;
|
|
62
62
|
onDragEnd: (quantity?: number) => void;
|
|
63
63
|
onOutsideDrop?: (item: IItem, position: IPosition) => void;
|
|
64
|
+
dragScale?: number;
|
|
64
65
|
checkIfItemCanBeMoved: () => boolean;
|
|
65
66
|
checkIfItemShouldDragEnd?: () => boolean;
|
|
66
67
|
openQuantitySelector?: (maxQuantity: number, callback: () => void) => void;
|
|
@@ -94,6 +95,7 @@ export const ItemSlot: React.FC<IProps> = observer(
|
|
|
94
95
|
checkIfItemCanBeMoved,
|
|
95
96
|
openQuantitySelector,
|
|
96
97
|
checkIfItemShouldDragEnd,
|
|
98
|
+
dragScale,
|
|
97
99
|
}) => {
|
|
98
100
|
const [isTooltipVisible, setTooltipVisible] = useState(false);
|
|
99
101
|
|
|
@@ -276,6 +278,7 @@ export const ItemSlot: React.FC<IProps> = observer(
|
|
|
276
278
|
>
|
|
277
279
|
<Draggable
|
|
278
280
|
defaultClassName={item ? 'draggable' : 'empty-slot'}
|
|
281
|
+
scale={dragScale}
|
|
279
282
|
onStop={(e, data) => {
|
|
280
283
|
if (wasDragged && item) {
|
|
281
284
|
//@ts-ignore
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IEquipmentSet,
|
|
3
3
|
IItem,
|
|
4
|
+
ItemRarities,
|
|
4
5
|
// IItem,
|
|
5
6
|
ItemSlotType,
|
|
6
7
|
ItemSubType,
|
|
@@ -55,7 +56,8 @@ export const items: IEquipmentSetItems = {
|
|
|
55
56
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
56
57
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
57
58
|
isTwoHanded: false,
|
|
58
|
-
hasUseWith: false
|
|
59
|
+
hasUseWith: false,
|
|
60
|
+
rarity: ItemRarities.Common
|
|
59
61
|
},
|
|
60
62
|
head: {
|
|
61
63
|
_id: '1',
|
|
@@ -87,7 +89,8 @@ export const items: IEquipmentSetItems = {
|
|
|
87
89
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
88
90
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
89
91
|
isTwoHanded: false,
|
|
90
|
-
hasUseWith: false
|
|
92
|
+
hasUseWith: false,
|
|
93
|
+
rarity: ItemRarities.Common
|
|
91
94
|
},
|
|
92
95
|
armor: {
|
|
93
96
|
_id: '2',
|
|
@@ -120,7 +123,8 @@ export const items: IEquipmentSetItems = {
|
|
|
120
123
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
121
124
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
122
125
|
isTwoHanded: false,
|
|
123
|
-
hasUseWith: false
|
|
126
|
+
hasUseWith: false,
|
|
127
|
+
rarity: ItemRarities.Common
|
|
124
128
|
},
|
|
125
129
|
legs: {
|
|
126
130
|
_id: '3',
|
|
@@ -153,7 +157,8 @@ export const items: IEquipmentSetItems = {
|
|
|
153
157
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
154
158
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
155
159
|
isTwoHanded: false,
|
|
156
|
-
hasUseWith: false
|
|
160
|
+
hasUseWith: false,
|
|
161
|
+
rarity: ItemRarities.Common
|
|
157
162
|
},
|
|
158
163
|
boot: {
|
|
159
164
|
_id: '4',
|
|
@@ -185,7 +190,8 @@ export const items: IEquipmentSetItems = {
|
|
|
185
190
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
186
191
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
187
192
|
isTwoHanded: false,
|
|
188
|
-
hasUseWith: false
|
|
193
|
+
hasUseWith: false,
|
|
194
|
+
rarity: ItemRarities.Common
|
|
189
195
|
},
|
|
190
196
|
neck: {
|
|
191
197
|
_id: '5',
|
|
@@ -218,7 +224,8 @@ export const items: IEquipmentSetItems = {
|
|
|
218
224
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
219
225
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
220
226
|
isTwoHanded: false,
|
|
221
|
-
hasUseWith: false
|
|
227
|
+
hasUseWith: false,
|
|
228
|
+
rarity: ItemRarities.Common
|
|
222
229
|
},
|
|
223
230
|
ring: {
|
|
224
231
|
_id: '6',
|
|
@@ -251,7 +258,8 @@ export const items: IEquipmentSetItems = {
|
|
|
251
258
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
252
259
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
253
260
|
isTwoHanded: false,
|
|
254
|
-
hasUseWith: false
|
|
261
|
+
hasUseWith: false,
|
|
262
|
+
rarity: ItemRarities.Common
|
|
255
263
|
},
|
|
256
264
|
accessory: {
|
|
257
265
|
_id: '392acek4j7c8e80d2fs60404',
|
|
@@ -286,6 +294,7 @@ export const items: IEquipmentSetItems = {
|
|
|
286
294
|
fullDescription: 'You see a stone. It is used with slingshot',
|
|
287
295
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
288
296
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
297
|
+
rarity: ItemRarities.Common
|
|
289
298
|
},
|
|
290
299
|
inventory: {
|
|
291
300
|
_id: '8',
|
|
@@ -329,7 +338,8 @@ export const items: IEquipmentSetItems = {
|
|
|
329
338
|
isEmpty: true,
|
|
330
339
|
},
|
|
331
340
|
isTwoHanded: false,
|
|
332
|
-
hasUseWith: false
|
|
341
|
+
hasUseWith: false,
|
|
342
|
+
rarity: ItemRarities.Common
|
|
333
343
|
},
|
|
334
344
|
rightHand: {
|
|
335
345
|
_id: '629acef1c7c8e8002ff60736',
|
|
@@ -363,7 +373,8 @@ export const items: IEquipmentSetItems = {
|
|
|
363
373
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
364
374
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
365
375
|
isTwoHanded: false,
|
|
366
|
-
hasUseWith: false
|
|
376
|
+
hasUseWith: false,
|
|
377
|
+
rarity: ItemRarities.Common
|
|
367
378
|
},
|
|
368
379
|
};
|
|
369
380
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IItem,
|
|
3
|
-
IItemContainer,
|
|
4
|
-
ItemSlotType,
|
|
3
|
+
IItemContainer, ItemRarities, ItemSlotType,
|
|
5
4
|
ItemSubType,
|
|
6
5
|
ItemType
|
|
7
6
|
} from '@rpg-engine/shared';
|
|
@@ -40,6 +39,7 @@ export const items: IItem[] = [
|
|
|
40
39
|
isStackable: false,
|
|
41
40
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
42
41
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
42
|
+
rarity: ItemRarities.Common
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
_id: '629acef1c7c8e8002ff73564',
|
|
@@ -72,6 +72,7 @@ export const items: IItem[] = [
|
|
|
72
72
|
isStackable: false,
|
|
73
73
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
74
74
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
75
|
+
rarity: ItemRarities.Common
|
|
75
76
|
},
|
|
76
77
|
{
|
|
77
78
|
_id: '629acef1c7c8e8002ff60723',
|
|
@@ -105,6 +106,7 @@ export const items: IItem[] = [
|
|
|
105
106
|
fullDescription: 'Recover your life',
|
|
106
107
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
107
108
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
109
|
+
rarity: ItemRarities.Common
|
|
108
110
|
},
|
|
109
111
|
{
|
|
110
112
|
_id: '629acek4j7c8e8002ff60034',
|
|
@@ -138,6 +140,7 @@ export const items: IItem[] = [
|
|
|
138
140
|
fullDescription: 'Recover your mana',
|
|
139
141
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
140
142
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
143
|
+
rarity: ItemRarities.Common
|
|
141
144
|
},
|
|
142
145
|
{
|
|
143
146
|
_id: '629acek4j7c8e8002fg60034',
|
|
@@ -171,6 +174,7 @@ export const items: IItem[] = [
|
|
|
171
174
|
fullDescription: 'Key to open things',
|
|
172
175
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
173
176
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
177
|
+
rarity: ItemRarities.Common
|
|
174
178
|
},
|
|
175
179
|
{
|
|
176
180
|
_id: '392acek4j7c8e8002ff60403',
|
|
@@ -204,6 +208,7 @@ export const items: IItem[] = [
|
|
|
204
208
|
fullDescription: 'Somes shard, some crafts.',
|
|
205
209
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
206
210
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
211
|
+
rarity: ItemRarities.Common
|
|
207
212
|
},
|
|
208
213
|
{
|
|
209
214
|
_id: '392acek4j7c8e8002ff60404',
|
|
@@ -240,6 +245,7 @@ export const items: IItem[] = [
|
|
|
240
245
|
'You see a bag. It has made using leather and it has 10 total slots.',
|
|
241
246
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
242
247
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
248
|
+
rarity: ItemRarities.Common
|
|
243
249
|
},
|
|
244
250
|
{
|
|
245
251
|
_id: '392acek4j7c8e80d2fs60404',
|
|
@@ -274,6 +280,7 @@ export const items: IItem[] = [
|
|
|
274
280
|
fullDescription: 'You see a stone. It is used with slingshot',
|
|
275
281
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
276
282
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
283
|
+
rarity: ItemRarities.Common
|
|
277
284
|
},
|
|
278
285
|
{
|
|
279
286
|
_id: '392acek4j7c8e80d2fs60404',
|
|
@@ -308,6 +315,7 @@ export const items: IItem[] = [
|
|
|
308
315
|
fullDescription: 'You see a stone. It is used with slingshot',
|
|
309
316
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
310
317
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
318
|
+
rarity: ItemRarities.Common
|
|
311
319
|
},
|
|
312
320
|
{
|
|
313
321
|
_id: '392acek4j7c8e80d2fs60404',
|
|
@@ -342,6 +350,7 @@ export const items: IItem[] = [
|
|
|
342
350
|
fullDescription: 'You see a stone. It is used with slingshot',
|
|
343
351
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
344
352
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
353
|
+
rarity: ItemRarities.Common
|
|
345
354
|
},
|
|
346
355
|
{
|
|
347
356
|
_id: '392acek4j7c8e80d2fs60404',
|
|
@@ -376,6 +385,7 @@ export const items: IItem[] = [
|
|
|
376
385
|
fullDescription: 'You see a stone. It is used with slingshot',
|
|
377
386
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
378
387
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
388
|
+
rarity: ItemRarities.Common
|
|
379
389
|
},
|
|
380
390
|
{
|
|
381
391
|
_id: '392acek4j7c8e80d2fs60404',
|
|
@@ -410,6 +420,7 @@ export const items: IItem[] = [
|
|
|
410
420
|
fullDescription: 'You see a stone. It is used with slingshot',
|
|
411
421
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
412
422
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
423
|
+
rarity: ItemRarities.Common
|
|
413
424
|
},
|
|
414
425
|
{
|
|
415
426
|
_id: '392acek4j7c8e80d2fs60404',
|
|
@@ -444,6 +455,7 @@ export const items: IItem[] = [
|
|
|
444
455
|
fullDescription: 'You see a stone. It is used with slingshot',
|
|
445
456
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
446
457
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
458
|
+
rarity: ItemRarities.Common
|
|
447
459
|
},
|
|
448
460
|
{
|
|
449
461
|
_id: '392acek4j7c8e80d2fs60404',
|
|
@@ -478,6 +490,7 @@ export const items: IItem[] = [
|
|
|
478
490
|
fullDescription: 'You see a stone. It is used with slingshot',
|
|
479
491
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
480
492
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
493
|
+
rarity: ItemRarities.Common
|
|
481
494
|
},
|
|
482
495
|
{
|
|
483
496
|
_id: '392acek4j7casd0d2fs60404',
|
|
@@ -512,6 +525,7 @@ export const items: IItem[] = [
|
|
|
512
525
|
fullDescription: 'You see a stone. It is used with slingshot',
|
|
513
526
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
514
527
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
528
|
+
rarity: ItemRarities.Common
|
|
515
529
|
}
|
|
516
530
|
];
|
|
517
531
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SkillType } from '@rpg-engine/shared';
|
|
1
|
+
import { ISkill, SkillType } from '@rpg-engine/shared';
|
|
2
2
|
|
|
3
3
|
export const skillMock = {
|
|
4
4
|
_id: '62aebda8785a9f0089a4f757',
|
|
@@ -110,6 +110,12 @@ export const skillMock = {
|
|
|
110
110
|
skillPoints: 2,
|
|
111
111
|
skillPointsToNextLevel: 80,
|
|
112
112
|
},
|
|
113
|
+
blacksmithing: {
|
|
114
|
+
type: SkillType.Crafting,
|
|
115
|
+
level: 1,
|
|
116
|
+
skillPoints: 2,
|
|
117
|
+
skillPointsToNextLevel: 80,
|
|
118
|
+
},
|
|
113
119
|
level: 2,
|
|
114
120
|
xpGainRate: 100,
|
|
115
121
|
experience: 31,
|
|
@@ -119,4 +125,4 @@ export const skillMock = {
|
|
|
119
125
|
createdAt: '2022-06-19T06:09:44.661Z',
|
|
120
126
|
updatedAt: '2022-06-19T06:09:44.661Z',
|
|
121
127
|
__v: 0,
|
|
122
|
-
};
|
|
128
|
+
} as ISkill;
|
|
@@ -174,7 +174,9 @@ const Template: Story<IChatMessage> = args => (
|
|
|
174
174
|
onSendChatMessage={msg => console.log(msg)}
|
|
175
175
|
chatMessages={chatMessagesMock}
|
|
176
176
|
opacity={0.5}
|
|
177
|
-
|
|
177
|
+
styles={{
|
|
178
|
+
height: '200px',
|
|
179
|
+
}}
|
|
178
180
|
onCloseButton={() => console.log('closing chat...')}
|
|
179
181
|
sendMessage={true}
|
|
180
182
|
{...args}
|