mod that makes plants more killable

test of for loop in for loop for reaction adding
This commit is contained in:
Lily-129 2022-02-05 23:29:06 -05:00 committed by GitHub
parent 77b9b9b106
commit 9fa69405cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
arrayNameA = ["radiation", "alcohol", "soap", "acid", "ammonia", "acid_gas"]
arrayNameB = ["plant", "frozen_plant", "grass", "algae", "sapling", "seeds", "grass_seed", "wheat_seed", "wheat", "flower_seed", "pistil", "petal", "vine", "bamboo", "bamboo_plant", "corn_seed", "potato_seed", "root", "berry_seed", "old_berry_leaf", "berry_leaf", "berry"]
for(i = 0; i < arrayNameA.length; i++) {
if(!elements[arrayNameA[i]].reactions) {
elements[arrayNameA[i]].reactions = {}
}
for(j = 0; j < arrayNameB.length; j++) {
elements[arrayNameA[i]].reactions[arrayNameB[j]] = { "elem1":null, "elem2":"dead_plant" }
};
};