feat: Integrate custom prop library and sandbox functionality
- Added support for custom props in the sandbox, including loading, saving, and rendering. - Implemented `PropLibrary` for managing custom prop entries and scanning for `.prop` files. - Introduced `PropVisuals` for shared visual and collision representation of custom props. - Enhanced `StageSpawner` to handle spawning of custom props with layered visuals and collision hulls. - Created `MissingPropPlaceholder` to manage missing custom props during scene reloads. - Updated thumbnail generation to support custom props with unique keys based on file paths. - Added tests for custom prop lifecycle, authored visual values, and missing prop handling. - Refactored existing code to accommodate new prop functionalities and ensure backward compatibility.
This commit is contained in:
@@ -40,7 +40,9 @@ func prop_png(id: String) -> String:
|
||||
|
||||
|
||||
func prop_file_key(path: String) -> String:
|
||||
return "%s_%d" % [path.get_file().get_basename(), FileAccess.get_modified_time(path)]
|
||||
var canonical: String = path.simplify_path()
|
||||
var digest: String = canonical.sha256_text().substr(0, 12)
|
||||
return "file_%s_%d" % [digest, FileAccess.get_modified_time(path)]
|
||||
|
||||
|
||||
func prop_file_png(path: String) -> String:
|
||||
|
||||
Reference in New Issue
Block a user