Compare commits

..

56 Commits

Author SHA1 Message Date
c2d81201d2 updated game 2023-05-03 12:11:19 +02:00
732a993494 small sussy changes 2023-05-02 18:44:30 +02:00
153b0666f8 increased default fov to 90 degrees 2023-04-29 21:48:53 +02:00
b42a5e9673 aaaaaaaaaaa sus idk how to name this commit 2023-04-29 21:46:33 +02:00
2e70abf1e6 changed ip of official sussycraft server to "coming soon!" 2023-04-29 18:16:01 +02:00
605f3306bf darkness light level changed again 2023-04-26 21:28:08 +02:00
03845e630d updated sussycraft 2023-04-26 20:16:28 +02:00
4ef39ff9b6 disabled infinite render distance option on key press 2023-04-26 18:08:09 +02:00
813902662a updated sussycrraft game 2023-04-26 15:23:29 +02:00
19fa51c570 new gui colors, multiplayer menu modified 2023-04-25 23:24:58 +02:00
25ecab3ad8 sussy bigger changes 2023-04-25 00:59:13 +02:00
458dc9dc15 small sussy changes 2023-04-24 01:47:16 +02:00
c1df5d87f3 new remastered logo and small sussy changes 2023-04-24 00:38:23 +02:00
f5428c870a updated sussy craft game 2023-04-17 22:32:07 +02:00
e05058e81e updated sussy craft 2023-04-17 22:28:42 +02:00
163fc1c8a7 many little sussy chanes 2023-04-13 00:13:37 +02:00
322e10342c disabled new minetest version check MUAHAHAHHAHAHA 2023-04-12 23:35:48 +02:00
0e7406d643 enabled multiplayer tab and changed pc font size to 26 2023-04-12 20:20:20 +02:00
e2581753e0 Update 'README.md' 2023-03-19 12:50:06 +00:00
aa85f3ecaf Update 'README.md' 2023-03-19 12:49:42 +00:00
98766a1f2d d 2023-03-19 12:45:39 +00:00
daae0e8e8c Update 'README.md' 2023-03-19 12:43:46 +00:00
342d05e576 Update 'README.md' 2023-03-19 12:38:20 +00:00
043d66e39c FIXED CRITICAL INSTANT CRASH ERROR IN tab_about.lua 2023-03-05 00:05:58 +01:00
60b4175aac version updated to 1.1.1 and little sussy fix to version code increamenting script 2023-03-04 23:27:19 +01:00
a6ea6a1a62 fixed fileprovider conflict with original minetest on android devices 2023-03-04 23:14:47 +01:00
58bada6236 MINETEST GUI SYSTEM SUCKS!!!!!!! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2023-03-02 23:31:12 +01:00
3978afd8c2 AAAAAAA TOO MANYYY COMMITS 2023-03-02 17:10:20 +01:00
8ddc44ccc5 sussy baka idk sus: 2023-03-02 17:09:38 +01:00
8e86d96da0 AAAAAAAAAAAA 2023-03-02 17:06:58 +01:00
643f5172c8 sus fix 2023-03-02 17:06:33 +01:00
edcf2c71ae even more sus 2023-03-02 17:05:28 +01:00
0001667902 sus 2023-03-02 17:04:36 +01:00
4eba8a044a added overcomplicated script that increments version code in android/build.gradle automaticaly 2023-03-02 16:56:42 +01:00
2b72ec963d reverted back the newest version of sussycraft submodule 2023-03-01 16:05:36 +01:00
86e3962260 mo' bullcrap 2023-02-28 22:41:21 -05:00
37125272d9 Updated Android verSSion code 2023-02-28 16:42:23 -05:00
0fdfae6e23 small sussy changes to about tab 2023-02-28 18:56:53 +01:00
2a29c45ce5 unzipservice code cleanup. does not affect code functionality 2023-02-27 14:58:09 +01:00
11ec9c45ce fixed instant crash on new android versions 2023-02-27 14:54:45 +01:00
2e4198eb2b version numbers in about tab are now correct 2023-02-26 21:15:22 +01:00
MCL Software Official
5b329fc179 Update version to 43 2023-02-26 12:49:29 -05:00
b3c1773b67 fixed ''Zip Path Traversal Vulnerability'' 2023-02-26 11:20:01 +01:00
013f0563a8 some sussy file gradle-wrapper.properties changed after gradle update chages. idk if to commit it sus 2023-02-24 14:10:41 +01:00
ee92d30eda changed capitalized project name from ''Minetest'' to ''SussyCraft'' 2023-02-24 14:09:13 +01:00
MCL Software Official
9f0b3bb8e6 Update SDK version to 31 2023-02-24 07:09:52 -05:00
MCL Software Official
cd54bbabcf "Xtreem" improvements by MCL Software 2023-02-23 17:04:02 -05:00
bdd5308e52 updated SussyCraft submodule 2023-02-23 20:58:59 +01:00
b161a2993f about tab window is now wideeeeeeeeeer 2023-02-23 20:39:10 +01:00
3e653ee166 changed size of privacy policy and discord buttons 2023-02-23 19:27:29 +01:00
d074c487bc changed font size to 21 and ''< Back to Settings page'' button size 2023-02-23 19:18:10 +01:00
861076cd49 modified about tab buttons 2023-02-23 18:06:59 +01:00
Kacper Kostka
21c2c6c2a3 d 2023-02-23 17:30:38 +01:00
Kacper Kostka
a5e59139f0 Merge branch 'master' of http://git.cubesoftware.xyz:20524/Looki2000/sussycraft-engine 2023-02-23 17:11:06 +01:00
Kacper Kostka
99121a0a03 fix 2023-02-23 17:10:51 +01:00
55b750c446 revert 274977b267
revert changed default touchscreen_threshold to 10
2023-02-23 16:08:18 +00:00
36 changed files with 453 additions and 270 deletions

View File

@@ -9,7 +9,7 @@ endif()
# This can be read from ${PROJECT_NAME} after project() is called
project(minetest)
set(PROJECT_NAME_CAPITALIZED "Minetest")
set(PROJECT_NAME_CAPITALIZED "SussyCraft")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
@@ -17,9 +17,9 @@ set(GCC_MINIMUM_VERSION "5.1")
set(CLANG_MINIMUM_VERSION "3.5")
# Also remember to set PROTOCOL_VERSION in network/networkprotocol.h when releasing
set(VERSION_MAJOR 5)
set(VERSION_MINOR 6)
set(VERSION_PATCH 1)
set(VERSION_MAJOR 1)
set(VERSION_MINOR 2)
set(VERSION_PATCH 0)
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
# Change to false for releases

View File

