Commit Graph

43 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
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
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 78f16c3e8e label all ABMs for profiler 2017-03-31 19:15:25 -04: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
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
Zefram 0de4fec07c Fix second description of radioactive group value 2014-08-28 15:30:15 +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 4996d1824c Make nuclear reactor core harder to break
With breaking an active reactor core now causing instant meltdown, having
it breakable by hand is too hazardous.  Change it to match steel block,
which constitutes the main part of the rest of the reactor structure.
2014-08-04 12:54:47 -04:00
Zefram b0faa70873 Uranium enrichment via centrifuge
Replacing the extractor-based system, uranium to be used as reactor fuel
must now be enriched in stages using the centrifuge.  Uranium metal can
exist at 36 levels of fissile content, from 0.0% to 3.5% in steps of 0.1%.
One round of centrifuging splits two dust of a particular grade in to one
dust each of the two neighbouring grades.  Uranium of each grade can exist
as dust, ingot, and block, with all the regular metal processes to convert
between them.  Uranium from ore exists in lump form, and is 0.7% fissle.
The blocks are radioactive to a degree dependent on fissile content.
Thus the chemical refinement and processing of uranium now follows the
standard pattern for metals, and is orthogonal to isotopic enrichment.
Each form of uranium (dust, ingot, block) intentionally looks identical
regardless of fissile grade.

If technic_worldgen is used alone, it defines only one grade of uranium
(as before), but defines it in the regular metal pattern, with lump, ingot
produced by cooking lump, and block crafted from ingots.  It identifies
the metal only as "uranium".  The multiple grades of uranium are defined
by the technic mod, which identifies each grade as "N.N%-fissile
uranium".  The single grade that was registered by technic_worldgen
is redefined to be described specifically as "0.7%-fissile uranium".
For the redefinition to work, technic_worldgen must load before technic,
so technic now declares a dependency on technic_worldgen.

Each fuel rod is made from five 3.5%-fissile ingots, each of which in
turn requires one to start with five 0.7%-fissile dust, so each fuel rod
is now derived from 12.5 uranium lumps (or 25 if the lumps were first
cooked rather than being ground).  This replaces the 20 lumps required
by the former recipes.  After setting up and priming the centrifuge
cascade, enriching a full set of fuel for the reactor (six fuel rods)
takes 14700 centrifuge operations.  It's intended to be a practical
necessity to automate the centrifuge.  In the absence of EU upgrades
for the centrifuges, these operations consume 5.88e8 EU, about 0.97%
of the 6.048e10 EU that the fuel set will produce in the reactor.
The intent is that, in this respect as in others, operating a reactor
should carry a very high up-front cost, but ultimately be very profitable.
2014-07-28 13:18:51 +01:00
Zefram 84cf6504c5 Make outer layer of reactor structure optional
As the layers of reactor structure now have a practical purpose,
in attenuating the modelled radiation from the core, it is no longer
necessary to make so much of it mandatory in order to motivate players
to build it.
2014-07-25 17:27:55 +01:00
Zefram d59055dd2b Audible siren to warn of reactor meltdown
The siren sounds a "danger" tone continuously while it is active and
damaged, such that meltdown is imminent.  It sounds a one-off "clear"
tone if it has been sounding "danger" and the danger has passed, either
because the structure is repaired or because the reactor has become idle.
2014-07-25 15:38:40 +01:00
Zefram 67b90f3ad1 Grace period before reactor meltdown
The meltdown check now doesn't trigger meltdown immediately on reactor
structure being compromised.  Instead, there's a grace period of up to
100 s, during which the reactor can be repaired.  The check doesn't just
look at whether the structure is damaged at all: it looks at how damaged
it is, counting the number of faulty nodes.  The amount of damage is
integrated over time, and the grace period is actually 100 node-seconds,
so greater damage causes meltdown more quickly.  If the active core is
dug then it melts down immediately, preventing the tactic of digging
the core to avert meltdown.

