aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/bucket/init.lua
diff options
context:
space:
mode:
authorx2048 <codeforsmile@gmail.com>2022-07-31 21:57:13 +0200
committerGitHub <noreply@github.com>2022-07-31 21:57:13 +0200
commit839600ed703ccffbdb71bd2f04fb379d0920da95 (patch)
tree51581b352b66a992666dc11979a4922e52d4aa16 /games/devtest/mods/bucket/init.lua
parenta2bf3a2aa89ea8c86ec51114389d1403cb83dca9 (diff)
downloadminetest-839600ed703ccffbdb71bd2f04fb379d0920da95.tar.gz
minetest-839600ed703ccffbdb71bd2f04fb379d0920da95.tar.bz2
minetest-839600ed703ccffbdb71bd2f04fb379d0920da95.zip
Use legacy image implementation (no NNAA filter) when not using 9-slice image (#12608)
Diffstat (limited to 'games/devtest/mods/bucket/init.lua')
0 files changed, 0 insertions, 0 deletions
/a> 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
/*
Minetest-c55
Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "subgame.h"
#include "porting.h"
#include "filesys.h"
#include "settings.h"
#include "log.h"
#include "util/string.h"

std::string getGameName(const std::string &game_path)
{
	std::string conf_path = game_path + DIR_DELIM + "game.conf";
	Settings conf;
	bool succeeded = conf.readConfigFile(conf_path.c_str());
	if(!succeeded)
		return "";
	if(!conf.exists("name"))
		return "";
	return conf.get("name");
}

struct GameFindPath
{
	std::string path;
	bool user_specific;
	GameFindPath(const std::string &path, bool user_specific):
		path(path),
		user_specific(user_specific)
	{}
};