init: add basic, improved, radiant tiers as properties for each element
This commit is contained in:
10
index.toml
10
index.toml
@@ -595,7 +595,7 @@ hash = "815fc6329edd3a9445c7b6be55ecc83f1d4b98de5474d84a5316bc915dde8a46"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/mods/arsnoveau.js"
|
||||
hash = "f25c7a0fd694135d3de66db51519c14377f96a836dbd59081a9f22860fb1878d"
|
||||
hash = "c0f4eefc4fac51cfb1bfa3a72b405e2386337160dbd056880de13717c6e4621f"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/mods/bakery.js"
|
||||
@@ -627,7 +627,7 @@ hash = "4717847a6d54f56ed6919a1e2c3591fc73780973708e818a563753132bc7c15e"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/mods/create.js"
|
||||
hash = "ca595f7141708157fe469666f5f2309bfcbda3d9c4e052abd55ae256726a0d0a"
|
||||
hash = "b885c3ddf38f6bbac8279af47f6c7d4769822ac88fcd0e644272972c7762a90a"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/mods/create_jetpack.js"
|
||||
@@ -743,7 +743,7 @@ hash = "bace606c88cff3079285ad8932eeebccdcea1e73dab04168591a888ee5c5278b"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/mods/vinery.js"
|
||||
hash = "b24325803c78a586a2516a593456c43156b4e7b5d63a9388a3d7476fe06f5417"
|
||||
hash = "51dc00f0cbdb2959f1eddf66e8c54fe0f51565689ad492050a875ef80823f8a4"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/mods/waystones.js"
|
||||
@@ -779,7 +779,7 @@ hash = "d851746c6e7ae1c679f576b984662289c10e4195c0f52b459fd1ce3a83666ed4"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/init.js"
|
||||
hash = "80483290133f2ab1a969008335c29758884b20e4611ffbfb4e4253f3207ef74a"
|
||||
hash = "ef0e9d5bfb86dd216696b99254bc626e4f8001a4bb6cd34fc302613f86cd3d65"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/progression-items.js"
|
||||
@@ -1106,7 +1106,7 @@ metafile = true
|
||||
|
||||
[[files]]
|
||||
file = "mods/create-railways-navigator.pw.toml"
|
||||
hash = "00929d51a65b0b8c417691b3312fc858ccff50bce507fc1d1b85dc7a2b2df20b"
|
||||
hash = "9ce768751565bacd62477d56be77dd7f0e0151e03d8a671ee0de21b6a9070818"
|
||||
metafile = true
|
||||
|
||||
[[files]]
|
||||
|
@@ -39,6 +39,10 @@ Tier.prototype.toString = function() {
|
||||
function Element(name, hue) {
|
||||
this.name = name;
|
||||
this.hue = hue;
|
||||
|
||||
this.basic = new Grist(this, Grist.Tiers.basic);
|
||||
this.improved = new Grist(this, Grist.Tiers.basic);
|
||||
this.radiant = new Grist(this, Grist.Tiers.basic);
|
||||
};
|
||||
|
||||
Element.prototype.displayName = function() {
|
||||
@@ -59,6 +63,17 @@ function Grist(element, tier) {
|
||||
Grist.Tier = Tier;
|
||||
Grist.Element = Element;
|
||||
|
||||
// Color values are 0-1 floats
|
||||
Grist.Tiers = {
|
||||
basic: new Tier('basic', 0.5, 'uncommon'),
|
||||
improved: new Tier('improved', 0.75, 'rare'),
|
||||
radiant: new Tier('radiant', 1.0, 'epic')
|
||||
};
|
||||
|
||||
Grist.Tiers.forEach = function(f) {
|
||||
[Grist.Tiers.basic, Grist.Tiers.improved, Grist.Tiers.radiant].forEach(f);
|
||||
}
|
||||
|
||||
// Hues are 0-255
|
||||
// -1 means white, as special case
|
||||
Grist.Types = {
|
||||
@@ -82,17 +97,6 @@ Grist.Primitives = [
|
||||
Grist.Types.universal
|
||||
];
|
||||
|
||||
// Color values are 0-1 floats
|
||||
Grist.Tiers = {
|
||||
basic: new Tier('basic', 0.5, 'uncommon'),
|
||||
improved: new Tier('improved', 0.75, 'rare'),
|
||||
radiant: new Tier('radiant', 1.0, 'epic')
|
||||
};
|
||||
|
||||
Grist.Tiers.forEach = function(f) {
|
||||
[Grist.Tiers.basic, Grist.Tiers.improved, Grist.Tiers.radiant].forEach(f);
|
||||
}
|
||||
|
||||
Grist.forEach = function(f) {
|
||||
Grist.Tiers.forEach(tier => {
|
||||
Grist.Elements.forEach(element => {
|
||||
|
Reference in New Issue
Block a user