Commit Graph

29 Commits

Author SHA1 Message Date
Vanessa Ezekowitz
a3a959ab5e add pipeworks tube overlays to MV, HV battery boxes 2017-04-11 07:48:46 -04:00
Vanessa Ezekowitz
3f8478086d fix crash in battery mod (missing meta check) 2017-04-11 07:45:31 -04:00
Vanessa Ezekowitz
7244f86ee5 allow per-battery charge/discharge stack splitting
(default off for both)
2017-04-11 04:41:11 -04:00
Vanessa Ezekowitz
af39221df9 only reject part of itemtack from chest/machine/etc., if possible
(e.g. if there's room for 50 of some item, and you send a stack of 99,
50 are added to the chest and a stack of 49 is rejected and sent
on to the next destination)
2017-04-09 20:35:11 -04:00
DS-Minetest
338f3b6a99 Make battery box send information via digilines. 2017-04-01 16:47:34 -03:00
ShadowNinja
85a984982c Cleanup
Changes:
  * Make rayIter a global utility, and use it for radiation too.
  * prettynum -> pretty_num and cleanup.
  * Remove resolve_name/function_exists (unused).
  * Cleanup nuclear reactor code.
2016-03-20 00:02:33 -04:00
ShadowNinja
83c6494166 Use connected nodeboxes for cables 2016-03-20 00:02:33 -04:00
est31
d732c8dfbd Add listring functionality
Add shift-click functionality
2015-06-18 04:09:27 +02:00
Jay Arndt
0113975160 Fix detection of if the machine should call pipeworks.after_place
The tube variable in these contexts always evaluates to a true value.
data.tube is the variable that indicates if pipeworks needs to be notified.
2015-03-07 21:44:42 -05:00
Jay Arndt
c8cbd261ee Drop upgrade items in the after_dig_node handler instead of can_dig
This fixes an item duplication bug triggered by using a screwdriver on an upgraded machine
2015-03-07 21:44:42 -05:00
est31
4b179821d3 Get rid of technic.format 2015-02-13 21:13:17 +01:00
Vanessa Ezekowitz
5ac93cccc9 simplify pipeworks tube detect
deMorgan's axiom, which I suck at using :P
2015-02-07 12:42:18 -05:00
Vanessa Ezekowitz
bccefd6997 fix other machines, battery boxes, etc to work with tube routing. 2015-02-07 03:47:53 -05:00
est31
d9bf9830b0 Better number formating
Is it 120000 or 1200000?
2015-01-31 01:29:16 -05:00
ShadowNinja
5382a88aef Fix some global errors 2014-12-15 17:47:07 -05:00
Novatux
563a4c071d Make switching station run all machines it is connected to, including those in unloaded blocks. 2014-07-11 11:00:46 +02:00
Novatux
6a08071d86 Upgrades to battery boxes too, prevent frames from moving too often (one move every second max) 2014-05-23 19:58:41 +02:00
Novatux
b204090acc Fix errors when trying to charge buckets of water. 2014-05-18 14:47:05 +02:00
Zefram
00d7c9bdea Refill behaviour for power tools and cans
Supply the on_refill hook for power tools and cans, to perform appropriate
charging.  This is to be used by unified_inventory's creative-mode
refill slot.
2014-04-30 10:49:54 +01:00
Zefram
99fd5dfee5 Genericise handling of multiple meanings of wear
The tool workshop is meant to repair mechanical damage to tools, so
is at risk of `repairing' tools that use the wear bar to represent
something other than mechanical wear.  It had special-case recognition
of the water and lava cans, which use the wear bar to represent how much
content they're carrying, and wouldn't repair them.  But it didn't avoid
`repairing' RE chargeable items, which use the wear bar to represent
how much energy they have stored.  It would modify the wear bar without
actually affecting the charge, so the wear bar would jump back to the
correct place when the next charging or discharging event occurred.

To genericise, introduce a new item property, "wear_represents", which
indicates how the wear bar is used for this item.  Currently defined
values are "mechanical_wear" (straightforward damage to tools that
start out perfect), "technic_RE_charge" (electrical energy, canonically
represented in the meta rather than the wear bar), and "content_level"
(how full a container is).  For backcompat, nil is interpreted as
"mechanical_wear".  The tool workshop will only repair "mechanical_wear"
tools.  As a bonus, set_RE_wear() will only set the wear bar for
"technic_RE_charge" items: this means developers will notice if they
forget to declare wear_represents, but also means that with no further
changes it's possible to have an RE chargeable item that uses its wear
bar to represent something else.
2014-04-30 00:21:55 +01:00
Bryant Mairs
1b7fa38082 Reduce the charge stored by each type of crystal. 2014-03-30 17:40:54 -04:00
ShadowNinja
5cf765b2f1 Localize most variables 2013-12-17 13:56:37 -05:00
ShadowNinja
f3d8b47b20 Add support for minetest.swap_node 2013-12-10 20:14:39 -05:00
ShadowNinja
354ee6f313 Add missing translations 2013-11-27 16:18:52 -05:00
ShadowNinja
0809dd747e Externalize common functions and protect inventories 2013-11-27 12:28:56 -05:00
ShadowNinja
76a8acbe5b Use upvalues in registrations 2013-11-26 16:53:52 -05:00
ShadowNinja
be2f30a1a2 Add support for translations via intllib 2013-10-30 13:48:39 -04:00
ShadowNinja
eac4844175 Fix negative tool discharging and a few other tweaks...
Disable the flashlight by default.
Use itemstack:{get,set}_{metadata,name,wear,...} rather than {to,from}_table.
Improve the style of part of the code of mischelaneous tools
2013-10-18 22:28:32 -04:00
ShadowNinja
ee0765804c Partial rewrite 2013-09-17 16:37:56 -04:00