Commit Graph

31 Commits

Author SHA1 Message Date
KaylebJay 00618d13b5
Drill and laser: call node-specific on_dig (#556)
This properly digs nodes that have a custom on_dig function specified. For normal nodes, the behaviour is kept the same.
2020-06-27 17:29:50 +02:00
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
Christopher Head 4f78a69ffc Fix trailing whitespace (#482)
Trim all trailing whitespace characters,
2019-01-26 14:15:40 +01:00
Vanessa Dannenberg 44cb8df048 use basic_materials mod where possible. 2018-11-11 09:54:20 +01:00
Vitaliy d1b54a573c Use tin from MTG instead of `moreores` (#401)
Register tin dust unconditionally
2018-07-21 19:11:12 +02:00
Vanessa Ezekowitz 60b5ca5594 Merge pull request #308 from thatgraemeguy/mk3_drill_fix
Make mk3 drill in 3x3 mode drill nodes from top to bottom
2017-03-06 14:22:25 -05:00
Vanessa Ezekowitz 05dfc14fdb Merge pull request #297 from t4im/fix/drill_pointed_thing
Remove reading of undefined global to fix drill drilling pointed_thing.above in combination with other badly coded mods.
2017-03-06 14:08:06 -05:00
Thomas 1765c31eaa Fixed set mode for mining drill mk2 and mk3 2017-03-05 09:01:50 +01:00
Thomas 11610cd9cb Fixed set mode for mining drill mk2 and mk3 2017-03-04 19:44:39 +01:00
ThatGraemeGuy 5dd6191175 Make mk3 drill in 3x3 mode drill nodes from top to bottom 2017-01-30 12:14:26 +02:00
Tim 7890ffe46b Fix drill drilling pointed_thing.above when some other mod declares a global variable above. 2016-10-09 17:46:44 +02:00
MT-Modder b8c9028681 Tools don't wear in creative mode v2
- Removed cans (will add again per request)
- Added creative check to global namespace (checking only once as
requested by VanessaE)
2015-03-11 18:08:16 -04:00
Vanessa Ezekowitz a413904ecd minetest.env:* --> minetest.* 2014-11-30 12:45:42 -05:00
Zefram 69487e530b Fix drill recipe
It was attempting to get the copper ingot from the wrong mod.
2014-07-14 15:19:02 +02:00
Zefram 5e4a87b925 Rework some recipes to use more varied ingredients 2014-07-09 09:17:44 +02:00
Zefram c394984ae5 Handle lag better in drill
If a mining drill is apparently applied to a non-pointable node, do
nothing rather than drilling as normal.  This situation usually arises
from lag, where the news of a node having been drilled didn't reach the
user quickly enough and the user thereby applied the drill twice to the
same node.  The second drill attempt would formerly consume charge and
then find that all the nodes it wanted to dig had already been removed.
2014-06-21 01:22:40 +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
Zefram e748af927a Fix drill charge usage
The drills weren't taking the variable usage cost into account (either
the per-type base cost or the per-mode multiplier) when deciding whether
they have sufficient charge to use.  This could cause them to overshoot in
charge usage, although they would then clamp to zero rather than record
negative charge.  Also, for the Mk1 drill where the cost was assessed
correctly, the drill would refuse to discharge to exactly zero charge.
2014-04-27 14:43:00 -04:00
Zefram 04c6f5bea3 Improve message about drill control
The message to "hold shift" makes an unwarranted assumption about the
user's keybindings.  Messages from the server should refer to a key's
game function, rather than its extragame identity.
2014-04-27 14:42:59 -04:00
Bryant Mairs 5dd09aeff4 Modify mining drill charges and power usage. Also fix bug with mk3 power usage. 2014-03-30 17:40:54 -04:00
ShadowNinja 8e2cb0121b Fix mining drill digging in the wrong direction 2013-12-23 16:54:21 -05:00
ShadowNinja bab8517b2a Add protection support to tools
This adds support to the chainsaw, mining drill, mining laser,
sonic screwdriver, and tree tap.
2013-12-17 14:22:10 -05:00
ShadowNinja 5cf765b2f1 Localize most variables 2013-12-17 13:56:37 -05:00
HybridDog f90915c408 Add Mk2 and Mk3 mining lasers 2013-10-30 15:09:31 -04: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
Jonathan Raphael Joachim Kolberg 91329b19a4 Fixed the crafting for mining_drill mk3 2013-07-28 12:45:53 +02:00
RealBadAngel 3bc6cad671 Remove lv, mv, and hv tiers from power tools.
Theyre already tiered with Mk1-3 (at least drill is, more in the future).
Tools can be considered as designed for different tiers of circuits thx to their power needs.
For example Mk3 will require ages to load in LV batbox.
Batboxes load tools timining: LV standard (1000EU), MV 4x faster (4000EU), HV 16x faster (16000EU)
Also since 1EU is the same in any circuit it is possible to move energy from one to another with portable devices like crystals.

Other changes:
- moved charge/discharge functions to battery_boxes_commons.lua
- added UI style backgrounds for all the batboxes
2013-07-17 19:14:01 +02:00
ShadowNinja 5d470cd753 Move files to subfolders 2013-07-11 12:31:00 -04:00