Commit Graph

338 Commits

Author SHA1 Message Date
jacob1
5012c3cfe6 fix build error when UPDATESERVER is defined 2018-01-01 12:12:43 -05:00
jacob1
b5159ab74e Changes to save format and PIPE
Update save format to optionally store type as two bits
PIPE now stores element in ctype
Disallow uploading saves using two bytes in type or other fields
update save format to store pmapbits and automatically convert data
2017-12-31 23:55:41 -05:00
jacob1
ac24810da5 add some defines to reduce usages of hardcoded r>>8 2017-12-28 12:03:26 -05:00
jacob1
c31267b06f use unique_ptr in GameSave::readPsv, rename variables 2017-12-27 16:57:32 -05:00
jacob1
ae9b416f2f use c++11 (unique_ptr) in GameSave::readOPS 2017-12-27 13:00:48 -05:00
jacob1
887d60628d use c++11, use unique_ptr in GameSave::SerializeOPS 2017-12-27 11:50:09 -05:00
jacob1
3529f6f468 fix ambient heat not loading in ctrl+c paste, fix pressure resetting to 0 when loading saves without pressure 2017-11-23 22:09:33 -05:00
wolfy1339
255ca13fab Remove unused code in src/Config.h (Fixes #516)
- Remove commented out code as it was not used anywhere in the code
2017-11-23 00:18:44 -05:00
jacob1
97c4123533 translate wall grids when shifting stamps by more than 4 pixels 2017-10-04 21:07:00 -04:00
jacob1
4ff0a9f52c only expand stamp in the direction you are moving 2017-10-04 21:07:00 -04:00
krawthekrow
ca542b1ef1 autoexpand save when particles are translated out of boundaries 2017-10-04 21:07:00 -04:00
jacob1
e4089a276a fix illuminati symbols appearing when rescanning stamps 2017-09-04 12:51:28 -04:00
jacob1
8fe3ca0f5c don't use std::pow here 2017-07-29 11:26:53 -04:00
jacob1
b02a72a77b add length limit to authors on saving/loading, fix type issue causing mass duplication
When making a local save, then stamping and loading the stamp (without doing anything else in between), issues with the code would cause the unsigned int in the json to turn into a normal int. It would then think the authors data from the stamp was from something else and append it. For users that do an excessive amount of stamping, this causes duplication in the authors links that shouldn't have ever happened.
2017-07-28 20:00:19 -04:00
jacob1
1cfd9d8fc7 only display updates based on build number, not version number 2017-07-23 16:41:38 -04:00
jacob1
aad8eba5df Version 92.0
also update README, and make ctrl+a moderator only shortcut
2017-07-23 10:58:52 -04:00
jacob1
ddce20da5b authors clipboard fix
MergeStampAuthorInfo prevents some duplication now, don't need this
2017-07-16 21:33:49 -04:00
jacob1
08ba035a53 fix nesting checks 2017-07-15 16:27:11 -04:00
jacob1
6efedcdd33 undo authors changes on ctrl+z, prevent excessive nesting 2017-07-15 16:21:16 -04:00
jacob1
8e5b0c760e Add logging inside saves which remembers which other saves material was taken from
The logging is saved inside the bson data in all online saves, local saves, stamps, and clipboard pieces. It is loaded back when reloading each of those.

See #474 for the format of the data. It is the same format for the bson data. Note that "links" is an array of objects. It can be recursive.

There is some effort to not duplicate information, we don't care if you loaded a stamp 10 times or if you are using the clipboard in your own save. Extra information is mostly not saved for your own stuff, only when you take material from other saves.

Press ctrl+a in debug builds to show what info it is currently saving in Client. Also enabled in snapshots for now.

There is one unrelated change in here, which fixes a crash pointed out by QuanTech. It was also save related and it was too close to the other changes to separate it into another commit. It fixes a crash when saving signs with invalid unicode. the BSON library doesn't like this, it was returning an error but we ignored it, which caused a crash. It now notices those errors. I also had to update several Serialize calls to check if it actually returned save data, or else it then would have started crashing there instead.
Also some debug prints were removed
2017-07-13 00:19:35 -04:00
jacob1
057435baa6 Differentiate between created date / updated date in save preview
still only shows most recent date, this just changes the text
2017-06-30 21:21:09 -04:00
jacob1
572e432045 update snapshot save restriction code 2017-06-04 18:10:07 -04:00
jacob1
35ce9570d6 make Mrprocom's name blue 2017-06-04 17:48:31 -04:00
jacob1
ce054bfc3f fix misc. errors reported by clang static analyzer 2017-05-06 20:02:23 -04:00
jacob1
8d492ef549 meant to move those functions into GameSave class 2017-04-25 00:05:15 -04:00
jacob1
5ce60b5f5f clean up massive repeated code in GameSave.cpp 2017-04-24 23:59:47 -04:00
jacob1
c98f63bd89 save ambient heat in saves, if it is enabled 2017-04-24 22:29:45 -04:00
jacob1
184777ed12 GameSave.cpp 2D array cleanup 2017-04-23 22:44:31 -04:00
jacob1
6d6a615a37 msvc min/max fixes 2017-04-23 12:30:39 -04:00
jacob1
40972f9434 pressure and air velocity are now saved in saves 2017-04-22 17:06:28 -04:00
jacob1
fc451e5385 don't allow publishing E182 saves 2016-09-04 21:49:24 -04:00
jacob1
2df333c99f TPT is now shown in desktop menus when installing on linux
uses powder-48.png as icon + 3rd .desktop entry
2016-09-04 21:27:55 -04:00
jacob1
b405674d3d minor updates to .desktop files 2016-09-04 20:17:35 -04:00
jacob1
89e7238f3b fix invalid read in BSON.cpp when loading some kinds of invalid saves 2016-08-14 18:18:59 -04:00
jacob1
6dc1c222bc catch potential ParseExceptions when loading saves, use bson error handler to prevent exit(-5) 2016-08-14 18:18:59 -04:00
jacob1
cd41aac1f7 allow snapshots to still publish saves, as long as they don't use new features 2016-08-07 15:31:28 -04:00
jacob1
9a855cc8cb fix some commas in HTTP.cpp that should be semicolons 2016-08-02 08:31:33 -04:00
jacob1
59ac872d5f restrict saves using newer features of elements 2016-07-26 19:33:04 -04:00
jacob1
9cae1f0fe7 HTTP.cpp: parsing headers shouldn't be case sensitive 2016-07-24 16:28:20 -04:00
wolfy1339
b65e94900e Use C++ includes (#308)
Replaces stdio.h, stdlib.h, string.h, math.h, time.h, limits.h and othters with their C++ equivalents.
2016-07-17 23:37:24 -04:00
jacob1
a3865c8f49 remove debugging stuff 2016-07-09 19:07:03 -04:00
jacob1
16b93083d4 Changes to support starcatcher build server with updates
Cherry-picked from 3ddaec7b2a
3ddaec7b2a
3ddaec7b2a
3ddaec7b2a
3ddaec7b2a
3ddaec7b2a
2016-07-09 19:00:54 -04:00
jacob1
7e4924e7ab windows pthread_t is uncooperative, just check this instead 2016-06-11 13:08:27 -04:00
jacob1
5b5390f822 attempted error fix 2016-06-11 12:57:13 -04:00
SopaXorzTaker
0af4b54bc3 extra NULL check
It is undefined behavior what happens when you try to call pthread_join on a NULL thread (which will happen if you close the game before opening the save browser). Seems to be harmless, but make sure we don't do that just in case --jacob1
2016-06-11 10:46:59 -04:00
jacob1
64f81000cd Fix typo 2016-04-27 00:00:28 -04:00
jacob1
a8427ef33a only use -Wno-unused-result on Linux, also actually fix the unused results that we could possibly care about
Fixes cross compilers, TODO: I don't think scons can check if a flag exists but might support adding a test for that, even if through hacky means, like CheckFramework
2016-04-26 23:55:14 -04:00
jacob1
1171c308e1 Fix warnings, fix crash when ctrl+click opening a save 2016-04-02 20:47:50 -04:00
jacob1
ad49bfbb82 ALL CAPS R COOL 2016-03-27 11:46:30 -04:00
jacob1
40c2ff27b0 Test using DownloadManager from my mod instead of RequestBroker
The crash when opening saves on mac is definitely something to do with the threading, and i'd rather just test this first to see if it fixes it

Copied from my mod almost entirely as-is, with the changes to HTTP.cpp included, also added locks into Download.cpp even though it is probably overkill
2016-03-27 11:41:36 -04:00