Commit Graph

4056 Commits (67084de44b771907b81885bf5cc57d609a2fc19e)

Author SHA1 Message Date
lethosor af34b5d614
Merge remote-tracking branch 'bseiller/ea_improve_survey_performance_keep_mlts_on_heap' into develop 2021-02-23 00:22:22 -05:00
bseiller 60e83046f8 Prevent accidental double-frees
- matcher.cpp, survey.cpp: setting the state pointer to null/nullptr in ::shutdown() to prevent errors caused by accidental double-frees - an additional check if the pointer is null already is not necessary as the standard guarantees that nothing happens if delete is called on a nullpointer

Co-Authored-By: Alan <3719547+lethosor@users.noreply.github.com>
2021-02-20 22:43:12 +01:00
myk002 de9375574a
fix syntax error 2021-02-18 23:25:21 -08:00
myk002 3e6294198b
update wording of fortplan deprecation notice 2021-02-18 23:23:50 -08:00
myk002 09f0607db2
add deprecation warnings to fortplan 2021-02-13 11:07:14 -08:00
Ben Lubar a051077820
update structures 2021-02-10 18:54:12 -06:00
lethosor ebbbfc0f8e
Merge remote-tracking branch 'myk002/myk_orders_crash' into develop
Conflicts:
	docs/changelog.txt
2021-02-10 00:10:53 -05:00
bseiller 6ffbf401c4 Merge branch 'develop' into ea_improve_survey_performance_keep_mlts_on_heap 2021-02-09 08:42:42 +01:00
bseiller efc92750fa Fix crash
embark-assistant.cpp: Move call to survey::initiate() after call to survey::setup(), otherwise state won't exist
2021-02-04 01:10:10 +01:00
bseiller 52bf998224 Adapt to review comments by @PatrikLundell
- survey.cpp: rename loop variable for more clarity; replace use of parmeter with use of vector.size(), replace nested vector.at calls with direct index access/subscript as it is faster and easier to read
2021-02-03 14:32:03 +01:00
bseiller 0c304cf85f Improve performance of surveying => faster search
replace the local/automatic mid_level_tiles variable in matcher::match_world_tile with one that is created once during the setup phase (heap).
The dynamic part of the contained (16*16*3 = 768) vectors is being allocated on the heap in both cases - which made the repeated instatiations of the automatic variable so slow/expensive.

Also replace calls to vector<bool>.resize in nested loops with direct assignments to those vectors, which curiously even after a lot of profiling is the fastest way to reset the inorganic vectors - at least on Windows.

- embark-assistant.cpp: Replace 2 local/automatic mid_level_tiles variables with a single dynamic variable created during setup as well; add calls to matcher::setup() and matcher::shutdown()
- matcher.cpp/.h: add state with mid_level_tiles member; add setup and shutdown functions
- survey.cpp: add function reset_mlt_inorganics as replacement for the looped calls to vector::resize as all inorganic vectors are now expected to have the proper size when entering survey::survey_mid_level_tile
2021-02-03 00:08:59 +01:00
myk002 1063497828
don't crash on malformed orders json 2021-02-02 10:50:21 -08:00
bseiller 56335977ab Merge branch 'develop' into ea_refactoring 2021-02-01 23:36:04 +01:00
bseiller fede136008 refactoring embark-assistant survey, 12.iteration
- survey.cpp: replace repeated (nested) vector access with an const int / auto pointer in survey_mid_level_tile
2021-02-01 22:57:30 +01:00
bseiller aff64956fb refactoring embark-assistant survey, 11.iteration
- survey.cpp: replace repeated (nested) vector access with a auto pointers in survey_mid_level_tile
2021-02-01 22:53:45 +01:00
bseiller 4fdcec5893 refactoring embark-assistant survey, 10.iteration
- survey.cpp: replacing repeated vector access with auto value in survey_mid_level_tile
2021-02-01 22:36:16 +01:00
bseiller 1ed783284e refactoring embark-assistant survey, 9.iteration
- survey.cpp: replacing repeated vector access with a const world_geo_biome pointer in survey_mid_level_tile
2021-02-01 22:31:58 +01:00
bseiller 9d64c9a549 refactoring embark-assistant survey, 8.iteration
survey.cpp: remove unused includes
2021-02-01 22:25:57 +01:00
bseiller db423cc11e refactoring embark-assistant survey, 7.iteration
- survey.cpp: replacing repeated nested vector access with a const df::inorganic_raw pointer in survey_mid_level_tile
2021-02-01 22:22:10 +01:00
bseiller aa520dfcce refactoring embark-assistant survey, 6.iteration
- survey.cpp: add function to copy all incursion values from one  mid_level_tile_incursion_base instance to another; replace repeated assignments with  calls to new function in survey_mid_level_tile
2021-02-01 16:00:01 +01:00
bseiller 3181532bf2 refactoring embark-assistant survey, 5.iteration
- survey.cpp: replacing repeated nested vector access with a const mid_level_tile reference in survey_mid_level_tile
2021-02-01 00:24:56 +01:00
bseiller 16438c59c8 Remove trailing whitespace as per lint rules 2021-01-31 14:03:49 +01:00
bseiller 115b8a439f fixing use of wrong indices, discovered during refactoring in survey::survey_mid_level_tile
- survey.cpp: replacing faulty repeated nested vector access (due to wrong indices) with the existing region_map_entry reference
2021-01-31 13:58:17 +01:00
lethosor fd7c3fc4aa
Prevent stockpiles hotkey label from overlapping with autodump
stockflow moved to last slot because it isn't enabled in dfhack.init-example

