@rpg-engine/long-bow 0.8.19 → 0.8.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.8.19",
3
+ "version": "0.8.20",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -368,7 +368,7 @@ const ContentContainer = styled.div`
368
368
  padding-bottom: 0;
369
369
  width: 100%;
370
370
  position: relative;
371
- min-height: 300px;
371
+ min-height: 250px;
372
372
  overflow: hidden;
373
373
  `;
374
374
 
@@ -4,7 +4,7 @@ import styled from 'styled-components';
4
4
  import { InternalTabs } from '../InternalTabs/InternalTabs';
5
5
  import {
6
6
  IInformationCenterItem,
7
- IInformationCenterProps,
7
+ IInformationCenterNPC,
8
8
  } from './InformationCenterTypes';
9
9
  import { InformationCenterBestiarySection } from './sections/bestiary/InformationCenterBestiarySection';
10
10
  import { InformationCenterFAQSection } from './sections/faq/InformationCenterFaqSection';
@@ -27,119 +27,127 @@ export interface IVideoGuide {
27
27
  category: 'Combat' | 'Crafting' | 'Exploration' | 'General';
28
28
  }
29
29
 
30
+ export interface IInformationCenterProps {
31
+ itemsAtlasJSON: Record<string, any>;
32
+ itemsAtlasIMG: string;
33
+ entitiesAtlasJSON: Record<string, any>;
34
+ entitiesAtlasIMG: string;
35
+ faqItems?: IFaqItem[];
36
+ bestiaryItems?: IInformationCenterNPC[];
37
+ videoGuides?: IVideoGuide[];
38
+ items?: IInformationCenterItem[];
39
+ loading?: boolean;
40
+ error?: string;
41
+ initialSearchQuery?: string;
42
+ }
43
+
30
44
  export const InformationCenter: React.FC<IInformationCenterProps> = ({
31
- itemsAtlasJSON,
32
- itemsAtlasIMG,
33
- entitiesAtlasJSON,
34
- entitiesAtlasIMG,
35
- iconsAtlasIMG,
36
- iconsAtlasJSON,
37
- faqItems = [],
38
- bestiaryItems = [],
39
- videoGuides = [],
40
- items = [],
41
- loading = false,
42
- error,
43
- initialSearchQuery = '',
44
- }) => {
45
- const [activeTab, setActiveTab] = useState('bestiary');
46
- const [
47
- selectedItem,
48
- setSelectedItem,
49
- ] = useState<IInformationCenterItem | null>(null);
45
+ itemsAtlasJSON,
46
+ itemsAtlasIMG,
47
+ entitiesAtlasJSON,
48
+ entitiesAtlasIMG,
49
+ faqItems = [],
50
+ bestiaryItems = [],
51
+ videoGuides = [],
52
+ items = [],
53
+ loading = false,
54
+ error,
55
+ initialSearchQuery = '',
56
+ }) => {
57
+ const [activeTab, setActiveTab] = useState('bestiary');
58
+ const [
59
+ selectedItem,
60
+ setSelectedItem,
61
+ ] = useState<IInformationCenterItem | null>(null);
50
62
 
51
- if (loading) {
52
- return <LoadingMessage>Loading...</LoadingMessage>;
53
- }
63
+ if (loading) {
64
+ return <LoadingMessage>Loading...</LoadingMessage>;
65
+ }
54
66
 
55
- if (error) {
56
- return <ErrorMessage>{error}</ErrorMessage>;
57
- }
67
+ if (error) {
68
+ return <ErrorMessage>{error}</ErrorMessage>;
69
+ }
58
70
 
59
- const tabs = [
60
- {
61
- id: 'bestiary',
62
- title: 'Bestiary',
63
- content: (
64
- <InformationCenterBestiarySection
65
- bestiaryItems={bestiaryItems}
66
- itemsAtlasJSON={itemsAtlasJSON}
67
- itemsAtlasIMG={itemsAtlasIMG}
68
- iconsAtlasIMG={iconsAtlasIMG}
69
- iconsAtlasJSON={iconsAtlasJSON}
70
- entitiesAtlasJSON={entitiesAtlasJSON}
71
- entitiesAtlasIMG={entitiesAtlasIMG}
72
- initialSearchQuery={initialSearchQuery}
73
- tabId="bestiary"
74
- />
75
- ),
76
- },
77
- {
78
- id: 'items',
79
- title: 'Items',
80
- content: (
81
- <InformationCenterItemsSection
82
- items={items}
83
- bestiaryItems={bestiaryItems}
84
- itemsAtlasJSON={itemsAtlasJSON}
85
- itemsAtlasIMG={itemsAtlasIMG}
86
- initialSearchQuery={initialSearchQuery}
87
- tabId="items"
88
- />
89
- ),
90
- },
91
- {
92
- id: 'faq',
93
- title: 'FAQ',
94
- content: (
95
- <InformationCenterFAQSection
96
- faqItems={faqItems}
97
- initialSearchQuery={initialSearchQuery}
98
- tabId="faq"
99
- />
100
- ),
101
- },
102
- {
103
- id: 'tutorials',
104
- title: 'Tutorials',
105
- content: (
106
- <InformationCenterTutorialsSection
107
- videoGuides={videoGuides}
108
- initialSearchQuery={initialSearchQuery}
109
- tabId="tutorials"
110
- />
111
- ),
112
- },
113
- ];
71
+ const tabs = [
72
+ {
73
+ id: 'bestiary',
74
+ title: 'Bestiary',
75
+ content: (
76
+ <InformationCenterBestiarySection
77
+ bestiaryItems={bestiaryItems}
78
+ itemsAtlasJSON={itemsAtlasJSON}
79
+ itemsAtlasIMG={itemsAtlasIMG}
80
+ entitiesAtlasJSON={entitiesAtlasJSON}
81
+ entitiesAtlasIMG={entitiesAtlasIMG}
82
+ initialSearchQuery={initialSearchQuery}
83
+ tabId="bestiary"
84
+ />
85
+ ),
86
+ },
87
+ {
88
+ id: 'items',
89
+ title: 'Items',
90
+ content: (
91
+ <InformationCenterItemsSection
92
+ items={items}
93
+ bestiaryItems={bestiaryItems}
94
+ itemsAtlasJSON={itemsAtlasJSON}
95
+ itemsAtlasIMG={itemsAtlasIMG}
96
+ initialSearchQuery={initialSearchQuery}
97
+ tabId="items"
98
+ />
99
+ ),
100
+ },
101
+ {
102
+ id: 'faq',
103
+ title: 'FAQ',
104
+ content: (
105
+ <InformationCenterFAQSection
106
+ faqItems={faqItems}
107
+ initialSearchQuery={initialSearchQuery}
108
+ tabId="faq"
109
+ />
110
+ ),
111
+ },
112
+ {
113
+ id: 'tutorials',
114
+ title: 'Tutorials',
115
+ content: (
116
+ <InformationCenterTutorialsSection
117
+ videoGuides={videoGuides}
118
+ initialSearchQuery={initialSearchQuery}
119
+ tabId="tutorials"
120
+ />
121
+ ),
122
+ },
123
+ ];
114
124
 
115
- return (
116
- <Container>
117
- <InternalTabs
118
- tabs={tabs}
119
- activeTextColor="#000000"
120
- activeTab={activeTab}
121
- onTabChange={setActiveTab}
122
- activeColor="#fef08a"
123
- inactiveColor="#6b7280"
124
- borderColor="#f59e0b"
125
- hoverColor="#fef3c7"
126
- />
127
- {selectedItem && (
128
- <InformationCenterItemDetails
129
- item={selectedItem}
130
- itemsAtlasJSON={itemsAtlasJSON}
131
- itemsAtlasIMG={itemsAtlasIMG}
132
- droppedBy={bestiaryItems.filter(npc =>
133
- npc.loots?.some(
134
- loot => loot.itemBlueprintKey === selectedItem.key
135
- )
136
- )}
137
- onBack={() => setSelectedItem(null)}
138
- />
139
- )}
140
- </Container>
141
- );
142
- };
125
+ return (
126
+ <Container>
127
+ <InternalTabs
128
+ tabs={tabs}
129
+ activeTextColor="#000000"
130
+ activeTab={activeTab}
131
+ onTabChange={setActiveTab}
132
+ activeColor="#fef08a"
133
+ inactiveColor="#6b7280"
134
+ borderColor="#f59e0b"
135
+ hoverColor="#fef3c7"
136
+ />
137
+ {selectedItem && (
138
+ <InformationCenterItemDetails
139
+ item={selectedItem}
140
+ itemsAtlasJSON={itemsAtlasJSON}
141
+ itemsAtlasIMG={itemsAtlasIMG}
142
+ droppedBy={bestiaryItems.filter(npc =>
143
+ npc.loots?.some(loot => loot.itemBlueprintKey === selectedItem.key)
144
+ )}
145
+ onBack={() => setSelectedItem(null)}
146
+ />
147
+ )}
148
+ </Container>
149
+ );
150
+ };
143
151
 
