aboutsummaryrefslogtreecommitdiff
path: root/advtrains/textures/advtrains_signal_off.png
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-01-22 12:42:55 +0100
committerorwell96 <orwell@bleipb.de>2019-01-22 12:42:55 +0100
commitfab6cc11a88bcf99645fee36eb91e1a71314c5b4 (patch)
tree89a9ae897f6bed2d8b38e911d6cb70613c579e9b /advtrains/textures/advtrains_signal_off.png
parent97a2ff7db064ffa7fdec430d6fa2963166372b5f (diff)
downloadadvtrains-fab6cc11a88bcf99645fee36eb91e1a71314c5b4.tar.gz
advtrains-fab6cc11a88bcf99645fee36eb91e1a71314c5b4.tar.bz2
advtrains-fab6cc11a88bcf99645fee36eb91e1a71314c5b4.zip
Fix "subway train" item
Diffstat (limited to 'advtrains/textures/advtrains_signal_off.png')
0 files changed, 0 insertions, 0 deletions
n148' href='#n148'>148 149 150 151 152
/*
Minetest
Copyright (C) 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.
*/

#include "object_properties.h"
#include "irrlichttypes_bloated.h"
#include "exceptions.h"
#include "util/serialize.h"
#include <sstream>

#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
#define PP2(x) "("<<(x).X<<","<<(x).Y<<")"

ObjectProperties::ObjectProperties():
	hp_max(1),
	physical(false),
	collideWithObjects(true),
	weight(5),
	collisionbox(-0.5,-0.5,-0.5, 0.5,0.5,0.5),
	visual("sprite"),
	mesh(""),
	visual_size(1,1),
	spritediv(1,1),
	initial_sprite_basepos(0,0),
	is_visible(true),
	makes_footstep_sound(false),
	automatic_rotate(0),
	stepheight(0),
	automatic_face_movement_dir(false),
	automatic_face_movement_dir_offset(0.0)
{
	textures.push_back("unknown_object.png");
	colors.push_back(video::SColor(255,255,255,255));
}

std::string ObjectProperties::dump()
{
	std::ostringstream os(std::ios::binary);
	os<<"hp_max="<<hp_max;
	os<<", physical="<<physical;
	os<<", collideWithObjects="<<collideWithObjects;
	os<<", weight="<<weight;
	os<<", collisionbox="<<PP(collisionbox.MinEdge)<<","<<PP(collisionbox.MaxEdge);
	os<<", visual="<<visual;
	os<<", mesh="<<mesh;
	os<<", visual_size="<<PP2(visual_size);
	os<<", textures=[";
	for(u32 i=0; i<textures.size(); i++){
		os<<"\""<<textures[i]<<"\" ";
	}
	os<<"]";
	os<<", colors=[";
	for(u32 i=0; i<colors.size(); i++){
		os<<"\""<<colors[i].getAlpha()<<","<<colors[i].getRed()<<","<<colors[i].getGreen()<<","<<colors[i].getBlue()<<"\" ";
	}
	os<<"]";
	os<<", spritediv="<<PP2(spritediv);
	os<<", initial_sprite_basepos="<<PP2(initial_sprite_basepos);