Skip to content

Commit 7efccdb

Browse files
committed
Merge branch 'develop' of https://github.com/PenguinMod/penguinmod.github.io into develop
2 parents d66ab28 + dbc2e07 commit 7efccdb

File tree

10 files changed

+137
-32
lines changed

10 files changed

+137
-32
lines changed

src/components/controls/controls.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const Controls = function (props) {
5656
/>
5757
<PauseButton
5858
paused={paused}
59-
title={intl.formatMessage(messages.goTitle)}
59+
title={intl.formatMessage(messages.pauseTitle)}
6060
onClick={onPauseButtonClick}
6161
/>
6262
<StopAll

src/components/library/library.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,10 @@ class LibraryComponent extends React.Component {
179179
});
180180
}
181181
}
182-
handleSelect (id) {
183-
this.handleClose();
182+
handleSelect (id, event) {
183+
if (event.shiftKey !== true) {
184+
this.handleClose();
185+
}
184186
this.props.onItemSelected(this.getFilteredData()[id]);
185187
}
186188
handleClose () {

src/containers/library-item.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class LibraryItem extends React.PureComponent {
5353
if (this.props.href) {
5454
window.open(this.props.href);
5555
} else {
56-
this.props.onSelect(this.props.id);
56+
this.props.onSelect(this.props.id, e);
5757
}
5858
}
5959
e.preventDefault();

src/lib/blocks.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ export default function (vm) {
270270
[ScratchBlocks.Msg.SENSING_OF_DIRECTION, 'direction'],
271271
[ScratchBlocks.Msg.SENSING_OF_COSTUMENUMBER, 'costume #'],
272272
[ScratchBlocks.Msg.SENSING_OF_COSTUMENAME, 'costume name'],
273+
['layer', 'layer'],
273274
[ScratchBlocks.Msg.SENSING_OF_SIZE, 'size'],
274275
[ScratchBlocks.Msg.SENSING_OF_VOLUME, 'volume']
275276
];

src/lib/libraries/costumes.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,6 +2736,47 @@
27362736
"rotationCenterX": 12,
27372737
"rotationCenterY": 24
27382738
},
2739+
{
2740+
"name": "Cubey-a",
2741+
"tags": [
2742+
"drawing",
2743+
"happy",
2744+
"character"
2745+
],
2746+
"bitmapResolution": 1,
2747+
"dataFormat": "svg",
2748+
"rotationCenterX": 0,
2749+
"rotationCenterY": 0,
2750+
"fromPenguinModLibrary": true,
2751+
"libraryFilePage": "images/cubey-a.svg"
2752+
},
2753+
{
2754+
"name": "Cubey-b",
2755+
"tags": [
2756+
"drawing",
2757+
"character"
2758+
],
2759+
"bitmapResolution": 1,
2760+
"dataFormat": "svg",
2761+
"rotationCenterX": 0,
2762+
"rotationCenterY": 0,
2763+
"fromPenguinModLibrary": true,
2764+
"libraryFilePage": "images/cubey-b.svg"
2765+
},
2766+
{
2767+
"name": "Cubey-c",
2768+
"tags": [
2769+
"drawing",
2770+
"happy",
2771+
"character"
2772+
],
2773+
"bitmapResolution": 1,
2774+
"dataFormat": "svg",
2775+
"rotationCenterX": 0,
2776+
"rotationCenterY": 0,
2777+
"fromPenguinModLibrary": true,
2778+
"libraryFilePage": "images/cubey-c.svg"
2779+
},
27392780
{
27402781
"name": "Cursor",
27412782
"tags": [
@@ -10969,6 +11010,33 @@
1096911010
"rotationCenterX": 33.402360253924,
1097011011
"rotationCenterY": 62.05085241467614
1097111012
},
11013+
{
11014+
"name": "Turkey-a",
11015+
"tags": [
11016+
"animals",
11017+
"thanksgiving"
11018+
],
11019+
"bitmapResolution": 1,
11020+
"dataFormat": "svg",
11021+
"rotationCenterX": 0,
11022+
"rotationCenterY": 0,
11023+
"fromPenguinModLibrary": true,
11024+
"libraryFilePage": "images/turkey.svg"
11025+
},
11026+
{
11027+
"name": "Turkey-b",
11028+
"tags": [
11029+
"food",
11030+
"dinner",
11031+
"thanksgiving"
11032+
],
11033+
"bitmapResolution": 1,
11034+
"dataFormat": "svg",
11035+
"rotationCenterX": 0,
11036+
"rotationCenterY": 0,
11037+
"fromPenguinModLibrary": true,
11038+
"libraryFilePage": "images/turkeyplate.svg"
11039+
},
1097211040
{
1097311041
"name": "Unicorn",
1097411042
"tags": [

src/lib/libraries/sounds.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,48 @@
6868
"fromPenguinModLibrary": true,
6969
"libraryFilePage": "sounds/bossa-chords.mp3"
7070
},
71+
{
72+
"name": "Overworld",
73+
"tags": [
74+
"music",
75+
"loops",
76+
"sharkpool",
77+
"penguinmod"
78+
],
79+
"dataFormat": "mpeg",
80+
"md5ext": "sound.mp3",
81+
"rate": 44100,
82+
"fromPenguinModLibrary": true,
83+
"libraryFilePage": "sounds/sp_overworld.mp3"
84+
},
85+
{
86+
"name": "Ready to Go",
87+
"tags": [
88+
"music",
89+
"loops",
90+
"sharkpool",
91+
"penguinmod"
92+
],
93+
"dataFormat": "mpeg",
94+
"md5ext": "sound.mp3",
95+
"rate": 44100,
96+
"fromPenguinModLibrary": true,
97+
"libraryFilePage": "sounds/sp_readytogo.mp3"
98+
},
99+
{
100+
"name": "Shining Aura",
101+
"tags": [
102+
"music",
103+
"themes",
104+
"sharkpool",
105+
"penguinmod"
106+
],
107+
"dataFormat": "mpeg",
108+
"md5ext": "sound.mp3",
109+
"rate": 44100,
110+
"fromPenguinModLibrary": true,
111+
"libraryFilePage": "sounds/sp_shiningaura.mp3"
112+
},
71113
{
72114
"name": "Cozy Mall",
73115
"tags": [

src/lib/make-toolbox-xml.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,11 @@ const looks = function (isInitialSetup, isStage, targetId, costumeName, backdrop
429429
</shadow>
430430
</value>
431431
</block>
432+
<block type="looks_goTargetLayer">
433+
<value name="VISIBLE_OPTION">
434+
<shadow type="looks_getOtherSpriteVisible_menu"/>
435+
</value>
436+
</block>
432437
<block type="looks_layersGetLayer"></block>
433438
${blockSeparator}
434439
`}

src/lib/project-fetcher-hoc.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const ProjectFetcherHOC = function (WrappedComponent) {
136136
storage.setProjectToken(projectId);
137137
assetPromise = storage.load(storage.AssetType.Project, projectId, storage.DataFormat.JSON);
138138
} else {
139-
projectUrl = `https://projects.penguinmod.com/api/projects/getPublished?type=file&id=${projectId}`
139+
projectUrl = `https://projects.penguinmod.com/api/projects/getPublished?type=file&safe=true&id=${projectId}`
140140
assetPromise = progressMonitor.fetchWithProgress(projectUrl)
141141
.then(r => {
142142
this.props.vm.runtime.renderer.setPrivateSkinAccess(false);

src/lib/tw-project-meta-fetcher-hoc.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,13 @@ const TWProjectMetaFetcherHOC = function (WrappedComponent) {
104104
}
105105
if (
106106
typeof rawData.accepted === 'boolean'
107+
|| typeof rawData.removedsoft === 'boolean'
107108
|| rawData.remix > 0 // checks isRemix and remixId existing at the same time
108109
|| typeof rawData.tooLarge === 'boolean'
109110
|| authorName
110111
) {
111112
this.props.onSetExtraProjectInfo(
112-
rawData.accepted === true,
113+
rawData.accepted === true && !rawData.removedsoft,
113114
rawData.remix > 0,
114115
Number(rawData.remix),
115116
rawData.tooLarge === true,

src/playground/render-interface.jsx

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,11 @@ class Interface extends React.Component {
372372
{/* project not approved message */}
373373
{(!extraProjectInfo.accepted) && (
374374
<div className={styles.remixWarningBox}>
375-
<p>This project is not approved. Be careful when running this project.</p>
375+
<p>
376+
This project is currently under review.
377+
Content may not be suitable for all ages,
378+
and you should be careful when running the project.
379+
</p>
376380
</div>
377381
)}
378382
{/* remix info */}
@@ -429,11 +433,13 @@ class Interface extends React.Component {
429433
/>
430434
</div>
431435
) : null}
432-
<VoteFrame
433-
id={projectId}
434-
darkmode={this.props.isDark}
435-
/>
436-
{projectId !== '0' && (
436+
{extraProjectInfo.author && (
437+
<VoteFrame
438+
id={projectId}
439+
darkmode={this.props.isDark}
440+
/>
441+
)}
442+
{projectId !== '0' && extraProjectInfo.author && (
437443
<div>
438444
{`${isUpdated ? 'Updated' : 'Uploaded'} ${projectReleaseMonth} ${projectReleaseDay} ${projectReleaseYear} at ${projectReleaseHour}:${projectReleaseMinute < 10 ? '0' : ''}${projectReleaseMinute} ${projectReleaseHalf}`}
439445
<div className={styles.centerSector}>
@@ -447,15 +453,6 @@ class Interface extends React.Component {
447453
/>
448454
{'Copy Link'}
449455
</button>
450-
{extraProjectInfo.author && (
451-
<a
452-
target="_blank"
453-
rel="noreferrer"
454-
href={`https://penguinmod.com/profile?user=${extraProjectInfo.author}`}
455-
>
456-
{`View other projects by ${extraProjectInfo.author}`}
457-
</a>
458-
)}
459456
<a
460457
target="_blank"
461458
rel="noreferrer"
@@ -471,17 +468,6 @@ class Interface extends React.Component {
471468
</div>
472469
</div>
473470
)}
474-
{/* this is pretty pointless now that we have the home page... */}
475-
{/* <div className={styles.section}>
476-
<p>
477-
<FormattedMessage
478-
// eslint-disable-next-line max-len
479-
defaultMessage="PenguinMod is a mod of TurboWarp to add new blocks and features either in extensions or in PenguinMod's main toolbox. TurboWarp is a Scratch mod that compiles projects to JavaScript to make them run really fast. Try it out by choosing an uploaded project below or making your own in the editor."
480-
description="Description of PenguinMod and TurboWarp"
481-
id="tw.home.description"
482-
/>
483-
</p>
484-
</div> */}
485471
<div className={styles.section}>
486472
<FeaturedProjects />
487473
</div>

0 commit comments

Comments
 (0)