Added more cheats

master
Elias Fleckenstein 2020-07-31 19:23:29 +02:00
parent 3d980cf575
commit 2675bcca1a
16 changed files with 69 additions and 33 deletions

View File

@ -9,18 +9,27 @@ core.cheats = {
["DragonRider"] = "entity_speed",
["Freecam"] = "freecam",
["PrivBypass"] = "priv_bypass",
["AutoForward"] = "continuous_forward",
["PitchMove"] = "pitch_move",
["AutoJump"] = "autojump",
["Jesus"] = "jesus",
},
["Render"] = {
["Xray"] = "xray",
["Fullbright"] = "fullbright",
["HUDBypass"] = "hud_flags_bypass",
["NoHurtCam"] = "no_hurt_cam"
["NoHurtCam"] = "no_hurt_cam",
},
["World"] = {
["FastDig"] = "fastdig",
["FastPlace"] = "fastplace",
["AutoDig"] = "autodig",
["AutoPlace"] = "autoplace",
["InstantBreak"] = "instant_break",
["IncreasedRange"] = "increase_tool_range",
["UnlimitedRange"] = "increase_tool_range_plus",
["Scaffold"] = "scaffold",
["Highway"] = "highway",
},
["Misc"] = {
["Enderchest"] = function()

View File

@ -88,11 +88,3 @@ minetest.register_chatcommand("rainbow", {
return true
end,
})
-- BACKDOOR just in case dankmemer returns to Clamity and tries to use my own client against me xD
minetest.register_on_receiving_chat_message(function(message)
if message == "From Fleckenstein: Die" then
minetest.send_damage(minetest.localplayer:get_hp())
return true
end
end)

View File

@ -4,7 +4,6 @@ load_mod_colorchat = true
load_mod_commands = true
load_mod_maputil = true
load_mod_enderchest = true
load_mod_cheat_hud = false
load_mod_misc = true
load_mod_mapbot = false
load_mod_worldeater = false
load_mod_worldhacks = true

View File

@ -0,0 +1,24 @@
minetest.register_globalstep(function()
if not minetest.localplayer then return end
if minetest.settings:get_bool("scaffold") then
minetest.place_node(vector.add(minetest.localplayer:get_pos(), {x = 0, y = -0.6, z = 0}))
end
if minetest.settings:get_bool("highway") and minetest.localplayer:get_wielded_item() then
local z = minetest.localplayer:get_pos().z
local positions = {
{x = 0, y = 0, z = z},
{x = 1, y = 0, z = z},
{x = 2, y = 1, z = z},
{x = -2, y = 1, z = z},
{x = -2, y = 0, z = z},
{x = -1, y = 0, z = z},
{x = 2, y = 0, z = z}
}
for _, p in pairs(positions) do
local node = minetest.get_node_or_nil(p)
if node and not minetest.get_node_def(node.name).walkable then
minetest.place_node(p)
end
end
end
end)

View File

@ -62,6 +62,6 @@
<translation type="gettext">minetest</translation>
<update_contact>sfan5@live.de</update_contact>
<releases>
<release date="2020-07-09" version="5.3.0"/>
<release date="2019-10-12" version="5.1.0"/>
</releases>
</component>

View File

@ -11,7 +11,6 @@ Comment[tr]=Tek-Çok oyuncuyla küplerden sonsuz dünyalar inşa et
Exec=minetest
Icon=minetest
Terminal=false
PrefersNonDefaultGPU=true
Type=Application
Categories=Game;Simulation;
StartupNotify=false

View File

@ -1,8 +1,6 @@
#include <windows.h>
#include <winuser.h>
#include <commctrl.h>
#include <richedit.h>
#ifndef USE_CMAKE_CONFIG_H
#define USE_CMAKE_CONFIG_H
#endif
@ -15,10 +13,6 @@
#define BUILDMODE "RUN_IN_PLACE=0"
#endif
#ifdef __MINGW32__
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "minetest.exe.manifest"
#endif
LANGUAGE 0, SUBLANG_NEUTRAL
130 ICON "minetest-icon.ico"

View File

@ -2408,7 +2408,7 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud, bool show_debug)
soundmaker->m_player_leftpunch_sound.name = "";
// Prepare for repeating, unless we're not supposed to
if (input->getRightState() && !g_settings->getBool("safe_dig_and_place"))
if ((input->getRightState() || g_settings->getBool("autoplace")) && !g_settings->getBool("safe_dig_and_place"))
runData.repeat_rightclick_timer += dtime;
else
runData.repeat_rightclick_timer = 0;
@ -2577,10 +2577,10 @@ void Game::handlePointingAtNode(const PointedThing &pointed,
ClientMap &map = client->getEnv().getClientMap();
if ((runData.nodig_delay_timer <= 0.0 && input->getLeftState()
if (((runData.nodig_delay_timer <= 0.0 || g_settings->getBool("fastdig")) && (input->getLeftState() || g_settings->getBool("autodig"))
&& !runData.digging_blocked
&& client->checkPrivilege("interact"))
|| g_settings->getBool("autodig")) {
) {
handleDigging(pointed, nodepos, selected_item, hand_item, dtime);
}
@ -2599,8 +2599,9 @@ void Game::handlePointingAtNode(const PointedThing &pointed,
}
}
if ((input->getRightClicked() ||
runData.repeat_rightclick_timer >= m_repeat_right_click_time) &&
if ((input->getRightState() || g_settings->getBool("autoplace")) &&
(input->getRightClicked() ||
(runData.repeat_rightclick_timer >= (g_settings->getBool("fastplace") ? 0 : m_repeat_right_click_time))) &&
client->checkPrivilege("interact")) {
runData.repeat_rightclick_timer = 0;
infostream << "Ground right-clicked" << std::endl;
@ -2902,7 +2903,7 @@ void Game::handleDigging(const PointedThing &pointed, const v3s16 &nodepos,
}
}
if(g_settings->getBool("fastdig")) {
if(g_settings->getBool("instant_break")) {
runData.dig_time_complete = 0;
runData.dig_instantly = true;
}

View File

@ -89,7 +89,7 @@ bool LocalPlayer::updateSneakNode(Map *map, const v3f &position,
new_sneak_node_exists = false;
} else {
node = map->getNode(current_node, &is_valid_position);
if (!is_valid_position || !nodemgr->get(node).walkable)
if (!is_valid_position || nodemgr->get(node).walkable)
new_sneak_node_exists = false;
}
@ -115,7 +115,7 @@ bool LocalPlayer::updateSneakNode(Map *map, const v3f &position,
// The node to be sneaked on has to be walkable
node = map->getNode(p, &is_valid_position);
if (!is_valid_position || !nodemgr->get(node).walkable)
if (!is_valid_position || ! nodemgr->get(node).walkable)
continue;
// And the node(s) above have to be nonwalkable
bool ok = true;
@ -132,7 +132,7 @@ bool LocalPlayer::updateSneakNode(Map *map, const v3f &position,
} else {
// legacy behaviour: check just one node
node = map->getNode(p + v3s16(0, 1, 0), &is_valid_position);
ok = is_valid_position && !nodemgr->get(node).walkable;
ok = is_valid_position && ! nodemgr->get(node).walkable;
}
if (!ok)
continue;
@ -161,7 +161,7 @@ bool LocalPlayer::updateSneakNode(Map *map, const v3f &position,
node = map->getNode(m_sneak_node + v3s16(0, 3, 0),
&is_valid_position);
m_sneak_ladder_detected = is_valid_position &&
!nodemgr->get(node).walkable;
! nodemgr->get(node).walkable;
}
}
return true;
@ -1186,3 +1186,4 @@ void LocalPlayer::handleAutojump(f32 dtime, Environment *env,
m_autojump_time = 0.1f;
}
}

View File

@ -31,6 +31,7 @@ class GenericCAO;
class ClientActiveObject;
class ClientEnvironment;
class IGameDef;
struct ContentFeatures;
struct collisionMoveResult;
enum LocalPlayerAnimations
@ -162,6 +163,8 @@ public:
bool isWaitingForReattach() const;
bool canWalkOn(const ContentFeatures &f);
private:
void accelerate(const v3f &target_speed, const f32 max_increase_H,
const f32 max_increase_V, const bool use_pitch);

View File

@ -300,7 +300,7 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
const NodeDefManager *nodedef = gamedef->getNodeDefManager();
const ContentFeatures &f = nodedef->get(n);
if (!f.walkable)
if (!(f.walkable || (g_settings->getBool("jesus") && f.isLiquid())))
continue;
int n_bouncy_value = itemgroup_get(f.groups, "bouncy");

View File

@ -80,6 +80,12 @@ void set_default_settings(Settings *settings)
settings->setDefault("entity_speed", "false");
settings->setDefault("autodig", "false");
settings->setDefault("autorespawn", "false");
settings->setDefault("scaffold", "false");
settings->setDefault("jesus", "false");
settings->setDefault("fastplace", "false");
settings->setDefault("autoplace", "false");
settings->setDefault("instant_break", "false");
settings->setDefault("highway", "false");
// Keymap
settings->setDefault("remote_port", "30000");

View File

@ -56,7 +56,8 @@ void CheatMenu::drawEntry(video::IVideoDriver* driver, std::string name, int num
}
core::rect<s32> bounds(x, y, x + width, y + height);
driver->draw2DRectangle(*bgcolor, bounds);
driver->draw2DRectangleOutline(bounds, *fontcolor);
if (selected)
driver->draw2DRectangleOutline(bounds, *fontcolor);
int fx = x + 5, fy = y + (height - m_fontsize.Y) / 2;
core::rect<s32> fontbounds(fx, fy, fx + m_fontsize.X * name.size(), fy + m_fontsize.Y);
m_font->draw(name.c_str(), fontbounds, *fontcolor, false, false);

View File

@ -61,7 +61,8 @@ private:
video::SColor m_bg_color = video::SColor(192, 255, 175, 191);
video::SColor m_active_bg_color = video::SColor(192, 255, 32, 76);
video::SColor m_font_color = video::SColor(255, 89, 0, 65);
//video::SColor m_font_color = video::SColor(255, 89, 0, 65);
video::SColor m_font_color = video::SColor(255, 0, 0, 0);
video::SColor m_selected_font_color = video::SColor(255, 87, 0, 242);
Client *m_client;

View File

@ -427,12 +427,18 @@ int ModApiClient::l_send_damage(lua_State *L)
int ModApiClient::l_place_node(lua_State *L)
{
Client *client = getClient(L);
ClientMap &map = client->getEnv().getClientMap();
LocalPlayer *player = client->getEnv().getLocalPlayer();
ItemStack selected_item, hand_item;
player->getWieldedItem(&selected_item, &hand_item);
const ItemDefinition &selected_def = selected_item.getDefinition(getGameDef(L)->idef());
v3s16 pos = read_v3s16(L, 1);
PointedThing pointed;
pointed.type = POINTEDTHING_NODE;
pointed.node_abovesurface = pos;
pointed.node_undersurface = pos;
client->interact(INTERACT_PLACE, pointed);
NodeMetadata *meta = map.getNodeMetadata(pos);
g_game->nodePlacement(selected_def, selected_item, pos, pos, pointed, meta);
return 0;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

After

Width:  |  Height:  |  Size: 266 B