Ref #1764
2021-01-30 21:14:45 -05:00
lethosor 9c65c1f7c7
Merge remote-tracking branch 'myk002/myk_stockpiles_stockflow_conflict' into develop
Conflicts:
	docs/changelog.txt
2021-01-30 21:11:58 -05:00
lethosor c78866aba7
Merge remote-tracking branch 'abstern/autofarm-fallow-if-no-eligible-plants' into develop 2021-01-30 18:09:12 -05:00
lethosor 62870e9aee
Remove extra log statement, reorder changelog
ref #1753
2021-01-30 18:08:17 -05:00
lethosor 9d0eacadbf
Merge remote-tracking branch 'Moth-Tolias/seedwatch' into develop 2021-01-30 17:56:16 -05:00
bseiller 741e430a06 removing dead store from survey::survey_mid_level_tile
- survey.cpp: deleting declaration of and assigments to variable base_z which is never used apart from a self-assigment
2021-01-30 23:37:09 +01:00
bseiller 028a68ae6f refactoring embark-assistant survey, 4.iteration
- survey.cpp: replacing repeated nested vector access with a region_map_entry reference in survey_mid_level_tile; made a reference mid_level_tile const to prevent acidental change of values
2021-01-30 23:33:09 +01:00
bseiller b1cf65860c Merge branch 'develop' into ea_refactoring 2021-01-30 17:39:41 +01:00
Susan 8540fd84a4 move world loaded check and message printing to plugin_enable() 2021-01-30 15:14:46 +00:00
lethosor c6da99e5ce
Merge remote-tracking branch 'myk002/myk_stockflow_steals_input' into develop
Conflicts:
	docs/changelog.txt
2021-01-30 01:59:44 -05:00
lethosor 845993ba59
Merge remote-tracking branch 'lethosor/fix-k-search-crash' into develop 2021-01-29 20:08:08 -05:00
Su 545fcf6745
Merge branch 'develop' into seedwatch 2021-01-29 11:34:57 +00:00
Susan 33342404bc Merge branch 'seedwatch' of github.com:Moth-Tolias/dfhack into seedwatch 2021-01-29 11:27:34 +00:00
Susan a3b0cda069 don't enable if no world is loaded 2021-01-29 11:26:46 +00:00
lethosor 5c14f619c8
Merge remote-tracking branch 'myk002/myk_buildingplan_enable_all' into develop 2021-01-29 00:59:33 -05:00
lethosor 4fbd763c1a
Also cancel 'k' search when hotkeys (F1 - Shift-F8) are pressed 2021-01-29 00:28:32 -05:00
lethosor 865484f678
Merge branch 'develop' into fix-k-search-crash
Conflicts:
	docs/changelog.txt
2021-01-29 00:16:13 -05:00
bseiller b33f06efee refactoring embark-assistant survey, 3.iteration
- survey.cpp: replacing repeated nested vector access with a mid_level_tile reference in survey_mid_level_tile
2021-01-28 23:48:09 +01:00
bseiller e90e84ab87 refactoring embark-assistant survey, 2.iteration
- survey.cpp: replacing pointer and repeated nested vector access with a region_tile_datum reference in survey_mid_level_tile
2021-01-28 23:40:58 +01:00
bseiller 6e012bb032 refactoring embark-assistant survey, 1.iteration
- survey.cpp: replacing repeated double vector access with a reference in survey_mid_level_tile
2021-01-28 23:38:40 +01:00
Su 98f3142c92
change deactivation message to be more accurate
Co-authored-by: Alan <lethosor@users.noreply.github.com>
2021-01-28 18:00:34 +00:00
myk002 42ae0727fe
resolve hotkey help text conflict
between stockflow and stockpiles

I removed stockpiles's dynamic placement code as well. it attempted to
move the hotkey help text down if it covered any stockpile links, but
this will no longer work since other hotkey text already takes up all
the lines below stockpiles' hotkey text.
2021-01-27 08:37:12 -08:00
myk002 ff69665815
keep stockflow from stealing input during rename 2021-01-27 08:25:21 -08:00
bseiller 1f7cae17ef Merge branch 'develop' into ea_incursion_struct 2021-01-26 23:22:59 +01:00
myk002 10634b8ae5
fix merge error 2021-01-24 09:19:01 -08:00
Myk Taylor d0fc448a39
add 'enable all' option for buildingplan
This kind of functionality is much more important now than it used to
be since there are so many supported building types.

Also modified the 'Planning Mode' status on the building placement
screen to reflect whether we're in quickfort mode, enable all mode, or
whether just the building type is enabled.

this setting is not persisted (just like quickfort_mode is not
persisted), but it can be set from onMapLoad.init
2021-01-24 09:08:36 -08:00
bseiller 3c4cb749a3 Merge branch 'develop' of https://github.com/DFHack/dfhack into prevent_repeated_survey_mlt_calls 2021-01-24 13:57:27 +01:00