@rpg-engine/long-bow 0.8.18 → 0.8.19

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.18",
3
+ "version": "0.8.19",
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: 250px;
371
+ min-height: 300px;
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
- IInformationCenterNPC,
7
+ IInformationCenterProps,
8
8
  } from './InformationCenterTypes';
9
9
  import { InformationCenterBestiarySection } from './sections/bestiary/InformationCenterBestiarySection';
10
10
  import { InformationCenterFAQSection } from './sections/faq/InformationCenterFaqSection';
@@ -27,127 +27,119 @@ 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
-
44
30
  export const InformationCenter: React.FC<IInformationCenterProps> = ({
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);
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);
62
50
 
63
- if (loading) {
64
- return <LoadingMessage>Loading...</LoadingMessage>;
65
- }
51
+ if (loading) {
52
+ return <LoadingMessage>Loading...</LoadingMessage>;
53
+ }
66
54
 
67
- if (error) {
68
- return <ErrorMessage>{error}</ErrorMessage>;
69
- }
55
+ if (error) {
56
+ return <ErrorMessage>{error}</ErrorMessage>;
57
+ }
70
58
 
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
- ];
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
+ ];
124
114
 
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
- };
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
+ };
151
143
 
152
144
  const Container = styled.div`
153
145
  width: 100%;
@@ -8,6 +8,7 @@ import {
8
8
  NPCSubtype,
9
9
  RangeTypes,
10
10
  } from '@rpg-engine/shared';
11
+ import { IFaqItem, IVideoGuide } from './InformationCenter';
11
12
 
12
13
  export enum MovementSpeed {
13
14
  ExtraSlow = 1.5,
@@ -48,6 +49,7 @@ interface INPCBlueprintSpellArea {
48
49
  spellKey: string;
49
50
  probability: number;
50
51
  power: string;
52
+ texturePath: string;
51
53
  }
52
54
 
53
55
  export interface IInformationCenterNPC {
@@ -85,3 +87,19 @@ export interface IInformationCenterItem extends IEquippableItemBlueprint {
85
87
  equippedBuff?: ICharacterPermanentBuff[];
86
88
  equippedBuffDescription?: string;
87
89
  }
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,6 +13,8 @@ interface IBestiarySectionProps {
13
13
  itemsAtlasIMG: string;
14
14
  entitiesAtlasJSON: Record<string, any>;
15
15
  entitiesAtlasIMG: string;
16
+ iconsAtlasIMG: any;
17
+ iconsAtlasJSON: any;
16
18
  initialSearchQuery: string;
17
19
  tabId: string;
18
20
  }
@@ -21,6 +23,8 @@ export const InformationCenterBestiarySection: React.FC<IBestiarySectionProps> =
21
23
  bestiaryItems,
22
24
  itemsAtlasJSON,
23
25
  itemsAtlasIMG,
26
+ iconsAtlasIMG,
27
+ iconsAtlasJSON,
24
28
  entitiesAtlasJSON,
25
29
  entitiesAtlasIMG,
26
30
  initialSearchQuery,
@@ -143,6 +147,8 @@ export const InformationCenterBestiarySection: React.FC<IBestiarySectionProps> =
143
147
  npc={selectedMonster}
144
148
  itemsAtlasJSON={itemsAtlasJSON}
145
149
  itemsAtlasIMG={itemsAtlasIMG}
150
+ iconAtlasIMG={iconsAtlasIMG}
151
+ iconAtlasJSON={iconsAtlasJSON}
146
152
  entitiesAtlasJSON={entitiesAtlasJSON}
147
153
  entitiesAtlasIMG={entitiesAtlasIMG}
148
154
  onBack={() => setSelectedMonster(null)}