Commit Graph

25 Commits

Author SHA1 Message Date
Saveliy Skresanov
efeac4fd8a Make "being transparent to photons" a property PROP_PHOTPASS. 2024-04-10 21:48:51 +07:00
Tamás Bálint Misius
ca6c67c16c
Factor functions shared between elements into headers
The signature duplication was getting out of hand; too easy to get wrong.
2023-12-09 16:37:49 +01:00
Tamás Bálint Misius
0f1218df0c
Sort out constness of Simulation and Renderer in graphics functions
Mostly. They are now const but only in graphics functions called from secondary Renderers. The primary (main thread) Renderer still allows graphics functions to mutate Simulation; this is required for correct in-PIPE rendering of custom elements.
2023-12-09 16:37:45 +01:00
catsoften
a715f5d71a Use RGB for constants and gradients, other misc changes 2023-04-16 22:13:39 +02:00
catsoften
bc085705a8 Remove deprecated PIXPACK/RGB/R/G/B functions 2023-04-16 22:13:39 +02:00
Tamás Bálint Misius
eee42b2ea3
Fix RNG usage
Mostly boils down to having graphics functions use Renderer's RNG, update and similar functions Simulation's.
2023-04-15 18:22:03 +02:00
Tamás Bálint Misius
4d52531889
Ditch element and tool classes 2020-01-09 19:22:11 +01:00
jacob1
9993290b72 Add Create function, handles setting default properties for elements that need randomness or special code
Most of the switch statement in create_part is gone. There's a few others that I will get rid of in future commits. There will also be a CreateAllowed function, and a ChangeType. ChangeType will handle stuff that is duplicated in both create_part and part_change_type. Considering making a Destroy function instead of ChangeType, though.

Later on, Lua events will be made for all 3

Credit to jacksonmj for the original design of all of this, I copied it into my mod years ago
2019-11-28 00:22:17 -05:00
jacob1
0078fb4c6f Add DefaultProperties, replaces some of the case statements in create_part
The rest will will in a commit soon that adds the Create event and some other stuff
Lua events will come after that
PLSM default temp lowered to MAX_TEMP
2019-11-25 22:08:18 -05:00
Tamás Bálint Misius
0179cefc78
Flatten include trees 2019-04-20 15:36:11 +02:00
jacob1
49703404be change almost all the rest of the rng calls to .chance/.between 2018-05-05 11:56:17 -04:00
Saveliy Skresanov
cda029ff42 Use xoroshiro128+ random generator (everywhere besides BSON code). 2018-04-23 22:47:44 +07:00
krawthekrow
63b2227802 add ctype-based filt shift modes (#351) 2016-11-07 18:06:43 -05:00
jacob1
07be209094 remove extra spacing in all the element files 2015-12-18 02:27:19 -05:00
jacob1
95ab91e91d Remove .State property from all element files 2015-12-18 01:51:22 -05:00
jacksonmj
1158647285 Visual effect for FILT when an ARAY or CRAY beam passes through it
(increased opacity for up to 4 frames)
2014-05-22 14:30:23 +01:00
jacksonmj
4b28cdb6ba Prevent FILT being rendered as black if the only wavelengths present are invalid 2014-01-03 12:21:15 +00:00
jacob1
79a2ac3103 fix issue with FILT PHOT scattering 2013-10-23 21:01:06 -04:00
jacksonmj
c3d3f9fc2a FILT mode for old QRTZ scattering, for Catelite.
FILT graphics could maybe do with changing in this mode.
2013-08-29 18:28:49 +01:00
jacksonmj
268158f1dd More FILT modes: XOR and NOT 2013-08-29 18:24:44 +01:00
jacksonmj
bebe9bd8fd Add a way for photons to set the colour of FILT (major version bump required)
Also add some new FILT modes, and make FILT modes affect BIZR and
BRAY colour in the same way as they affect photon colour. Photons
passing next to DTEC will set the colour of all FILT in a straight
line starting from any FILT adjacent to the DTEC (a bit like an
ARAY beam), and the exact colour of the photon will be used for
FILT interactions instead of the colour based on temperature.

FILT tmp=4: red shift, tmp=5: blue shift. Size of shift determined
by FILT temperature. tmp=6: FILT has no effect on photon colour
(possible before by using invalid tmp modes, but here's a supported
method of doing it. Invalid tmp modes should be automatically replaced
in existing saves).

Also, FILT mode is now described in the HUD.
2013-08-29 17:19:07 +01:00
jacob1
e493cf8a47 fix all tab spacing issues in all the element files 2013-03-13 15:54:34 -04:00
Simon Robertshaw
05e32f1698 Fix things melting with heat sim off 2012-08-28 15:08:11 +01:00
Simon Robertshaw
50a587813e TPT: Add PROP_NOAMBHEAT to prevent certain elements from being heated by Ambient heat 8397b6e51a 2012-06-12 17:25:06 +01:00
Simon Robertshaw
51b17badf4 A bit of refactoring (elements) 2012-05-07 17:59:50 +01:00