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
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
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
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
lethosor
10cfef0553
Fix whitespace issues
2015-02-14 22:53:06 -05:00
Eric Wald
83b1317173
Switching stockflow to the internal getStockpileContents.
...
This should speed it up over checking each space individually, but no longer counts spaces with empty assigned bins and barrels as empty.
2014-09-07 15:07:57 -06:00
Eric Wald
1ce07c063d
Canonical way to find the stockpile by id.
2014-09-07 14:55:34 -06:00
Eric Wald
632b0b85bd
Speeding up the stockpile item count.
...
kr0pper reports two orders of magnitude speed improvement for check_pile() by using the map tile item cache.
2014-08-23 17:49:03 -06:00
Eric Wald
8495bddc2d
Removing an obsolete workaround
2014-08-23 17:46:35 -06:00
Eric Wald
f5d50adf0d
Removing the leaves check for stockpile acceptability.
...
That item type no longer exists in DF 0.40; such items will now always be considered properly stored by any stockpile they're on.
2014-08-15 21:41:23 -06:00
Eric Wald
2ebebaf62f
Deleting old stockflow records.
...
Once a stockpile has been removed or abandoned, its persistent configuration is obsolete.
2014-08-03 15:07:04 -06:00
Eric Wald
1b1475fb94
Warning about mismatched stockflow entries.
...
For the most part, mismatches should only happen if the reaction list has changed between world loads, which means either the raw files or the plugin files have been changed. For now, such entries are ignored, though in some cases it might be possible to recover a new order number by searching through the reaction list.
2014-08-03 15:04:28 -06:00
Eric Wald
2db1c9d722
Moving the global job_types cache into the two functions that use it.
...
It's mostly an artifact of a misunderstanding, anyway.
2014-08-03 14:57:20 -06:00
Eric Wald
1aafa206bc
Localizing a few Lua variables.
...
It seems like the globals could be localized, too, but I'm not quite sure what that would accomplish.
2014-08-02 18:08:13 -06:00
Eric Wald
ad4d545036
Ignoring the removed job types for DF 0.40+
...
The version check allows the plugin to work with DF 0.34, just in case.
2014-08-02 17:58:36 -06:00
Alexander Gavrilov
63254df6dd
Fix obvious issues in stockflow.
...
- Duplicate definition of a function now in uicommon.h
- Assertion failure due to missing core suspend claim.
- Incorrect way of accessing the civ entity.
- Accessing nil objects in the lua module if filter matches nothing.
- Lua module breaking on reload('plugins.stockflow').
2014-06-03 12:57:45 +04:00
Eric Wald
144eff4cf2
Clearing the center column.
...
The official order selection screen has an extra space to the left of the orders on the right-hand side.
2014-05-04 15:36:42 -06:00
Eric Wald
4fc850445d
Magic Number Reduction: Display placement constants
2014-05-04 15:28:53 -06:00
Eric Wald
767badbfb9
Magic number reduction: Clothing flags
...
Bone and shell are used to construct BARRED and SCALED armor/clothing items, for some reason.
2014-05-04 15:13:25 -06:00
Eric Wald
bdb22235af
Magic number reduction: Job types
2014-05-04 15:02:12 -06:00
Eric Wald
2d5f7e4022
Magic number reduction: Persistent storage
...
Replaces explicit indices into the ints field of Stockflow persistent storage objects with enumerated values.
2014-05-04 12:55:00 -06:00
Eric Wald
723cfcf28e
Attempting to repair an order object leak.
...
Now frees manager_order objects in the reaction_list when the plugin is disabled or the world unloaded. However, there may still be orders leaked elsewhere.
2014-05-04 12:35:10 -06:00
Eric Wald
b9ed7a5cc2
Stockflow plugin v1.0
2014-04-13 15:19:03 -06:00