Skip to content

Commit

Permalink
Allow removing a template from any entity.
Browse files Browse the repository at this point in the history
  • Loading branch information
player-03 committed Nov 11, 2024
1 parent a3a36e1 commit 98d8e6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/echoes/macro/EntityTemplateBuilder.hx
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ class EntityTemplateBuilder {
}

fields = (macro class RemoveTemplate {
@:noCompletion public static inline function removeTemplateFrom(entity:$templateType, ?recursive:Bool = false):echoes.Entity {
entity.removeTemplateFromSelf(${ parents.length > 1 ? macro recursive : macro false });
@:noCompletion public static inline function removeTemplateFrom(entity:echoes.Entity, ?recursive:Bool = false):echoes.Entity {
(cast entity:$templateType).removeTemplateFromSelf(${ parents.length > 1 ? macro recursive : macro false });
return cast entity;
}

Expand Down

0 comments on commit 98d8e6e

Please sign in to comment.