70 Commits

Author SHA1 Message Date
SX
3981ad18e7 #77 Revert early exit on overload, update overload 2020-09-20 02:01:52 +03:00
SX
ad362a6ecc Remove Power monitor from network #76 not actual machine anymore 2020-09-19 22:34:20 +03:00
SX
47cda2d81e Make node_timeout local 2020-09-05 15:14:54 +03:00
SX
b63bfe683e Reduce meta usage, clean cable cache on overload #76 #77 2020-09-05 15:09:32 +03:00
SX
22599b7dd5 Reduce meta, fix network id #76 #77 2020-09-05 11:26:33 +03:00
SX
66f9705ac2 Remove print, add comment 2020-08-22 21:27:53 +02:00
SX
3d12f8966c Machines with multiple networks causes switching overload 2020-08-22 21:27:53 +02:00
Alexander Ried
5f9cfc7caf fix: touch disabled switching stations
Otherwise the "switching station reenable abm" (see file
switchting_station.lua) will reenable the disabled switching station at
its next run.
2020-07-21 19:48:53 +02:00
Alexander Ried
0645e4c1f6 Add digiline interface to power monitor
The power monitor can now be queried for information about the network. They
are retrieved from the associated switching station.

Also export information about the attached batteries.
2020-06-30 15:06:05 +02:00
BuckarooBanzay
9d80ac1e0f fix luacheck warnings 2020-06-18 11:42:23 +02:00
BuckarooBanzay
53a9ea18b0 provide "lag" info in switching station digiline response 2020-06-18 10:59:40 +02:00
SX
1536df8589 Machine conduct digilines downwards (#49)
* Custom digiline rules for machines

* Add custom digiline receptor and effector rules for machines

* technic.digiline.rules must be always available, even if digilines is disabled

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
2020-05-23 21:24:35 +02:00
BuckarooBanzay
7306aa1144 update readme/settings 2020-01-16 15:40:08 +01:00
Thomas Rudin
289b8020b9 polyfuse overload 2020-01-05 16:45:10 +01:00
Thomas Rudin
7234b73f46 move out switching station run function 2020-01-03 13:43:36 +01:00
NatureFreshMilk
a81aa242d3 lag calculation and 250 ms switching station limit 2019-11-05 14:01:45 +01:00
NatureFreshMilk
9a48248316 Merge branch 'master' into pandorabox 2019-08-27 07:35:00 +02:00
coil
d119a67482 Refactor switching station ABMs (#508)
When the function is defined inside the ABM, a new closure is allocated every time the ABM runs. 
Since the action function is already way too long, it's better for readability and performance to split it out.
2019-08-26 19:45:11 +02:00
Thomas Rudin
6059ec8aeb Revert "Revert "Revert "remove monitoring code and deps"""
This reverts commit 2a07854bd337e918ea9e60d08b42b7dbe09b2433.
2019-04-29 21:26:20 +02:00
Thomas Rudin
b89eee3b68 sw fix 2019-04-29 20:57:00 +02:00
Thomas Rudin
9ca1f1070a Revert "Revert "remove monitoring code and deps""
This reverts commit 48d251a33821a2b6f9f826e6d8fe7ca601e3e903.
2019-04-29 20:49:22 +02:00
Thomas Rudin
ddf78dbc57 perf stuff 2019-04-10 09:42:02 +02:00
NatureFreshMilk
cea42b18a0 add technic.switch_max_range setting 2019-04-01 09:07:06 +02:00
NatureFreshMilk
0af2749ac4 tune abm intervals to introduce jitter 2019-03-21 13:10:10 +01:00
Thomas Rudin
37dcb2a101 Revert "remove monitoring code and deps"
This reverts commit 7b16d4fe870016b5e415585f1a57d44ae882745a.
2019-03-11 21:42:40 +01:00
NatureFreshMilk
baefac24e2 remove monitoring code and deps 2019-03-11 08:42:51 +01:00
NatureFreshMilk
59b297fa23 enable monitoring on technic switching station 2019-03-04 08:51:32 +01:00
Thomas Rudin
c562064a62 conservative chances on avm's 2019-03-03 20:19:17 +01:00
NatureFreshMilk
72470365d1 remove forceload code 2019-03-01 13:23:49 +01:00
Thomas Rudin
ae584dbeb6 timeout and overload reset change 2018-12-09 19:16:50 +01:00
Thomas Rudin
e7330172cc proper overload 2018-11-26 17:53:50 +01:00
Thomas Rudin
5bc1519766 overload detection 2018-11-26 17:31:55 +01:00
Thomas Rudin
82c6301607 log timing 2018-10-24 11:19:38 +02:00
Thomas Rudin
80e9e44099 timeing info on switching station 2018-10-16 13:27:21 +02:00
Thomas Rudin
ebf4ad0fd7 custom 2018-10-15 20:21:30 +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
number Zero
86fb981b44 Fix O(n^2) network traversal 2018-02-13 18:25:44 +01:00
Ekdohibs
215de5487b Fix redundant_warn 2018-01-13 10:30:22 +01:00
Vanessa Ezekowitz
a84b5f3b28 print warning to console if redundant switching station is found
and where it is

only prints the warning once per redundant station, per minetest
session. if there are multiple redundant stations on a network, digging
one should cause the warning to appear for the next one technic finds,
if it doesn't show them all right away.
2017-07-03 18:05:52 -04:00
Vanessa Ezekowitz
9d5bd90b57 add chat command to allow disabling of switching station ABM
(for situations where a user creates a laggy machine on a public server, use
this to suspend power distribution until the machine is found and disabled)

`/powerctrl off` to disable
`/powerctrl on` to reenable

(actually, anything but "on" disables it)
2017-07-03 17:35:19 -04:00
you
987cc5a6a4 Add api documentation (#361) 2017-06-05 10:51:59 -04:00
Vanessa Ezekowitz
54004f4951 redo top/bottom textures for supply converter
delete back/bottom texture for power monitor
use "machine bottom" for bottom of force field generator
add cable connection overlay, use it on various machines' bottoms/sides, as appropriate
2017-04-11 08:48:16 -04:00
DS-Minetest
338f3b6a99 Make battery box send information via digilines. 2017-04-01 16:47:34 -03:00
Vanessa Ezekowitz
78f16c3e8e label all ABMs for profiler 2017-03-31 19:15:25 -04:00
DS-Minetest
6abd857b3f Add digiline support to switching station.
Makes the switching station able to send supply and demand
via digilines.
2017-03-28 09:30:59 -03:00
Maciej 'agaran' Pijanka
10307f23a7 Do not run converters twice. 2017-03-15 19:00:22 -04:00
Carter Kolwey
088eea1e3b Fixes for network calculation issues
This fixes several issues:
* More than one switching station could become active on large networks
 - Switching stations now semi-permanently become disabled if another is present
 - Power monitors have been added to replace the function of "slave" switching stations, to discourage overuse of switching stations
* Networks did not reliably "split" when cutting a cable
 - I "may" have caused this issue, but I believe it is solved by this
* Machines did not run without a player near the switching station
 - Active switching stations now forceload themselves, and free the forceloaded block if disabled, dug, or disconnected
 - Machines are only loaded to run them (as before), so only one mapblock (or two if the bottom edge of the switching station is a mapblock boundary) is loaded
 - Cables are still only loaded during a full network recalculation
2017-03-10 01:35:58 -06:00
Carter Kolwey
d3f40e0fd0 Only update the associated network(s) when placing/digging nodes 2017-03-05 04:09:23 -06: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