dodelani dnevnik

This commit is contained in:
2025-12-08 03:15:53 +01:00
parent 860a10a5c3
commit 4c3ee03007
11 changed files with 488 additions and 72 deletions

View File

@@ -0,0 +1,32 @@
class BlueprintSystem {
constructor(scene) {
this.scene = scene;
this.knownRecipes = ['axe', 'pickaxe', 'hoe']; // Default known
this.blueprintsFound = []; // Items found but not learned? Or just list
console.log('📜 BlueprintSystem: Initialized');
}
// Called when digging/mining
tryDropBlueprint() {
if (Math.random() < 0.05) { // 5% chance
const newBp = 'blueprint_barn'; // Randomize this
console.log('✨ BLUEPRINT FOUND:', newBp);
return newBp;
}
return null;
}
learnBlueprint(id) {
if (!this.knownRecipes.includes(id)) {
this.knownRecipes.push(id);
console.log('🧠 Learned Recipe:', id);
// TODO: Add to Crafting Menu
return true;
}
return false;
}
hasRecipe(id) {
return this.knownRecipes.includes(id);
}
}