diff options
| author | J08nY | 2017-04-24 02:23:37 +0200 |
|---|---|---|
| committer | J08nY | 2017-04-24 02:23:37 +0200 |
| commit | 8f1613ca0fab95fe837d9278e7829f70fb7bc934 (patch) | |
| tree | 572ebdce96d1e1734d5175d646fe2248d483cff2 /scripts/template_combine.gd | |
| parent | cfe4ce0fb4705a6c231528d60e4833c4dc2ec68f (diff) | |
| download | ld38-8f1613ca0fab95fe837d9278e7829f70fb7bc934.tar.gz ld38-8f1613ca0fab95fe837d9278e7829f70fb7bc934.tar.zst ld38-8f1613ca0fab95fe837d9278e7829f70fb7bc934.zip | |
Diffstat (limited to 'scripts/template_combine.gd')
| -rw-r--r-- | scripts/template_combine.gd | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/template_combine.gd b/scripts/template_combine.gd new file mode 100644 index 0000000..9791703 --- /dev/null +++ b/scripts/template_combine.gd @@ -0,0 +1,10 @@ +extends "res://scripts/template.gd" + +var bases = null + +func _init().("res://assets/combinator.json"): + self.bases = self.data["bases"] + +func template(world): + var base = self.bases[randi() % self.bases.size()] + return self.replace_all(base, self.data) |