144
152
  const Container = styled.div`
145
153
  width: 100%;
@@ -8,7 +8,6 @@ import {
8
8
  NPCSubtype,
9
9
  RangeTypes,
10
10
  } from '@rpg-engine/shared';
11
- import { IFaqItem, IVideoGuide } from './InformationCenter';
12
11
 
13
12
  export enum MovementSpeed {
14
13
  ExtraSlow = 1.5,
@@ -49,7 +48,6 @@ interface INPCBlueprintSpellArea {
49
48
  spellKey: string;
50
49
  probability: number;
51
50
  power: string;
52
- texturePath: string;
53
51
  }
54
52
 
55
53
  export interface IInformationCenterNPC {
@@ -87,19 +85,3 @@ export interface IInformationCenterItem extends IEquippableItemBlueprint {
87
85
  equippedBuff?: ICharacterPermanentBuff[];
88
86
  equippedBuffDescription?: string;
89
87
  }
90
-
91
- export interface IInformationCenterProps {
92
- itemsAtlasJSON: Record<string, any>;
93
- itemsAtlasIMG: string;
94
- entitiesAtlasJSON: Record<string, any>;
95
- entitiesAtlasIMG: string;
96
- iconsAtlasJSON: any;
97
- iconsAtlasIMG: any;
98
- faqItems?: IFaqItem[];
99
- bestiaryItems?: IInformationCenterNPC[];
100
- videoGuides?: IVideoGuide[];
101
- items?: IInformationCenterItem[];
102
- loading?: boolean;
103
- error?: string;
104
- initialSearchQuery?: string;
105
- }
@@ -13,8 +13,6 @@ interface IBestiarySectionProps {
13
13
  itemsAtlasIMG: string;
14
14
  entitiesAtlasJSON: Record<string, any>;
15
15
  entitiesAtlasIMG: string;
16
- iconsAtlasIMG: any;
17
- iconsAtlasJSON: any;
18
16
  initialSearchQuery: string;
19
17
  tabId: string;
20
18
  }
@@ -23,8 +21,6 @@ export const InformationCenterBestiarySection: React.FC<IBestiarySectionProps> =
23
21
  bestiaryItems,
24
22
  itemsAtlasJSON,
25
23
  itemsAtlasIMG,
26
- iconsAtlasIMG,
27
- iconsAtlasJSON,
28
24
  entitiesAtlasJSON,
29
25
  entitiesAtlasIMG,
30
26
  initialSearchQuery,
@@ -147,8 +143,6 @@ export const InformationCenterBestiarySection: React.FC<IBestiarySectionProps> =
147
143
  npc={selectedMonster}
148
144
  itemsAtlasJSON={itemsAtlasJSON}
149
145
  itemsAtlasIMG={itemsAtlasIMG}
150
- iconAtlasIMG={iconsAtlasIMG}
151
- iconAtlasJSON={iconsAtlasJSON}
152
146
  entitiesAtlasJSON={entitiesAtlasJSON}
153
147
  entitiesAtlasIMG={entitiesAtlasIMG}
154
148
  onBack={() => setSelectedMonster(null)}