phase 12 koncxana
This commit is contained in:
@@ -157,6 +157,12 @@ class InteractionSystem {
|
||||
return;
|
||||
}
|
||||
|
||||
// 3.3.1 BOAT DEPLOY
|
||||
if (activeTool === 'boat' && !isAttack && this.scene.oceanSystem) {
|
||||
this.scene.oceanSystem.useBoat();
|
||||
return;
|
||||
}
|
||||
|
||||
// 3.4 Check for Vehicles (Scooter)
|
||||
if (!isAttack && this.scene.vehicles) {
|
||||
for (const vehicle of this.scene.vehicles) {
|
||||
@@ -215,6 +221,32 @@ class InteractionSystem {
|
||||
}
|
||||
}
|
||||
|
||||
// 3.6 Check for Livestock Interaction (Milking)
|
||||
if (npc.type.includes('cow') && activeTool === 'bucket' && !isAttack) {
|
||||
if (npc.milkReady) {
|
||||
npc.milkReady = false;
|
||||
npc.milkCooldown = 60000; // 60s cooldown
|
||||
|
||||
const product = npc.type.includes('mutant') ? 'glowing_milk' : 'milk';
|
||||
|
||||
if (invSys) {
|
||||
invSys.addItem(product, 1);
|
||||
this.scene.events.emit('show-floating-text', {
|
||||
x: npc.sprite.x, y: npc.sprite.y - 40, text: `+1 ${product}`, color: '#FFFFFF'
|
||||
});
|
||||
console.log(`🥛 Milked ${npc.type}: ${product}`);
|
||||
|
||||
// Optional: Replace bucket with empty? No, bucket is tool.
|
||||
// Maybe replace bucket with bucket_milk if it was a single use item, but let's keep it as tool.
|
||||
}
|
||||
} else {
|
||||
this.scene.events.emit('show-floating-text', {
|
||||
x: npc.sprite.x, y: npc.sprite.y - 40, text: 'Not ready...', color: '#AAAAAA'
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isAttack) npc.toggleState();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user