Open joshuaskelly opened 4 years ago
I could imagine that passing a TagCollection
to those methods would not be easy?! How about just passing an array of strings instead, e.g. tags.remove(["foo", "bar"])
.
Why would that be difficult? It would look like:
Trigger t;
Player p;
p.tags.remove(t.tags);
Mock example of a trigger that removes a set of tags
@PythooonUser I agree with @joshuaskelly as initialisation would be done mainly in the data files. How about a generic collection which also adds method overloads for Array<E>
and E[]
though?
public interface TagCollection<E> {
void add(E value);
void add(Array<E> value);
void add(E[] value);
}
I'd also like to present a pretty easy view in the editor. Which typically is a comma separate list of strings.
That mock example makes sense. I thought of a non-cached use-case where you would just test for some tags, and not creating a collection first etc.
@evrimoztamur I don't know what being generic gets us?
@joshuaskelly because Java has generics and generics are cool 😎
I think it would over complicate the editor experience.
Completely forgot about the editor, you're right!
Is there a way to add an 'editor representation'? As in, have the internal data structure be an array but be represented as string array (or other complex form) in the editor. Not too involved with editor param pane code.
Summary
This feature introduces a tag system for entities that can be used to make decisions.
Goals
Use Cases
rock-breaker
.magical
tagged weapons.Proposed JSON
Proposed Data Structure