Previously, only one assembly could be compiled per startup. You
could compile all of your mods by restarting the game over and
over, loading the previously compiled mods from the cache.
Now, that's not necessary.
Oh yeah, also, more bugs in the Linux "port". Yippee. Whoops.
My first attempt at an assembly cache was a dictionary from a
Python filename to its associated assembly... except each templated
class in the file gets its own assembly.
This new format (which has different magic numbers) provides a
dictionary from a Python filename to a *list* of its associated
assemblies. This also means that the cache can remember Python
files with no associated assemblies so that they don't get scanned
again.
It uses a meta-language and a CSharpCodeProvider on startup. I will
release a tutorial on the forums soon showing how to use it.
This commit also adds an extremely basic loading screen which shows
while Desktop is getting everything ready. Which can take a while
if you have any Python mods. Thanks, IronPython.
seems like I somehow got an old copy of SaveSystem.cs and committed
that, re-introducing the game's dependency on Unite, which is dead,
press F to pay respects.
Refactored every part in the code that used that damn foreach loop.
All assemblies are now loaded on startup into an array, and the
results of GetType() on each are concatenated into another array.
The parts of the code that were loading the assemblies and scanning
them themselves now look to ReflectMan.Types, and all disk I/O is
limited to the first time ReflectMan is accessed. While I was there
I also replaced some other foreach loops with array comprehensions
and such to speed things up - there is a noticeable improvement.
It doesn't seem to have broken anything, but I'd appreciate if
someone could do more stress testing for me.
Recently, Codepoints have been changed to ULong64. While SuperDoggo (on
discord) was playing ShiftLotto, he tried to bet 100cp with only 80cp.
The check to make sure you don't overbet failed because ShiftLotto
subtracts codepoints*difficulty - currentCodepoints. If this value is
negitive, it should give you an error. But, due to the transition to
ulong,, this does not work and the check passes, removing (or adding if
you're lucky) codepoints, crashing the game. I fixed this by simply
changing thechecking statment from subtraction to a Less Than check (<).
WOW I TYPED ALOT OF STUFF