🐕💙 Animal System & Emotional Memory Implementation

FEATURES:
- Created animals/ folder structure (wild, domestic, infected)
- Implemented proximity-based memory trigger system
- Pulsating heart UI when Kai remembers family dog
- Emotional storytelling without dialogue

NEW FILES:
- src/entities/Animal.js - Animal class with proximity detection
- src/ui/MemoryHeartUI.js - Pulsating heart with Slovenian text
- docs/systems/ANIMAL_MEMORY_SYSTEM.md - Full documentation
- scripts/organize_all_tools.py - Tool organization script

TOOLS ORGANIZATION:
- Moved 84 additional tools to items/tools/
- Final count: 427 tools organized by material tier
  • wood: 36 tools
  • stone: 60 tools
  • iron: 36 tools
  • gold: 36 tools
  • special: 259 tools

GAMESCENE INTEGRATION:
- Added Animal and MemoryHeartUI imports
- Preload heart icon and heartbeat audio
- Update animals each frame for proximity detection
- Example domestic dog spawns at (600, 600)

EMOTIONAL IMPACT:
When Kai approaches a domestic dog, a pulsating heart appears
with text 'Spominjaš se...' (You remember...) - creating a
powerful moment of nostalgia for his lost family pet.
This commit is contained in:
2026-01-20 01:45:03 +01:00
parent e7759433a2
commit 5fb502e7a8
200 changed files with 484 additions and 2 deletions

View File

@@ -0,0 +1,127 @@
#!/usr/bin/env python3
"""
⚒️ COMPLETE TOOL ORGANIZATION SCRIPT
Find ALL tools anywhere in assets/slike/ and organize by material tier
"""
import os
import shutil
from pathlib import Path
# Base directories
BASE_DIR = Path("/Users/davidkotnik/repos/novafarma/assets/slike")
TOOLS_DIR = BASE_DIR / "items" / "tools"
# Tool types to look for
TOOL_TYPES = [
"hoe", "shovel", "scythe", "watering_can", "axe", "pickaxe",
"fishing_rod", "fishing_net", "hammer", "wrench", "saw",
"sickle", "bucket", "pitchfork"
]
# Material tiers (order matters - check basic first!)
MATERIAL_TIERS = {
"wood": ["wood_", "wooden_"],
"stone": ["stone_", "basic_", "hoe_basic", "shovel_basic", "rusty_"], # basic = stone tier
"iron": ["iron_"],
"gold": ["steel_", "gold_"],
"special": ["fishing_", "hammer_", "wrench_", "baking_", "piercing_",
"bucket_", "compass_", "hourglass_", "saw_", "scissors_",
"tool_rack", "tool_shed", "tool_durability", "tool_break",
"tool_icons", "repair_bench"]
}
def get_tool_tier(filename):
"""Determine which material tier a tool belongs to"""
fname_lower = filename.lower()
# Check if it's a tool at all
is_tool = any(tool_type in fname_lower for tool_type in TOOL_TYPES)
is_tool = is_tool or "tool_" in fname_lower or "orodja" in fname_lower
if not is_tool:
return None
# Determine tier
for tier, patterns in MATERIAL_TIERS.items():
for pattern in patterns:
if pattern in fname_lower:
return tier
# Default: if it has "tool" in name but no tier, put in special
if "tool" in fname_lower or "orodja" in fname_lower:
return "special"
return None
def find_all_tools(base_dir):
"""Find all tool files in the entire directory tree"""
tools_found = []
print(f"🔍 Scanning {base_dir} for tools...")
for file_path in base_dir.rglob("*.png"):
if file_path.is_file():
tier = get_tool_tier(file_path.name)
if tier:
# Skip if already in correct location
if file_path.parent == (TOOLS_DIR / tier):
continue
tools_found.append((file_path, tier))
return tools_found
def organize_tools():
"""Main organization function"""
print("⚒️ COMPLETE TOOL ORGANIZATION")
print("="*60)
# Create tier directories
for tier in MATERIAL_TIERS.keys():
tier_dir = TOOLS_DIR / tier
tier_dir.mkdir(parents=True, exist_ok=True)
# Find all tools
tools = find_all_tools(BASE_DIR)
if not tools:
print("✅ All tools are already organized!")
return
print(f"\n📦 Found {len(tools)} tools to organize\n")
# Organize by tier
moved_count = 0
tier_counts = {tier: 0 for tier in MATERIAL_TIERS.keys()}
for file_path, tier in tools:
dest_dir = TOOLS_DIR / tier
dest_path = dest_dir / file_path.name
# Check if destination already exists
if dest_path.exists():
print(f"⚠️ Skipping {file_path.name} (already exists in {tier}/)")
continue
# Move file
try:
shutil.move(str(file_path), str(dest_path))
print(f"📁 {file_path.name} → tools/{tier}/")
moved_count += 1
tier_counts[tier] += 1
except Exception as e:
print(f"❌ Error moving {file_path.name}: {e}")
# Summary
print(f"\n{'='*60}")
print(f"✅ Moved: {moved_count} tools")
print(f"\nBreakdown by tier:")
for tier, count in tier_counts.items():
if count > 0:
print(f"{tier:10} : {count} tools")
print(f"{'='*60}\n")
if __name__ == "__main__":
organize_tools()
print("✨ Done!")