Commit Graph

153 Commits (ae1aa49089ccf8fb8d564d247371de70e333eb36)

Author SHA1 Message Date
lethosor aea76b7ef3 stockflow: make sure that manager order amounts are integers
Fixes #1044
2017-03-18 17:56:06 -04:00
Lethosor ba48afe908 stockflow: Simplify calculation
See #1046

Use math.floor() for now until we can get Lua 5.3 working on Travis
2016-12-16 14:22:00 -05:00
Kelly Kinkade 1419d58b9a stockflow: Use "floor division"
Per suggestion by @dscorbett
2016-12-16 13:04:51 -06:00
Kelly Kinkade 5be77fa63d stockflow: Fix "integer expected" problem in stockflow 2016-12-16 08:09:53 -06:00
Eric Wald 060331de37 Stockflow reaction updates
SpinThread jobs now get the proper material category flag, and metal mechanisms can be ordered.
2016-06-26 19:22:53 -06:00
Eric Wald 3f0857bff3 Incrementing the manager order id properly.
There's a chance that not doing so could lead to a crash, somehow.
2016-05-16 19:48:52 -06:00
Eric Wald 2df41e6bad Clearing the active flag for new stockflow orders.
It's not entirely clear what this flag does when there aren't any conditions on the order, but new manual orders start as Ready instead of Active.
2016-05-15 22:06:20 -06:00
Eric Wald 0b1004f2b8 Notice resizing immediately, instead of on next key press 2016-05-15 09:14:30 -06:00
Eric Wald 6add87b358 Simplifying key strings 2016-05-15 08:58:45 -06:00
Eric Wald 6575f5f412 Removing the quantity limit on stockflow orders. 2016-05-14 23:40:01 -06:00
Eric Wald 3e8d4f9257 New command for clearing the stockpile order.
Shift-Space by default, using the SETUPGAME_SAVE_PROFILE_ABORT key.
2016-05-14 23:35:07 -06:00
Eric Wald 8c7d5366c9 Switching to the new manager order flags 2016-05-14 23:33:38 -06:00
Eric Wald 02e0b9e721 Manager interface now uses the full height.
Its navigation behavior has also changed, and it now has key hints for navigation.
2016-05-14 22:42:49 -06:00
lethosor 2399539990 Merge remote-tracking branches 'warmist/patch-7', 'warmist/patch-8' and 'warmist/patch-9' into develop 2016-04-10 11:58:48 -04:00
Warmist 812f6df272 Fix building-hacks color for auto_gears option
Now it should select the gear color correctly
2016-04-10 16:55:08 +03:00
Warmist c4c452c288 Show sidebar when moving from screen to screen
When both are from lua the old logic failed.
2016-04-10 16:51:58 +03:00
Warmist 29f08cd20d Fix eventful trying to show sidebar
It should not try to do that if e.g. showing buildingitems. Maybe later we will have more valid focus strings (e.g. custom item view for some buildings) but for now just use vanilla (or callback function not a class)
2016-04-10 14:58:03 +03:00
Warmist 9c9f710d5b Fix eventful not showing sidebar sometimes
E.g. when destroying buildings
2016-04-10 14:47:33 +03:00
expwnent b71c1b9e7c Merge pull request #751 from PeridexisErrant/remove-dfusion
Remove dfusion, df2mc, mapexport, dwarfexport
2016-03-13 08:22:07 -04:00
Warmist bc02e2a844 Add auto-gears mode for building hacks for automatic animation and gear positions. 2016-03-13 13:37:36 +02:00
Eric Wald 8ce115646a Updating Stockflow for version 42.06
The manager can now specify each type of craft individually, as well as in general.
There may be a better justification for not allowing pearl and shell scepters, though.
2016-02-23 22:09:26 -07:00
lethosor f4ce45deae Disable confirm note-delete in name entry
Fixes #820
2016-02-11 22:56:33 -05:00
lethosor a9ad2f40f1 Add a location retirement confirmation 2015-12-25 11:18:55 -05:00
Eric Wald 4dc94a565f Adjusting stockflow order numbers where possible.
Loading 0.40 saves in 0.42 results in a different list of reactions.  Fortunately, all but the instruments should still work.
2015-12-18 07:02:29 -07:00
Eric Wald 45625318bb Stockflow reaction list repairs.
Mostly, instruments and their pieces are made through generated custom reactions, instead of as tools.
Depends on df-structures commit e551233 for full potency.
2015-12-17 22:02:30 -07:00
lethosor af92b3ae1f Fix some confirm plugin issues and add a simple configuration UI
- Detect null pointers in trade-related functions
- Fix typo/issues pointed out by @dscorbett
- Reorder includes
2015-11-21 20:58:49 -05:00
lethosor b7dd93b6e8 Implement most of the confirm plugin in Lua
This should make resolving future issues easier, although implementing
new confirmations in lua isn't possible yet (each one requires a line
in confirm.cpp).

