teleporter
This commit is contained in:
@@ -119,7 +119,7 @@ fn parse_bounds_args() -> Option<Bounds> {
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let logger = DedupLogger::new();
|
||||
log::set_boxed_logger(Box::new(logger))
|
||||
.map(|()| log::set_max_level(LevelFilter::Trace))
|
||||
.map(|()| log::set_max_level(LevelFilter::Warn))
|
||||
.unwrap();
|
||||
|
||||
info!("🎮 Cursebreaker - Scene Parser");
|
||||
@@ -197,8 +197,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.map(|p| p.to_string_lossy().to_string())
|
||||
.unwrap_or_else(|_| scene_path.to_string_lossy().to_string());
|
||||
|
||||
info!("\n📁 [{}/{}] Parsing scene: {}", idx + 1, scene_files.len(), relative_path);
|
||||
log::logger().flush();
|
||||
print!("\n📁 [{}/{}] Parsing scene: {}", idx + 1, scene_files.len(), relative_path);
|
||||
|
||||
match project.parse_scene_filtered(&relative_path, Some(&type_filter)) {
|
||||
Ok(mut scene) => {
|
||||
@@ -242,17 +241,17 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
process_item_icons_from_map(&cb_assets_path, &mut conn, &all_unique_harvestables)?;
|
||||
|
||||
// Print summary
|
||||
info!("\n==================================================");
|
||||
info!("📊 SUMMARY");
|
||||
info!("==================================================");
|
||||
info!(" Scenes processed: {} ({} failed)", scenes_processed, scenes_failed);
|
||||
info!(" Resources: {}", total_resources);
|
||||
info!(" Teleporters: {}", total_teleporters);
|
||||
info!(" Workbenches: {}", total_workbenches);
|
||||
info!(" Loot spawners: {}", total_loot);
|
||||
info!(" Map icons: {}", total_map_icons);
|
||||
info!(" Map name changers:{}", total_map_name_changers);
|
||||
info!("==================================================");
|
||||
println!("\n==================================================");
|
||||
println!("📊 SUMMARY");
|
||||
println!("==================================================");
|
||||
println!(" Scenes processed: {} ({} failed)", scenes_processed, scenes_failed);
|
||||
println!(" Resources: {}", total_resources);
|
||||
println!(" Teleporters: {}", total_teleporters);
|
||||
println!(" Workbenches: {}", total_workbenches);
|
||||
println!(" Loot spawners: {}", total_loot);
|
||||
println!(" Map icons: {}", total_map_icons);
|
||||
println!(" Map name changers:{}", total_map_name_changers);
|
||||
println!("==================================================");
|
||||
|
||||
log::logger().flush();
|
||||
|
||||
|
||||
@@ -288,6 +288,7 @@ impl IconDatabase {
|
||||
("Inventory/Banknote.png", "Inventory_Banknote"),
|
||||
("Minimap/ShowCoordinates.png", "Minimap_ShowCoordinates"),
|
||||
("SplashScreens/Olipa.png", "SplashScreens_Olipa"),
|
||||
("ItemIcons/131.png", "SplashScreens_Olipa"),
|
||||
];
|
||||
|
||||
for (file, name) in individual_files {
|
||||
|
||||
@@ -516,11 +516,18 @@ impl ItemDatabase {
|
||||
icon_base_path: &Path,
|
||||
item_id: i32,
|
||||
) -> (Option<Vec<u8>>, Option<Vec<u8>>, Option<Vec<u8>>) {
|
||||
// Try both lowercase and uppercase extensions (Linux is case-sensitive)
|
||||
let icon_file = icon_base_path.join(format!("{}.png", item_id));
|
||||
|
||||
if !icon_file.exists() {
|
||||
let icon_file = if icon_file.exists() {
|
||||
icon_file
|
||||
} else {
|
||||
let uppercase = icon_base_path.join(format!("{}.PNG", item_id));
|
||||
if uppercase.exists() {
|
||||
uppercase
|
||||
} else {
|
||||
return (None, None, None);
|
||||
}
|
||||
};
|
||||
|
||||
// Process image at 3 sizes: 256, 64, 16
|
||||
match processor.process_image(&icon_file, &[256, 64, 16], None, None) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/// Interactable_TeleporterTeleporter component from Cursebreaker
|
||||
/// Interactable_TeleporterDoor component from Cursebreaker
|
||||
///
|
||||
/// C# definition from Interactable_TeleporterTeleporter.cs:
|
||||
/// C# definition from Interactable_TeleporterDoor.cs:
|
||||
/// ```csharp
|
||||
/// public class Interactable_TeleporterTeleporter : MonoBehaviour
|
||||
/// public class Interactable_TeleporterDoor : MonoBehaviour
|
||||
/// {
|
||||
/// public Transform tpTransform;
|
||||
/// }
|
||||
@@ -53,7 +53,7 @@ impl EcsInsertable for InteractableTeleporter {
|
||||
inventory::submit! {
|
||||
unity_parser::ComponentRegistration {
|
||||
type_id: 114,
|
||||
class_name: "Interactable_TeleporterTeleporter",
|
||||
class_name: "Interactable_TeleporterDoorEditor",
|
||||
parse_and_insert: |yaml, ctx, world, entity| {
|
||||
<InteractableTeleporter as EcsInsertable>::parse_and_insert(yaml, ctx, world, entity)
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! ECS world building from Unity documents
|
||||
|
||||
use log::{info, warn};
|
||||
use log::{info, warn, debug};
|
||||
|
||||
use crate::model::RawDocument;
|
||||
use crate::parser::{GuidResolver, PrefabGuidResolver};
|
||||
@@ -150,7 +150,7 @@ pub fn build_world_from_documents(
|
||||
}
|
||||
Err(e) => {
|
||||
// Soft failure - warn but continue
|
||||
warn!("Failed to instantiate prefab: {}", e);
|
||||
debug!("Failed to instantiate prefab: {}", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user