@rpg-engine/long-bow 0.2.2 → 0.2.5
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/Character/CharacterSelection.d.ts +12 -0
- package/dist/components/PropertySelect/PropertySelect.d.ts +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +20556 -205
- 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 +20556 -207
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/CharacterSelection.stories.d.ts +4 -0
- package/package.json +2 -2
- package/src/components/Character/CharacterSelection.tsx +94 -0
- package/src/components/Item/Inventory/itemContainerHelper.ts +1 -1
- package/src/components/PropertySelect/PropertySelect.tsx +9 -2
- package/src/index.tsx +2 -0
- package/src/mocks/atlas/entities/entities.json +20215 -0
- package/src/mocks/atlas/entities/entities.png +0 -0
- package/src/mocks/itemContainer.mocks.ts +6 -4
- package/src/stories/CharacterSelection.stories.tsx +43 -0
- package/src/stories/PropertySelect.stories.tsx +0 -1
|
Binary file
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
IItemContainer,
|
|
4
4
|
ItemSlotType,
|
|
5
5
|
ItemSubType,
|
|
6
|
-
ItemType
|
|
6
|
+
ItemType,
|
|
7
7
|
} from '@rpg-engine/shared';
|
|
8
8
|
|
|
9
9
|
export const items: IItem[] = [
|
|
@@ -244,7 +244,8 @@ export const items: IItem[] = [
|
|
|
244
244
|
textureKey: 'bag',
|
|
245
245
|
name: 'Bag',
|
|
246
246
|
generateContainerSlots: 10,
|
|
247
|
-
description:
|
|
247
|
+
description:
|
|
248
|
+
'You see a bag. It has made using leather and it has 10 total slots.',
|
|
248
249
|
attack: 7,
|
|
249
250
|
defense: 3,
|
|
250
251
|
weight: 13,
|
|
@@ -252,10 +253,11 @@ export const items: IItem[] = [
|
|
|
252
253
|
x: 320,
|
|
253
254
|
y: 144,
|
|
254
255
|
scene: 'MainScene',
|
|
255
|
-
fullDescription:
|
|
256
|
+
fullDescription:
|
|
257
|
+
'You see a bag. It has made using leather and it has 10 total slots.',
|
|
256
258
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
257
259
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
258
|
-
}
|
|
260
|
+
},
|
|
259
261
|
];
|
|
260
262
|
|
|
261
263
|
export const itemContainerMock: IItemContainer = {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { RPGUIRoot } from '..';
|
|
4
|
+
import CharacterSelection, {
|
|
5
|
+
ICharacterProps,
|
|
6
|
+
} from '../components/Character/CharacterSelection';
|
|
7
|
+
|
|
8
|
+
const meta: Meta = {
|
|
9
|
+
title: 'Character Selection',
|
|
10
|
+
component: CharacterSelection,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
const Template: Story<any> = args => (
|
|
16
|
+
<RPGUIRoot>
|
|
17
|
+
<CharacterSelection
|
|
18
|
+
{...args}
|
|
19
|
+
onChange={value => {
|
|
20
|
+
console.log(value);
|
|
21
|
+
}}
|
|
22
|
+
/>
|
|
23
|
+
</RPGUIRoot>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const Default = Template.bind({});
|
|
27
|
+
|
|
28
|
+
const availableCharacters: ICharacterProps[] = [
|
|
29
|
+
{
|
|
30
|
+
id: 'woman',
|
|
31
|
+
name: 'Woman',
|
|
32
|
+
spriteKey: 'woman-1/down/standing/0.png',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'kid',
|
|
36
|
+
name: 'Kid',
|
|
37
|
+
spriteKey: 'kid-1/down/standing/0.png',
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
Default.args = {
|
|
42
|
+
availableCharacters: availableCharacters,
|
|
43
|
+
};
|