mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 16:54:04 +00:00
Edit node values as curves, folded sections and suggestions in the studio
Nested settings fold into sections and lists of objects into items. Curve values show a sparkline and open a points or shape editor, and a number or range can be made a curve. Blocks, resources and roles are suggested while typing, and string lists are typed as a, b. The studio asks the bridge for the platform and pack lists (suggestions endpoint). No terrain, pin, golden or digest moved; the files written are the same JSON. v3: db53f834a
This commit is contained in:
1 parent
dbfc1d0c34
commit
7eb45cebf6
20 files changed
+1403
-99
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package art.arcane.iris.core.studio.scene;
|
||||
|
||||
import com.volmit.resource.ResourceId;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertThrows;
|
||||
|
||||
public class StudioSuggestionsTest {
|
||||
@Test
|
||||
public void thePacksOwnResourcesAreOfferedByPathAndOthersInFull() {
|
||||
List<ResourceId> ids = List.of(ResourceId.parse("overworld:birch"), ResourceId.parse("other:oak"), ResourceId.parse("overworld:conifer/pine"));
|
||||
|
||||
assertEquals(List.of("birch", "conifer/pine", "other:oak"), StudioSuggestions.sortedKeys(ids, "overworld"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void platformEntriesAreOfferedInFull() {
|
||||
List<ResourceId> ids = List.of(ResourceId.parse("minecraft:stone"), ResourceId.parse("minecraft:dirt"));
|
||||
|
||||
assertEquals(List.of("minecraft:dirt", "minecraft:stone"), StudioSuggestions.sortedKeys(ids, null));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void aReferenceThatDoesNotExistIsRefused() {
|
||||
assertThrows(NoSuchElementException.class, () -> StudioSuggestions.ofReference("NOT_A_REFERENCE"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user