Skip to content

Commit cf19986

Browse files
committed
Add changes from wiki sim page
Resolves #32, resolves #34
1 parent b5bc130 commit cf19986

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/sim.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ end
113113
--Create a single particle at location x, y. Returns the index of the new particle, or a negative number on failure.<br>
114114
--Possible values for index are:<br>
115115
--> **-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>
117117
--> **-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>
118118
--
119119
--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,7 +606,7 @@ end
606606
--TODO: look into if its an iterator
607607

608608
--```
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])
610610
--```
611611
--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>
612612
---@param x integer
@@ -616,7 +616,7 @@ end
616616
---@param tool integer?
617617
---@param brush integer?
618618
---@param strength number?
619-
---@return number
619+
---@return 0
620620
function simulation.toolBrush(x, y, rx, ry, tool, brush, strength)
621621
end
622622

0 commit comments

Comments
 (0)