Skip to content

Commit

Permalink
Merge pull request #802 from guzzo86/main
Browse files Browse the repository at this point in the history
The fueled generators u just helped me fix Ryan. + some more tree and wood types!!!! WOO!
  • Loading branch information
slweeb authored Sep 19, 2024
2 parents bc411ad + 4a57acb commit 5bea740
Show file tree
Hide file tree
Showing 4 changed files with 628 additions and 2 deletions.
5 changes: 5 additions & 0 deletions mod-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ <h2>Sandboxels Mod List</h2>
<tr><td>color_tools.js</td><td>Adds tools that manipulate colors</td><td>Alice</td></tr>
<tr><td>controllable_pixel.js</td><td>Adds a pixel controlled using WASD (keyboard required)</td><td>Jayd</td></tr>
<tr><td>controllable_pixel_test.js</td><td>Adds a pixel that can be controlled with the keyboard keys. <a href="https://github.com/R74nCom/sandboxels/commit/58dfa9477f2ed7ec9c44b00a35162e7c63bc129c">Read the commit description for more info.</a> [PC ONLY]</td><td>Alice</td></tr>
<tr><td>customtemptools.js</td><td>Adds temperature tools (set/heat/cool) that you change the value of.</td><td>guzzo86</td></tr>
<tr><td>cpt_alt.js</td><td>Adds a more destructive variant of the controllable pixel</td><td>Alice</td></tr>
<tr><td>debugRework.js</td><td>Revamps the Debug tool</td><td>Fioushemastor</td></tr>
<tr><td>delete_all_of_element.js</td><td>Adds a tool that deletes every pixel of the element(s) the user clicks on</td><td>Alice</td></tr>
Expand Down Expand Up @@ -214,11 +215,13 @@ <h2>Sandboxels Mod List</h2>

