I am still having a lot of trouble with getting my custom elements to change when in contact with other elements.
My code:
BANG: http://pastebin.com/KqTMNQ22
BBNG: http://pastebin.com/iK16QSYS
BANG should make BBNG on contact with EXOT. MBNG should be formed when BBNG meets NEUT. I also am having trouble with case-by-case reactions (BBNG reacting differently to PROT and ELEC, for example) and tinkering with the explosive powers of the elements. I have not given the code for MBNG as it works.
r = pmap[y+ry][x+rx];
if (!r)
r = photons[y+ry][x+rx];
if (!r)
continue;
Got this error:
How does one declare "photons" in a way that evades the error?
I also changed the code that you said would fix problem 1 (used outdated paste) and it still didn't work.
Regarding the third problem, nucular has made a case-reaction system. Their mod is in the Powder Toy mods discussion. Use the link to the repository and find the element RVRS (reversium).
pmapbut you'll have to access photons by the simulation object, aka replace every instance of
photonsin your code with
sim->photons
Okay, so no build errors, but the elements are still not changing - instead, they disappear. Why is this happening?
This is my second try at modding TPT (I tried once but I didn't decide to use the forums); I originally gave up due to errors of this sort that I could not fix.