@@ -1,7 +1,30 @@
Minetest fork for SussyCraft
~~Minetest fork for SussyCraft~~ SussyCraft Engine
============================
This repository is a fork of the Minetest game engine that was modified especially for SussyCraft. Bottom part of this README is the original README from the Minetest repository.
JermaSus will eat you if you don't use this fork!\
⠀⠀⠀⡯⡯⡾⠝⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢊⠘⡮⣣⠪⠢⡑⡌\
⠀⠀⠀⠟⠝⠈⠀⠀⠀⠡⠀⠠⢈⠠⢐⢠⢂⢔⣐⢄⡂⢔⠀⡁⢉⠸⢨⢑⠕⡌\
⠀⠀⡀⠁⠀⠀⠀⡀⢂⠡⠈⡔⣕⢮⣳⢯⣿⣻⣟⣯⣯⢷⣫⣆⡂⠀⠀⢐⠑⡌\
⢀⠠⠐⠈⠀⢀⢂⠢⡂⠕⡁⣝⢮⣳⢽⡽⣾⣻⣿⣯⡯⣟⣞⢾⢜⢆⠀⡀⠀⠪\
⣬⠂⠀⠀⢀⢂⢪⠨⢂⠥⣺⡪⣗⢗⣽⢽⡯⣿⣽⣷⢿⡽⡾⡽⣝⢎⠀⠀⠀⢡\
⣿⠀⠀⠀⢂⠢⢂⢥⢱⡹⣪⢞⡵⣻⡪⡯⡯⣟⡾⣿⣻⡽⣯⡻⣪⠧⠑⠀⠁⢐\
⣿⠀⠀⠀⠢⢑⠠⠑⠕⡝⡎⡗⡝⡎⣞⢽⡹⣕⢯⢻⠹⡹⢚⠝⡷⡽⡨⠀⠀⢔\
⣿⡯⠀⢈⠈⢄⠂⠂⠐⠀⠌⠠⢑⠱⡱⡱⡑⢔⠁⠀⡀⠐⠐⠐⡡⡹⣪⠀⠀⢘\
⣿⣽⠀⡀⡊⠀⠐⠨⠈⡁⠂⢈⠠⡱⡽⣷⡑⠁⠠⠑⠀⢉⢇⣤⢘⣪⢽⠀⢌⢎\
⣿⢾⠀⢌⠌⠀⡁⠢⠂⠐⡀⠀⢀⢳⢽⣽⡺⣨⢄⣑⢉⢃⢭⡲⣕⡭⣹⠠⢐⢗\
⣿⡗⠀⠢⠡⡱⡸⣔⢵⢱⢸⠈⠀⡪⣳⣳⢹⢜⡵⣱⢱⡱⣳⡹⣵⣻⢔⢅⢬⡷\
⣷⡇⡂⠡⡑⢕⢕⠕⡑⠡⢂⢊⢐⢕⡝⡮⡧⡳⣝⢴⡐⣁⠃⡫⡒⣕⢏⡮⣷⡟\
⣷⣻⣅⠑⢌⠢⠁⢐⠠⠑⡐⠐⠌⡪⠮⡫⠪⡪⡪⣺⢸⠰⠡⠠⠐⢱⠨⡪⡪⡰\
⣯⢷⣟⣇⡂⡂⡌⡀⠀⠁⡂⠅⠂⠀⡑⡄⢇⠇⢝⡨⡠⡁⢐⠠⢀⢪⡐⡜⡪⡊\
⣿⢽⡾⢹⡄⠕⡅⢇⠂⠑⣴⡬⣬⣬⣆⢮⣦⣷⣵⣷⡗⢃⢮⠱⡸⢰⢱⢸⢨⢌\
⣯⢯⣟⠸⣳⡅⠜⠔⡌⡐⠈⠻⠟⣿⢿⣿⣿⠿⡻⣃⠢⣱⡳⡱⡩⢢⠣⡃⠢⠁\
⡯⣟⣞⡇⡿⣽⡪⡘⡰⠨⢐⢀⠢⢢⢄⢤⣰⠼⡾⢕⢕⡵⣝⠎⢌⢪⠪⡘⡌⠀\
⡯⣳⠯⠚⢊⠡⡂⢂⠨⠊⠔⡑⠬⡸⣘⢬⢪⣪⡺⡼⣕⢯⢞⢕⢝⠎⢻⢼⣀⠀\
⠁⡂⠔⡁⡢⠣⢀⠢⠀⠅⠱⡐⡱⡘⡔⡕⡕⣲⡹⣎⡮⡏⡑⢜⢼⡱⢩⣗⣯⣟\
⢀⢂⢑⠀⡂⡃⠅⠊⢄⢑⠠⠑⢕⢕⢝⢮⢺⢕⢟⢮⢊⢢⢱⢄⠃⣇⣞⢞⣞⢾\
⢀⠢⡑⡀⢂⢊⠠⠁⡂⡐⠀⠅⡈⠪⠪⠪⠣⠫⠑⡁⢔⠕⣜⣜⢦⡰⡎⡯⡾⡽
This repository is a fork of the Minetest game engine that was modified especially for SussyCraft. Bottom part of this README is a modified README from the Minetest repository.
Minetest
========
@@ -17,8 +40,8 @@ and contributors (see source file comments and the version control log)
In case you downloaded the source code
--------------------------------------
If you downloaded the Minetest Engine source code in which this file is
contained, you probably want to download the [Minetest Game](https://github.com/minetest/minetest_game/)
If you downloaded the SuusyCraft Engine source code in which this file is
contained, you probably want to download the [SussyCraft game](http://git.cubesoftware.xyz:20524/kacperks/SussyCraft) (it's a submodule)
project too. See its README.txt for more information.
Table of Contents

View File

@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
compileSdkVersion 31
buildToolsVersion '30.0.3'
ndkVersion "$ndk_version"
defaultConfig {
applicationId 'xyz.cubesoftware.sussycraft'
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 31
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
versionCode project.versionCode
}

View File

@@ -62,7 +62,7 @@
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="net.minetest.minetest.fileprovider"
android:authorities="xyz.cubesoftware.sussycraft.fileprovider"
android:grantUriPermissions="true"
android:exported="false">
<meta-data

View File

@@ -45,6 +45,7 @@ import java.util.Objects;
// Native code finds these methods by name (see porting_android.cpp).
// This annotation prevents the minifier/Proguard from mangling them.
@Keep
@SuppressWarnings("unused")
public class GameActivity extends NativeActivity {
static {
System.loadLibrary("c++_shared");
@@ -194,7 +195,7 @@ public class GameActivity extends NativeActivity {
return;
}
Uri fileUri = FileProvider.getUriForFile(this, "net.minetest.minetest.fileprovider", file);
Uri fileUri = FileProvider.getUriForFile(this, "xyz.cubesoftware.sussycraft.fileprovider", file);
Intent intent = new Intent(Intent.ACTION_SEND, fileUri);
intent.setDataAndType(fileUri, getContentResolver().getType(fileUri));
@@ -204,4 +205,4 @@ public class GameActivity extends NativeActivity {
Intent shareIntent = Intent.createChooser(intent, null);
startActivity(shareIntent);
}
}
}

View File

@@ -127,8 +127,12 @@ public class MainActivity extends AppCompatActivity {
}
@Override
public void onRequestPermissionsResult(int requestCode,
@NonNull String[] permissions, @NonNull int[] grantResults) {
public void onRequestPermissionsResult(
int requestCode,
@NonNull String[] permissions,
@NonNull int[] grantResults
) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == PERMISSIONS) {
for (int grantResult : grantResults) {
if (grantResult != PackageManager.PERMISSION_GRANTED) {
@@ -182,4 +186,4 @@ public class MainActivity extends AppCompatActivity {
super.onDestroy();
unregisterReceiver(myReceiver);
}
}
}

View File

@@ -29,10 +29,10 @@ import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Environment;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.StringRes;
import java.io.File;
@@ -77,9 +77,6 @@ public class UnzipService extends IntentService {
try {
setIsRunning(true);
File userDataDirectory = Utils.getUserDataDirectory(this);
if (userDataDirectory == null) {
throw new IOException("Unable to find user data directory");
}
try (InputStream in = this.getAssets().open(zipFile.getName())) {
try (OutputStream out = new FileOutputStream(zipFile)) {
@@ -98,7 +95,9 @@ public class UnzipService extends IntentService {
failureMessage = e.getLocalizedMessage();
} finally {
setIsRunning(false);
zipFile.delete();
if (!zipFile.delete()) {
Log.w("UnzipService", "Minetest installation ZIP cannot be deleted");
}
}
}
@@ -131,8 +130,12 @@ public class UnzipService extends IntentService {
Intent notificationIntent = new Intent(this, MainActivity.class);
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
| Intent.FLAG_ACTIVITY_SINGLE_TOP);
int pendingIntentFlag = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
pendingIntentFlag = PendingIntent.FLAG_MUTABLE;
}
PendingIntent intent = PendingIntent.getActivity(this, 0,
notificationIntent, 0);
notificationIntent, pendingIntentFlag);
builder.setContentTitle(getString(R.string.notification_title))
.setSmallIcon(R.mipmap.ic_launcher)
@@ -156,7 +159,7 @@ public class UnzipService extends IntentService {
int readLen;
byte[] readBuffer = new byte[16384];
try (FileInputStream fileInputStream = new FileInputStream(zipFile);
ZipInputStream zipInputStream = new ZipInputStream(fileInputStream)) {
ZipInputStream zipInputStream = new ZipInputStream(fileInputStream)) {
ZipEntry ze;
while ((ze = zipInputStream.getNextEntry()) != null) {
if (ze.isDirectory()) {
@@ -165,8 +168,17 @@ public class UnzipService extends IntentService {
continue;
}
publishProgress(notificationBuilder, R.string.loading, 100 * ++per / size);
try (OutputStream outputStream = new FileOutputStream(
new File(userDataDirectory, ze.getName()))) {
// "Zip Path Traversal Vulnerability" fixed according to this article: https://support.google.com/faqs/answer/9294009
File new_file = new File(userDataDirectory, ze.getName());
String canonicalPath = new_file.getCanonicalPath();
if (!canonicalPath.startsWith(String.valueOf(userDataDirectory))) {
throw new IOException("Unzipping failed due to security issue!");
}
try (OutputStream outputStream = new FileOutputStream(new_file)) {
while ((readLen = zipInputStream.read(readBuffer)) != -1) {
outputStream.write(readBuffer, 0, readLen);
}
@@ -210,7 +222,9 @@ public class UnzipService extends IntentService {
return;
publishProgress(notificationBuilder, R.string.migrating, 0);
newLocation.mkdir();
if (!newLocation.mkdir()) {
Log.e("UnzipService", "New installation folder cannot be made");
}
String[] dirs = new String[] { "worlds", "games", "mods", "textures", "client" };
for (int i = 0; i < dirs.length; i++) {
@@ -228,7 +242,9 @@ public class UnzipService extends IntentService {
}
}
recursivelyDeleteDirectory(oldLocation);
if (!recursivelyDeleteDirectory(oldLocation)) {
Log.w("UnzipService", "Old installation files cannot be deleted successfully");
}
}
private void publishProgress(@Nullable Notification.Builder notificationBuilder, @StringRes int message, int progress) {

View File

@@ -1,39 +1,46 @@
package net.minetest.minetest;
import android.content.Context;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.File;
import java.util.Objects;
public class Utils {
public static @NonNull File createDirs(File root, String dir) {
@NonNull
public static File createDirs(@NonNull File root, @NonNull String dir) {
File f = new File(root, dir);
if (!f.isDirectory())
f.mkdirs();
if (!f.mkdirs())
Log.e("Utils", "Directory " + dir + " cannot be created");
return f;
}
public static @Nullable File getUserDataDirectory(Context context) {
File extDir = context.getExternalFilesDir(null);
if (extDir == null) {
return null;
}
@NonNull
public static File getUserDataDirectory(@NonNull Context context) {
File extDir = Objects.requireNonNull(
context.getExternalFilesDir(null),
"Cannot get external file directory"
);
return createDirs(extDir, "Minetest");
}
public static @Nullable File getCacheDirectory(Context context) {
return context.getCacheDir();
@NonNull
public static File getCacheDirectory(@NonNull Context context) {
return Objects.requireNonNull(
context.getCacheDir(),
"Cannot get cache directory"
);
}
public static boolean isInstallValid(Context context) {
public static boolean isInstallValid(@NonNull Context context) {
File userDataDirectory = getUserDataDirectory(context);
return userDataDirectory != null && userDataDirectory.isDirectory() &&
return userDataDirectory.isDirectory() &&
new File(userDataDirectory, "games").isDirectory() &&
new File(userDataDirectory, "builtin").isDirectory() &&
new File(userDataDirectory, "client").isDirectory() &&
new File(userDataDirectory, "textures").isDirectory();
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 262 KiB

View File

@@ -4,10 +4,10 @@
<string name="label">SussyCraft</string>
<string name="loading">Loading&#8230;</string>
<string name="migrating">Migrating save data from old install&#8230; (this may take a while)</string>
<string name="not_granted">Required permission wasn\'t granted, Minetest can\'t run without it</string>
<string name="notification_title">Loading Minetest</string>
<string name="not_granted">Required permission wasn\'t granted, SussyCraft can\'t run without it</string>
<string name="notification_title">Loading SussyCraft</string>
<string name="notification_description">Less than 1 minute&#8230;</string>
<string name="ime_dialog_done">Done</string>
<string name="no_external_storage">External storage isn\'t available. If you use an SDCard, please reinsert it. Otherwise, try restarting your phone or contacting the Minetest developers</string>
<string name="no_external_storage">External storage isn\'t available. If you use an SD Card, please reinsert it. Otherwise, try restarting your phone or contacting the SussyCraft developers</string>
</resources>

View File

@@ -1,23 +1,23 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
project.ext.set("versionMajor", 5) // Version Major
project.ext.set("versionMinor", 6) // Version Minor
project.ext.set("versionMajor", 1) // Version Major
project.ext.set("versionMinor", 2) // Version Minor
project.ext.set("versionPatch", 0) // Version Patch
project.ext.set("versionExtra", "") // Version Extra
project.ext.set("versionCode", 42) // Android Version Code
project.ext.set("developmentBuild", 0) // Whether it is a development build, or a release
project.ext.set("versionExtra", "") // Version Extra
project.ext.set("versionCode", 47) // Android Version Code
project.ext.set("developmentBuild", 0) // Whether it is a development build, or a release
// NOTE: +2 after each release!
// +1 for ARM and +1 for ARM64 APK's, because
// each APK must have a larger `versionCode` than the previous
buildscript {
ext.ndk_version = '23.2.8568313'
ext.ndk_version = '25.1.8937393'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'de.undercouch:gradle-download-task:4.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -27,7 +27,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@@ -1,5 +1,6 @@
#Fri Feb 24 12:42:36 CET 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME

View File

@@ -2,12 +2,12 @@ apply plugin: 'com.android.library'
apply plugin: 'de.undercouch.download'
android {
compileSdkVersion 30
compileSdkVersion 31
buildToolsVersion '30.0.3'
ndkVersion "$ndk_version"
defaultConfig {
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 31
externalNativeBuild {
ndkBuild {
arguments '-j' + Runtime.getRuntime().availableProcessors(),

View File

@@ -1,2 +1,2 @@
rootProject.name = "Minetest"
rootProject.name = "SussyCraft"
include ':app', ':native'

67
android/versionCode+1.py Normal file
View File

@@ -0,0 +1,67 @@
import os
###############################################################################
# Overcomplicated script that increments the versionCode in build.gradle by 1 #
###############################################################################
script_path = os.path.dirname(os.path.realpath(__file__))
# open build.gradle as read
with open(script_path + "\\build.gradle", "r") as f:
# read lines
lines = f.readlines()
# find versionCode
for line_i in range(len(lines)):
# find char_i of "project.ext.set("versionCode", "
char_i = lines[line_i].find("project.ext.set(\"versionCode\",")
if char_i != -1:
char_i += 30
line_max_i = len(lines[line_i]) - 1
# find start of number
while True:
if char_i > line_max_i:
print("Error: number in versionCode not found")
input("Press Enter to exit...")
exit()
char_unicode = ord(lines[line_i][char_i])
if 48 <= char_unicode <= 57:
break
char_i += 1
# find end of number
num_end_i = char_i + 1
while True:
char_unicode = ord(lines[line_i][num_end_i])
if 48 > char_unicode or char_unicode > 57:
break
num_end_i += 1
# get number
num = int(lines[line_i][char_i:num_end_i])
print(f"OLD versionCode: {num}")
num += 1
print(f"NEW versionCode: {num}")
# replace number
lines[line_i] = lines[line_i][:char_i] + str(num) + lines[line_i][num_end_i:]
# write lines
with open(script_path + "\\build.gradle", "w") as f:
f.writelines(lines)
break
if char_i == -1:
print("Error: versionCode not found")
else:
print("Done!")
input("Press Enter to exit...")

View File

@@ -35,6 +35,9 @@ dofile(commonpath .. "strict.lua")
dofile(commonpath .. "serialize.lua")
dofile(commonpath .. "misc_helpers.lua")
-- disable day/night cycle
minetest.settings:set("time_speed", 0)
if INIT == "game" then
dofile(gamepath .. "init.lua")
assert(not core.get_http_api)

View File

@@ -1024,7 +1024,7 @@ local function create_settings_formspec(tabview, _, tabdata)
formspec = formspec:sub(1, -2) -- remove trailing comma
end
formspec = formspec .. ";" .. selected_setting .. "]" ..
"button[0,4.9;4,1;btn_back;".. fgettext("< Back to Settings page") .. "]" ..
"button[0,4.9;4.5,1;btn_back;".. fgettext("< Back to Settings page") .. "]" ..
"button[10,4.9;2,1;btn_edit;" .. fgettext("Edit") .. "]" ..
"button[7,4.9;3,1;btn_restore;" .. fgettext("Restore Default") .. "]" ..
"checkbox[0,4.3;cb_tech_settings;" .. fgettext("Show technical names") .. ";"

View File

@@ -64,8 +64,7 @@ function mm_game_theme.reset()
if not have_bg then
if core.settings:get_bool("menu_clouds") then
--core.set_clouds(true)
mm_game_theme.set_dirt_bg()
core.set_clouds(true)
else
mm_game_theme.set_dirt_bg()
end
@@ -199,6 +198,6 @@ function mm_game_theme.set_music(gamedetails)
if mm_game_theme.music_handle ~= nil then
core.sound_stop(mm_game_theme.music_handle)
end
local music_path = "amogus_incomming"
local music_path = gamedetails.path .. DIR_DELIM .. "menu" .. DIR_DELIM .. "theme"
mm_game_theme.music_handle = core.sound_play(music_path, true)
end
end

View File

@@ -92,14 +92,14 @@ local function init_globals()
end
mm_game_theme.init()
mm_game_theme.set_music("amogus_incomming.ogg")
-- Create main tabview
local tv_main = tabview_create("maintab", {x = 12, y = 5.4}, {x = 0, y = 0})
-- note: size would be 15.5,7.1 in real coordinates mode
tv_main:set_autosave_tab(true)
tv_main:add(tabs.local_game)
--tv_main:add(tabs.play_online)
tv_main:add(tabs.play_online)
--tv_main:add(tabs.content)
tv_main:add(tabs.settings)
@@ -108,7 +108,6 @@ local function init_globals()
tv_main:set_global_event_handler(main_event_handler)
tv_main:set_fixed_size(false)
local last_tab = core.settings:get("maintab_LAST")
if last_tab and tv_main.current_tab ~= last_tab then
tv_main:set_tab(last_tab)
@@ -124,7 +123,8 @@ local function init_globals()
end
ui.set_default("maintab")
check_new_version()
-- disable new minetest version check because this is sussycraft MUHAHAHAHAHHAHAHA
-- check_new_version()
tv_main:show()
ui.update()
end

View File

@@ -15,24 +15,37 @@
--with this program; if not, write to the Free Software Foundation, Inc.,
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-- IMPORTANT! some lines had to be split up to new lines because they didn't fit in the window
local sussycraft_authors = {
"SussyCraft Game Authors:",
"Kacper Kostka (kacperks) <kacperks@cubesoftware.xyz>",
"Kacper Kostka (kacperks)",
"<kacperks@cubesoftware.xyz>",
"(Programming, Textures)",
"-----------------------------------------------------------",
"Łukasz Brzostowski (Looki2000)",
"<electro.brzostek@gmail.com or looki2000@cubesoftware.xyz>",
"(Programming, Textures, 3D Models, Soundtrack, Sounds)",
"Karol Rostek (karoltoja200) discord:karoltoja200#6809",
"-----------------------------------------------------------",
"Karol Rostek (karoltoja200)",
"<discord: karoltoja200#6809>",
"(Textures)",
"Dawid Cholewiusz (D47 0_o) discord:D46 0_o#8952",
"-----------------------------------------------------------",
"Dawid Cholewiusz (D47 0_o)",
"<discord: D46 0_o#8952>",
"(Structures builder)",
"Kacper Brzostowski (wooden plank texture)",
"-----------------------------------------------------------",
"Kacper Brzostowski",
"(wooden plank texture)",
}
-- https://github.com/orgs/minetest/teams/engine/members
local core_developers = {
"Perttu Ahola (celeron55) <celeron55@gmail.com> [Project founder]",
"sfan5 <sfan5@live.de>",
@@ -140,34 +153,37 @@ return {
local credit_list = {}
table.insert_all(credit_list, {
core.colorize("#ff0", fgettext("SussyCraft Developers"))
core.colorize("#ffdd33", fgettext("SussyCraft Developers"))
})
prepare_credits(credit_list, sussycraft_authors)
table.insert_all(credit_list, {
core.colorize("#ff0", fgettext("Minetest Engine Developers"))
"",
core.colorize("#ffdd33", fgettext("Minetest Engine Developers"))
})
prepare_credits(credit_list, core_developers)
table.insert_all(credit_list, {
"",
core.colorize("#ff0", fgettext("Core Team"))
core.colorize("#ffdd33", fgettext("Core Team"))
})
prepare_credits(credit_list, core_team)
table.insert_all(credit_list, {
"",
core.colorize("#ff0", fgettext("Active Contributors"))
core.colorize("#ffdd33", fgettext("Active Contributors"))
})
prepare_credits(credit_list, active_contributors)
table.insert_all(credit_list, {
"",
core.colorize("#ff0", fgettext("Previous Core Developers"))
core.colorize("#ffdd33", fgettext("Previous Core Developers"))
})
prepare_credits(credit_list, previous_core_developers)
table.insert_all(credit_list, {
"",
core.colorize("#ff0", fgettext("Previous Contributors"))
core.colorize("#ffdd33", fgettext("Previous Contributors"))
})
prepare_credits(credit_list, previous_contributors)
-- SUS
local excamation_marks_count = math.random(1, 30)
table.insert_all(credit_list, {
"",
@@ -179,17 +195,24 @@ return {
-- account for the visible portion
scroll_height = math.max(0, scroll_height - 6.9)
-- minetest gui system sucks so I had to make these calculations to center the buttons BECAUSE THEY CHANGE ON EVERY ANDROID DEVICE AND I HAVE TO WIDEN THEM MORE BECAUSE MINETEST IS A PIECE OF CRAP AAAAAAAAAAAAAAAA
local privacy_button_size = 3.5
local discord_button_size = 4.5
local fs = "image[1.5,0.6;2.5,2.5;" .. core.formspec_escape(logofile) .. "]" ..
"style[label_button;border=false]" ..
"button[0.1,3.4;5.3,0.5;label_button;" ..
core.formspec_escape("SussyCraft 0.8") .. "]" ..
"button[1.5,4.1;3.5,0.9;homepage;Privacy Policy]" ..
"scroll_container[5.5,0.1;9.5,6.9;scroll_credits;vertical;" ..
core.formspec_escape("SussyCraft " .. core.get_version().string) .. "]" ..
"button[" .. tostring(-privacy_button_size / 2 + 2.75) .. ",4.1;" .. tostring(privacy_button_size) .. ",0.8;privacy;Privacy Policy]" ..
"button[" .. tostring(-discord_button_size / 2 + 2.75) .. ",5.1;" .. tostring(discord_button_size) .. ",0.8;discord;SussyCraft Discord]" ..
"scroll_container[5.5,0.1;13.5,6.9;scroll_credits;vertical;" .. -- originally: 5.5,0.1;9.5,6.9
tostring(scroll_height / 1000) .. "]" .. credit_fs ..
"scroll_container_end[]"..
"scrollbar[15,0.1;0.4,6.9;vertical;scroll_credits;0]"..
"scrollbar[19,0.1;0.4,6.9;vertical;scroll_credits;0]" -- originally: 15,0.1;0.4,6.9
"button[1.5,5.1;3.5,0.8;discord;Discord]"
-- Render information
fs = fs .. "style[label_button2;border=false]" ..
@@ -198,29 +221,15 @@ return {
fgettext("Active renderer:") .. "\n" ..
core.formspec_escape(core.get_screen_info().render_info) .. "]"
if PLATFORM == "Android" then
else
end
return fs, "size[15.5,7.1,false]real_coordinates[true]"
return fs, "size[19.5,7.1,false]real_coordinates[true]" -- originally: 15.5,7.1
end,
cbf_button_handler = function(this, fields, name, tabdata)
if fields.homepage then
if fields.privacy then
core.open_url("https://cubesoftware.xyz/sussycraft/privacy.html")
end
if fields.discord then
core.open_url("https://discord.gg/aJmhBN74sh")
end
if fields.share_debug then
local path = core.get_user_path() .. DIR_DELIM .. "debug.txt"
core.share_file(path)
end
if fields.userdata then
core.open_dir(core.get_user_path())
end
end,
}

View File

@@ -165,9 +165,9 @@ local function get_formspec(tabview, name, tabdata)
y = y + yo
end
if disabled_settings["enable_server"] == nil then
--host = "checkbox[0,"..y..";cb_server;".. fgettext("Host Server") ..";" ..
-- dump(core.settings:get_bool("enable_server")) .. "]"
--y = y + yo
host = "checkbox[0,"..y..";cb_server;".. fgettext("Host Server") ..";" ..
dump(core.settings:get_bool("enable_server")) .. "]"
y = y + yo
end
retval = retval ..
@@ -185,7 +185,7 @@ local function get_formspec(tabview, name, tabdata)
if core.settings:get_bool("enable_server") and disabled_settings["enable_server"] == nil then
retval = retval ..
"button[7.9,4.75;4.1,1;play;".. fgettext("Host Game") .. "]" ..
"checkbox[0,"..y..";cb_server_announce;" .. fgettext("Announce Server") .. ";" ..
--"checkbox[0,"..y..";cb_server_announce;" .. fgettext("Announce Server") .. ";" ..
dump(core.settings:get_bool("server_announce")) .. "]" ..
"field[0.3,2.85;3.8,0.5;te_playername;" .. fgettext("Name") .. ";" ..
core.formspec_escape(core.settings:get("name")) .. "]" ..
@@ -205,7 +205,7 @@ local function get_formspec(tabview, name, tabdata)
end
else
retval = retval ..
"button[7.9,4.75;4.1,1;play;" .. fgettext("Play Game") .. "]"
"button[7.9,4.75;4.1,1;play;" .. fgettext("Play Selected World") .. "]"
end
return retval
@@ -260,13 +260,13 @@ local function main_button_handler(this, fields, name, tabdata)
return true
end
if fields["cb_server_announce"] then
core.settings:set("server_announce", fields["cb_server_announce"])
local selected = core.get_textlist_index("srv_worlds")
menu_worldmt(selected, "server_announce", fields["cb_server_announce"])
--if fields["cb_server_announce"] then
-- core.settings:set("server_announce", fields["cb_server_announce"])
-- local selected = core.get_textlist_index("srv_worlds")
-- menu_worldmt(selected, "server_announce", fields["cb_server_announce"])
return true
end
-- return true
--end
if fields["play"] ~= nil or world_doubleclick or fields["key_enter"] then
local selected = core.get_textlist_index("sp_worlds")

View File

@@ -16,41 +16,54 @@
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
local function get_sorted_servers()
--local servers = {
-- fav = {},
-- public = {},
-- incompatible = {}
--}
main_serv = {
address = "in the future!",
port = 30000,
name = "The official SussyCraft server"
}
local servers = {
fav = {},
public = {},
fav = serverlistmgr.get_favorites(),
public = {main_serv},
incompatible = {}
}
local favs = serverlistmgr.get_favorites()
local taken_favs = {}
local result = menudata.search_result or serverlistmgr.servers
for _, server in ipairs(result) do
server.is_favorite = false
for index, fav in ipairs(favs) do
if server.address == fav.address and server.port == fav.port then
taken_favs[index] = true
server.is_favorite = true
break
end
end
server.is_compatible = is_server_protocol_compat(server.proto_min, server.proto_max)
if server.is_favorite then
table.insert(servers.fav, server)
elseif server.is_compatible then
table.insert(servers.public, server)
else
table.insert(servers.incompatible, server)
end
end
if not menudata.search_result then
for index, fav in ipairs(favs) do
if not taken_favs[index] then
table.insert(servers.fav, fav)
end
end
end
--local favs = serverlistmgr.get_favorites()
--local taken_favs = {}
--local result = menudata.search_result or serverlistmgr.servers
--for _, server in ipairs(result) do
-- server.is_favorite = false
-- for index, fav in ipairs(favs) do
-- if server.address == fav.address and server.port == fav.port then
-- taken_favs[index] = true
-- server.is_favorite = true
-- break
-- end
-- end
-- server.is_compatible = is_server_protocol_compat(server.proto_min, server.proto_max)
-- if server.is_favorite then
-- table.insert(servers.fav, server)
-- elseif server.is_compatible then
-- table.insert(servers.public, server)
-- else
-- table.insert(servers.incompatible, server)
-- end
--end
--
--if not menudata.search_result then
-- for index, fav in ipairs(favs) do
-- if not taken_favs[index] then
-- table.insert(servers.fav, fav)
-- end
-- end
--end
return servers
end
@@ -60,31 +73,31 @@ local function get_formspec(tabview, name, tabdata)
-- it may have changed after a change by the settings menu.
common_update_cached_supp_proto()
if not tabdata.search_for then
tabdata.search_for = ""
end
--if not tabdata.search_for then
-- tabdata.search_for = ""
--end
local retval =
-- Search
"field[0.25,0.25;7,0.75;te_search;;" .. core.formspec_escape(tabdata.search_for) .. "]" ..
"container[7.25,0.25]" ..
"image_button[0,0;0.75,0.75;" .. core.formspec_escape(defaulttexturedir .. "search.png") .. ";btn_mp_search;]" ..
"image_button[0.75,0;0.75,0.75;" .. core.formspec_escape(defaulttexturedir .. "clear.png") .. ";btn_mp_clear;]" ..
"image_button[1.5,0;0.75,0.75;" .. core.formspec_escape(defaulttexturedir .. "refresh.png") .. ";btn_mp_refresh;]" ..
"tooltip[btn_mp_clear;" .. fgettext("Clear") .. "]" ..
"tooltip[btn_mp_search;" .. fgettext("Search") .. "]" ..
"tooltip[btn_mp_refresh;" .. fgettext("Refresh") .. "]" ..
"container_end[]" ..
--"field[0.25,0.25;7,0.75;te_search;;" .. core.formspec_escape(tabdata.search_for) .. "]" ..
--"container[7.25,0.25]" ..
--"image_button[0,0;0.75,0.75;" .. core.formspec_escape(defaulttexturedir .. "search.png") .. ";btn_mp_search;]" ..
--"image_button[0.75,0;0.75,0.75;" .. core.formspec_escape(defaulttexturedir .. "clear.png") .. ";btn_mp_clear;]" ..
--"image_button[1.5,0;0.75,0.75;" .. core.formspec_escape(defaulttexturedir .. "refresh.png") .. ";btn_mp_refresh;]" ..
--"tooltip[btn_mp_clear;" .. fgettext("Clear") .. "]" ..
--"tooltip[btn_mp_search;" .. fgettext("Search") .. "]" ..
--"tooltip[btn_mp_refresh;" .. fgettext("Refresh") .. "]" ..
--"container_end[]" ..
"container[9.75,0]" ..
"box[0,0;5.75,7;#666666]" ..
-- Address / Port
"label[0.25,0.35;" .. fgettext("Address") .. "]" ..
"label[4.25,0.35;" .. fgettext("Port") .. "]" ..
"field[0.25,0.5;4,0.75;te_address;;" ..
"label[0.25,0.30;" .. fgettext("Address") .. "]" ..
"label[4,0.30;" .. fgettext("Port") .. "]" ..
"field[0.25,0.5;3.75,0.75;te_address;;" ..
core.formspec_escape(core.settings:get("address")) .. "]" ..
"field[4.25,0.5;1.25,0.75;te_port;;" ..
"field[4,0.5;1.5,0.75;te_port;;" ..
core.formspec_escape(core.settings:get("remote_port")) .. "]" ..
-- Description Background
@@ -108,7 +121,7 @@ local function get_formspec(tabview, name, tabdata)
if tabdata.selected then
if gamedata.fav then
retval = retval .. "tooltip[btn_delete_favorite;" .. fgettext("Remove favorite") .. "]"
retval = retval .. "tooltip[btn_delete_favorite;" .. fgettext("Remove recent") .. "]"
retval = retval .. "style[btn_delete_favorite;padding=6]"
retval = retval .. "image_button[5,1.3;0.5,0.5;" .. core.formspec_escape(defaulttexturedir ..
"server_favorite_delete.png") .. ";btn_delete_favorite;]"
@@ -148,13 +161,14 @@ local function get_formspec(tabview, name, tabdata)
"align=inline,padding=0.25,width=1.5;" ..
"color,align=inline,span=1;" ..
"text,align=inline,padding=1]" ..
"table[0.25,1;9.25,5.75;servers;"
"table[0.25,0.2;9.25,6.65;servers;"
local servers = get_sorted_servers()
--minetest.debug("Serverlist: " .. dump(servers))
local dividers = {
fav = "5,#ffff00," .. fgettext("Favorites") .. ",,,0,0,,",
public = "6,#4bdd42," .. fgettext("Public Servers") .. ",,,0,0,,",
fav = "5,#ffff00," .. fgettext("Recent") .. ",,,0,0,,",
public = "6,#4bdd42," .. fgettext("Main Servers") .. ",,,0,0,,",
incompatible = "7,"..mt_color_grey.."," .. fgettext("Incompatible Servers") .. ",,,0,0,,"
}
local order = {"fav", "public", "incompatible"}
@@ -185,60 +199,60 @@ end
--------------------------------------------------------------------------------
local function search_server_list(input)
menudata.search_result = nil
if #serverlistmgr.servers < 2 then
return
end
-- setup the keyword list
local keywords = {}
for word in input:gmatch("%S+") do
word = word:gsub("(%W)", "%%%1")
table.insert(keywords, word)
end
if #keywords == 0 then
return
end
menudata.search_result = {}
-- Search the serverlist
local search_result = {}
for i = 1, #serverlistmgr.servers do
local server = serverlistmgr.servers[i]
local found = 0
for k = 1, #keywords do
local keyword = keywords[k]
if server.name then
local sername = server.name:lower()
local _, count = sername:gsub(keyword, keyword)
found = found + count * 4
end
if server.description then
local desc = server.description:lower()
local _, count = desc:gsub(keyword, keyword)
found = found + count * 2
end
end
if found > 0 then
local points = (#serverlistmgr.servers - i) / 5 + found
server.points = points
table.insert(search_result, server)
end
end
if #search_result == 0 then
return
end
table.sort(search_result, function(a, b)
return a.points > b.points
end)
menudata.search_result = search_result
end
--local function search_server_list(input)
-- menudata.search_result = nil
-- if #serverlistmgr.servers < 2 then
-- return
-- end
--
-- -- setup the keyword list
-- local keywords = {}
-- for word in input:gmatch("%S+") do
-- word = word:gsub("(%W)", "%%%1")
-- table.insert(keywords, word)
-- end
--
-- if #keywords == 0 then
-- return
-- end
--
-- menudata.search_result = {}
--
-- -- Search the serverlist
-- local search_result = {}
-- for i = 1, #serverlistmgr.servers do
-- local server = serverlistmgr.servers[i]
-- local found = 0
-- for k = 1, #keywords do
-- local keyword = keywords[k]
-- if server.name then
-- local sername = server.name:lower()
-- local _, count = sername:gsub(keyword, keyword)
-- found = found + count * 4
-- end
--
-- if server.description then
-- local desc = server.description:lower()
-- local _, count = desc:gsub(keyword, keyword)
-- found = found + count * 2
-- end
-- end
-- if found > 0 then
-- local points = (#serverlistmgr.servers - i) / 5 + found
-- server.points = points
-- table.insert(search_result, server)
-- end
-- end
--
-- if #search_result == 0 then
-- return
-- end
--
-- table.sort(search_result, function(a, b)
-- return a.points > b.points
-- end)
-- menudata.search_result = search_result
--end
local function set_selected_server(tabdata, idx, server)
-- reset selection
@@ -324,27 +338,27 @@ local function main_button_handler(tabview, fields, name, tabdata)
return true
end
if fields.btn_mp_clear then
tabdata.search_for = ""
menudata.search_result = nil
return true
end
--if fields.btn_mp_clear then
-- tabdata.search_for = ""
-- menudata.search_result = nil
-- return true
--end
if fields.btn_mp_search or fields.key_enter_field == "te_search" then
tabdata.search_for = fields.te_search
search_server_list(fields.te_search:lower())
if menudata.search_result then
-- first server in row 2 due to header
set_selected_server(tabdata, 2, menudata.search_result[1])
end
--if fields.btn_mp_search or fields.key_enter_field == "te_search" then
-- tabdata.search_for = fields.te_search
-- search_server_list(fields.te_search:lower())
-- if menudata.search_result then
-- -- first server in row 2 due to header
-- set_selected_server(tabdata, 2, menudata.search_result[1])
-- end
return true
end
-- return true
--end
if fields.btn_mp_refresh then
serverlistmgr.sync()
return true
end
--if fields.btn_mp_refresh then
-- serverlistmgr.sync()
-- return true
--end
if (fields.btn_mp_login or fields.key_enter)
and fields.te_address ~= "" and fields.te_port then
@@ -364,8 +378,11 @@ local function main_button_handler(tabview, fields, name, tabdata)
if server and server.address == gamedata.address and
server.port == gamedata.port then
serverlistmgr.add_favorite(server)
-- add only if not main_serv
if server.address ~= main_serv.address and server.port ~= main_serv.port then
serverlistmgr.add_favorite(server)
end
gamedata.servername = server.name
gamedata.serverdescription = server.description
@@ -413,15 +430,15 @@ local function main_button_handler(tabview, fields, name, tabdata)
return false
end
local function on_change(type, old_tab, new_tab)
if type == "LEAVE" then return end
serverlistmgr.sync()
end
--local function on_change(type, old_tab, new_tab)
-- if type == "LEAVE" then return end
-- serverlistmgr.sync()
--end
return {
name = "online",
caption = fgettext("Join Game"),
cbf_formspec = get_formspec,
cbf_button_handler = main_button_handler,
on_change = on_change
on_change = nil
}

View File

@@ -201,8 +201,8 @@ local function formspec(tabview, name, tabdata)
if core.settings:get("touchscreen_threshold") ~= nil then
tab_string = tab_string ..
"label[4.25,3.5;" .. fgettext("Touch threshold (px):") .. "]" ..
"dropdown[4.25,3.95;3.5;dd_touchthreshold;0,10,20,30,40,50;" ..
((tonumber(core.settings:get("touchscreen_threshold")) / 10) + 1) ..
"dropdown[4.25,3.95;3.5;dd_touchthreshold;0,5,10,15,20,25,30,35,40,45,50;" ..
((tonumber(core.settings:get("touchscreen_threshold")) / 5) + 1) ..
"]"
else
tab_string = tab_string ..

View File

@@ -110,12 +110,12 @@ safe_dig_and_place (Safe digging and placing) bool false
invert_mouse (Invert mouse) bool false
# Mouse sensitivity multiplier.
mouse_sensitivity (Mouse sensitivity) float 0.2 0.001 10.0
mouse_sensitivity (Mouse sensitivity) float 0.1 0.001 10.0
[*Touchscreen]
# The length in pixels it takes for touch screen interaction to start.
touchscreen_threshold (Touch screen threshold) int 20 0 100
touchscreen_threshold (Touch screen threshold) int 5 0 100
# (Android) Fixes the position of virtual joystick.
# If disabled, virtual joystick will center to first-touch's position.
@@ -152,10 +152,10 @@ pause_on_lost_focus (Pause on lost window focus) bool false
# If FPS would go higher than this, limit it by sleeping
# to not waste CPU power for no benefit.
fps_max (Maximum FPS) int 60 1 4294967295
fps_max (Maximum FPS) int 240 1 4294967295
# Vertical screen synchronization.
vsync (VSync) bool false
vsync (VSync) bool true
# Maximum FPS when the window is not focused, or when the game is paused.
fps_max_unfocused (FPS when unfocused or paused) int 20 1 4294967295
@@ -499,7 +499,7 @@ tooltip_show_delay (Tooltip delay) int 400 0 18446744073709551615
tooltip_append_itemname (Append item name) bool false
# Use a cloud animation for the main menu background.
menu_clouds (Clouds in menu) bool true
menu_clouds (Clouds in menu) bool false
[**HUD]
@@ -609,7 +609,7 @@ server_url (Server URL) string https://minetest.net
server_announce (Announce server) bool false
# Announce to this serverlist.
serverlist_url (Serverlist URL) string servers.minetest.net
serverlist_url (Serverlist URL) string servers.cubesoftware.xyz
# Message of the day displayed to players connecting.
motd (Message of the day) string
@@ -1673,7 +1673,7 @@ font_shadow (Font shadow) int 1 0 65535
font_shadow_alpha (Font shadow alpha) int 127 0 255
# Font size of the default font where 1 unit = 1 pixel at 96 DPI
font_size (Font size) int 32 5 72
font_size (Font size) int 16 5 72
# For pixel-style fonts that do not scale well, this ensures that font sizes used
# with this font will always be divisible by this value, in pixels. For instance,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -49,8 +49,8 @@ BEGIN
VALUE "FileDescription", PROJECT_NAME_C " engine"
VALUE "FileVersion", VERSION_STRING
VALUE "InternalName", PROJECT_NAME
VALUE "LegalCopyright", "(c) 2011-2015 celeron55"
VALUE "LegalTrademarks", """Minetest"" is the property of the Minetest community, don't use it without permission!"
VALUE "LegalCopyright", "(c) 2023 SussyCraft Developers ("PROJECT_NAME_C") and (c) 2011-2015 celeron55 (Minetest engine)"
VALUE "LegalTrademarks", "SussyCraft is a modified version of ""Minetest"". ""Minetest"" is the property of the Minetest community, don't use it without permission!"
VALUE "OriginalFilename", "minetest.exe"
VALUE "PrivateBuild", VERSION_EXTRA
VALUE "ProductName", PROJECT_NAME_C

View File

@@ -142,7 +142,27 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
skin->setColor(gui::EGDC_3D_LIGHT, video::SColor(0, 0, 0, 0));
skin->setColor(gui::EGDC_3D_HIGH_LIGHT, video::SColor(255, 30, 30, 30));
skin->setColor(gui::EGDC_3D_SHADOW, video::SColor(255, 0, 0, 0));
skin->setColor(gui::EGDC_HIGH_LIGHT, video::SColor(255, 70, 120, 50));
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> distrib(0, 1);
// random gui color
bool gui_color = static_cast<bool>(distrib(gen));
// sus list highlight color
//skin->setColor(gui::EGDC_HIGH_LIGHT, video::SColor(255, 70, 120, 50)); // minetest green
//skin->setColor(gui::EGDC_HIGH_LIGHT, video::SColor(255, 120, 50, 50)); // dark sussy red
//skin->setColor(gui::EGDC_HIGH_LIGHT, video::SColor(255, 50, 50, 120)); // evening sky blue
if (gui_color)
skin->setColor(gui::EGDC_HIGH_LIGHT, video::SColor(255, 120, 50, 50)); // dark sussy red
else
skin->setColor(gui::EGDC_HIGH_LIGHT, video::SColor(255, 50, 50, 120)); // evening sky blue
skin->setColor(gui::EGDC_HIGH_LIGHT_TEXT, video::SColor(255, 255, 255, 255));
#ifdef HAVE_TOUCHSCREENGUI
float density = RenderingEngine::getDisplayDensity();
@@ -173,7 +193,18 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
// Irrlicht 1.8 input colours
skin->setColor(gui::EGDC_EDITABLE, video::SColor(255, 128, 128, 128));
skin->setColor(gui::EGDC_FOCUSED_EDITABLE, video::SColor(255, 96, 134, 49));
// sus field selected color
//skin->setColor(gui::EGDC_FOCUSED_EDITABLE, video::SColor(255, 96, 134, 49)); // minetest green
//skin->setColor(gui::EGDC_FOCUSED_EDITABLE, video::SColor(255, 135, 50, 50)); // dark sussy red
//skin->setColor(gui::EGDC_FOCUSED_EDITABLE, video::SColor(255, 50, 50, 135)); // evening sky blue
if (gui_color)
skin->setColor(gui::EGDC_FOCUSED_EDITABLE, video::SColor(255, 135, 50, 50)); // dark sussy red
else
skin->setColor(gui::EGDC_FOCUSED_EDITABLE, video::SColor(255, 50, 50, 135)); // evening sky blue
// Create the menu clouds
if (!g_menucloudsmgr)

View File

@@ -1981,8 +1981,8 @@ void Game::processKeyInput()
increaseViewRange();
} else if (wasKeyDown(KeyType::DECREASE_VIEWING_RANGE)) {
decreaseViewRange();
} else if (wasKeyDown(KeyType::RANGESELECT)) {
toggleFullViewRange();
//} else if (wasKeyDown(KeyType::RANGESELECT)) {
// toggleFullViewRange();
} else if (wasKeyDown(KeyType::ZOOM)) {
checkZoomEnabled();
} else if (wasKeyDown(KeyType::QUICKTUNE_NEXT)) {

View File

@@ -14,7 +14,7 @@
#else
#if defined (__ANDROID__)
#define PROJECT_NAME "minetest"
#define PROJECT_NAME_C "Minetest"
#define PROJECT_NAME_C "SussyCraft"
#define STATIC_SHAREDIR ""
#define ENABLE_UPDATE_CHECKER 0
#define VERSION_STRING STR(VERSION_MAJOR) "." STR(VERSION_MINOR) "." STR(VERSION_PATCH) STR(VERSION_EXTRA)

View File

@@ -110,4 +110,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
GUI related things
*/
#define TTF_DEFAULT_FONT_SIZE (16)
#define TTF_DEFAULT_FONT_SIZE (32)

View File

@@ -35,7 +35,7 @@ void set_default_settings()
settings->setDefault("language", "");
settings->setDefault("name", "");
settings->setDefault("bind_address", "");
settings->setDefault("serverlist_url", "servers.cubesoftware.xyz");
settings->setDefault("serverlist_url", "servers.minetest.net");
// Client
settings->setDefault("address", "");
@@ -179,7 +179,7 @@ void set_default_settings()
settings->setDefault("autosave_screensize", "true");
settings->setDefault("fullscreen", "false");
settings->setDefault("vsync", "true");
settings->setDefault("fov", "72");
settings->setDefault("fov", "90");
settings->setDefault("leaves_style", "fancy");
settings->setDefault("connected_glass", "false");
settings->setDefault("smooth_lighting", "true");
@@ -252,17 +252,22 @@ void set_default_settings()
// Effects
settings->setDefault("directional_colored_fog", "true");
settings->setDefault("inventory_items_animations", "false");
# if ENABLE_GLES
settings->setDefault("mip_map", "false");
settings->setDefault("anisotropic_filter", "false");
# else
settings->setDefault("mip_map", "true");
settings->setDefault("anisotropic_filter", "true");
# endif
settings->setDefault("bilinear_filter", "false");
settings->setDefault("trilinear_filter", "false");
settings->setDefault("tone_mapping", "false");
settings->setDefault("enable_waving_water", "false");
settings->setDefault("enable_waving_water", "true");
settings->setDefault("water_wave_height", "1.0");
settings->setDefault("water_wave_length", "20.0");
settings->setDefault("water_wave_speed", "5.0");
settings->setDefault("enable_waving_leaves", "false");
settings->setDefault("enable_waving_plants", "false");
settings->setDefault("enable_waving_leaves", "true");
settings->setDefault("enable_waving_plants", "true");
// Effects Shadows
settings->setDefault("enable_dynamic_shadows", "false");
@@ -279,7 +284,7 @@ void set_default_settings()
// Input
settings->setDefault("invert_mouse", "false");
settings->setDefault("mouse_sensitivity", "0.05");
settings->setDefault("mouse_sensitivity", "0.08");
settings->setDefault("repeat_place_time", "0.25");
settings->setDefault("safe_dig_and_place", "false");
settings->setDefault("random_input", "false");
@@ -323,7 +328,7 @@ void set_default_settings()
std::string font_size_str = std::to_string(TTF_DEFAULT_FONT_SIZE);
settings->setDefault("font_size", font_size_str);
settings->setDefault("mono_font_size", font_size_str);
settings->setDefault("chat_font_size", "0"); // Default "font_size"
settings->setDefault("chat_font_size", "16"); // Default "font_size"
// ContentDB
settings->setDefault("contentdb_url", "https://content.minetest.net");
@@ -502,15 +507,15 @@ void set_default_settings()
if (x_inches < 3.7f) {
settings->setDefault("hud_scaling", "0.6");
settings->setDefault("font_size", "16");
settings->setDefault("font_size", "21");
settings->setDefault("mono_font_size", "14");
} else if (x_inches < 4.5f) {
settings->setDefault("hud_scaling", "0.7");
settings->setDefault("font_size", "16");
settings->setDefault("font_size", "21");
settings->setDefault("mono_font_size", "14");
} else if (x_inches < 6.0f) {
settings->setDefault("hud_scaling", "0.85");
settings->setDefault("font_size", "16");
settings->setDefault("font_size", "21");
settings->setDefault("mono_font_size", "14");
}
// Tablets >= 6.0 use non-Android defaults for these settings

View File

@@ -74,7 +74,7 @@ void set_light_table(float gamma)
params.gamma = rangelim(gamma, 0.33f, 3.0f);
// Boundary values should be fixed
light_LUT[0] = 0;
light_LUT[0] = 40;
light_LUT[LIGHT_SUN] = 255;
for (size_t i = 1; i < LIGHT_SUN; i++) {