Skip to content

Commit 16c09e5

Browse files
committed
add costumes &support penguinmod library backdrops
1 parent 5b73126 commit 16c09e5

File tree

5 files changed

+56
-1
lines changed

5 files changed

+56
-1
lines changed

src/containers/backdrop-library.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class BackdropLibrary extends React.Component {
3232
bitmapResolution: item.bitmapResolution,
3333
skinId: null
3434
};
35+
if (item.fromPenguinModLibrary) {
36+
vmBackdrop.fromPenguinModLibrary = true;
37+
vmBackdrop.libraryId = item.libraryFilePage;
38+
vmBackdrop.dataFormat = item.dataFormat;
39+
}
3540
// Do not switch to stage, just add the backdrop
3641
this.props.vm.addBackdrop(item.md5ext, vmBackdrop);
3742
}
@@ -40,6 +45,7 @@ class BackdropLibrary extends React.Component {
4045
<LibraryComponent
4146
data={getBackdropLibrary()}
4247
id="backdropLibrary"
48+
actor="CostumeLibrary"
4349
header={"Backdrops"}
4450
tags={backdropTags}
4551
title={this.props.intl.formatMessage(messages.libraryTitle)}

src/containers/costume-library.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CostumeLibrary extends React.PureComponent {
3636
vmCostume.fromPenguinModLibrary = true;
3737
vmCostume.libraryId = item.libraryFilePage;
3838
vmCostume.dataFormat = item.dataFormat;
39-
};
39+
}
4040
this.props.vm.addCostumeFromLibrary(item.md5ext, vmCostume);
4141
}
4242
render () {

src/containers/costume-tab.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ class CostumeTab extends React.Component {
197197
bitmapResolution: item.bitmapResolution,
198198
skinId: null
199199
};
200+
if (item.fromPenguinModLibrary) {
201+
vmCostume.fromPenguinModLibrary = true;
202+
vmCostume.libraryId = item.libraryFilePage;
203+
vmCostume.dataFormat = item.dataFormat;
204+
};
200205
this.handleNewCostume(vmCostume);
201206
}
202207
handleCostumeUpload(e) {

src/lib/libraries/backdrops.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,20 @@
190190
"rotationCenterX": 480,
191191
"rotationCenterY": 360
192192
},
193+
{
194+
"name": "Calm Night",
195+
"tags": [
196+
"outdoors",
197+
"lights",
198+
"purple"
199+
],
200+
"bitmapResolution": 2,
201+
"dataFormat": "png",
202+
"rotationCenterX": 480,
203+
"rotationCenterY": 360,
204+
"fromPenguinModLibrary": true,
205+
"libraryFilePage": "images/backdrops/calm_night.png"
206+
},
193207
{
194208
"name": "Canyon",
195209
"tags": [

src/lib/libraries/costumes.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6486,6 +6486,21 @@
64866486
"rotationCenterX": 68,
64876487
"rotationCenterY": 260
64886488
},
6489+
{
6490+
"name": "Joe",
6491+
"tags": [
6492+
"people",
6493+
"crude",
6494+
"drawing",
6495+
"human"
6496+
],
6497+
"bitmapResolution": 1,
6498+
"dataFormat": "svg",
6499+
"rotationCenterX": 0,
6500+
"rotationCenterY": 0,
6501+
"fromPenguinModLibrary": true,
6502+
"libraryFilePage": "images/Joe.svg"
6503+
},
64896504
{
64906505
"name": "Jordyn-a",
64916506
"tags": [
@@ -9891,6 +9906,21 @@
98919906
"rotationCenterX": 55,
98929907
"rotationCenterY": 89
98939908
},
9909+
{
9910+
"name": "Sleeping Dog",
9911+
"tags": [
9912+
"dog",
9913+
"animals",
9914+
"realistic",
9915+
"max"
9916+
],
9917+
"bitmapResolution": 2,
9918+
"dataFormat": "png",
9919+
"rotationCenterX": 225,
9920+
"rotationCenterY": 144,
9921+
"fromPenguinModLibrary": true,
9922+
"libraryFilePage": "images/max.png"
9923+
},
98949924
{
98959925
"name": "Smiley-a",
98969926
"tags": [

0 commit comments

Comments
 (0)