feat(expansion): implement Phase 3 (Town Restoration) and Phase 4 (Cannabis Textiles)
- Added TownSquareScene and linked it with M key transition - Integrated TownRestorationSystem with material costs and inventory - Added locked shop items in NPCShopSystem until buildings are restored - Updated InteractionSystem to handle ruin restoration triggers - Expanded Cannabis farming to yield Hemp Fiber - Added Hemp Clothing crafting recipe and procedural icons - Refactored StatusEffectSystem and NPCShopSystem to global classes
This commit is contained in:
@@ -18,6 +18,13 @@ class FarmingSystem {
|
||||
daysPerStage: 2,
|
||||
sellPrice: 15,
|
||||
seedCost: 8
|
||||
},
|
||||
'cannabis': {
|
||||
name: 'Cannabis',
|
||||
growthStages: 4,
|
||||
daysPerStage: 2,
|
||||
sellPrice: 60,
|
||||
seedCost: 20
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -154,16 +161,18 @@ class FarmingSystem {
|
||||
// Determine texture based on stage
|
||||
let textureKey = `crop_${crop.type}_stage_${crop.stage}`;
|
||||
|
||||
// Fallback textures
|
||||
if (!this.scene.textures.exists(textureKey)) {
|
||||
textureKey = 'carrots_stages'; // Use carrot stages as fallback
|
||||
}
|
||||
|
||||
if (this.scene.textures.exists(textureKey)) {
|
||||
crop.sprite = this.scene.add.sprite(screenPos.x, screenPos.y, textureKey);
|
||||
crop.sprite.setOrigin(0.5, 1);
|
||||
crop.sprite.setScale(0.8);
|
||||
crop.sprite.setDepth(this.scene.iso.getDepth(crop.gridX, crop.gridY));
|
||||
|
||||
// Apply tilts/fallback tints
|
||||
if (textureKey === 'carrots_stages' && crop.type === 'cannabis') {
|
||||
crop.sprite.setTint(0x55ff55); // Green tint for cannabis fallback
|
||||
} else if (crop.type === 'cannabis') {
|
||||
crop.sprite.setTint(0x88ff88); // Subtle green boost for specific texture
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +191,12 @@ class FarmingSystem {
|
||||
|
||||
// Give items
|
||||
if (this.scene.inventorySystem) {
|
||||
this.scene.inventorySystem.addItem(crop.type, 1);
|
||||
if (crop.type === 'cannabis') {
|
||||
this.scene.inventorySystem.addItem('cannabis_buds', 2);
|
||||
this.scene.inventorySystem.addItem('hemp_fiber', 3);
|
||||
} else {
|
||||
this.scene.inventorySystem.addItem(crop.type, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Give gold
|
||||
|
||||
Reference in New Issue
Block a user