placeholderBlock
0
0
2
0
<undefined>
<undefined>
1
611
6
-1
0
-1
2
self
0
0
1
inputs
0
ds_list_create()
1
611
6
-1
0
-1
2
self
0
0
1
outputs
0
ds_list_create()
1
611
6
-1
0
-1
2
self
0
0
1
allowedUses
0
1
1
603
7
0
0
-1
2
self
0
0
1
///Count number of allowed uses of this template
var uses = 0;
with (OneUse) {
if (place_meeting(x, y, other))
uses++;
}
if (uses > 0)
allowedUses = uses;
1
603
7
0
0
-1
2
self
0
0
1
///Find anchors, call User 2 recursively, attach inputs and outputs
var anchors = ds_priority_create();
with (InputTemplate) {
if (place_meeting(self.x, self.y, other))
ds_priority_add(anchors, id, self.x);
}
with (OutputTemplate) {
if (place_meeting(self.x, self.y, other))
ds_priority_add(anchors, id, self.x);
}
repeat (ds_priority_size(anchors)) {
var anchor = ds_priority_delete_min(anchors);
with (anchor)
event_user(2);
with (TypeParser)
addLink(self.root, anchor.con);
if (instanceof(anchor, InputTemplate))
ds_list_add(self.inputs, anchor.con);
else
ds_list_add(self.outputs, anchor.con);
}
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
0