phase 11 part1
This commit is contained in:
@@ -630,10 +630,11 @@ class NPC {
|
||||
|
||||
this.state = 'TAMED';
|
||||
console.log('🧟❤️ Zombie TAMED!');
|
||||
this.isTamed = true; // Mark as tamed
|
||||
|
||||
// Register to ZombieWorkerSystem
|
||||
if (this.scene.zombieSystem) {
|
||||
this.scene.zombieSystem.registerWorker(this);
|
||||
// Register to ZombieWorkerSystem (assign FARM work by default)
|
||||
if (this.scene.zombieWorkerSystem) {
|
||||
this.scene.zombieWorkerSystem.assignWork(this, 'FARM', 5);
|
||||
}
|
||||
|
||||
// Visual Feedback
|
||||
|
||||
@@ -44,35 +44,41 @@ class Scooter {
|
||||
}
|
||||
|
||||
tryFix(player) {
|
||||
// Logic: Check if player has tools?
|
||||
// User said: "ga more popraviti" (needs to fix it).
|
||||
// Let's just require a short delay or check for 'wrench' if we had one.
|
||||
// For easter egg, let's say hitting it with a hammer works, or just interacting.
|
||||
// Let's make it simple: "Fixing Scooter..." progress.
|
||||
// Use ScooterRepairSystem to check parts/tools
|
||||
if (!this.scene.scooterRepairSystem) {
|
||||
console.log('🚫 Repair system not available!');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('🔧 Fixing Scooter...');
|
||||
this.scene.events.emit('show-floating-text', {
|
||||
x: this.sprite.x,
|
||||
y: this.sprite.y - 50,
|
||||
text: "Fixing...",
|
||||
color: '#FFFF00'
|
||||
});
|
||||
console.log('🔧 Attempting to repair Scooter...');
|
||||
|
||||
// Plays sound
|
||||
if (this.scene.soundManager) this.scene.soundManager.playHit(); // Clank sounds
|
||||
const success = this.scene.scooterRepairSystem.repairScooter();
|
||||
|
||||
// Delay 2 seconds then fix
|
||||
this.scene.time.delayedCall(2000, () => {
|
||||
if (success) {
|
||||
this.isBroken = false;
|
||||
this.createSprite(); // Update texture to shiny
|
||||
this.createSprite(); // Update to fixed texture
|
||||
|
||||
this.scene.events.emit('show-floating-text', {
|
||||
x: this.sprite.x,
|
||||
y: this.sprite.y - 50,
|
||||
text: "Scooter Fixed!",
|
||||
text: "🛵 REPAIRED!",
|
||||
color: '#00FF00'
|
||||
});
|
||||
console.log('✅ Scooter Fixed!');
|
||||
});
|
||||
|
||||
if (this.scene.soundManager) {
|
||||
this.scene.soundManager.playHarvest(); // Success sound
|
||||
}
|
||||
} else {
|
||||
// Show what's missing
|
||||
this.scene.scooterRepairSystem.listMissingParts();
|
||||
|
||||
this.scene.events.emit('show-floating-text', {
|
||||
x: this.sprite.x,
|
||||
y: this.sprite.y - 50,
|
||||
text: "Missing Parts!",
|
||||
color: '#FF0000'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
toggleRide(player) {
|
||||
|
||||
Reference in New Issue
Block a user