Commit Graph

95 Commits

Author SHA1 Message Date
SmallJoker 410e341da5 HV Reactor: Improve formspec layout 2024-01-09 21:51:08 +01:00
SmallJoker 49d4105a2b Quarry: revert startpos+1 air-like node check
Quarries are also deployed in entirely solid underground, where
it is expected that the quarry produces a new shaft from scratch.
2023-10-01 10:47:59 +02:00
SmallJoker fda8a3d042 Quarry: Allow digging in different airlike environments
This offloads the digging check to a separate function for better code separation.
2023-09-23 13:25:11 +02:00
SmallJoker 0f6bdb1bde Correct (almost) all luacheck warnings
Also includes a few code opimizations:
- Combined mining drill functions
- Shorter alias registration (unused?)
- Add TODOs to address later
2022-06-06 21:04:13 +02:00
Cedric Haase 11e43ffe13
nuclear_reactor: Add error messages on start failure (#574) 2021-01-06 18:12:51 +01: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
Lejo b81d1d3f2d Check protection of the forcefield and Quarry (#468) 2019-04-13 20:45:49 +02:00
Thomas Rudin c14521cbd2 Quarry: Fix server freeze when max depth is reduced (#487)
Endless loop if max-depth is changed but some quarries are below that new limit
The old comparison (~=) did not account for that
2019-03-02 11:14:05 +01:00
Christopher Head 4f78a69ffc Fix trailing whitespace (#482)
Trim all trailing whitespace characters,
2019-01-26 14:15:40 +01:00
Thomas Rudin 701240bc3a Quarry: Check for valid facedir to fix server freeze #465 (#466)
Checks if facedir is valid. If the face points up or down the depth-check would run endless and freeze the server
2018-12-09 16:01:10 +01:00
Lejo aa82fa1d13 Forcefield: Remove deprecated update_map() call (#467) 2018-12-09 15:57:48 +01:00
Thomas Rudin 3d52b679b0 Quarry: Make use of fake digger from pipeworks (#453)
Fixes crash when digging empty protected chests (https://github.com/minetest/minetest_game/blob/backport-0.4/mods/default/nodes.lua#L1868)
2018-11-16 21:36:03 +01:00
Vanessa Dannenberg 44cb8df048 use basic_materials mod where possible. 2018-11-11 09:54:20 +01:00
thetaepsilon-gamedev c93bfefd9f machines/HV/quarry.lua: [modification] provide a basic digger object to can_dig callbacks to prevent nil object errors (#425)
Minetest game's doors mod was known to cause server errors when passed a nil digger in it's can_dig callback,
due to always attempting to invoke digger:get_player_name().
Fix this by providing a basic fake player which provides this method to can_dig callbacks.
(It should be noted that currently this fix causes doors to be undiggable by quarries.)
2018-05-19 22:06:00 +02:00
Vitaliy 689766f15a Remove unused values (#407) 2018-02-17 11:00:15 -08:00
DS e056800cea nuclear_reactor: do not set structure_accumulated_badness to less than 0 2017-09-07 07:43:20 +02:00
DS bf58c77316 digilinize nuclear_reactor (#341)
* start digilinizing

* add self 💥 destruction and co.

* add start button and command

* fix some things

* add possibility to disable nuclear reactor in formspec

* oops

* some style

* improve connectivity

* add protection
2017-06-05 11:02:05 -04:00
DS 51f9df2cf2 make some forcefield improvements (#344)
* mkae some forcefield improvements

* add emitter on_blast
2017-06-05 10:56:03 -04:00
Vanessa Ezekowitz 1d20af1bcb replace HV nuke reactor nodeboxes with comparable mesh model
model includes a flat extension on one "side" to fix #342

rotate the reactor with the screwdriver with shift-right-click before filling, to
line up the flat side with your cabling.  Note that the reactor doesn't actually
care which side the cable comes from.
2017-04-12 22:22:29 -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
Vanessa Ezekowitz 0e9caf069d add pipeworks tube overlay to top of quarry
(and get rid of obsolete inventorycube() image)
2017-04-11 08:09:53 -04:00
DS-Minetest ef8bb38bfd Make forcefield controlable with digilines. 2017-04-04 23:58:02 -03: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
Vanessa Ezekowitz 32b6ca9816 Merge pull request #298 from t4im/fix/quarry_loops
Mitigate server freezes due to item-transportation loops with quarries.
2017-03-06 14:11:40 -05:00
ShadowNinja 06dec20326 Add longer-term radiation damage
Radiation now slowly damages you for a while after exposure,
with the effect's time and intensity proportional to the
amount of radiation received.  The radioactivity of some
items is reduced to account for the increased damage.
2017-01-28 17:51:14 -05:00
ShadowNinja 1da213a5e4 Split radiation from nuclear reactor code 2017-01-28 17:51:14 -05:00
ShadowNinja 26de2f7c88 Tweak radioactivity
This simplifies radioactivity by removing the 1000 and 0.25 multipliers.
It also increases the effectiveness of protection (I think it was too low
before -- most of the advantage of adding protective layers was just from
the increased distance).
2017-01-28 17:51:14 -05:00
ShadowNinja 8ccb6d97ec Switch nuclear reactor to a lead shield
The reactor originaly used a stainless steel shield only
because lead wasn't yet available.  Stainless steel shields
are automatically converted to lead shields for legacy reasons.
2017-01-28 17:51:14 -05:00
Tim 428b1b8709 Mitigate several forms of quarry-placement leading to item-transportation loops, that eventually cause server freezes.
As a nice side effect, items are not gonna be unnecessarily received by the quarry anymore, if another tube is available for transport.
2016-10-09 17:46:06 +02:00
ShadowNinja 097d033585 Fix radiation damage 2016-03-20 22:38:30 -04: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
RealBadAngel c5127f4b1b Fix code style (useless or) 2015-11-28 08:31:27 +01:00
RealBadAngel 8ef83e8f7e Fix corium greifing disabling not working. 2015-11-14 11:29:16 +01:00
Vanessa Ezekowitz e7d06b33d1 fix missing radiation resistance for lead block 2015-09-12 01:34:57 -04:00
est31 d732c8dfbd Add listring functionality
Add shift-click functionality
2015-06-18 04:09:27 +02:00
Vanessa Ezekowitz b00e942824 don't run the damage ABM if damage is disabled on the server. 2015-03-15 18:21:28 -04:00
Tim 3252da05d1 use the timers, that are allready running instead of allocating a new one every tick 2015-01-27 19:02:33 +01:00
est31 f250e1632f Give quarries a better inventory icon
Current inventory icon is indistinguishable from carbon steel block. The side with the pick was hidden. This commit moves that part to the front.
2015-01-24 21:23:26 +01:00
est31 86dd5852aa Add cache to quarry
Adds a cache to the quarry in order to reduce load and send larger stacks through pipes instead of just single items. Coin tossing ensures the cache gets purged around every 200 seconds. The interval isn't fixed in order to prevent material spikes from multiple quarries which got loaded simultaneously. When the cache is full, or the quarry finished, it is purged too.
2015-01-24 21:22:49 +01: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
Vanessa Ezekowitz 8da4d057b0 update to latest mesecons API
requires mesecons commit 5be179bf110b44bdc06df6dbfde4e61487cf0635 or later.
2014-11-22 13:58:38 -05:00
ShadowNinja 30a37a490f Make the forcefield replace buildable_to nodes and make it faster (about x20) 2014-11-13 12:28:04 -05:00
Zefram 0de4fec07c Fix second description of radioactive group value 2014-08-28 15:30:15 +02:00
Zefram 45919b871a Make forcefield properly undiggable 2014-08-28 15:14:05 +02:00
Zefram 2912e2da78 Rebalance radiation shielding
Squeeze the range of material shielding values.  The strongest shielding
materials get weaker, and weaker shielding materials, especially low-end
ones such as dirt, get stronger.  The radioactivity of the active
reactor core is increased so that the standard shielding is (still)
only narrowly sufficient.
2014-08-20 20:09:41 +01:00
Zefram 7a9d2ffe5f Finer gradations of radioactivity
Make the "radioactive" group value be the safe distance in millimeters
rather than meters, to allow for intermediate values.  Use such
intermediate values for the uranium blocks, using the existing formula
with this finer quantisation.  All other radioactive nodes retain their
existing radioactivity exactly.
2014-08-20 19:14:03 +01:00
Zefram d0efa15b98 In quarry, skip past undiggable nodes
The quarry used to get stuck when it encountered an undiggable node.
Change it to skip past that node, digging whatever later stuff it can.
Necessarily, the current digging position becomes semantically-significant
state: it is no longer sufficient to search the quarry cuboid from the top
on each iteration.  The current digging height is reported in the quarry's
interaction form, and can be reset to the top using a button on the form.

Where there is a non-air node within the quarry directly above the
next node to dig, it blocks the quarry's access to that node, even if
everything involved is diggable.  Thus an undiggable node casts a shadow
of undug nodes below it.  Resolving undiggability of a node is a major
reason to use the restart button.
2014-08-18 15:14:15 +01:00
Zefram 849526cd76 Fix forcefield power demand when disabled 2014-08-15 12:25:47 +01:00