Commit Graph

89 Commits (666edd6d60d99f49ce2556af0c58e53d8795c6c0)

Author SHA1 Message Date
myk002 fa126af1fd
undo unnecessary edits 2020-11-12 22:49:06 -08:00
myk002 10616a387f
cleaner mask-based implementation 2020-11-12 22:44:38 -08:00
myk002 02a86d761a
identify bars as non_economic items
allows Job::isSuitableMaterial() to match metal bars as a building
material
2020-11-12 19:10:06 -08:00
Myk Taylor 4d7f4d80ad prep buildingplan for core algorithm changes
player-visible changes
- removed text that showed up if you used the wrong hotkeys. no other
  dfhack screen does this, and it seems unneeded. can add back if others
  think otherwise, though

internal changes
- changed signature of lua-exported isPlannableBuilding to take subtype
  and custom type in addition to building type. this is only used by
  quickfort, and it already sends all three params in preparation for
  this change
- added lua-exported scheduleCycle(), which is like doCycle(), but only
  takes effect on the next non-paused frame. this lets quickfort
  run only one buildingplan cycle regardless of how many #build
  blueprints were run
- declared a few dfhack library methods and params const so buildingplan
  could call them from const methods
- converted buildingplan internal debug logging fn to have a printf api
- reshaped buildingplan-planner API and refactored implementation in
  preparation for upcoming core algorithm changes for supporing all
  building types (no externally-visible functionality changes)
  - changed df::building_type params to type, subtype, custom tuple keys
  - introduced capability to return multiple filters per building type
    (though the current buildings all only have one filter per)
- split monolith hook functions in buildingplan.cpp into one per scope.
  this significantly cleans up the code and preps the hooks to handle
  iterating through multiple item filters.
- got rid of send_key function and replaced with better reporting of
  whether keys have been handled
2020-10-04 20:05:08 -07:00
Ben Lubar a9f219baf9
update for DFHack/df-structures#7dfea1f1d4e453b97d5529785701db46360596ce 2020-06-29 16:16:44 -05:00
Stoyan Gaydarov 38cccdb0f4 Update the module create calls to return unique_ptrs 2018-07-14 19:55:25 -07:00
lethosor db95796d4c Many build fixes 2018-03-10 16:53:45 -05:00
DoctorVanGogh ba53f3c035 Add 'undisturbed' flag to job item checks 2015-10-26 02:19:41 +01:00
Ross Morgan-Linial 51d61d91cb Change tabs to spaces. 2015-05-07 20:50:19 -07:00
Ross Morgan-Linial 7aac9a8fb8 Improve workflow handling of plant reactions
Makes workflow understand "seeds of any plant", "thread of any plant",
"drink of any plant", "powder of any plant", and "liquid of any plant"
when counting items.

Changes workflow's handling of the built-in plant reactions to
understand that they always produce plant products, and that they also
produce seeds.

