aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/textures/at_il_route_start.png
blob: dcb5160acbbb46ed120dd897b3b27e5b4339d82c (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 20 00 00 00 20 08 06 00 00 00 73 7a 7a .PNG........IHDR.............szz
0020 f4 00 00 00 06 62 4b 47 44 00 ff 00 ff 00 ff a0 bd a7 93 00 00 00 09 70 48 59 73 00 00 0b 13 00 .....bKGD..............pHYs.....
0040 00 0b 13 01 00 9a 9c 18 00 00 00 07 74 49 4d 45 07 e2 07 04 0d 31 1a 99 fd 36 f5 00 00 00 19 74 ............tIME.....1...6.....t
0060 45 58 74 43 6f 6d 6d 65 6e 74 00 43 72 65 61 74 65 64 20 77 69 74 68 20 47 49 4d 50 57 81 0e 17 EXtComment.Created.with.GIMPW...
0080 00 00 00 e4 49 44 41 54 58 c3 ed 97 3b 0e c3 20 0c 40 6d 0b f5 14 bd 4f a6 9c 96 89 ab b1 b8 43 ....IDATX...;....@m....O.......C
00a0 43 4b 1a 93 f0 b1 cb 12 2f 44 38 f1 7b c2 41 08 80 91 f0 c0 e0 81 47 4a e0 10 3c 8f b5 af 16 aa CK....../D8.{.A.......GJ..<.....
00c0 c0 07 24 50 0d de 29 81 aa f0 0e 09 54 87 37 4a a0 09 bc 41 82 ba e0 52 61 69 ae 42 9c 54 e0 03 ..$P..).....T.7J...A...Rai.B.T..
00e0 12 a4 06 ef 94 20 55 78 87 04 a9 c3 1b 25 c8 04 de 20 41 66 f0 4a 09 32 85 57 48 90 39 fc 42 82 ......Ux.....%....Af.J.2.WH.9.B.
0100 0e 09 0b 78 a9 f6 0a 48 bb 84 25 fc 57 62 1b 3f 40 0e df 56 e0 b2 17 49 b9 34 cf 01 18 e3 96 7b ...x...H..%.Wb.?@..V...I.4.....{
0120 00 60 7c 8f 87 83 66 01 cc eb 4a b5 9d 94 e4 00 7c f5 2c c1 4a ef 94 be a9 3b 8c 8c c3 9d 2d b5 .`|...f...J.....|.,.J....;....-.
0140 56 9c b5 d7 95 96 52 33 aa 5b 20 fd 34 7f 6d 41 2e 91 ac 73 29 71 2e 8e b5 60 fe bd e0 09 9e 67 V.....R3.[..4.mA...s)q...`.....g
0160 ee 82 e9 db f0 8e 3b 5e b5 7c 6d d2 5e bf 46 03 00 00 00 00 49 45 4e 44 ae 42 60 82 ......;^.|m.^.F.....IEND.B`.
href='#n122'>122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 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 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
/*
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.
*/

#ifndef INVENTORYMANAGER_HEADER
#define INVENTORYMANAGER_HEADER

#include "inventory.h"
#include <iostream>
#include <string>
class ServerActiveObject;

struct InventoryLocation
{
	enum Type{
		UNDEFINED,
		CURRENT_PLAYER,
		PLAYER,
		NODEMETA,
        DETACHED,
	} type;

	std::string name; // PLAYER, DETACHED
	v3s16 p; // NODEMETA

	InventoryLocation()
	{
		setUndefined();
	}
	void setUndefined()
	{
		type = UNDEFINED;
	}
	void setCurrentPlayer()
	{
		type = CURRENT_PLAYER;
	}
	void setPlayer(const std::string &name_)
	{
		type = PLAYER;
		name = name_;
	}
	void setNodeMeta(v3s16 p_)
	{
		type = NODEMETA;
		p = p_;
	}
	void setDetached(const std::string &name_)
	{
		type = DETACHED;
		name = name_;
	}

	bool operator==(const InventoryLocation &other) const
	{
		if(type != other.type)
			return false;
		switch(type){
		case UNDEFINED:
			return false;
		case CURRENT_PLAYER:
			return true;
		case PLAYER:
			return (name == other.name);
		case NODEMETA:
			return (p == other.p);
		case DETACHED:
			return (name == other.name);
		}
		return false;
	}
	bool operator!=(const InventoryLocation &other) const
	{
		return !(*this == other);
	}

	void applyCurrentPlayer(const std::string &name_)
	{
		if(type == CURRENT_PLAYER)
			setPlayer(name_);
	}

	std::string dump() const;
	void serialize(std::ostream &os) const;