summaryrefslogtreecommitdiff
path: root/src/simulation/tools/Heat.cpp
blob: f28274cad740f5a54ec23bf32a202a9504d07c08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "simulation/Tools.h"
//#TPT-Directive ToolClass Tool_Heat TOOL_HEAT 0
Tool_Heat::Tool_Heat()
{
	Identifier = "DEFAULT_TOOL_HEAT";
	Name = "HEAT";
	Colour = PIXPACK(0xFFDD00);
	Description = "Heats particles";
}

int Tool_Heat::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
{
	if(!cpart)
		return 0;
	cpart->temp += strength;
	if(cpart->temp > MAX_TEMP)
		cpart->temp = MAX_TEMP;
	if(cpart->temp < 0)
		cpart->temp = 0;
	return 1;
}

Tool_Heat::~Tool_Heat() {}