Merge pull request #663 from JustAGenericUsername/main

This commit is contained in:
slweeb 2024-05-27 13:35:40 -04:00 committed by GitHub
commit 69df2f9ab3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 46 additions and 10 deletions

View File

@ -225,6 +225,7 @@
<tr><td>more_breaking.js</td><td>Allows for breaking more elements in explosions</td><td>Alice</td></tr>
<tr><td>rays.js</td><td>Adds more Ray types</td><td>Alice</td></tr>
<tr><td>rays++.js</td><td>Adds a couple more rays</td><td>uptzik</td></tr>
<tr><td>subspace.js</td><td>Adds the Subspace Tripmine from Roblox</td><td>nousernamefound</td></tr>
<tr><td>weapons.js</td><td>Adds varieties of different weapons </td><td>Jayd</td></tr>
<!----><tr><td class="modCat" colspan="3">Food & Cooking</td></tr><!---->
@ -301,7 +302,6 @@
<tr><td>random_liquids.js</td><td>Randomly generates liquids on game load</td><td>Alice</td></tr>
<tr><td>sbmixup.js</td><td>Adds silly elements from a <a href="https://R74n.com/mix/" target="_blank">Mix-Up!</a> game</td><td>stefanblox</td>
<tr><td>star_wars.js</td><td>Adds various items from Star Wars by Disney</td><td>SeaPickle754</td>
<tr><td>subspace.js</td><td>Adds a Subspace Tripmine sound effect when an explosion happens</td><td>nousernamefound</td></tr>
<tr><td>sus.js</td><td>Adds an Among Us crewmate</td><td>Nv7</td></tr>
<tr><td>triggerable_random_powders.js</td><td>Adds powders with different abilities, such as heating and cooling</td><td>Alice</td></tr>
<tr><td>troll.js</td><td>Adds various dumb elements that iterate randomly on the entire screen</td><td>Alice</td></tr>

View File

@ -2999,7 +2999,7 @@ elements.insulated_wire = {
}
elements.insulated_wire.desc = "Insulated wire. Only conducts to other insulated wires. Pairs with ray emitters to not make diagonal rays."
elements.e_pipe.desc = "Electric pipe. Only passes elements while charged."
elements.destructible_e_pipe.desc = elements.e_pipe.desc
elements.destroyable_e_pipe.desc = elements.e_pipe.desc
elements.channel_pipe.desc = "Channel pipe. Only passes elements to pipes of the same channel."
elements.bridge_pipe.desc = "Bridge pipe. Can pass and receive from any other type of pipe."
elements.ray_emitter.desc = "Emits a ray of the specified element in the opposite direction it was shocked from."

View File

@ -1,10 +1,46 @@
function playSubspace() {
var audio = new Audio("https://JustAGenericUsername.github.io/subspaceboom.mp3");
function playSubspace(file) {
var audio = new Audio("https://JustAGenericUsername.github.io/" + file + ".mp3");
audio.play();
}
window.addEventListener('load', function() {
const oldexpfunc = explodeAt;
explodeAt = function(x,y,radius,fire="fire"){
oldexpfunc(x,y,radius,fire)
playSubspace()
}})
elements.subspace_trimpine = {
color: "#2e2430",
behavior: behaviors.STURDYPOWDER,
maxSize: 1,
cooldown: defaultCooldown,
density: 1500,
category: "weapons",
state: "solid",
properties:{
counter: 0
},
tick: function(pixel){
if (pixel.counter == 0){
playSubspace("subspaceplace")
}
if (!pixel.rgb){pixel.rgb = pixel.color.match(/\d+/g);}
if (pixel.counter >= 90 && pixel.counter < 121){
if (!pixel.a){pixel.a = 1}
pixel.a -= 0.05
pixel.color = "rgba(" + pixel.rgb[0] + "," + pixel.rgb[1] + "," + pixel.rgb[2] + "," + pixel.a + ")"
}
if (pixel.counter >= 121){
if (!isEmpty(pixel.x, pixel.y-1, true)){
let oldx = pixel.x
let oldy = pixel.y
explodeAt(pixel.x, pixel.y, 20)
playSubspace("subspaceboom")
deletePixel(pixel.x, pixel.y)
var coords = circleCoords(oldx, oldy, 25)
for (var i = 0; i < coords.length; i++){
var x = coords[i].x
var y = coords[i].y
if (!isEmpty(x, y, true)){
var newPixel = pixelMap[x][y]
newPixel.color = pixelColorPick(pixel, "#FF00FF")
}
}
}
}
pixel.counter ++
}
}