This means that you can set a target for, for example, "powder of any
plant", and workflow will use a milling job to produce that.
2015-05-07 20:49:29 -07:00
Quietust 97de21357c First pass for 0.40 compatibility; still lots left to do, but this will at least build 2014-07-21 13:18:29 -05:00
jj 04dce1aa7f MaterialInfo: fix decoding for COAL subtypes 2013-11-05 00:31:32 +01:00
Alexander Gavrilov f36041f6bd Implement a MapCache api for writing base layer tiles of arbitrary stone.
Precompute some tables in TileTypes for extremely efficient
conversion between tiles of most important material types.
2013-10-10 12:15:50 +04:00
Petr Mrázek e06b6904f1 Small fix to sync dfhack with the structures. 2013-01-15 23:41:43 +01:00
Quietust 3f2e583746 Naming consistency 2012-11-16 15:35:34 -06:00
Alexander Gavrilov eb936c4ce0 Support milking and shearing in workflow. 2012-11-10 17:06:54 +04:00
Alexander Gavrilov ff982dcf73 Fix representation and parsing of built-in materials.
The trick is to support both FOO and FOO:NONE for all of them,
including INORGANIC[:NONE]. Otherwise the workflow gui scripts
have problems.
2012-11-07 13:31:36 +04:00
Alexander Gavrilov 59ec9b304e Implement adding workflow constraints from gui/workflow. 2012-10-24 21:49:30 +04:00
Alexander Gavrilov 795961bfc4 Fix the treatment of non_economic in Materials/Items modules.
non_economic == !(is boulder && is inorganic && is economic)
2012-10-20 20:31:45 +04:00
Petr Mrázek 8812238bf6 Update license, add contributors file, bump release number 2012-09-30 04:03:37 +02:00
Alexander Gavrilov 36e44c682c Add a plugin implementing 'add spatter to item' reactions. 2012-09-17 21:15:51 +04:00
jj cdd711efa4 add COAL subtypes in MaterialInfo::getToken 2012-07-04 17:31:41 +02:00
Alexander Gavrilov e72bf1ac9a Sync to changes in df-structures. 2012-05-26 14:49:27 +04:00
Alexander Gavrilov 0a6982f404 Enable warnings correctly on linux and fix a lot of them. 2012-04-20 13:30:37 +04:00
Alexander Gavrilov 0daafef690 Wrap MaterialInfo for lua. 2012-04-06 19:56:19 +04:00
Alexander Gavrilov 58eb199036 Add many new template functions for enums & bitfields.
An incompatible change: ENUM_KEY_STR returns std::string now.
The old behavior is available via enum_item_key_str function.
2012-03-17 12:52:22 +04:00
Alexander Gavrilov f84b1539a8 Change to the traits representation of enum and bitfield properties. 2012-03-15 20:46:08 +04:00
Quietust 2b2c30ac43 DEEP_ANY got renamed to SPECIAL 2012-03-03 16:03:35 -06:00
Petr Mrázek 022822277d Fix the ugly Materials code... 2012-03-01 01:52:13 +01:00
Petr Mrázek 2682c54fce Fix horrible errors and make MSVC shut upt about non-issues. 2012-03-01 01:29:55 +01:00
Petr Mrázek 8f680dcf94 Make it build and run on linux (no stonesense, df2mc, dfusion) 2012-02-09 03:07:26 +01:00
Quietust 9afcea3deb In all loops that iterate across a vector, use a size_t as the index 2012-01-31 10:55:38 -06:00
Quietust a82f4c9138 Cleanup code to get rid of MSVC warning C4482 2012-01-31 10:17:27 -06:00
Alexander Gavrilov ef256e1453 Detect incomplete thread and cloth items in workflow. 2012-01-27 21:17:50 +04:00
Petr Mrázek d5d4875532 Make things work properly. 2012-01-27 05:54:26 +01:00
Alexander Gavrilov 174d9d0739 Tweak showmood, add a few validity checks, commit a dfhack.init example. 2012-01-24 15:36:30 +04:00
Quietust 7f23c322a2 Cleanup 2012-01-21 19:24:58 -06:00
Quietust d2c78646ea t_creaturecaste shouldn't be using t_attrib, because those AREN'T actual attribute values, just the PHYS/MENT_ATT_RANGE values from the raws 2012-01-21 13:24:38 -06:00
Quietust 118e5c6617 Major cleanup of Materials modul, precursor to eventually nuking it 2012-01-21 10:12:26 -06:00
Quietust 6d2ce7b8a9 Add default return value to MaterialInfo::matches 2012-01-11 10:50:38 -06:00
Alexander Gavrilov 7f5aa4de62 Support the most important job types in workflow. 2012-01-10 17:23:37 +04:00
Alexander Gavrilov 50386f66a3 Update structures and implement modifying the job_item item type. 2012-01-09 16:20:17 +04:00
Alexander Gavrilov ea790f1346 Move a few functions into the core, and add some more. 2012-01-08 20:02:12 +04:00
Petr Mrázek 72a4698968 Merge https://github.com/angavrilov/dfhack 2012-01-05 23:54:33 +01:00
Petr Mrázek 78a98de37e Fix MSVC builds, break buildings :D 2012-01-05 23:39:14 +01:00
Alexander Gavrilov 687245abd9 Allow setting job item materials. 2012-01-05 22:04:05 +04:00
Alexander Gavrilov 99dda069de Update data definitions. 2012-01-04 18:46:39 +04:00
Petr Mrázek 86464b99cc Remove DfVector, break MSVC builds until further notice. 2012-01-04 01:45:11 +01:00
Alexander Gavrilov f8814909a9 Move the MaterialInfo class to the main library. 2012-01-03 19:25:55 +04:00
Petr Mrázek 9db20bd84d Header changes/cleanup. 2011-12-31 12:48:42 +01:00