2025-10-08 08:58:26 -04:00
// made by 3pm
2024-11-10 06:10:38 -05:00
2025-10-08 08:58:26 -04:00
version = "0.0.2"
subversion = "0.0.21"
versionname = "Let's take a look..."
2024-11-10 06:10:38 -05:00
2025-05-18 10:00:36 -04:00
console . log ( "3pms_mod.js " + version + " \"" + versionname + "\"" )
2024-11-10 06:10:38 -05:00
console . log ( "3pms_mod.js | Initiating..." )
// bypassing the tps limit
2025-10-08 08:58:26 -04:00
function tpsPrompt ( ) {
promptInput ( "Enter the new simulation Ticks Per Second (TPS). This is how many updates per second the simulation will run.\n\nThe default is 30.\n\nThe current TPS is " + tps + ".\n\nNOTE: 3pms_mod.js removes the TPS limit.\nAny TPS higher than 1000 isn't recommended.\n\n" ,
( r ) => {
var newtps = parseInt ( r ) ;
if ( r !== null ) {
if ( isNaN ( newtps ) || newtps == "" ) logMessage ( "You did not enter a valid TPS." ) ;
else {
newtps = parseInt ( newtps ) ;
if ( isNaN ( newtps ) || newtps <= 0 ) {
logMessage ( "You did not enter a valid TPS." ) ;
}
else {
tps = newtps ;
delete currentSaveData . oldTps ;
}
}
resetInterval ( tps ) ;
2024-11-10 06:10:38 -05:00
}
2025-10-08 08:58:26 -04:00
focusGame ( ) ;
} ,
"Change TPS"
)
}
2024-11-10 06:10:38 -05:00
2025-05-18 10:00:36 -04:00
// more settings
2024-11-10 06:10:38 -05:00
function showMoreSettings ( ) {
showingMenu = "moresettings"
console . log ( "3pms_mod.js | Opening More Settings...." )
var moresettingsParent = document . getElementById ( "moresettingsParent" ) ;
moresettingsParent . style . display = "block" ;
}
setTimeout ( ( ) => {
const gamediv = document . getElementById ( "gameDiv" )
2025-05-18 09:49:39 -04:00
gamediv . insertAdjacentHTML ( "beforeend" , `
< div id = "moresettingsParent" style = "display: none" class = "menuParent" >
< div id = "moresettingsMenu" >
< button class = "XButton" onclick = "closeMenu();showSettings();" > - < / b u t t o n >
< span class = "menuTitle" > More Settings < / s p a n >
< div class = "menuText" style = "padding-top:1em" >
< p > Nothing to see here ; 3 < / p >
< / d i v >
< / d i v >
< / d i v > ` ) ;
2025-10-08 08:58:26 -04:00
const menuText = document . getElementsByClassName ( "menuText" ) [ 9 ]
2024-11-10 06:10:38 -05:00
const newButton = document . createElement ( "button" )
newButton . innerText = "More Settings"
newButton . className = "settingsButton"
newButton . onclick = ( ) => {
closeMenu ( ) ;
showMoreSettings ( )
}
menuText . appendChild ( newButton )
} , 1000 ) ;
// elements
2025-10-08 08:58:26 -04:00
elements . calcium _oxide = {
2024-11-10 06:10:38 -05:00
color : [ "#544E45" , "#6A635E" , "#6E6A61" , "#756F62" , "#918A7B" ] ,
tick : function ( pixel ) {
behaviors . POWDER ( pixel ) ;
for ( var i = 0 ; i < adjacentCoords . length ; i ++ ) {
var x = pixel . x + adjacentCoords [ i ] [ 0 ] ;
var y = pixel . y + adjacentCoords [ i ] [ 1 ] ; } } ,
tempHigh : 842 ,
reactions : {
water : { elem1 : "calcium_oxide" , elem2 : "steam" } ,
salt _water : { elem1 : "calcium_oxide" , elem2 : "steam" } ,
sugar _water : { elem1 : "calcium_oxide" , elem2 : "steam" } ,
dirty _water : { elem1 : "calcium_oxide" , elem2 : "steam" }
} ,
category : "powders" ,
state : "solid" ,
density : 1550 ,
conduct : 0.40 ,
hardness : 0.2 ,
fireColor : "#ff6b21"
}
2025-10-08 08:58:26 -04:00
elements . eeraser = {
2025-05-18 10:00:36 -04:00
color : "#FFFF00" ,
2025-10-08 08:58:26 -04:00
behaviorOn : [
"DL|XX|DL" ,
"DL|XX|DL" ,
2025-05-18 10:00:36 -04:00
"DL|DL|DL" ,
] ,
2025-10-08 08:58:26 -04:00
behavior : [
"XX|XX|XX" ,
"XX|XX|XX" ,
"XX|XX|XX"
] ,
conduct : 0.5 ,
2025-05-18 10:00:36 -04:00
category : "machines" ,
2025-10-08 08:58:26 -04:00
state : "solid" ,
2025-05-18 10:00:36 -04:00
} ;
2025-10-08 08:58:26 -04:00
// tools
elements . replace _all _of _element = {
color : [ "#ff3030" , "#800000" ] ,
name : "replace all of element" ,
onSelect : async function ( ) {
promptInput (
"Enter the element to be replaced." ,
( r ) => {
if ( r in elements ) {
elements . replace _all _of _element . tool = function ( pixel ) {
elementbefore = pixel . element
for ( var i = 0 ; i <= width ; i ++ ) {
for ( var j = 0 ; j <= height ; j ++ ) {
if ( ! isEmpty ( i , j , true ) ) {
if ( pixelMap [ i ] [ j ] . element == elementbefore ) {
changePixel ( pixelMap [ i ] [ j ] , r )
}
}
}
}
}
} else {
logMessage ( "You did not enter an existing element." ) ;
}
} ,
"3pms_mod.js"
) ;
} ,
category : "tools" ,
} ;
2025-05-18 09:49:39 -04:00
2025-10-08 08:58:26 -04:00
setTimeout ( ( ) => {
console . log ( "3pms_mod.js | Initiated. Thank you." )
} , 1000 ) ;