|
113 | 113 | --Create a single particle at location x, y. Returns the index of the new particle, or a negative number on failure.<br>
|
114 | 114 | --Possible values for index are:<br>
|
115 | 115 | --> **-1** Normal particle creation. This is the most useful value. No particle is created if position x, y is occupied and the requested new particle type cannot pass through the particle that is already there.<br>
|
116 |
| ---> **-2** Create particle as though it was drawn by the user with the brush. Usually not useful.<br> |
| 116 | +--> **-2** Create particle as though it was drawn by the user with the brush (runs the Create function). Usually not useful.<br> |
117 | 117 | --> **-3** Create particle without checking for collisions with existing particles. In most cases, this is a bad idea, since a lot of elements don't work properly when there are multiple particles in the same place. Particles may also turn into BHOL if there are too many in the same place. The exception to this is elements that have been specifically designed to cope with this (such as multiple energy particles like PHOT and NEUT in the same place).<br>
|
118 | 118 | --
|
119 | 119 | --Particle index >= 0: Overwrite an existing particle with a new particle. At the moment no collision checking is performed, so the same considerations apply as for index=-3. It is usually safe if the new particle is in the same location as the old one. This is roughly equivalent to calling `sim.partKill` then `sim.partCreate(-3, ...)`.<br>
|
|
606 | 606 | --TODO: look into if its an iterator
|
607 | 607 |
|
608 | 608 | --```
|
609 |
| ---number sim.toolBrush(number x, number y, [number rx], [number ry], [number tool], [number brush], [number strength]) |
| 609 | +--sim.toolBrush(number x, number y, [number rx], [number ry], [number tool], [number brush], [number strength]) |
610 | 610 | --```
|
611 | 611 | --Performs the given tool (HEAT, COOL, AIR, etc) on the given coordinates with the given brush size. The brush types are 0 (circle), 1 (square) and 2 (triangle).<br>
|
612 | 612 | ---@param x integer
|
|
616 | 616 | ---@param tool integer?
|
617 | 617 | ---@param brush integer?
|
618 | 618 | ---@param strength number?
|
619 |
| ----@return number |
| 619 | +---@return 0 |
620 | 620 | function simulation.toolBrush(x, y, rx, ry, tool, brush, strength)
|
621 | 621 | end
|
622 | 622 |
|
|
0 commit comments