<!----><tr><td class="modCat" colspan="3">Machines & Technology</td></tr><!---->
<tr><td>clone_liquid.js</td><td>Adds a liquid form of cloner</td><td>Alice</td></tr>
<tr><td>colored_lightbulbs.js</td><td>Adds a light bulb that can be painted.</td><td>guzzo86, ggod</td></tr>
<tr><td>combustion.js</td><td>Adds components necessary for combustion engines</td><td>uptzik</td></tr>
<tr><td>conveyance.js</td><td>Conveyors, operated with and without electricity</td><td>Melecie</td></tr>
<tr><td>ExtraMachines.js</td><td>Adds sensors, energy resources, materials, and more</td><td>Mecoolnotcool</td></tr>
<tr><td>fine_tuned_cloner.js</td><td>Adds a cloner that can spawn at different rates and prevent unwated cloning</td><td>BatteRaquette58</td></tr>
<tr><td>flipflop.js</td><td>Toggleable switches; <a href="https://github.com/R74nCom/sandboxels/pull/134">Explanation</a></td><td>Flix</td></tr>
<tr><td>fuel_generators.js</td><td>Fuel powered generators.</td></tr>
<tr><td>gameOfLife.js</td><td>Conway's Game of Life on a screen</td><td>ggod</td></tr>
<tr><td>logicgates.js</td><td>Adds predictable electricity and logic gates</td><td>nousernamefound</td></tr>
<tr><td>note_block.js</td><td>Adds musical Note Blocks</td><td>Alice</td></tr>
Expand Down Expand Up @@ -253,6 +256,7 @@ <h2>Sandboxels Mod List</h2>
<tr><td>aChefsDream_beta.js</td><td>Beta testing for aChefsDream. The code can be found <a href="https://www.github.com/SquareScreamYT/aChefsDream.js">on GitHub</a></td><td>SquareScreamYT</td></tr>
<tr><td>bananas.js</td><td>Adds bananas and banana plants</td><td>Alice</td></tr>
<tr><td>CherrySoda.js</td><td>Adds materials to make Cherry soda. Benzaldehyde + seltzer = Cherrysoda.</td><td>guzzo86</td></tr>
<tr><td>GrapeSoda.js</td><td>Adds materials to make Grape soda. Methylanthranilic acid + seltzer = Cherrysoda.</td><td>guzzo86</td></tr>
<tr><td>community_desserts.js</td><td>Adds various desserts from community suggestions</td><td>Tisquares</td></tr>
<tr><td>greenitemsandmore.js</td><td>Adds various green things, including apples and more food</td><td>zonneschijn7</td>
<tr><td>ketchup_mod.js</td><td>Adds a bunch of ketchup related stuff, plus a few other condiments</td><td>Nubo318 (main dev), Devi, Alice (contributors)</td></tr>
Expand Down Expand Up @@ -285,6 +289,7 @@ <h2>Sandboxels Mod List</h2>
<tr><td>lost_souls.js</td><td>Adds souls and related elements, the mod can also be found <a href="https://github.com/HACKERPRO908/lost_souls.js">on Github</a></td><td>pixelegend4, SquareScreamYT, salmonfishy</td></tr>
<tr><td>miscible_psoup_and_birthpool.js</td><td>Makes Primordial Soup and Birthpool mix instead of the birthpool settling to the bottom. Will be deprecated upon the release of Magical Menagerie</td><td>Alice</td></tr>
<tr><td>mobs.js</td><td>Adds Creepers, Zombies, and Skeletons</td><td>Alice</td></tr>
<tr><td>moretrees.js</td><td>Adds 25 more tree & wood types.</td><td>guzzo86</td></tr>
<tr><td>nocancer.js</td><td>Removes cancer from the game one tick after it is created</td><td>mollthecoder</td></tr>
<tr><td>nocancer2.js</td><td>Removes cancer from the game altogether. May be incompatible with other mods that spawn cancer</td><td>mollthecoder</td></tr>
<tr><td>nograssgrow.js</td><td>Prevents Grass from growing</td><td>mollthecoder</td></tr>
Expand Down
4 changes: 2 additions & 2 deletions mods/CherrySoda.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ elements.cherrysoda_gas = {
}
elements.cherrysoda_ice = {
color: "#BF4F9C",
behavior: behaviors.wALL,
behavior: behaviors.WALL,
category: "solids",
state: "solid",
density: 1065,
desc: "Cherry soda gas.",
desc: "Cherry soda ice.",
tempHigh: -27,
stateHigh: "cherrysoda",
temp: -47,
Expand Down
131 changes: 131 additions & 0 deletions mods/fueled_generators.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
elements.gasoline = {
color: ["#FFFF66", "#FFFF66", "#FFFF66", "#FFFF66", "#FFFF66"],
burn: 15,
burnTime: 300,
viscosity: 0.6,
density: 750,
category: "fuels",
behavior: behaviors.LIQUID,
state: "liquid",
desc: "Used in Gas Generators!"
}

elements.diesel = {
color: "#EBFBB5",
burn: 10,
burnTime: 600,
viscosity: 3,
density: 860,
category: "fuels",
behavior: behaviors.LIQUID,
state: "liquid",
desc: "Used in Diesel Generators!"
}

elements.gasoline_generator = {
color: "#6d5f5d",
behavior: behaviors.WALL,
state: "solid",
density: 1000,
category: "machines",
properties: {
shocksToDo: 0
},
hoverStat: function(pixel){return (pixel.shocksToDo).toString() || 0},
tick: function(pixel){
if (pixel.shocksToDo <= 40){
for (var i = 0; i < adjacentCoords.length; i++){
var coord = adjacentCoords[i]
var x = pixel.x + coord[0]
var y = pixel.y + coord[1]
if (!isEmpty(x, y, true)){
var otherPixel = pixelMap[x][y]
if (otherPixel.element == "gasoline"){
deletePixel(x, y)
if(!pixel.shocksToDo){pixel.shocksToDo = 0}
pixel.shocksToDo += 10
}
else if (otherPixel.element == "gasoline_generator"){
var otherPixel = pixelMap[x][y]
var otherShock = otherPixel.shocksToDo || 0
var currentShock = pixel.shocksToDo || 0
if (otherShock > currentShock){
otherPixel.shocksToDo --
pixel.shocksToDo ++
} else if (currentShock > otherShock) {
otherPixel.shocksToDo ++
pixel.shocksToDo --
}
}
}
}}
if (!pixel.charge && !pixel.chargeCD && pixel.shocksToDo){
for (var i = 0; i < adjacentCoords.length; i++){
var coord = adjacentCoords[i]
var x = pixel.x + coord[0]
var y = pixel.y + coord[1]
if (!isEmpty(x, y, true)){
if (elements[pixelMap[x][y].element].conduct > 0){
pixel.charge = 1
pixel.shocksToDo --
break;
}
}
}
}
}
}

elements.diesel_generator = {
color: "#FF9C27",
behavior: behaviors.WALL,
state: "solid",
density: 1000,
category: "machines",
properties: {
shocksToDo: 0
},
hoverStat: function(pixel){return (pixel.shocksToDo).toString() || 0},
tick: function(pixel){
if (pixel.shocksToDo <= 80){
for (var i = 0; i < adjacentCoords.length; i++){
var coord = adjacentCoords[i]
var x = pixel.x + coord[0]
var y = pixel.y + coord[1]
if (!isEmpty(x, y, true)){
var otherPixel = pixelMap[x][y]
if (otherPixel.element == "diesel"){
deletePixel(x, y)
if(!pixel.shocksToDo){pixel.shocksToDo = 0}
pixel.shocksToDo += 20
}
else if (otherPixel.element == "diesel_generator"){
var otherPixel = pixelMap[x][y]
var otherShock = otherPixel.shocksToDo || 0
var currentShock = pixel.shocksToDo || 0
if (otherShock > currentShock){
otherPixel.shocksToDo --
pixel.shocksToDo ++
} else if (currentShock > otherShock) {
otherPixel.shocksToDo ++
pixel.shocksToDo --
}
}
}
}}
if (!pixel.charge && !pixel.chargeCD && pixel.shocksToDo){
for (var i = 0; i < adjacentCoords.length; i++){
var coord = adjacentCoords[i]
var x = pixel.x + coord[0]
var y = pixel.y + coord[1]
if (!isEmpty(x, y, true)){
if (elements[pixelMap[x][y].element].conduct > 0){
pixel.charge = 1
pixel.shocksToDo --
break;
}
}
}
}
}
}
Loading

0 comments on commit 5bea740

Please sign in to comment.