FEATURES: ✅ Blueprint System: Auto-generated ghost/hologram items for building mode ✅ ItemManager: Logic for Item/Blueprint switching ✅ New Animals: Cow, Pig, Bear, Wolf (Dark Noir Chibi Style) ORGANIZATION: ✅ Flattened Reference Library: All 6k+ images in 'glavna_referenca' for easy review ✅ Cleanup: Empty 'ZA_PREGLED' and '_NESORTIRANO' sorted ✅ Unlocked: 'glavna_referenca' ready for manual editing STATUS: Ready for DEMO assembly!
83 lines
2.6 KiB
Python
83 lines
2.6 KiB
Python
import os
|
|
import shutil
|
|
|
|
SOURCE_DIR = os.path.abspath("assets/slike/glavna_referenca/_NESORTIRANO")
|
|
DEST_BASE = os.path.abspath("assets/slike/glavna_referenca")
|
|
|
|
RULES = {
|
|
# DINOSAURS -> Dino Valley
|
|
"dinosaurs": "biomes/10_dino_valley/enemies",
|
|
"trex": "biomes/10_dino_valley/boss",
|
|
"raptor": "biomes/10_dino_valley/enemies",
|
|
"triceratops": "biomes/10_dino_valley/enemies",
|
|
|
|
# CHERNOBYL
|
|
"Chernobyl": "biomes/20_chernobyl", # Script will check for 'props', 'building' keywords
|
|
"radioactive": "biomes/09_radioactive/terrain",
|
|
|
|
# ARCTIC
|
|
"Arctic": "biomes/06_snow",
|
|
|
|
# Other Biomes based on keywords
|
|
"desert": "biomes/04_desert",
|
|
"swamp": "biomes/03_swamp",
|
|
"forest": "biomes/02_forest",
|
|
"jungle": "biomes/16_amazon_rainforest",
|
|
"amazon": "biomes/16_amazon_rainforest",
|
|
"egypt": "biomes/15_egyptian_desert",
|
|
"mexic": "biomes/18_mexican_cenotes",
|
|
"witch": "biomes/19_witch_forest",
|
|
"atlantis": "biomes/17_atlantis",
|
|
|
|
# Common Items
|
|
"potion": "items/consumables",
|
|
"tool": "items/tools",
|
|
"weapon": "items/weapons",
|
|
|
|
# Susi (Just in case some are left)
|
|
"susi": "characters/susi",
|
|
}
|
|
|
|
def organize():
|
|
if not os.path.exists(SOURCE_DIR):
|
|
print("❌ NESORTIRANO map not found")
|
|
return
|
|
|
|
print("📦 Organizing NESORTIRANO...")
|
|
count = 0
|
|
|
|
for filename in os.listdir(SOURCE_DIR):
|
|
if filename.startswith("."): continue
|
|
|
|
src_path = os.path.join(SOURCE_DIR, filename)
|
|
lower_name = filename.lower()
|
|
dest_subdir = None
|
|
|
|
# 1. SPECIAL LOGIC FOR CHERNOBYL PROPS
|
|
if "chernobyl" in lower_name and "props" in lower_name:
|
|
dest_subdir = "biomes/20_chernobyl/items"
|
|
elif "chernobyl" in lower_name:
|
|
dest_subdir = "biomes/20_chernobyl/buildings"
|
|
|
|
# 2. General Rules
|
|
if not dest_subdir:
|
|
for keyword, path in RULES.items():
|
|
if keyword.lower() in lower_name:
|
|
dest_subdir = path
|
|
break
|
|
|
|
# 3. Move it
|
|
if dest_subdir:
|
|
full_dest_dir = os.path.join(DEST_BASE, dest_subdir)
|
|
if not os.path.exists(full_dest_dir):
|
|
os.makedirs(full_dest_dir)
|
|
|
|
shutil.move(src_path, os.path.join(full_dest_dir, filename))
|
|
count += 1
|
|
if count % 50 == 0: print(f"Moved {count} files...")
|
|
|
|
print(f"✅ Finished! Organized {count} files from NESORTIRANO.")
|
|
|
|
if __name__ == "__main__":
|
|
organize()
|