grist: make textures generated through a makefile
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.vscode
|
@ -1,2 +1 @@
|
|||||||
compose.yaml
|
assets
|
||||||
exports
|
|
||||||
|
74
Makefile
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
GRISTS = build agricultural intelligent energetic primordeal universal
|
||||||
|
RANKS = basic improved radiant
|
||||||
|
|
||||||
|
GRIST_HUE_build = 203
|
||||||
|
GRIST_HUE_agricultural = 40
|
||||||
|
GRIST_HUE_intelligent = 77
|
||||||
|
GRIST_HUE_energetic = 0
|
||||||
|
GRIST_HUE_primordeal = 280
|
||||||
|
GRIST_HUE_universal = 0
|
||||||
|
|
||||||
|
GRIST_VALUE_basic = 128
|
||||||
|
GRIST_VALUE_improved = 199
|
||||||
|
GRIST_VALUE_radiant = 255
|
||||||
|
|
||||||
|
GRIST_VALUE_basic_universal = 120
|
||||||
|
GRIST_VALUE_improved_universal = 160
|
||||||
|
GRIST_VALUE_radiant_universal = 190
|
||||||
|
|
||||||
|
GRIST_SATURATION_universal = 100
|
||||||
|
|
||||||
|
BLOCKS = kubejs/assets/malloc/textures/block
|
||||||
|
ITEMS = kubejs/assets/malloc/textures/item
|
||||||
|
|
||||||
|
TEXTURES = $(foreach element,$(GRISTS),$(foreach rank,$(RANKS), grist_$(rank)_$(element).png))
|
||||||
|
|
||||||
|
ITEM_TEXTURES = $(addprefix $(ITEMS)/,$(TEXTURES))
|
||||||
|
BLOCK_TEXTURES = $(addprefix $(BLOCKS)/,$(TEXTURES))
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
|
||||||
|
all: $(ITEM_TEXTURES) $(BLOCK_TEXTURES)
|
||||||
|
|
||||||
|
$(BLOCKS)/grist_basic_%.png: assets/textures/block/grist.png Makefile
|
||||||
|
if [ $* = "universal" ]; then \
|
||||||
|
magick $< -modulate $(GRIST_VALUE_basic_universal),$(GRIST_SATURATION_universal) $@; \
|
||||||
|
else \
|
||||||
|
magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_basic))" -tint 100 $@; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
$(BLOCKS)/grist_improved_%.png: assets/textures/block/grist.png Makefile
|
||||||
|
if [ $* = "universal" ]; then \
|
||||||
|
magick $< -modulate $(GRIST_VALUE_improved_universal),$(GRIST_SATURATION_universal) $@; \
|
||||||
|
else \
|
||||||
|
magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_improved))" -tint 100 $@; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
$(BLOCKS)/grist_radiant_%.png: assets/textures/block/grist.png Makefile
|
||||||
|
if [ $* = "universal" ]; then \
|
||||||
|
magick $< -modulate $(GRIST_VALUE_radiant_universal),$(GRIST_SATURATION_universal) $@; \
|
||||||
|
else \
|
||||||
|
magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_radiant))" -tint 100 $@; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
$(ITEMS)/grist_basic_%.png: assets/textures/item/grist_basic.png Makefile
|
||||||
|
if [ $* = "universal" ]; then \
|
||||||
|
magick $< -modulate $(GRIST_VALUE_basic_universal),$(GRIST_SATURATION_universal) $@; \
|
||||||
|
else \
|
||||||
|
magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_basic))" -tint 100 $@; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
$(ITEMS)/grist_improved_%.png: assets/textures/item/grist_improved.png Makefile
|
||||||
|
if [ $* = "universal" ]; then \
|
||||||
|
magick $< -modulate $(GRIST_VALUE_improved_universal),$(GRIST_SATURATION_universal) $@; \
|
||||||
|
else \
|
||||||
|
magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_improved))" -tint 100 $@; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
$(ITEMS)/grist_radiant_%.png: assets/textures/item/grist_radiant.png Makefile
|
||||||
|
if [ $* = "universal" ]; then \
|
||||||
|
magick $< -modulate $(GRIST_VALUE_radiant_universal),$(GRIST_SATURATION_universal) $@; \
|
||||||
|
else \
|
||||||
|
magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_radiant))" -tint 100 $@; \
|
||||||
|
fi
|
BIN
assets/textures/block/grist.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 852 B After Width: | Height: | Size: 852 B |
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 1006 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
32
index.toml
@ -1,5 +1,13 @@
|
|||||||
hash-format = "sha256"
|
hash-format = "sha256"
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
file = "Makefile"
|
||||||
|
hash = "9d3e49c2786e4f668afb6b0b3061c3547949b7edb1013be066903f6ce87b9721"
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
file = "compose.yaml"
|
||||||
|
hash = "e4d93964cb1ab3cc6f49a55307851e731ef07d56b076b746184b9f9644b6e814"
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "config/alexsmobs.toml"
|
file = "config/alexsmobs.toml"
|
||||||
hash = "a60442351eb4a2fb2c74d4a7c62fd25d32faca43c0f192a1c261c13db9a71551"
|
hash = "a60442351eb4a2fb2c74d4a7c62fd25d32faca43c0f192a1c261c13db9a71551"
|
||||||
@ -180,27 +188,19 @@ hash = "2a5a7e97cc8b21baa4a3f4b06fb48383abe8638f50b0138d3127ef22f6deb010"
|
|||||||
file = "defaultconfigs/weaponleveling-server.toml"
|
file = "defaultconfigs/weaponleveling-server.toml"
|
||||||
hash = "0381c2b141fe6bf4bdb0fa1d7687b62da7e7e6500259c10951a7ad7963a8564f"
|
hash = "0381c2b141fe6bf4bdb0fa1d7687b62da7e7e6500259c10951a7ad7963a8564f"
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
file = "exports/.gitkeep"
|
||||||
|
hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
file = "exports/Malloc S4 Dev.zip"
|
||||||
|
hash = "7ef905ff57d9118cbcce52b4fad5211c57ecd75f6210fae8f6da42290bd123cf"
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "global_packs/required_data/repurposed-structures-irons-spells-n-spellbooks-compat.pw.toml"
|
file = "global_packs/required_data/repurposed-structures-irons-spells-n-spellbooks-compat.pw.toml"
|
||||||
hash = "562849ad56d6b05b72495560233703827582608c7b5c9e301090f3d1e4089fb6"
|
hash = "562849ad56d6b05b72495560233703827582608c7b5c9e301090f3d1e4089fb6"
|
||||||
metafile = true
|
metafile = true
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "kubejs/assets/malloc/textures/block/grist.png"
|
|
||||||
hash = "fb7c934a50e8fc07bce606f209e77df91b502ee6a85f55fd83f94c464b840e6d"
|
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "kubejs/assets/malloc/textures/item/grist_basic.png"
|
|
||||||
hash = "cb71e0ca5854602cdafb40caedb8eeb105e77d684e3aa50f345256c598d69fef"
|
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "kubejs/assets/malloc/textures/item/grist_improved.png"
|
|
||||||
hash = "174698fce79cae4e03cbeada41f234952910f4782b47d92f42a7dc5807e7a764"
|
|
||||||
|
|
||||||
[[files]]
|
|
||||||
file = "kubejs/assets/malloc/textures/item/grist_radiant.png"
|
|
||||||
hash = "3251b72c91de9ea34d5269517598c5a77be52da822b530f232fa280aa38e47f1"
|
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "kubejs/client_scripts/jsconfig.json"
|
file = "kubejs/client_scripts/jsconfig.json"
|
||||||
hash = "dee1340c5e7927f5675987957c6b198f9ca2e1e731291d72396278dddc066a04"
|
hash = "dee1340c5e7927f5675987957c6b198f9ca2e1e731291d72396278dddc066a04"
|
||||||
|
1
kubejs/assets/malloc/textures/block/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
grist_*.png
|
Before Width: | Height: | Size: 1.2 KiB |
1
kubejs/assets/malloc/textures/item/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
grist_*.png
|
@ -5,8 +5,7 @@ StartupEvents.registry('block', e => {
|
|||||||
e.create(grist.id())
|
e.create(grist.id())
|
||||||
.displayName(grist.displayName())
|
.displayName(grist.displayName())
|
||||||
.tagBlock('mineable/pickaxe')
|
.tagBlock('mineable/pickaxe')
|
||||||
.textureAll(grist.blockTexture())
|
.textureAll(grist.blockTexture());
|
||||||
.color(0, grist.color());
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -18,8 +17,7 @@ StartupEvents.registry('item', e => {
|
|||||||
.displayName(grist.displayName())
|
.displayName(grist.displayName())
|
||||||
.rarity('rare')
|
.rarity('rare')
|
||||||
.fireResistant(true)
|
.fireResistant(true)
|
||||||
.textureJson({layer0: grist.itemTexture()})
|
.textureJson({layer0: grist.itemTexture()});
|
||||||
.color(0, grist.color());
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -218,11 +218,11 @@ Grist.prototype.toJson = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Grist.prototype.itemTexture = function() {
|
Grist.prototype.itemTexture = function() {
|
||||||
return `malloc:item/grist_${this.tier.name}`;
|
return `malloc:item/grist_${this.tier.name}_${this.element.name}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
Grist.prototype.blockTexture = function() {
|
Grist.prototype.blockTexture = function() {
|
||||||
return 'malloc:block/grist';
|
return `malloc:block/grist_${this.tier.name}_${this.element.name}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
global.Grist = Grist;
|
global.Grist = Grist;
|
@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0"
|
|||||||
[index]
|
[index]
|
||||||
file = "index.toml"
|
file = "index.toml"
|
||||||
hash-format = "sha256"
|
hash-format = "sha256"
|
||||||
hash = "cf85b20a7837c30b3997021086b754414e68974d6e6040e43656ff6a17a6d028"
|
hash = "3defe698f1e46a1a53a5f51c843e1b34ea451647031575a0d08a43c095c1c51f"
|
||||||
|
|
||||||
[versions]
|
[versions]
|
||||||
forge = "47.4.0"
|
forge = "47.4.0"
|
||||||
|