Commit Graph

42 Commits

Author SHA1 Message Date
David Leal a8daa417c4
Add GitHub workflow and luacheck (#545)
Add badge to README
Fix luacheck warnings
Remove node_ownership globals (and support)
2020-06-12 20:39:00 +02:00
fgrosswig e90b28895c battery_box.lua: Make "srcstack" local (#525)
Fixes warning:
Assignment to undeclared global "srcstack" inside a function at battery_box.lua:454
2020-01-06 21:50:15 +01:00
Christopher Head 6e58a8e939 Make power meter work on LV battery box (#483) 2019-01-26 14:14:45 +01:00
Vitaliy d1b54a573c Use tin from MTG instead of `moreores` (#401)
Register tin dust unconditionally
2018-07-21 19:11:12 +02:00
HybridDog 41f175986d Show EU power values more readable (#424)
Add the EU_string helper function
In comparison to pretty_num it uses SI prefixes, adds "EU" (e.g. kEU) and rounds the number for readability
Add a constant_digit_count boolean setting
2018-07-16 17:26:39 +02:00
DS 1a75cd9254 add sulfur-lead crafting recipe(s) for battery (#353) 2017-06-05 10:56:51 -04:00
Vanessa Ezekowitz 557dc4db1b Battery boxes no longer connect to tubes from bottom
(since a power cable needs to go there)

items destined for "discharge" still come from the top, but items bound for the
"charge" slot must come in from the left, right or back
2017-04-14 05:16:14 -04:00
Thomas--S fc2f6d8976 Generalize check for cable below battery box 2017-04-13 22:36:52 +02:00
Vanessa Ezekowitz 06abe11dd0 check for cable plate under battery also 2017-04-13 16:25:42 -04:00
Vanessa Ezekowitz a34ea59105 LV batbox should show charge on all X/Z sides
(also, fixup some other texture defs for readability)
2017-04-12 20:29:22 -04:00
Vanessa Ezekowitz 33455328bd Make batteries only charge/discharge from the bottom
(they were already supposed to but would leech charge from sideways neighbors too)
2017-04-12 20:21:20 -04:00
Vanessa Ezekowitz 170d3e09c5 clean-up battery box images, make more consistent
added tube or cable entry overlays as appropriate.
deleted a couple of obsolete textures
2017-04-12 18:50:50 -04:00
Vanessa Ezekowitz fab2c492c4 pipeworks has button on/off, button label, and button "base" cached
used them wherever possible
2017-04-11 19:19:29 -04:00
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