Update pullers.js
This commit is contained in:
parent
1a2fe97314
commit
9a3a0c0da4
|
|
@ -2,19 +2,23 @@
|
||||||
// a sandboxels mod that adds pullers
|
// a sandboxels mod that adds pullers
|
||||||
/*
|
/*
|
||||||
==CHANGELOG==
|
==CHANGELOG==
|
||||||
Version 1.1.1#
|
Version 1.1.2
|
||||||
@voidapex11
|
@voidapex11
|
||||||
~initial comit
|
~fixed spelling mistake's
|
||||||
|
|
||||||
|
Version 1.1.1
|
||||||
|
@voidapex11
|
||||||
|
~initial commit
|
||||||
+pullersDesc
|
+pullersDesc
|
||||||
+imovable_inator& movable_inator
|
+imovable_inator& movable_inator
|
||||||
+imovable wall, steel & insulation
|
+imovable wall, steel & insulation
|
||||||
+L, R, U & D pullers
|
+L, R, U & D pullers
|
||||||
+void light&dark
|
+void light&dark
|
||||||
~don't comit without permision as you may disrupt other dev's hard work
|
~don't commit without permission as you may disrupt other dev's hard work
|
||||||
~update changelog with newer updates first
|
~update changelog with newer updates first
|
||||||
~Version format is:
|
~Version format is:
|
||||||
rewrites.major updates.paches&minor feechers
|
rewrites.major updates.paches&minor features
|
||||||
put a '#' at end of version format if it has not been pushed to the github
|
put a '#' at the end of the version format if it has not been pushed to the github
|
||||||
~for change-log
|
~for change-log
|
||||||
'~' means notes/changes '+' means aditions and '-' is removals
|
'~' means notes/changes '+' means aditions and '-' is removals
|
||||||
*/
|
*/
|
||||||
|
|
@ -41,10 +45,10 @@ elements.pullersDesc = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// for the inator reference: if you know you know
|
// for the inator reference: if you know you know
|
||||||
elements.imovable_inator = {
|
elements.immovable_inator = {
|
||||||
color: "#525252",
|
color: "#525252",
|
||||||
tool: function(pixel) {
|
tool: function(pixel) {
|
||||||
pixel.imovable = true
|
pixel.immovable = true
|
||||||
},
|
},
|
||||||
category: "tools",
|
category: "tools",
|
||||||
}
|
}
|
||||||
|
|
@ -52,14 +56,14 @@ elements.imovable_inator = {
|
||||||
elements.movable_inator = {
|
elements.movable_inator = {
|
||||||
color: "#a8a8a8",
|
color: "#a8a8a8",
|
||||||
tool: function(pixel) {
|
tool: function(pixel) {
|
||||||
pixel.imovable = false
|
pixel.immovable = false
|
||||||
},
|
},
|
||||||
category: 'tools',
|
category: 'tools',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
elements.imovable_wall = {
|
elements.immovable_wall = {
|
||||||
color: "#808080",
|
color: "#808080",
|
||||||
behavior: behaviors.WALL,
|
behavior: behaviors.WALL,
|
||||||
category: "solids",
|
category: "solids",
|
||||||
|
|
@ -67,11 +71,11 @@ elements.imovable_wall = {
|
||||||
hardness: 1,
|
hardness: 1,
|
||||||
noMix: true,
|
noMix: true,
|
||||||
properties: {
|
properties: {
|
||||||
imovable: true
|
immovable: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.imovable_steel = {
|
elements.immovable_steel = {
|
||||||
color: "#71797e",
|
color: "#71797e",
|
||||||
behavior: behaviors.WALL,
|
behavior: behaviors.WALL,
|
||||||
reactions: {
|
reactions: {
|
||||||
|
|
@ -92,11 +96,11 @@ elements.imovable_steel = {
|
||||||
conduct: 0.42,
|
conduct: 0.42,
|
||||||
hardness: 0.8,
|
hardness: 0.8,
|
||||||
properties: {
|
properties: {
|
||||||
imovable: true
|
immovable: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.imovable_insulation = {
|
elements.immovable_insulation = {
|
||||||
color: "#b8aea5",
|
color: "#b8aea5",
|
||||||
behavior: behaviors.WALL,
|
behavior: behaviors.WALL,
|
||||||
category: "solids",
|
category: "solids",
|
||||||
|
|
@ -104,7 +108,7 @@ elements.imovable_insulation = {
|
||||||
state: "solid",
|
state: "solid",
|
||||||
noMix: true,
|
noMix: true,
|
||||||
properties: {
|
properties: {
|
||||||
imovable: true
|
immovable: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -123,7 +127,7 @@ elements.left_puller = {
|
||||||
for (i = 1; i <= pixel.range; i++) {
|
for (i = 1; i <= pixel.range; i++) {
|
||||||
|
|
||||||
if (!isEmpty(pixel.x + i, pixel.y, true)) {
|
if (!isEmpty(pixel.x + i, pixel.y, true)) {
|
||||||
if (pixelMap[pixel.x+i][pixel.y]['imovable']) {break}
|
if (pixelMap[pixel.x+i][pixel.y]['immovable']) {break}
|
||||||
else {
|
else {
|
||||||
tryMove(pixelMap[pixel.x + i][pixel.y], pixel.x + i - 1, pixel.y);
|
tryMove(pixelMap[pixel.x + i][pixel.y], pixel.x + i - 1, pixel.y);
|
||||||
}
|
}
|
||||||
|
|
@ -157,7 +161,7 @@ elements.right_puller = {
|
||||||
for(h = pixel.pushStrength; h >= pixel.pushStrength; h--) {
|
for(h = pixel.pushStrength; h >= pixel.pushStrength; h--) {
|
||||||
for (i = 1; i <= pixel.range; i++) {
|
for (i = 1; i <= pixel.range; i++) {
|
||||||
if (!isEmpty(pixel.x - i, pixel.y, true)) {
|
if (!isEmpty(pixel.x - i, pixel.y, true)) {
|
||||||
if (pixelMap[pixel.x-i][pixel.y]['imovable']) {break}
|
if (pixelMap[pixel.x-i][pixel.y]['immovable']) {break}
|
||||||
else {
|
else {
|
||||||
tryMove(pixelMap[pixel.x - i][pixel.y], pixel.x - i + 1, pixel.y);
|
tryMove(pixelMap[pixel.x - i][pixel.y], pixel.x - i + 1, pixel.y);
|
||||||
}
|
}
|
||||||
|
|
@ -190,7 +194,7 @@ elements.down_puller = {
|
||||||
for (i = 1; i <= pixel.range; i++) {
|
for (i = 1; i <= pixel.range; i++) {
|
||||||
|
|
||||||
if (!isEmpty(pixel.x, pixel.y - i, true)) {
|
if (!isEmpty(pixel.x, pixel.y - i, true)) {
|
||||||
if (pixelMap[pixel.x][pixel.y - i]['imovable']) {break}
|
if (pixelMap[pixel.x][pixel.y - i]['immovable]) {break}
|
||||||
else {
|
else {
|
||||||
tryMove(pixelMap[pixel.x][pixel.y - i], pixel.x, pixel.y - i + 1);
|
tryMove(pixelMap[pixel.x][pixel.y - i], pixel.x, pixel.y - i + 1);
|
||||||
}
|
}
|
||||||
|
|
@ -223,7 +227,7 @@ elements.up_puller = {
|
||||||
for (i = 1; i <= pixel.range; i++) {
|
for (i = 1; i <= pixel.range; i++) {
|
||||||
if (!isEmpty(pixel.x, pixel.y + i, true)) {
|
if (!isEmpty(pixel.x, pixel.y + i, true)) {
|
||||||
|
|
||||||
if (pixelMap[pixel.x][pixel.y + i]['imovable']){
|
if (pixelMap[pixel.x][pixel.y + i]['immovable']){
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -246,5 +250,5 @@ elements.up_puller = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enabledMods.includes("pushers.js")) {
|
if (enabledMods.includes("pushers.js")) {
|
||||||
console.info('compatibility with pushers.js and imovable objects coming in a later update of the pullers.js')
|
console.log('compatibility with pushers.js and imovable objects coming in a later update of the pullers.js\neventualy...')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue