jacob1
adb39b91a9
attempt to reduce "script is not responding" when debugging (valgrind / breakpoints)
2017-07-28 20:32:46 -04:00
jacob1
8064d3b467
remove useless debug print in !set
2017-07-25 20:11:57 -04:00
jacob1
ad5a2a0972
tpt.parts: only prevent writing to dead particles, not reading
2017-07-16 11:43:50 -04:00
jacob1
b8ce522779
sim.signs.delete() api function
2017-07-16 10:42:53 -04:00
jacob1
6d141b0722
add new PhotonReflectWavelengths property, add reflection color for POLO
2017-07-16 00:07:32 -04:00
jacob1
5ee10d14e4
reduce unnecessary #include dependency chains
...
for example, elements no longer include Client.h or Graphics.h, and interface stuff won't include Window.h or Graphics.h unless requested
2017-07-13 23:24:35 -04:00
jacob1
f3a7d966d2
potential fix in sim.partCreate, also
2017-07-13 20:55:03 -04:00
LBPHacker
7dd538b82c
Fix tpt.parts being unsafe
...
`tpt.parts` does check whether the particle ID it gets is valid, but it doesn't check whether that particle ID is used. One could potentially modify the life property of dead particles to break the linked list of free particle IDs, thus potentially gaining the ability to read from or write to arbitrary addresses in memory.
2017-07-13 20:33:46 -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
ec417095b9
add sim.TOOL_MIX, fixes #414
2017-05-09 21:59:15 -04:00
jacob1
ce054bfc3f
fix misc. errors reported by clang static analyzer
2017-05-06 20:02:23 -04:00
jacob1
cdc8f64896
fix clang compile warnings, fixes #406
...
also, sim.ambientAirTemp takes floats now
2017-04-27 23:08:06 -04:00
jacob1
866289c179
remove duplicate function, fix Simulation::GetParticleType, fixes #402
2017-04-21 20:24:24 -04:00
jacob1
e712a8dbec
make last 3 arguments to sim.brush optional, for convenience
2017-04-17 23:28:12 -04:00
LBPHacker
e9d80fe52a
sizeof(unsigned char)
2017-04-17 23:28:12 -04:00
LBPHacker
5cf3fa3f5b
More parameters for sim.brush
2017-04-17 23:28:12 -04:00
Issue tracking bot
d9115fc3fe
Fix -Werror=misleading-indentation ( #369 )
2017-02-20 18:51:10 -05:00
jacob1
51eeaf218d
fix crash when doing Textbox.new()
2017-02-13 17:43:48 -05:00
Tamás Bálint Misius
57f5d0f84f
Add sim.brush ( #350 )
2016-11-07 18:00:34 -05:00
jacob1
797f9357ff
fix float detection in console, fixes stuff like !set type all 0.8C
2016-09-10 12:46:15 -04:00
jacob1
ecb08952e5
Add SDL_keysym.h, Use official SDL constants
2016-07-19 22:42:10 -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
eafd8115b0
add onlyEnabled option to tpt.num_menus (probably useless)
2016-07-17 23:36:36 -04:00
jacob1
8a0496e60a
another fix for lua key events
2016-07-17 18:19:00 -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
b75c8318e4
add tpt.num_menus and tpt.menu_enabled functions
2016-07-08 20:33:01 -04:00
jacob1
9a18338476
remove debugging thing
2016-06-11 23:50:46 -04:00
jacob1
2a541bd2f5
fix for lua keydown events, send 'j' when ctrl+somekey is pressed, not ^J
2016-06-11 15:54:19 -04:00
jacob1
57be4ef498
'character' is always 0 in sdl keyup event, so just send 'key' instead to lua keyup events
2016-04-26 22:42:57 -04:00
jacob1
aa99258101
more cleanup so that 3D can stay a more permanent thing
2016-04-02 00:10:15 -04:00
jacob1
46d096206f
Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience
2016-03-31 22:08:04 -04:00
jacob1
aa108be3df
Pass in actual character sdl saw into keypress functions
...
Previously you couldn't detect what shift+somekey would do on alternate keyboard layours.
2016-01-31 21:39:39 -05:00
jacob1
28598a43be
another compiler fix (include <stdexcept> manually)
2016-01-26 00:31:05 -05:00
jacob1
f6d82b6f8a
separate t and v argument in create_part, fix LIGH not defaulting to .life of 30 with clones / console
2016-01-11 22:38:42 -05:00
jacob1
37eb674d40
fix being unable to set floating point values in element.property
...
broken in e92bbac700
2015-12-18 18:21:04 -05:00
jacob1
b9c3eeae92
Allow old lua scripts which use state to work
2015-12-18 02:07:16 -05:00
jacob1
f63c3072a4
fix crash when doing simulation = nil in the console
2015-12-11 12:05:00 -05:00
jacob1
9a9f80fefa
don't add extra newlines when downloading scripts via tpt.getscript
2015-10-23 00:18:41 -04:00
jacob1
bc112b54df
initialize GoL variables, add sim.gspeed function
2015-10-10 00:03:04 -04:00
jacob1
9c44fc641c
fix crash with sim.floodWalls(1,1,4,0)
2015-09-29 00:09:41 -04:00
jacob1
1f7b6a6bb4
fix wind line from lua changing brush size, allow setting wind tool strength
2015-09-28 23:53:14 -04:00
jacob1
cae8c9e095
fix some compile errors with last commit, remove snapshot version info from HUD and add to intro text instead, add tpt.version.snapshot
2015-09-26 14:56:37 -04:00
jacob1
13a71b611a
more tptmp mouse fixes, fix buttons and menusection buttons staying highlighted sometimes
2015-09-22 19:59:31 -04:00
jacob1
16781bcb8e
two new lua mouse up events (4 & 5) for some corner cases
...
Also fixes mouse held event being stuck in one of those cases
2015-09-20 21:40:00 -04:00
jacob1
bbdbb67079
fix tpt.brushx returning incorrect value when brush is updated with tpt.brushID
2015-09-19 20:01:53 -04:00
jacob1
f5774ad9b9
update tpt.getscript to use starcatcher.us
2015-09-18 13:00:01 -04:00
jacob1
e9043c93aa
fix lua windows to allow -1 for position again (centers the window)
2015-09-16 01:48:15 -04:00
jacob1
a629979d8b
fix tpt.reset_spark to also reset WIFI
2015-09-10 23:59:13 -04:00
jacob1
f827e125cb
fix sim.loadStamp / tptmp crash
2015-09-10 13:07:52 -04:00
jacob1
fee8516157
new function tpt.confirm (confirm prompt which returns true or false)
2015-09-08 01:27:20 -04:00