18 Commits

Author SHA1 Message Date
SX
3df86dd24b Add power tool API, refactor existing tools
Cleanup deprecated metadata access for tools

Fix mining drill translations

Remove deprecated power tool functions

Drop charge value completely

Ensure use_RE_charge always uses at least 1 point

Use precalculated wear factor, remove negative set_wear hack...

Use technic_max_charge instead of max_charge in item definition, accept both

Log errors instead of failing with invalid power tool stack

Metadata migration for prospector

Cleanup tool definition max_charge, get_RE_charge log warning for unknown stacks
2022-06-09 22:29:48 +03:00
SX
148a858103 Update common machine registration API 2021-11-15 11:45:19 +02:00
David Leal
814de6fdc9 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
David Leal
d5df30c3ff Replace deprecated functions with newer ones (#510)
Use mod.conf
2019-09-14 12:55:41 +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
ShadowNinja
1475ee6e40 Add trace_node_ray_fat and use it for mining lasers
This function includes more nodes, so laser tunnels
aren't always only one node wide.
2016-11-17 11:48:19 -05:00
ShadowNinja
e501c4622b Replace trace_node_ray algorithm
This is an algorithm that I designed myself.  It fixes an
issue with the old code where it would be more eager to
move in some directions rather than others.  This bug
resulted in, eg, a lead block on a radiation source's
+x side protecting you when you were directly overhead.
2016-11-17 11:48:19 -05: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
est31
4b179821d3 Get rid of technic.format 2015-02-13 21:13:17 +01:00
est31
18265de3b3 Fix bug for switching stations displaying same input and output 2015-01-31 10:42:55 +01:00
est31
d9bf9830b0 Better number formating
Is it 120000 or 1200000?
2015-01-31 01:29:16 -05:00
est31
c38da0945c Optimize quarry_run
Don't load the whole digging area when only a small piece is relevant.
Also, move the (time expensive) check whether the air above a block is free to the last position, which spares unneccessary checks when multiple quarries are placed together, or a quarry has to loop over air for another reason.
2015-01-24 19:40:02 +01:00
ShadowNinja
7d5edcf23e Remove swap_node compatability code 2014-07-21 00:40:53 -04:00
RealBadAngel
0e6b3ce86b Add snippet to check if function exists. 2014-07-03 17:40:06 +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
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
RealBadAngel
e23f87d20c Reworked power tools, new drills 2013-02-21 22:01:49 +01:00