dedup link check

This commit is contained in:
OMGeeky
2025-06-01 19:01:35 +02:00
parent 185f168b19
commit 8561415574
10 changed files with 27 additions and 100 deletions

View File

@@ -208,17 +208,7 @@ public class NPC extends JSONElement {
@Override
public void link() {
if (this.state == State.created || this.state == State.modified || this.state == State.saved) {
//This type of state is unrelated to parsing/linking.
return;
}
if (this.state == State.init) {
//Not parsed yet.
this.parse();
} else if (this.state == State.linked) {
//Already linked.
return;
}
if (!this.needsToBeLinked()) return;
Project proj = getProject();
if (proj == null) {
Notification.addError("Error linking item "+id+". No parent project found.");