mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-18 22:21:21 +02:00
Air tool
This commit is contained in:
18
src/simulation/tools/Air.cpp
Normal file
18
src/simulation/tools/Air.cpp
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#include "simulation/Tools.h"
|
||||||
|
#include "simulation/Air.h"
|
||||||
|
//#TPT-Directive ToolClass Tool_Air TOOL_AIR 3
|
||||||
|
Tool_Air::Tool_Air()
|
||||||
|
{
|
||||||
|
Identifier = "DEFAULT_TOOL_AIR";
|
||||||
|
Name = "AIR";
|
||||||
|
Colour = PIXPACK(0xFFFFFF);
|
||||||
|
Description = "Creates air pressure";
|
||||||
|
}
|
||||||
|
|
||||||
|
int Tool_Air::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
|
||||||
|
{
|
||||||
|
sim->air->pv[y/CELL][x/CELL] += 0.03f*strength;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tool_Air::~Tool_Air() {}
|
Reference in New Issue
Block a user