diff --git a/css/inventory.css b/css/inventory.css
index 3e463ab..7ce7985 100644
--- a/css/inventory.css
+++ b/css/inventory.css
@@ -38,6 +38,26 @@
background: rgb(149 157 216 / 80%);
}
+/* Pulse animation for newly added items */
+@keyframes pulse-slot {
+ 0% {
+ transform: scale(1);
+ box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
+ }
+ 50% {
+ transform: scale(1.5);
+ box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
+ }
+ 100% {
+ transform: scale(1);
+ box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
+ }
+}
+
+.inventory-slot.pulse {
+ animation: pulse-slot 0.6s ease-out;
+}
+
.inventory-item {
max-width: 48px;
max-height: 48px;
diff --git a/css/notes.css b/css/notes.css
index b6962db..03f0712 100644
--- a/css/notes.css
+++ b/css/notes.css
@@ -77,6 +77,7 @@
margin: 0;
overflow: auto; /* Allow scrolling if content is too long */
box-sizing: border-box;
+ height: 90%; /* so that it scolls before the bottom of the image */
}
/* Text box container */
diff --git a/css/password-minigame.css b/css/password-minigame.css
index cfd7c48..d19a856 100644
--- a/css/password-minigame.css
+++ b/css/password-minigame.css
@@ -180,11 +180,7 @@
background: rgba(0, 255, 0, 0.1);
}
-.icon-small {
- width: 20px;
- height: 20px;
- object-fit: contain;
-}
+
.icon-keyboard {
width: 40px;
@@ -226,6 +222,13 @@
transform: scale(0.95);
}
+.hint-controls {
+ display: flex;
+ gap: 10px;
+ align-items: center;
+ margin-bottom: 10px;
+}
+
.password-hint-container {
display: flex;
flex-direction: column;
@@ -236,7 +239,7 @@
background: #f39c12;
color: white;
border: none;
- padding: 8px 16px;
+ padding: 12px 24px;
/* border-radius: 5px; */
cursor: pointer;
font-size: 18px;
diff --git a/js/minigames/container/container-minigame.js b/js/minigames/container/container-minigame.js
index 9fcd877..94e5e93 100644
--- a/js/minigames/container/container-minigame.js
+++ b/js/minigames/container/container-minigame.js
@@ -43,6 +43,15 @@ export class ContainerMinigame extends MinigameScene {
`;
}
+ // Add notebook button to minigame controls if postit note exists
+ if (this.controlsElement && this.containerItem.scenarioData.postitNote && this.containerItem.scenarioData.showPostit) {
+ const notebookBtn = document.createElement('button');
+ notebookBtn.className = 'minigame-button';
+ notebookBtn.id = 'minigame-notebook-postit';
+ notebookBtn.innerHTML = '
Add to Notebook';
+ this.controlsElement.appendChild(notebookBtn);
+ }
+
// Create the container minigame UI
this.createContainerUI();
}
@@ -235,6 +244,12 @@ export class ContainerMinigame extends MinigameScene {
if (closeBtn) {
this.addEventListener(closeBtn, 'click', () => this.complete(false));
}
+
+ // Add to Notebook button
+ const addToNotebookBtn = document.getElementById('minigame-notebook-postit');
+ if (addToNotebookBtn) {
+ this.addEventListener(addToNotebookBtn, 'click', () => this.addPostitToNotebook());
+ }
}
isInteractiveItem(item) {
@@ -396,6 +411,80 @@ export class ContainerMinigame extends MinigameScene {
window.gameAlert('Crypto workstation not available', 'error', 'Error', 3000);
}
}
+
+ addPostitToNotebook() {
+ console.log('Adding postit note to notebook:', this.containerItem.scenarioData.postitNote);
+
+ const postitNote = this.containerItem.scenarioData.postitNote;
+ if (!postitNote || postitNote.trim() === '') {
+ this.showMessage('No postit note to add.', 'error');
+ return;
+ }
+
+ // Create comprehensive notebook content
+ const notebookTitle = `Postit Note - ${this.containerItem.scenarioData.name}`;
+ let notebookContent = `Postit Note:\n${'-'.repeat(50)}\n\n${postitNote}`;
+
+ // Add container contents list
+ notebookContent += `\n\n${'='.repeat(20)}\n`;
+ notebookContent += `CONTAINER CONTENTS: ${this.containerItem.scenarioData.name}\n`;
+ notebookContent += `${'='.repeat(20)}\n`;
+
+ if (this.contents && this.contents.length > 0) {
+ this.contents.forEach((item, index) => {
+ notebookContent += `${index + 1}. ${item.name || item.type}`;
+ if (item.description) {
+ notebookContent += ` - ${item.description}`;
+ }
+ notebookContent += '\n';
+ });
+ } else {
+ notebookContent += 'No items found\n';
+ }
+
+ notebookContent += `${'='.repeat(20)}\n`;
+ notebookContent += `Date: ${new Date().toLocaleString()}`;
+
+ const notebookObservations = `Postit note found in ${this.containerItem.scenarioData.name}.`;
+
+ // Check if notes minigame is available
+ if (window.startNotesMinigame) {
+ // Store the container state globally so we can return to it
+ const containerState = {
+ containerItem: this.containerItem,
+ contents: this.contents,
+ isTakeable: this.isTakeable
+ };
+
+ window.pendingContainerReturn = containerState;
+
+ // Create a postit item for the notes minigame
+ const postitItem = {
+ scenarioData: {
+ type: 'postit_note',
+ name: notebookTitle,
+ text: notebookContent,
+ observations: notebookObservations,
+ important: true
+ }
+ };
+
+ // Start notes minigame
+ window.startNotesMinigame(
+ postitItem,
+ notebookContent,
+ notebookObservations,
+ null,
+ false,
+ false
+ );
+
+ this.showMessage("Added postit note to notebook", 'success');
+ } else {
+ console.error('Notes minigame not available');
+ this.showMessage('Notebook not available', 'error');
+ }
+ }
takeItem(item, itemElement) {
console.log('Taking item from container:', item);
diff --git a/js/minigames/notes/notes-minigame.js b/js/minigames/notes/notes-minigame.js
index 85b3288..d460635 100644
--- a/js/minigames/notes/notes-minigame.js
+++ b/js/minigames/notes/notes-minigame.js
@@ -799,10 +799,6 @@ window.addNote = function(title, text, important = false) {
window.gameState.notes.push(note);
- // Show notification for new note
- if (window.showNotification) {
- window.showNotification(`New note added: ${title}`, 'info', 'Note Added', 3000);
- }
return note;
};
diff --git a/js/minigames/password/password-minigame.js b/js/minigames/password/password-minigame.js
index 70b10b1..873ed89 100644
--- a/js/minigames/password/password-minigame.js
+++ b/js/minigames/password/password-minigame.js
@@ -36,6 +36,15 @@ export class PasswordMinigame extends MinigameScene {
// Set up the password interface
this.setupPasswordInterface();
+ // Add notebook button to minigame controls if postit note exists (before cancel button)
+ if (this.controlsElement && this.gameData.showPostit && this.gameData.postitNote) {
+ const notebookBtn = document.createElement('button');
+ notebookBtn.className = 'minigame-button';
+ notebookBtn.id = 'minigame-notebook-postit';
+ notebookBtn.innerHTML = '
Add to Notebook';
+ this.controlsElement.appendChild(notebookBtn);
+ }
+
// Set up event listeners
this.setupEventListeners();
}
@@ -61,8 +70,11 @@ export class PasswordMinigame extends MinigameScene {
${this.gameData.showHint ? `
-