The-Powder-Toy/src/simulation/elements
jacob1 bf7d182de5 Add CreateAllowed and ChangeType events
Used in create_part, kill_part, and part_change_type, allows us to remove element-specific stuff in those functions
Note: difference between Create and ChangeType is that Create is called when we want to initialize default element properties, but ChangeType is called every time a particle is changed to that type, even if it doesn't need default properties set. ChangeType is mainly used for things that need accurate state tracking, like the stkm spawn status.
ChangeType is called every time a particle is changed to or from its type, which includes if the particle is deleted, and also Lua.

Neither of these functions are called when loading saves, that's probably an oversight, will fix later
2019-11-29 19:32:33 -05:00
..
116.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
146.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
ACEL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
ACID.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
AMTR.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
ANAR.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
ARAY.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BANG.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BCLN.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BCOL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BGLA.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BHOL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BIZR.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BIZRG.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BIZRS.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BMTL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BOMB.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BOYL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BRAY.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BRCK.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BREC.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BRMT.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BTRY.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
BVBR.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
C5.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
CAUS.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
CBNW.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
CFLM.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
CLNE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
CLST.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
CNCT.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
CO2.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
COAL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
CONV.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
CRAY.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
CRMC.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
DCEL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DESL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DEST.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DEUT.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DLAY.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DMG.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DMND.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DRAY.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DRIC.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DSTW.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DTEC.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DUST.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
DYST.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
ELEC.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
Element.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
Element.h Add CreateAllowed and ChangeType events 2019-11-29 19:32:33 -05:00
EMBR.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
EMP.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
ETRD.cpp Add CreateAllowed and ChangeType events 2019-11-29 19:32:33 -05:00
EXOT.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
FIGH.cpp Add CreateAllowed and ChangeType events 2019-11-29 19:32:33 -05:00
FILT.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
FIRE.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
FIRW.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
FOG.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
FRAY.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
FRME.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
FRZW.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
FRZZ.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
FSEP.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
FUSE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
FWRK.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
GAS.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
GBMB.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
GEL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
GLAS.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
GLOW.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
GOLD.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
GOO.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
GPMP.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
GRAV.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
GRVT.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
GUNP.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
H2.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
HEAC.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
HSWC.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
ICEI.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
IGNT.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
INSL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
INST.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
INVIS.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
INWR.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
IRON.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
ISOZ.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
ISZS.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
LAVA.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
LCRY.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
LDTC.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
LIFE.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
LIGH.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
LNTG.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
LO2.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
LOLZ.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
LOVE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
LRBD.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
LSNS.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
MERC.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
METL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
MORT.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
MWAX.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
NBHL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
NBLE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
NEUT.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
NICE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
NITR.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
NONE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
NSCN.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
NTCT.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
NWHL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
O2.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
OIL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PBCN.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PCLN.cpp Blacklist SPRK in PCLN's and PBCN's ctypeDraw function 2019-11-27 21:00:47 +01:00
PHOT.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
PIPE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PLEX.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PLNT.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PLSM.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
PLUT.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
POLO.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PPIP.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PQRT.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
PROT.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
PRTI.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PRTO.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PSCN.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PSNS.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PSTE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PSTN.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PSTS.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PTCT.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PUMP.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
PVOD.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
QRTZ.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
RBDM.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
RFGL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
RFRG.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
RIME.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
RPEL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SALT.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SAND.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SAWD.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SHLD1.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SHLD2.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SHLD3.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SHLD4.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SING.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
SLTW.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SMKE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SNOW.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SOAP.cpp Add CreateAllowed and ChangeType events 2019-11-29 19:32:33 -05:00
SPAWN2.cpp Add CreateAllowed and ChangeType events 2019-11-29 19:32:33 -05:00
SPAWN.cpp Add CreateAllowed and ChangeType events 2019-11-29 19:32:33 -05:00
SPNG.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SPRK.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
STKM2.cpp Add CreateAllowed and ChangeType events 2019-11-29 19:32:33 -05:00
STKM.cpp Add CreateAllowed and ChangeType events 2019-11-29 19:32:33 -05:00
STNE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
STOR.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
SWCH.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
TESC.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
THDR.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
THRM.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
TRON.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
TSNS.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
TTAN.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
TUNG.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
URAN.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
VIBR.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
VINE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
VIRS.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
VOID.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
VRSG.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
VRSS.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
WARP.cpp Add Create function, handles setting default properties for elements that need randomness or special code 2019-11-28 00:22:17 -05:00
WATR.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
WAX.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
WHOL.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
WIFI.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
WIRE.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
WOOD.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
WTRV.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00
YEST.cpp Add DefaultProperties, replaces some of the case statements in create_part 2019-11-25 22:08:18 -05:00