Skip to content

Commit 12d961f

Browse files
committed
Merge commit '98d605298ddef164543a3907a95581715302e98d' into remove-non-det
2 parents 3a51a9d + 98d6052 commit 12d961f

File tree

12 files changed

+123
-21
lines changed

12 files changed

+123
-21
lines changed

.github/workflows/build-development.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
1111
steps:
1212
- name: Checkout repository
1313
uses: actions/checkout@v4
14+
# Has to be run before actions/setup-node.
15+
# See: https://github.com/actions/setup-node/issues/480
16+
- name: Enable corepack for Yarn
17+
run: corepack enable
1418
- name: Setup node
1519
uses: actions/setup-node@v4
1620
with:

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ jobs:
2626
steps:
2727
- name: Checkout repository
2828
uses: actions/checkout@v4
29+
# Has to be run before actions/setup-node.
30+
# See: https://github.com/actions/setup-node/issues/480
31+
- name: Enable corepack for Yarn
32+
run: corepack enable
2933
- name: Setup node
3034
uses: actions/setup-node@v4
3135
with:

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs v20.18.1

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"browserfs": "^1.4.3",
4949
"classnames": "^2.3.2",
5050
"dayjs": "^1.11.13",
51-
"dompurify": "^3.1.6",
51+
"dompurify": "^3.2.4",
5252
"flexboxgrid": "^6.3.1",
5353
"flexboxgrid-helpers": "^1.1.3",
5454
"hastscript": "^9.0.0",

