summaryrefslogtreecommitdiff
path: root/doc/minetest.6
blob: b3fdd94d938cb3f1d7f0c079b80e54b3cb2ea309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
.\" Minetest man page
.TH minetest 6 "11 March 2012" "" ""

.SH NAME
minetest \- Multiplayer infinite-world block sandbox

.SH SYNOPSIS
.B minetest
[ OPTION ... ]

.SH DESCRIPTION
.B Minetest
is one of the first InfiniMiner/Minecraft(/whatever) inspired games (started October 2010), with a goal of taking the survival multiplayer gameplay to a slightly different direction.
.PP
The main design philosophy is to keep it technically simple, stable and portable. It will be kept lightweight enough to run on fairly old hardware.

.SH OPTIONS
.TP
\-\-address <value>
Address to connect to
.TP
\-\-config <value>
Load configuration from specified file
.TP
\-\-disable\-unittests
Disable unit tests
.TP
\-\-enable\-unittests
Enable unit tests
.TP
\-\-gameid <value>
Set gameid
.TP
\-\-go
Disable main menu
.TP
\-\-help
Show allowed options
.TP
\-\-logfile <value>
Set logfile path (debug.txt)
.TP
\-\-map\-dir <value>
Same as \-\-world (deprecated)
.TP
\-\-name <value>
Set player name
.TP
\-\-password <value>
Set password
.TP
\-\-port <value>
Set network port (UDP) to use
.TP
\-\-random\-input
Enable random user input, for testing
.TP
\-\-server
Run dedicated server
.TP
\-\-speedtests
Run speed tests
.TP
\-\-info
Print more information to console
.TP
\-\-verbose
Print even more information to console
.TP
\-\-trace
Print enormous amounts of information to console
.TP
\-\-world <value>
Set world path

.SH BUGS
Please report all bugs to Perttu Ahola <celeron55@gmail.com>.

.SH AUTHOR
.PP
Perttu Ahola <celeron55@gmail.com>
and contributors.
.PP
This man page was originally written by
Juhani Numminen <juhaninumminen0@gmail.com>.

.SH WWW
http://c55.me/minetest/

.SH "SEE ALSO"
.BR minetestserver(6)
5'>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 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313
/*
Minetest
Copyright (C) 2010-2013 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.
*/

#pragma once

#include "itemdef.h"
#include "irrlichttypes.h"
#include "itemstackmetadata.h"
#include <istream>
#include <ostream>
#include <string>
#include <vector>
#include <cassert>

struct ToolCapabilities;

struct ItemStack
{
	ItemStack() = default;

	ItemStack(const std::string &name_, u16 count_,
			u16 wear, IItemDefManager *itemdef);

	~ItemStack() = default;

	// Serialization
	void serialize(std::ostream &os) const;
	// Deserialization.  Pass itemdef unless you don't want aliases resolved.
	void deSerialize(std::istream &is, IItemDefManager *itemdef = NULL);
	void deSerialize(const std::string &s, IItemDefManager *itemdef = NULL);

	// Returns the string used for inventory
	std::string getItemString() const;

	/*
		Quantity methods
	*/

	bool empty() const
	{
		return count == 0;
	}

	void clear()
	{
		name = "";
		count = 0;
		wear = 0;
		metadata.clear();
	}

	void add(u16 n)
	{
		count += n;
	}

	void remove(u16 n)
	{