Incidentally move the meltdown check into its own ABM, from the
technic_run callback, so that it applies even when the reactor is not
connected to a switching station.
2014-07-25 14:24:25 +01:00
Zefram ec008d7045 Material-dependent radiation shielding
Radiation is attenuated exponentially by passing through shielding
material.  Radiation resistance values are assigned to all bulk-material
nodes, and the radiation damage ABM traces the path of each radiation ray
to count up the shielding.  The relative radiation resistance values are
essentially real, but the effectiveness of all shielding is scaled down
by a factor of about 70 for game purposes.  Strength of the existing
radiation sources is increased by varying amounts to compensate for
shielding.  Uranium block and ore, both usable as shielding, are made
slightly radioactive, the latter only very slightly.
2014-07-25 03:42:21 +01:00
Zefram 17c5b66524 Inverse square law for radiation damage 2014-07-24 17:38:53 +01:00
Zefram e11f0f8817 Tweak corium light settings
Flowing corium appeared too dark.
2014-07-23 18:45:50 -04:00
Zefram c5e9480d99 Config setting to nerf corium
For use on servers that have a mainly creative purpose, the setting
enable_corium_griefing=false will prevent corium from flowing far or
unpredictably and from destroying nodes other than water.  All reactor
meltdowns will stay contained.
2014-07-23 17:24:52 -04:00
Zefram 366fc3bc65 Better reactor meltdown
Reactor `explosion' now replaces the reactor core with a corium source
node.  Corium is a new liquid, which flows a bit like lava, but has
the additional feature of destroying nodes to which it is adjacent.
It also randomly turns into a solid form, chernobylite, which makes an
attractive building block.  It thus gradually melts its way through the
reactor shielding layers; a meltdown gets worse over time if not cleaned
up promptly.

The mechanism for an active reactor core to damage nearby players is
generalised into a "radioactive" node group.  Corium and chernobylite
are radioactive, to varying degrees.  Players receive a varying amount of
damage from a radioactive node, depending on proximity.  Staying outside
a reactor cube is sufficient to be safe from the active core, but not
sufficient to be safe from a melted core.
2014-07-23 20:21:59 +01:00
Vanessa Ezekowitz 2d9e06c479 actually make the reactor core melt down when it should
(turns into a lava source, boils away the surrounding water)
2014-07-23 11:08:11 -04:00
Novatux 1c617f2c5e Make unconnected generators burn the fuel they still have. 2014-07-12 09:50:50 +02: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
Zefram 5e4a87b925 Rework some recipes to use more varied ingredients 2014-07-09 09:17:44 +02:00
Zefram 68ea0acbd0 Consistently use cable in electric machine recipes
All electric machine recipes now include cable of the appropriate tier
as the bottom-middle ingredient, immediately below the casing ingredient.
Many LV machines were using a copper ingot in that location.
2014-07-09 09:17:43 +02:00
Zefram e8a5a6652d Use machine casing in most machine recipes 2014-07-09 09:17:43 +02:00
Zefram 7c4b7046cc Rationalise machine terminology
All electrically-powered machines now consistently indicate their
tier (supply voltage) in their names.  As this implies that they are
electrically powered, the furnaces no longer have "Electric" in their
names.  The fuel-fired equivalents of electric machines, which exist
for alloy furnace and furnace, now say "Fuel-Fired" to distinguish them.
(The fuel-fired alloy furnace used to say "Coal", which was inaccurate
because it uses any fuel.  The fuel-fired furnace, from the default mod,
used to just be called "Furnace", which is ambiguous.)

Electric power generators now consistently indicate their tier and have
the word "Generator" in their names.  This makes their purpose much
clearer, and makes obvious craft guide searches produce useful results.
The fuel-fired generators, previously just (ambiguously) called
"Generator", are now explicitly "Fuel-Fired".
2014-06-21 01:21:52 +02:00
Vanessa Ezekowitz 30adc3b651 86400 ticks is one week, not 24h 2014-05-04 15:23:34 -04:00
ShadowNinja f3d8b47b20 Add support for minetest.swap_node 2013-12-10 20:14:39 -05:00
ShadowNinja 0809dd747e Externalize common functions and protect inventories 2013-11-27 12:28:56 -05:00
ShadowNinja be2f30a1a2 Add support for translations via intllib 2013-10-30 13:48:39 -04:00
ShadowNinja ee0765804c Partial rewrite 2013-09-17 16:37:56 -04:00