@rpg-engine/long-bow 0.4.87 → 0.4.88
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/PartySystem/PartyManager/PartyManager.d.ts +3 -2
- package/dist/components/PartySystem/PartyManager/PartyManagerRows.d.ts +2 -1
- package/dist/components/PartySystem/mockedConstantes/mockedValues.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +66 -25
- 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 +67 -27
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/NPCDialog/.DS_Store +0 -0
- package/src/components/NPCDialog/img/.DS_Store +0 -0
- package/src/components/PartySystem/PartyManager/PartyManager.tsx +41 -12
- package/src/components/PartySystem/PartyManager/PartyManagerRows.tsx +10 -5
- package/src/components/PartySystem/mockedConstantes/mockedValues.tsx +23 -5
- package/src/components/SkillProgressBar.tsx +6 -9
- package/src/mocks/.DS_Store +0 -0
- package/src/mocks/atlas/.DS_Store +0 -0
- package/src/stories/PartyManager.stories.tsx +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ICharacterPartyShared } from '@rpg-engine/shared';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { IPartyManagerRowProps } from './PartyManagerRows';
|
|
3
3
|
export interface IPartyManagerProps {
|
|
4
|
-
partyRows:
|
|
4
|
+
partyRows: ICharacterPartyShared | null;
|
|
5
|
+
isLeader: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare const PartyManager: React.FC<IPartyManagerProps>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ICharacterPartyShared } from '@rpg-engine/shared';
|
|
1
2
|
import { IPartyRowProps } from '../PartyDashboard/PartyRows';
|
|
2
3
|
import { IPlayersRowProps } from '../PartyInvite';
|
|
3
4
|
import { IPartyManagerRowProps } from '../PartyManager';
|
|
4
5
|
export declare const mockedPartyRows: IPartyRowProps[];
|
|
6
|
+
export declare const mockedPlayersRows2: ICharacterPartyShared;
|
|
5
7
|
export declare const mockedPlayersRows: IPlayersRowProps[];
|
|
6
8
|
export declare const mockedPartyManager: IPartyManagerRowProps[];
|
|
@@ -16344,13 +16344,16 @@ var RowsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
16344
16344
|
var PartyManagerRow = function PartyManagerRow(_ref) {
|
|
16345
16345
|
var charName = _ref.charName,
|
|
16346
16346
|
charClass = _ref.charClass,
|
|
16347
|
-
|
|
16348
|
-
|
|
16347
|
+
isLeader = _ref.isLeader,
|
|
16348
|
+
isLeaderRow = _ref.isLeaderRow;
|
|
16349
|
+
return React__default.createElement(PartyWrapper$2, null, React__default.createElement(TextContainer$5, null, charName), React__default.createElement(TextContainer$5, null, charClass), React__default.createElement("div", {
|
|
16349
16350
|
className: "cancel-button"
|
|
16350
16351
|
}, React__default.createElement(Button, {
|
|
16351
|
-
buttonType: exports.ButtonTypes.RPGUIButton
|
|
16352
|
-
|
|
16353
|
-
|
|
16352
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
16353
|
+
disabled: !isLeader
|
|
16354
|
+
}, isLeaderRow ? 'Leader' : 'Remove')), React__default.createElement(Button, {
|
|
16355
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
16356
|
+
disabled: !isLeader
|
|
16354
16357
|
}, "New Leader"));
|
|
16355
16358
|
};
|
|
16356
16359
|
var PartyWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -16363,7 +16366,8 @@ var TextContainer$5 = /*#__PURE__*/styled.div.withConfig({
|
|
|
16363
16366
|
})(["color:", ";"], uiColors.white);
|
|
16364
16367
|
|
|
16365
16368
|
var PartyManager = function PartyManager(_ref) {
|
|
16366
|
-
var partyRows = _ref.partyRows
|
|
16369
|
+
var partyRows = _ref.partyRows,
|
|
16370
|
+
isLeader = _ref.isLeader;
|
|
16367
16371
|
return React__default.createElement(DraggableContainer, {
|
|
16368
16372
|
type: exports.RPGUIContainerTypes.Framed,
|
|
16369
16373
|
onCloseButton: function onCloseButton() {
|
|
@@ -16380,15 +16384,22 @@ var PartyManager = function PartyManager(_ref) {
|
|
|
16380
16384
|
className: "golden"
|
|
16381
16385
|
}))), React__default.createElement(RowsWrapper$2, {
|
|
16382
16386
|
className: "partyRows"
|
|
16383
|
-
}, partyRows.
|
|
16387
|
+
}, partyRows ? React__default.createElement(React__default.Fragment, null, React__default.createElement(PartyManagerRow, {
|
|
16388
|
+
key: partyRows.leader._id,
|
|
16389
|
+
id: partyRows.leader._id,
|
|
16390
|
+
charName: partyRows.leader.name,
|
|
16391
|
+
charClass: partyRows.leader["class"],
|
|
16392
|
+
isLeader: isLeader,
|
|
16393
|
+
isLeaderRow: true
|
|
16394
|
+
}), partyRows.members.map(function (partyRows) {
|
|
16384
16395
|
return React__default.createElement(PartyManagerRow, {
|
|
16385
|
-
key: partyRows.
|
|
16386
|
-
charName: partyRows.
|
|
16387
|
-
charClass: partyRows
|
|
16388
|
-
|
|
16389
|
-
|
|
16396
|
+
key: partyRows._id,
|
|
16397
|
+
charName: partyRows.name,
|
|
16398
|
+
charClass: partyRows["class"],
|
|
16399
|
+
id: partyRows._id,
|
|
16400
|
+
isLeader: isLeader
|
|
16390
16401
|
});
|
|
16391
|
-
})));
|
|
16402
|
+
})) : React__default.createElement(React__default.Fragment, null, React__default.createElement(NotinParty, null, "You are not in party. ", React__default.createElement("br", null), "Please create a new party"))));
|
|
16392
16403
|
};
|
|
16393
16404
|
var Wrapper$5 = /*#__PURE__*/styled.div.withConfig({
|
|
16394
16405
|
displayName: "PartyManager__Wrapper",
|
|
@@ -16402,6 +16413,10 @@ var Title$6 = /*#__PURE__*/styled.h1.withConfig({
|
|
|
16402
16413
|
displayName: "PartyManager__Title",
|
|
16403
16414
|
componentId: "sc-1yqcad8-2"
|
|
16404
16415
|
})(["font-size:0.6rem;color:", " !important;"], uiColors.yellow);
|
|
16416
|
+
var NotinParty = /*#__PURE__*/styled.h1.withConfig({
|
|
16417
|
+
displayName: "PartyManager__NotinParty",
|
|
16418
|
+
componentId: "sc-1yqcad8-3"
|
|
16419
|
+
})(["font-size:0.6rem;margin:auto;"]);
|
|
16405
16420
|
|
|
16406
16421
|
var mockedPartyRows = [{
|
|
16407
16422
|
id: /*#__PURE__*/uuid.v4(),
|
|
@@ -16468,6 +16483,33 @@ var mockedPartyRows = [{
|
|
|
16468
16483
|
isInvited: true,
|
|
16469
16484
|
partyName: 'Party'
|
|
16470
16485
|
}];
|
|
16486
|
+
var mockedPlayersRows2 = {
|
|
16487
|
+
id: /*#__PURE__*/uuid.v4(),
|
|
16488
|
+
leader: {
|
|
16489
|
+
_id: /*#__PURE__*/uuid.v4(),
|
|
16490
|
+
"class": shared.CharacterClass.Druid,
|
|
16491
|
+
name: 'leader'
|
|
16492
|
+
},
|
|
16493
|
+
members: [{
|
|
16494
|
+
_id: /*#__PURE__*/uuid.v4(),
|
|
16495
|
+
"class": shared.CharacterClass.Druid,
|
|
16496
|
+
name: 'blblb'
|
|
16497
|
+
}, {
|
|
16498
|
+
_id: /*#__PURE__*/uuid.v4(),
|
|
16499
|
+
"class": shared.CharacterClass.Druid,
|
|
16500
|
+
name: 'blblb'
|
|
16501
|
+
}, {
|
|
16502
|
+
_id: /*#__PURE__*/uuid.v4(),
|
|
16503
|
+
"class": shared.CharacterClass.Druid,
|
|
16504
|
+
name: 'blblb'
|
|
16505
|
+
}, {
|
|
16506
|
+
_id: /*#__PURE__*/uuid.v4(),
|
|
16507
|
+
"class": shared.CharacterClass.Druid,
|
|
16508
|
+
name: 'blblb'
|
|
16509
|
+
}],
|
|
16510
|
+
maxSize: 5,
|
|
16511
|
+
size: 4
|
|
16512
|
+
};
|
|
16471
16513
|
var mockedPlayersRows = [{
|
|
16472
16514
|
id: /*#__PURE__*/uuid.v4(),
|
|
16473
16515
|
charName: 'CharNome',
|
|
@@ -16503,27 +16545,27 @@ var mockedPartyManager = [{
|
|
|
16503
16545
|
id: /*#__PURE__*/uuid.v4(),
|
|
16504
16546
|
charName: 'CharNome',
|
|
16505
16547
|
charClass: 'CharClass',
|
|
16506
|
-
|
|
16548
|
+
isLeader: false
|
|
16507
16549
|
}, {
|
|
16508
16550
|
id: /*#__PURE__*/uuid.v4(),
|
|
16509
16551
|
charName: 'CharNome',
|
|
16510
16552
|
charClass: 'CharClass',
|
|
16511
|
-
|
|
16553
|
+
isLeader: false
|
|
16512
16554
|
}, {
|
|
16513
16555
|
id: /*#__PURE__*/uuid.v4(),
|
|
16514
16556
|
charName: 'CharNome',
|
|
16515
16557
|
charClass: 'CharClass',
|
|
16516
|
-
|
|
16558
|
+
isLeader: false
|
|
16517
16559
|
}, {
|
|
16518
16560
|
id: /*#__PURE__*/uuid.v4(),
|
|
16519
16561
|
charName: 'CharNome',
|
|
16520
16562
|
charClass: 'CharClass',
|
|
16521
|
-
|
|
16563
|
+
isLeader: false
|
|
16522
16564
|
}, {
|
|
16523
16565
|
id: /*#__PURE__*/uuid.v4(),
|
|
16524
16566
|
charName: 'CharNome',
|
|
16525
16567
|
charClass: 'CharClass',
|
|
16526
|
-
|
|
16568
|
+
isLeader: false
|
|
16527
16569
|
}];
|
|
16528
16570
|
|
|
16529
16571
|
var ProgressBar = function ProgressBar(_ref) {
|
|
@@ -16965,15 +17007,13 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
16965
17007
|
if (!skillPointsToNextLevel) {
|
|
16966
17008
|
skillPointsToNextLevel = shared.getSPForLevel(level + 1);
|
|
16967
17009
|
}
|
|
16968
|
-
var skillsBuffsCalc = function skillsBuffsCalc(
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
return "+" + result.toFixed(2);
|
|
16972
|
-
} else {
|
|
16973
|
-
return "" + result.toFixed(2);
|
|
17010
|
+
var skillsBuffsCalc = function skillsBuffsCalc() {
|
|
17011
|
+
if (buffAndDebuff) {
|
|
17012
|
+
return 1 + buffAndDebuff / 100;
|
|
16974
17013
|
}
|
|
17014
|
+
return;
|
|
16975
17015
|
};
|
|
16976
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement(ProgressTitle, null, buffAndDebuff !== undefined && React__default.createElement(React__default.Fragment, null, buffAndDebuff > 0 ? React__default.createElement(BuffAndDebuffContainer, null, React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleNameBuff, null, skillName), React__default.createElement(TitleNameBuff, null, "lv ", level, " (", skillsBuffsCalc(
|
|
17016
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(ProgressTitle, null, buffAndDebuff !== undefined && React__default.createElement(React__default.Fragment, null, buffAndDebuff > 0 ? React__default.createElement(BuffAndDebuffContainer, null, React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleNameBuff, null, skillName), React__default.createElement(TitleNameBuff, null, "lv ", level, " (", skillsBuffsCalc(), ")")), React__default.createElement(TitleNameBuffContainer, null, React__default.createElement(TitleNameBuff, null, "(+", buffAndDebuff, "%)"))) : buffAndDebuff < 0 ? React__default.createElement(React__default.Fragment, null, React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleNameDebuff, null, skillName), React__default.createElement(TitleNameDebuff, null, "lv ", level, " (", skillsBuffsCalc(), ")")), React__default.createElement("div", null, React__default.createElement(TitleNameDebuff, null, "(", buffAndDebuff, "%)"))) : React__default.createElement(TitleName, null, skillName)), !buffAndDebuff && React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleName, null, skillName), React__default.createElement(ValueDisplay, null, "lv ", level))), React__default.createElement(ProgressBody, null, React__default.createElement(ProgressIconContainer, null, atlasIMG && atlasJSON ? React__default.createElement(SpriteContainer$1, null, React__default.createElement(ErrorBoundary, null, React__default.createElement(SpriteFromAtlas, {
|
|
16977
17017
|
atlasIMG: atlasIMG,
|
|
16978
17018
|
atlasJSON: atlasJSON,
|
|
16979
17019
|
spriteKey: texturePath,
|
|
@@ -17995,6 +18035,7 @@ exports._RPGUI = _RPGUI;
|
|
|
17995
18035
|
exports.mockedPartyManager = mockedPartyManager;
|
|
17996
18036
|
exports.mockedPartyRows = mockedPartyRows;
|
|
17997
18037
|
exports.mockedPlayersRows = mockedPlayersRows;
|
|
18038
|
+
exports.mockedPlayersRows2 = mockedPlayersRows2;
|
|
17998
18039
|
exports.rarityColor = rarityColor;
|
|
17999
18040
|
exports.useEventListener = useEventListener;
|
|
18000
18041
|
//# sourceMappingURL=long-bow.cjs.development.js.map
|