Skip to content

Commit

Permalink
Prevent duplicate items in behaviorGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
uellenberg committed Nov 20, 2021
1 parent a13f1e2 commit b1d1020
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@ export const behaviorGraph: TemplateObject = {
behaviorCheck(state, name);

state.graphgame.behaviors[name].addPost((id: number, idx: number) => {
return `inline function g_raphgamepost${idx}1(x, y) {
return `inline function g_raphgamepost${name}a${id}a${idx}a1(x, y) {
${body2 ? body1 : "state = 1;"}
}
inline function g_raphgamepost${idx}2(x, y) {
inline function g_raphgamepost${name}a${id}a${idx}a2(x, y) {
${body2 ? body2 : body1}
}
graph { g_raphgamepost${idx}1(x, y) } ${operator || "="} { g_raphgamepost${idx}2(x, y) };`;
graph { g_raphgamepost${name}a${id}a${idx}a1(x, y) } ${operator || "="} { g_raphgamepost${name}a${id}a${idx}a2(x, y) };`;
});

return "";
Expand Down

0 comments on commit b1d1020

Please sign in to comment.