Because this blows up the size of the executable. This was meant to be done only with debug builds anyway. The release stack traces are all sorts of wonky anyway, no need to complicate them further.
Probably needs some tweaking before it's actually generic enough to work for everyone though. Absolutely not going to work for windows people in its current form.
This effectively leaves the staleness checking to adb install, as it should be done: adb has insight into the state of the system, we don't. Newer versions of android can do incremental installs too, so reinstalling the same thing is essentially free.
Also invoke android/install-apk in the debug script to make sure that the app being debugged is up to date.
They were marked done as far as Libcurl.cpp semantics went, but they weren't noticed by the Worker loop and thus weren't actually marked done with MarkDone.
Broken by 0cc179ae4e where I quietly (i.e. no mention of this in the commit message >_>) replaced curl_multi_wait with curl_multi_poll, the former of which would return after some time even if nothing happened and the latter of which doesn't. Thus, the request manager loop kept iterating, if slowly, and masked this issue: these half-baked requests ended up being noticed in the iteration of the Worker loop that came after the one during which they were marked done.
Also fix the MotD being finalized improperly in Client.
SetLastError will always cause the error to show up in the console. Use tempfile->GetError() instead, which will return the same error message anyway unless the stamp doesn't exist.
It doesn't make much sense for a Lua function to vary depending on whether the user holds shift or not.
This restores the original behavior of includePressure in 6931f35520, which was accidentally removed later in a407aba087. Since I doubt anyone used this parameter, I'll just keep it at position 6 instead of moving it back to 4.
Rather than when the active tool is the property tool. Solves the problem of not being able to sample "away" from the property tool when it's already selected. Also bring up the property window after each such sampling of properties.
These fire just after RenderBegin (read: really early) and just before RenderEnd (read: really late, but before the zoom window is drawn), respectively.
Lua graphics calls now also decide whether they should draw using simulation graphics or user interface graphics based on which event is being handled. This fixes element graphics functions being unable to draw with graphics calls.
This fixes many saves that use 1-px mirrors, for example, id:1077513 id:828603 id:2845200 id:30082
PHOT refraction, which was wildly broken in 97.0, is unchanged, and still works. In Simulation::get_normal, I simply check if REFRACT is set, and if it is, apply the new logic
There had never been a legit use of tpt.beginGetScript (or indeed, tpt.getscript) that didn't involve the exact parameters 1, "autorun.lua", 1. The most infamous alternative parametrization was 2, "autorun.lua", 1, which would install TPTMP where you'd normally install the script manager. Absolute madness.
The callback parameter also goes away with this change, because no other script needs to know when the script manager is done being installed. I also fixed a problem where the function might be called from the wrong context and thus get delayed in handling the completion of the HTTP request. With the earlier removal of checking for existing destination files and bailing out if found, this function is now bullet-proof(tm).
This restores the tpt.getscript(1, "autorun.lua", 1) usage pattern, albeit only from the console.
It's not worth the trouble to ask questions (this was the old behaviour), the next best thing (in terms of preserving old behaviour) is to overwrite unconditionally. There is no situation in which the file name would be specified but the user wouldn't want the file to be written to.
A sim event being an event that takes place in the context of the simulation. Currently, this simply means that the RNG math.random uses is the sim's rather than the UI's.
More precisely, fix reaching the particle limit while pasting onto a sim with no stacking, which shouldn't be possible at all, because pasting removes stacking at any position that has particles, and if the sim doesn't already have stacking, in the worst case we should end up filling the screen, which would use exactly as many particles as the limit allows.
The problem was that the removal of stacking happened after all particles were done being pasted, which meant that the particle limit could be reached halfway into the process. The solution is to remove on demand the particles wherever we're pasting one.
This works because assuming there is no stacking in the sim (this is the only case we care about) and that pmap is up to date (it is, we call RecalcFreeParticles early), then a spot that is being pasted over is either free (and therefore there are also slots free in Simulation::parts) or has exactly one particle, which we remove before creating the one we're pasting.
That is, undo the decoupling of the effective save version from what is today the upstream display version done in 7fc3fb4c15. This enables taking advantage of new features, for example the comprehensive palette, in saves that do come with a comprehensive palette, which is a 98.0-and-above feature.
Also fully populate GameSave::version before making checks against it and fix GameSave::fromNewerVersion reflecting the relationship between only the major components of version numbers.