This also resolves an issue with note-delete and route-delete, with
dfhack/df-structures@1bc4f61
2015-11-21 19:01:35 -05:00
PeridexisErrant 80e4b8d3df Remove DFusion plugin and script system
It's been four years since meaningful updates, and in that time
alternatives have emerged to almost everything.  Any remaining
functionality to replace is on the issue tracker.

Simpler is better, for users and developers, and removing a legacy
system makes it easier to understand how DFHack works.
2015-11-17 11:13:19 +09:30
expwnent fabcfcd921 Fixed trailing whitespace. 2015-09-21 17:42:30 -04:00
Warmist 80fd4b1365 Some additions and fixes.
Added new functions: select, set(non)blocking, isBlocking.
Set default to non-blocking. Added "would block" to ignored errors.
2015-09-16 09:57:22 +03:00
warmist 7639420455 Update luasocket.lua 2015-08-17 10:07:20 +03:00
Warmist d9c50d677f A lua interface for csockets in a spirit of luasocket 2015-08-15 15:09:12 +03:00
lethosor a90f3c3d67 stockpiles: Restrict characters in filenames when saving
Previously, it was possible to save outside of the stocksettings
directory or fail to save in a nonexistent subdirectory (e.g. when
a stockpile name had slashes in it).

Resolves #621
2015-07-29 14:17:14 -04:00
lethosor 8145a04944 dwarfmonitor: Add mouse cursor widget
Suggested by @ragundo
2015-06-15 13:42:29 -04:00
lethosor 7581bda7d5 Update dwarfmonitor documentation and NEWS 2015-06-13 21:50:15 -04:00
lethosor 93c9a41a3a Reimplement dwarfmonitor widgets in Lua (and improve customizability)
Widget positions and a few other options (e.g. date formats) can be
specified in dfhack-config/dwarfmonitor.json on a per-instance basis.

Related changes:
* Fixed an issue loading JSON files from Lua
* JSON files in dfhack-config (only dwarfmonitor.json currently) are
  no longer copied into the DF directory when building DFHack. This
  keeps developers' personal settings intact, but will require
  copying over changes made to DFHack's copies manually.
* Fixed incorrect config path in dwarfmonitor help
2015-06-13 21:15:43 -04:00
Ross Morgan-Linial 3001053cef Change tabs to spaces. 2015-05-07 21:51:03 -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
Ben Lubar d182b6c1c3 only create the stocksettings directory when it is requested 2015-03-24 17:46:49 -05:00
Eric Wald 23707db1d3 Fixed ballistic arrow head orders 2015-03-15 16:38:59 -06:00
Eric Wald 6bfaa8d35d Better way to handle obsolete job types. 2015-03-15 16:37:35 -06:00
Eric Wald 81c2a6e79f Refactoring a table insert into reaction_entry. 2015-03-15 16:02:29 -06:00
Eric Wald 11d65b4f2d Always clear reactions when loading.
This removes a minor potential for memory leaks.
2015-03-15 15:43:46 -06:00
Eric Wald d18bd3e2a5 Preventing a stockflow error message in Arena mode 2015-03-15 14:08:47 -06:00
lethosor 0b912f54be Fix field name in lua/stockflow.lua
From DFHack/df-structures#39
2015-03-01 17:32:25 -05:00
Warmist e9ab892369 Building hacks changes.
Fixed buildings not consuming correct value of power. Added way to ignore unpowered state. Added setPower/getPower to change how much power building uses on the fly.
2015-02-24 15:37:38 +02:00
lethosor 10cfef0553 Fix whitespace issues 2015-02-14 22:53:06 -05:00
expwnent e5e0d93ef1 Added modtools/reaction-product-trigger. 2015-02-02 02:39:05 -05:00
Casey Link b0e0bbda9b stockpiles: show proper cased names in filter list 2014-12-05 16:53:19 +01:00
Casey Link 52f4cb3fc1 stockpiles: load prompt uses typing + filtering 2014-12-05 14:49:40 +01:00