mirror of
https://github.com/OMGeeky/ATCS.git
synced 2026-02-23 15:38:23 +01:00
add warning about icon
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.gpl.rpg.atcontentstudio.model.gamedata;
|
package com.gpl.rpg.atcontentstudio.model.gamedata;
|
||||||
|
|
||||||
|
import com.gpl.rpg.atcontentstudio.Notification;
|
||||||
import com.gpl.rpg.atcontentstudio.model.GameDataElement;
|
import com.gpl.rpg.atcontentstudio.model.GameDataElement;
|
||||||
import com.gpl.rpg.atcontentstudio.model.Project;
|
import com.gpl.rpg.atcontentstudio.model.Project;
|
||||||
|
|
||||||
@@ -49,6 +50,10 @@ public final class Common {
|
|||||||
public static void linkIcon(Project proj, String iconId, GameDataElement backlink) {
|
public static void linkIcon(Project proj, String iconId, GameDataElement backlink) {
|
||||||
if (iconId != null) {
|
if (iconId != null) {
|
||||||
String spritesheetId = iconId.split(":")[0];
|
String spritesheetId = iconId.split(":")[0];
|
||||||
|
if (proj.getSpritesheet(spritesheetId) == null) {
|
||||||
|
Notification.addError("Error Spritesheet " + spritesheetId + ". has no backlink. (" + iconId + ")");
|
||||||
|
return;
|
||||||
|
}
|
||||||
proj.getSpritesheet(spritesheetId).addBacklink(backlink);
|
proj.getSpritesheet(spritesheetId).addBacklink(backlink);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user