Zwischenstand commited
This commit is contained in:
@@ -192,7 +192,7 @@ public class AnimationLibrary extends BaseAppState {
|
||||
* @return Clip-Name oder {@code null}
|
||||
*/
|
||||
public static String getClipForAction(Path assetRoot, String setName, AnimationAction action) {
|
||||
Path setDir = assetRoot.resolve("animations").resolve("sets");
|
||||
Path setDir = assetRoot.resolve("Characters").resolve("sets");
|
||||
try {
|
||||
AnimSet set = AnimSet.load(setDir, setName);
|
||||
return set.getActionMap().get(action.name());
|
||||
@@ -223,7 +223,7 @@ public class AnimationLibrary extends BaseAppState {
|
||||
log.info("[AnimLib] {} Clips geladen: {}", clips.size(), clips.keySet());
|
||||
}
|
||||
|
||||
Path setDir = findAssetRoot().resolve("animations").resolve("sets");
|
||||
Path setDir = findAssetRoot().resolve("Characters").resolve("sets");
|
||||
try {
|
||||
AnimSet animSet = AnimSet.load(setDir, "human");
|
||||
createSubClips(animSet);
|
||||
@@ -293,7 +293,7 @@ public class AnimationLibrary extends BaseAppState {
|
||||
private void loadClipFromFile(Path file) {
|
||||
String fileName = file.getFileName().toString();
|
||||
String clipName = fileName.replaceFirst("\\.j3o$", "");
|
||||
String assetKey = "animations/clips/" + fileName;
|
||||
String assetKey = "Characters/clips/" + fileName;
|
||||
|
||||
try {
|
||||
Spatial loaded = assetManager.loadModel(assetKey);
|
||||
@@ -319,18 +319,18 @@ public class AnimationLibrary extends BaseAppState {
|
||||
}
|
||||
}
|
||||
|
||||
/** Gibt den Asset-Wurzelpfad zurück (erstes Verzeichnis mit {@code animations/}-Unterordner). */
|
||||
/** Gibt den Asset-Wurzelpfad zurück (erstes Verzeichnis mit {@code Characters/}-Unterordner). */
|
||||
public static Path findAssetRoot() {
|
||||
for (String base : ASSET_BASES) {
|
||||
Path p = Paths.get(base);
|
||||
if (Files.isDirectory(p.resolve("animations"))) return p;
|
||||
if (Files.isDirectory(p.resolve("Characters"))) return p;
|
||||
}
|
||||
return Paths.get(ASSET_BASES[0]);
|
||||
}
|
||||
|
||||
private static Path findClipsDir() {
|
||||
for (String base : ASSET_BASES) {
|
||||
Path p = Paths.get(base, "animations", "clips");
|
||||
Path p = Paths.get(base, "Characters", "clips");
|
||||
if (Files.isDirectory(p)) return p;
|
||||
}
|
||||
return null;
|
||||
@@ -367,7 +367,7 @@ public class AnimationLibrary extends BaseAppState {
|
||||
}
|
||||
if (minDepth == Integer.MAX_VALUE) return clip;
|
||||
|
||||
boolean isLocomotion = LOCOMOTION_CLIPS.contains(clip.getName());
|
||||
boolean isLocomotion = LOCOMOTION_CLIPS.contains(clip.getName().toLowerCase(java.util.Locale.ROOT));
|
||||
|
||||
List<AnimTrack<?>> newTracks = new ArrayList<>();
|
||||
boolean modified = false;
|
||||
|
||||
@@ -550,7 +550,7 @@ public class WorldScene extends BaseAppState {
|
||||
animLib.getClipKeys());
|
||||
// AnimSet-ActionMap ausgeben
|
||||
if (setName != null) {
|
||||
java.nio.file.Path setDir = AnimationLibrary.findAssetRoot().resolve("animations").resolve("sets");
|
||||
java.nio.file.Path setDir = AnimationLibrary.findAssetRoot().resolve("Characters").resolve("sets");
|
||||
try {
|
||||
de.blight.game.animation.AnimSet set = de.blight.game.animation.AnimSet.load(setDir, setName);
|
||||
log.info("[AnimCtx] AnimSet '{}' actionMap: {}", setName, set.getActionMap());
|
||||
@@ -736,7 +736,7 @@ public class WorldScene extends BaseAppState {
|
||||
}
|
||||
|
||||
private MainCharacter findMainCharacter() {
|
||||
java.nio.file.Path charDir = AnimationLibrary.findAssetRoot().resolve("character");
|
||||
java.nio.file.Path charDir = AnimationLibrary.findAssetRoot().resolve("Characters");
|
||||
for (GameCharacter c : CharacterIO.loadAll(charDir)) {
|
||||
if (c instanceof MainCharacter mc) return mc;
|
||||
}
|
||||
|
||||
@@ -668,7 +668,7 @@ public class WorldNpcsState extends BaseAppState {
|
||||
&& saveState.getSave().character.positionSaved
|
||||
&& SaveGameIO.exists();
|
||||
try {
|
||||
java.nio.file.Path charDir = AnimationLibrary.findAssetRoot().resolve("character");
|
||||
java.nio.file.Path charDir = AnimationLibrary.findAssetRoot().resolve("Characters");
|
||||
for (GameCharacter gc : CharacterIO.loadAll(charDir)) {
|
||||
if (gc instanceof NPC npc) {
|
||||
java.util.List<String> savedState = useSaved
|
||||
|
||||
Reference in New Issue
Block a user