Skip to content

Commit

Permalink
fix: create_clone - other targets
Browse files Browse the repository at this point in the history
  • Loading branch information
gnlow committed Dec 4, 2023
1 parent 4198a12 commit ead8254
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,11 @@ export class Entry {
```
*/
create_clone(targetId: string, obj: EntrySprite) {
if (targetId == "self") {
obj.clone(this)
}
const target =
targetId == "self"
? obj
: this.objects[targetId]
target.clone(this)
}
when_clone_start(f: () => void, obj: EntrySprite) {
obj.on("clone", f)
Expand Down

0 comments on commit ead8254

Please sign in to comment.