Define data types for ID-based resource handling (#4168)

* Add resource lib

* rename ResourceSource to ResourceInput

* Rename ResourceInput -> DataSource and improve API

* Review

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
This commit is contained in:
Timon
2026-05-25 10:50:57 +00:00
committed by GitHub
parent d0d9a350c7
commit bbbe04903f
28 changed files with 187 additions and 46 deletions

View File

@@ -16,7 +16,7 @@ pub fn expand_network(network: &mut NodeNetwork, substitutions: &HashMap<ProtoNo
/// Replace every `TaggedValue::Resource(hash)` input with a reference to a freshly inserted `resource` proto node.
fn replace_resource_inputs(network: &mut NodeNetwork) {
let mut hash_to_node_id: HashMap<application_io::ResourceHash, NodeId> = HashMap::new();
let mut hash_to_node_id: HashMap<graph_craft::application_io::resource::ResourceHash, NodeId> = HashMap::new();
let mut new_resource_nodes: Vec<(NodeId, DocumentNode)> = Vec::new();
for node in network.nodes.values_mut() {