Compare commits

..

35 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
23 changed files with 323 additions and 172 deletions

View File

@@ -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

@@ -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

@@ -195,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));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 262 KiB

View File

@@ -1,10 +1,10 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
project.ext.set("versionMajor", 1) // Version Major
project.ext.set("versionMinor", 1) // Version Minor
project.ext.set("versionMinor", 2) // Version Minor
project.ext.set("versionPatch", 0) // Version Patch
project.ext.set("versionExtra", "") // Version Extra
project.ext.set("versionCode", 44) // Android Version Code
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

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

@@ -99,7 +99,7 @@ local function init_globals()
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)
@@ -123,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

@@ -194,14 +194,18 @@ return {
local credit_fs, scroll_height = build_hacky_list(credit_list)
-- 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 " .. core.get_version().string) .. "]" ..
-- original x positions: 1.5 and 2.5
"button[1.1,4.1;3.3,0.8;privacy;Privacy Policy]" ..
"button[0.6,5.1;4.3,0.8;discord;SussyCraft Discord]" ..
"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 ..

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")) .. "]" ..
@@ -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
@@ -365,7 +379,10 @@ local function main_button_handler(tabview, fields, name, tabdata)
if server and server.address == gamedata.address and
server.port == gamedata.port then
-- 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
}

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

@@ -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");

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++) {