src/features/cseMachine/CseMachineUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ export function getControlItemComponent(
756756
case InstrType.BRANCH:
757757
return new ControlItemComponent(
758758
'branch',
759-
'Pop boolean value from stash and execute corresponding branch',
759+
'Branch to the consequent or alternative',
760760
stackHeight,
761761
highlightOnHover,
762762
unhighlightOnHover,

src/features/game/effects/GlowingObject.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ export default class GlowingImage {
8888
this.blinkClearer?.();
8989
}
9090

91+
public hoverGlowStart() {
92+
this.imageGlow.setAlpha(0.5);
93+
}
94+
95+
public hoverGlowEnd() {
96+
this.imageGlow.setAlpha(0);
97+
}
98+
9199
public getContainer() {
92100
return this.container;
93101
}

src/features/game/mode/explore/GameModeExplore.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ class GameModeExplore implements IGameUI {
103103
if (!activatable.actionIds || !activatable.actionIds.length) {
104104
return;
105105
}
106-
activatable.clickArea.on('pointerout', () => this.explorePointerOut());
106+
107+
activatable.clickArea.on('pointerout', () =>
108+
this.explorePointerOut(activatable.interactionId)
109+
);
107110
activatable.clickArea.on('pointerover', () =>
108111
this.explorePointerOver(activatable.interactionId)
109112
);
@@ -138,6 +141,8 @@ class GameModeExplore implements IGameUI {
138141
*/
139142
private explorePointerOver(id: ItemId) {
140143
const hasTriggered = GameGlobalAPI.getInstance().hasTriggeredInteraction(id);
144+
GameGlobalAPI.getInstance().objectHoverGlow(id, true);
145+
141146
if (hasTriggered) {
142147
GameGlobalAPI.getInstance().setDefaultCursor(ExploreModeConstants.checked);
143148
} else {
@@ -149,8 +154,9 @@ class GameModeExplore implements IGameUI {
149154
* Function to be executed when user off hover upon interactable object/bbox.
150155
* It sets the cursor back to 'Explore' mode cursor.
151156
*/
152-
private explorePointerOut() {
157+
private explorePointerOut(id: ItemId) {
153158
GameGlobalAPI.getInstance().setDefaultCursor(ExploreModeConstants.normal);
159+
GameGlobalAPI.getInstance().objectHoverGlow(id, false);
154160
}
155161

156162
/**
@@ -163,6 +169,7 @@ class GameModeExplore implements IGameUI {
163169
*/
164170
private explorePointerUp(id: string) {
165171
GameGlobalAPI.getInstance().setDefaultCursor(Constants.defaultCursor);
172+
GameGlobalAPI.getInstance().objectHoverGlow(id, false);
166173
GameGlobalAPI.getInstance().triggerInteraction(id);
167174
GameGlobalAPI.getInstance().setDefaultCursor(ExploreModeConstants.normal);
168175
}

src/features/game/objects/GameObjectManager.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,23 @@ class GameObjectManager implements StateObserver {
7979
}
8080
}
8181

82+
/**
83+
* Apply glow effect on the object, for when it's hovered on
84+
*
85+
* @param objectId id of the object
86+
*/
87+
public objectHoverGlow(objectId: ItemId, turnOn: boolean) {
88+
const object = this.objects.get(objectId);
89+
if (!object) {
90+
return;
91+
}
92+
if (turnOn) {
93+
(object.sprite as GlowingImage).hoverGlowStart();
94+
} else {
95+
(object.sprite as GlowingImage).hoverGlowEnd();
96+
}
97+
}
98+
8299
/**
83100
* Create the object from the given object property.
84101
* Because we want this sprite to be activatable

src/features/game/scenes/gameManager/GameGlobalAPI.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ class GameGlobalAPI {
135135
this.getGameManager().getObjectManager().makeObjectBlink(objectId, turnOn);
136136
}
137137

138+
public objectHoverGlow(objectId: ItemId, turnOn: boolean) {
139+
this.getGameManager().getObjectManager().objectHoverGlow(objectId, turnOn);
140+
}
141+
138142
public setObjProperty(id: ItemId, newObjProp: ObjectProperty) {
139143
this.getGameManager().getStateManager().setObjProperty(id, newObjProp);
140144
}

src/pages/contributors/subcomponents/ContributorsDetails.tsx

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ const ContributorsDetails: React.FC = () => (
1111
<Card className={classes['contributorsDetails']} elevation={Elevation.ONE}>
1212
<H3>The Team behind the Source Academy</H3>
1313
<p className={classes['description']}>
14-
The <i>Source Academy</i> is designed and developed by a team of students, most of who have
14+
The <i>Source Academy</i> is designed and developed by a team of students, most of whom have
1515
used the system to learn the fundamentals of computing and enjoyed it. This page includes
16-
all developers who contributed to the Source Academy <i>Strange</i> (2024) and its
17-
precursors <i>Merlin</i> (2023), <i>Rook</i> (2022), <i>Knight</i> (2020) and <i>Cadet</i>{' '}
18-
(2018). These versions succeeded Source Academy 2 (2017) and ultimately the original Source
19-
Academy (2016).
16+
all developers who contributed to the Source Academy <i>Charm</i> (2025) and its precursors{' '}
17+
<i>Strange</i> (2024), <i>Merlin</i> (2023), <i>Rook</i> (2022), <i>Knight</i> (2020) and{' '}
18+
<i>Cadet</i> (2018). These versions succeeded Source Academy 2 (2017) and ultimately the
19+
original Source Academy (2016).
2020
</p>
2121
<div className={classes['leadership']}>
2222
<H5>
2323
<strong>
24-
<u>2024 Leadership (Strange)</u>
24+
<u>2025 Leadership (Charm)</u>
2525
</strong>
2626
</H5>
2727
<p>
@@ -37,7 +37,7 @@ const ContributorsDetails: React.FC = () => (
3737
</p>
3838
{dot}
3939
<p>
40-
Richard Dominick
40+
Gabriel Chang
4141
<br />
4242
<strong>(Backend)</strong>
4343
</p>
@@ -313,6 +313,49 @@ const ContributorsDetails: React.FC = () => (
313313
<strong>(Robotics)</strong>
314314
</p>
315315
</div>
316+
317+
<div className={classes['leadership']}>
318+
<p className={classes['evenWider']}>
319+
<strong>2024 Leadership (Strange)</strong>
320+
</p>
321+
<br />
322+
323+
<p>
324+
Richard Dominick
325+
<br />
326+
<strong>(CTO)</strong>
327+
</p>
328+
{dot}
329+
<p>
330+
Zhang Yao
331+
<br />
332+
<strong>(Frontend)</strong>
333+
</p>
334+
{dot}
335+
<p>
336+
Richard Dominick
337+
<br />
338+
<strong>(Backend)</strong>
339+
</p>
340+
{dot}
341+
<p>
342+
Lee Hyung Woon
343+
<br />
344+
<strong>(Game)</strong>
345+
</p>
346+
{dot}
347+
<p>
348+
Kyriel Mortel Abad
349+
<br />
350+
<strong>(Languages)</strong>
351+
</p>
352+
{dot}
353+
<p>
354+
Lee Yi
355+
<br />
356+
<strong>(Modules)</strong>
357+
</p>
358+
</div>
316359
<div className={classes['contributors']}>
317360
<H5>
318361
<strong>

0 commit comments

Comments
 (0)