Commit Graph

380 Commits

Author SHA1 Message Date
Vanessa Ezekowitz bc0ac581aa prevent crash if get_recipe_index() is passed a nil or apparent garbage instead
of a table
2015-01-12 17:43:56 -05:00
Novatux 4ac36e9d27 Fix infinite energy with supply converter 2014-12-30 12:10:36 +01:00
ShadowNinja 5382a88aef Fix some global errors 2014-12-15 17:47:07 -05:00
Vanessa Ezekowitz a413904ecd minetest.env:* --> minetest.* 2014-11-30 12:45:42 -05: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 f205e5f404 Fix anonymous digging of non-empty machine
The quarry was causing crashes when it reached a machine that was
undiggable due to containing items.
2014-11-06 08:33:14 -05:00
ThatGraemeGuy 6d90ebb94e Make generators stop supplying EUs when there is a non-fuel item in the fuel slot 2014-09-16 15:21:14 -04: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 7d610b7c80 Tube capability for tool workshop
Tool workshop can now accept tools to repair via tube.  It has upgrade
slots.  Battery upgrade reduces its power consumption.  Tube upgrade
makes it eject fully-repaired (or unrepairable) items via tube.
2014-08-18 17:09:37 +01:00
Zefram 814646b542 Smoother link of processing cycles to ABM cycles
Make the generic processing machine code willing to complete more than
one processing cycle in one ABM cycle, and more generally to carry
over leftover processing effort after completing a processing cycle.
The src_time meta item now represents accumulated processing effort
(time multiplied by speed) in a scaled form (to retain fractions),
rather than just time in integral seconds.  This affects the MV furnace,
with speed 4 and most recipe times being 3 s, and will be essential for
faster furnaces.
2014-08-18 15:14:15 +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 d0001a20c9 Fix visible cable connection for irregular items
The switching station and supply converter only semantically connect to
cables in particular directions.  Make them visually connect only in
the matching directions.  This is done by special-casing in the cable
update logic.  If more irregular items arise in the future, or the
existing items start to need facedir logic, this should be generalised
into something like the connect_sides system for pneumatic tubes.
2014-08-17 13:43:39 +01:00
Novatux 35b10adb40 Fix items sending 2014-08-16 13:42:17 +02:00
Zefram 849526cd76 Fix forcefield power demand when disabled 2014-08-15 12:25:47 +01:00
Zefram 830de45936 Option for forcefield to be cubical 2014-08-15 12:25:46 +01:00
Zefram 6cc471e986 Simplify music player interface
Having a track selected now implies playing it, rather than
playing/stopped being a hidden state separate from track selection.
2014-08-15 12:25:46 +01:00
Zefram 1d0687556a Fix music player's sound management
If an operating music player was disconnected from the electrical network
or destroyed, it used to leave the music playing forever.  There was
also a glitch upon starting playing, as the music was started by the
form handler but then stopped when the run function realised it wasn't
receiving any power, because it hadn't demanded any yet.
2014-08-15 12:25:46 +01:00
Zefram 049129d9b8 Handle both pipeworks APIs
The new API function is now renamed to pipeworks.tube_inject_item(),
so use it under that name.  If it is not available, synthesise the new
API in terms of the old one.
2014-08-15 13:23:41 +02:00
Vanessa Ezekowitz 772c21cb04 don't put anchor in creative inv 2014-08-14 21:56:05 -04:00
Novatux baf7f61665 Compatibility with latest pipeworks 2014-08-14 21:29:56 +02:00
Zefram b001a67979 Administrative world anchor 2014-08-13 19:07:53 +01:00
Zefram 38e85e9775 Manual section on uranium enrichment 2014-08-13 02:45:44 +01:00
Kevin Zheng 7cfb3874a3 Evenly distribute charge across multiple batteries 2014-08-06 12:08:48 -05:00
ShadowNinja ab567e21ca Remove non-functional tetris machine 2014-08-04 13:43:57 -04: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 fc87eca4cd Fix technic_run declaration for hydro generator 2014-08-04 14:58:38 +01:00
Zefram 8275091347 Improve injector interface
Make the injector's mode button lag-resistant.  Display the mode on
the button, as is done with other machines' toggle buttons.  Describe
the modes using the same words that are now used to distinguish the
corresponding pipeworks objects.  Expand name to "self-contained
injector", now that the pipeworks objects are also called "injector".
Show injector item image along with the item name at the head of the form.
2014-08-01 18:25:20 +01:00
Zefram daa6135211 Update alloying craft guide to match machine
The alloy furnaces have been changed to lay out the input slots
horizontally.  The craft guide should match that, for mnemonic value.
2014-08-01 17:56:32 +01:00
Zefram beb480bec2 Redescribe alloying in craft guide
Change "Alloy cooking" to "Alloying", for consistency with the
descriptions of other recipe types.
2014-08-01 17:50:40 +01:00
Zefram 0003ec6a79 Make carbon steel alloying quicker
Taking the same time per alloying cycle as other alloys meant that carbon
steel was being produced painfully slowly, becuase it processes much less
material per cycle than other alloys.  This change halves the cycle time,
which leaves it still processing less material per second than other
alloying processes, but by a less drastic margin.
2014-08-01 17:40:35 +01:00
Zefram 2a7ee141eb Fix behaviour on decabling a forcefield emitter 2014-08-01 17:30:21 +01:00
Vanessa Ezekowitz 88bdac62e3 Merge remote-tracking branch 'zefram/zefram/centrifuge' 2014-07-30 15:36:27 -04:00
Zefram 12d0c6522b Correct breakability of sandstone CNC nodes
default:sandstone has cracky=3, but the CNC nodes had cracky=2.
2014-07-30 20:28:30 +01:00
Zefram 0dfac3f484 Make granite harder than regular stone
In real life granite is renowned for its hardness.
2014-07-30 20:25:35 +01:00
Zefram 60bc80692b Remove a noisy debugging print 2014-07-28 13:29:39 +01: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 dd65a68ce9 Add centrifuge
The centrifuge, currently only existing in an MV variety, is a machine
that separates a mixed substance into its constituents.  Currently the
main use is to reverse alloying of metals.  The alloy separation recipes
intentionally only operate on the dust form of metals, making this less
convenient than the original alloying.  It also only recovers metal
constituents, not the carbon that went into cast iron or carbon steel.

This change incidentally generalises the technic recipe and
machine infrastructure to handle recipes with multiple outputs.
As unified_inventory's craft guide can't yet handle that, these recipes
are not registered there.
2014-07-26 18:01:05 +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
Zefram cca72f43f1 Tweak mesecon control of forcefield
Drop support for negative mesecon control.  This requires users of
negative mesecon control to invert their mesecon signal externally.

Comment on rationale for the way toggle buttons in formspec are managed.
2014-07-23 16:49:08 +01:00
Zefram 6a4cb16392 Fix mesecon control of forcefield
The code formerly attempted to make the forcefield emitter controlled
both manually and by (inverted) mesecon signal, but the two interfered
with each other.  In particular, a newly-placed emitted would be
informed that it was getting no mesecon signal, and would therefore
enable itself.  Fix this by adding explicit modes for how the emitter
will respond to mesecon signals: ignore them, obey them positively,
or obey them negatively.

The manual control could have been incorporated into this mode setting
by having two "ignore mesecon" modes: always-enabled and always-disabled.
But it seems more useful to have a separate manual master switch, so that
the emitter can be manually disabled without losing the mesecon mode.
So it is now implemented that way.
2014-07-23 16:49:08 +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
Vanessa Ezekowitz 29c7ff5228 don't attempt to force-load blocks if they're already loaded. 2014-07-23 10:00:13 -04:00
ShadowNinja 14b30bfd0d Clean up constructor 2014-07-21 01:52:13 -04:00
ShadowNinja 22a4bcf80d Remove mods that aren't strictly required from depends.txt 2014-07-20 23:49:38 -04:00
goblin 6ec12b51cb also return buckets with generators
... and in the `smelt_item` function, even though it seems unused
2014-07-19 00:18:44 +01:00
goblin 9290e6f00d coal alloy furnace to return the buckets 2014-07-18 17:08:05 +01:00
Novatux efd5ff644c Fix supply converter again 2014-07-14 11:16:37 +02:00
Novatux 7065ba9155 Fix problem with supply converter producing energy 2014-07-13 14:15:10 +02:00
Novatux 1af6313c69 Fix crash with supply converter 2014-07-12 18:22:52 +02: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 5ec2d10dbc Vary cable insulation type with tier
LV cables are now paper-insulated, rather than uninsulated (which made
no sense).  MV cables are rubber-insulated as before.  HV cables are now
plastic-insulated (which they already visually appeared to be).  MV and
HV cables are still crafted by adding insulation onto lower-tier cable,
rather than by insulating raw copper; this matches the way machines are
upgraded between tiers rather than crafted afresh.
2014-07-09 09:17:44 +02:00
Zefram 4958a77e21 Tweak supply converter recipe
The casing is now in the center of the grid, as it is for all other
machines.
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 611c7760eb Fix fuel-fired alloy furnace
Commit ee0765804c broke the fuel-fired alloy
furnace, by removing the definition of its formspec that it requires to
set up the form upon construction.
2014-07-07 15:15:05 +02:00
Zefram e5cc3359e0 Fix craft guide for alloy cooking et al
A typo in commit d55ecc39f9 made recipes
for alloy cooking, compressing, and all other craft types sharing that
machine code, to be shown with three ingredient slots instead of the
correct one or two.
2014-07-07 15:15:05 +02:00
Zefram ad157d1b8f Fix brass alloying recipe
Commit d55ecc39f9 introduced a bogus
reference to "technic:copper_ingot".
2014-07-07 15:15:05 +02:00
Novatux d55ecc39f9 Change the recipe code to be able to handle recipes with more than one input, and use it for the alloy furnace.
Reorganize the init.lua files.
2014-07-03 15:57:39 +02:00
Carter Kolwey 95fcc435f1 Make MV extractor/compressor work 2014-07-03 08:18:41 +02:00
Novatux 5f2d09b8a9 Fix machine description 2014-07-03 08:17:20 +02:00
Zefram 2d6f34df15 Better forcefield control dialog
The size configuration is no longer cleared when exiting the dialog with
<esc>.  The enable/disable toggle button now indicates the current state.
The name of the toggle button now varies according to state, so that
pressing the button multiple times in one state (which can arise due
to lag making the user unsure about whether the first press registered)
only makes the state change that the user requested, rather than toggling
repeatedly.
2014-07-02 21:43:34 -04:00
Novatux c0a17396bf Add MV version of compressor too, remove infinite sand-producing compressor recipe. 2014-07-02 22:45:46 +02:00
Novatux aa8af0c871 Refactor a lot of code: make only one registration function for grinder, extractor and electric furnace (compressor will follow soon) 2014-07-02 22:24:38 +02:00
Novatux 88cbc6c2a7 Add MV extractor 2014-07-02 19:43:24 +02:00
Novatux 2a23587445 Add registration code for extractor 2014-07-02 19:43:13 +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
Zefram 23603e7f41 Full glooptest support
To support the glooptest mod (successor of gloopores), define the
gloopores lump->dust grinding recipes if either of the mods is available.
(Formerly only "gloopores" was supported.)  Define kalite dust item,
which was previously missing.  Make gloop ingots grindable to dust as the
non-gloop ingots already are; incidentally refactor this to automatically
make ingots grindable whenever the ingot can be made by cooking dust.
Add textures for all the gloop dusts.  Do the "Steel"->"Iron" renaming
for glooptest-defined tools and items.
2014-06-21 01:19:26 +02:00
ShadowNinja 799c1b3409 Fix wear_represents logic 2014-05-30 21:13:14 -04:00
ShadowNinja ebc122fb35 Remove unused parameter to is_empty() 2014-05-30 21:00:58 -04:00
ShadowNinja 7c2f2d9630 Fix crash when trying to repair unknown items 2014-05-30 20:59:59 -04:00
Zefram b74c2d38b9 Better quarry control dialog
The size configuration is no longer cleared when exiting the dialog with
<esc>.  The enable/disable toggle button now indicates the current state.
The name of the toggle button now varies according to state, so that
pressing the button multiple times in one state (which can arise due
to lag making the user unsure about whether the first press registered)
only makes the state change that the user requested, rather than toggling
repeatedly.
2014-05-24 00:26:24 +02:00
Zefram 4d20e4473e Stop quarry duplicating items
The quarry was digging via dig_node and also manually putting the node's
drops into the tube system.  This assumed that dig_node would attempt
to put the drops in the player's inventory, doing nothing if there is
no such inventory.  With the item_drop mod installed, dig_node would
instead turn the node into an item entity, so the quarry's strategy would
duplicate the item, making it appear both as an item entity in situ and
as an item in the tube.  Instead, the quarry must use remove_node when
it manually processes the drops, just like the pipeworks node breaker.
2014-05-24 00:25:19 +02:00
Zefram 623fcae4a4 Fix supply converter
Its registration as a battery (BA) node didn't work.  It needs to be
registered as both a producer (PR) and a receiver (RE).
2014-05-24 00:24:30 +02:00
Zefram 29429f636e Only make gloop dusts if gloopores is present 2014-05-24 00:23:48 +02:00
Zefram a5fc7ac41e Make stainless steel ingot grindable to dust
Consistent with all the other ingot/dust pairs.
2014-05-24 00:22:11 +02:00
Novatux 6a08071d86 Upgrades to battery boxes too, prevent frames from moving too often (one move every second max) 2014-05-23 19:58:41 +02:00
Zefram 68b7bcc28e split default iron/steel into three metals
Override the default mod's iron/steel substance, replacing it with three
metals: wrought iron (pure iron), carbon steel (iron alloyed with a little
carbon), and cast iron (iron alloyed with lots of carbon).  Wrought iron
is easiest to refine, then cast iron, and carbon steel the most difficult,
matching the historical progression.  Recipes that used default steel are
changed to use one of the three, the choice of alloy for each application
being both somewhat realistic and also matching up with game progression.

The default:steel{_ingot,block} items are identified specifically with
wrought iron.  This makes the default refining recipes work appropriately.
Iron-using recipes defined outside technic are thus necessarily
reinterpreted to use wrought iron, which is mostly appropriate.
Some objects are renamed accordingly.

Rather than use the default steel textures for wrought iron, with technic
providing textures for the other two, technic now provides textures for
all three metals.  This avoids problems that would occur with texture
packs that provide default_steel_{ingot,block} textures that are not
intended to support this wrought-iron/carbon-steel/cast-iron distinction.
A texture pack can provide a distinct set of three textures specifically
for the situation where this distinction is required.

Incidentally make grinding and alloy cooking recipes work correctly when
ingredients are specified by alias.
2014-05-22 20:57:50 +02:00
Novatux b204090acc Fix errors when trying to charge buckets of water. 2014-05-18 14:47:05 +02:00
RealBadAngel c7a4c05860 Fix invalid check for UI. 2014-05-06 22:11:04 +02:00
Vanessa Ezekowitz 30adc3b651 86400 ticks is one week, not 24h 2014-05-04 15:23:34 -04: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 0294fc8f3a various backward-compatibility aliases 2014-04-30 00:26:45 +01:00
Zefram 9b64ffea8c Register craft types with unified_inventory 2014-04-30 00:22:48 +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 ca69473664 fix tube properties for injector
By relying on another no-longer-extant definition, the injector didn't
visually connect to the tube below it.
2014-04-30 00:21:36 +01:00
Zefram 1a94fdc601 fix groups for injector
The injector was in no groups, and therefore not breakable by ordinary
means.  This was because the code referred to a defined variable that
went away in the course of a rewrite of the chests code.
2014-04-30 00:21:13 +01:00
Zefram f504178421 Fix drops for active machines
Active machine nodes need to drop their inactive counterpart.  Some were
missing that declaration.
2014-04-27 14:43:00 -04:00
RealBadAngel 18cae761af The code to connect an electrical machine to cables would only consider
the first-seen tier for which the machine was registered.  So the
switching station, which is uniquely registered for all tiers, would
only visually connect to LV cable when placed, not to MV or HV cable.
(It would function nevertheless, and cable would connect to the switching
station if placed later.)  Change to consider all tiers.  Incidentally
avoid a gratuitous iteration through all registered machines.
2014-04-27 15:57:11 +02:00
Xanthin 39c41a06f4 Add german translations for all mods 2014-04-22 16:30:27 -04:00
Boba 44dbc75b61 Fix typo in frame and template motor recipes 2014-04-14 20:54:28 -04:00
Boba 061d1a3ab4 Fix crash when using the template tool 2014-04-14 20:52:57 -04:00
Bryant Mairs 9ab5846d56 Make the charge stored by every battery box consistent with the input ingredients. 2014-03-30 17:40:54 -04:00
Bryant Mairs 1b7fa38082 Reduce the charge stored by each type of crystal. 2014-03-30 17:40:54 -04:00
Tim 252156d653 Fix CNC steel block groups 2014-03-30 14:13:11 -04:00
Tim 8684fa1733 Fix constructor description 2014-03-30 14:13:04 -04:00
Tim 8a88812b8b Make marble, granite, bronze and stainless steel blocks CNC-millable 2014-03-30 14:12:34 -04:00
Tim 0201135231 Remove duplicate CNC registration of default:tree 2014-03-30 14:09:24 -04:00
Tim 8bdbe1e451 Fix steel block node name in the CNC 2014-03-30 14:08:56 -04:00
ShadowNinja 821fba9b02 Fix CNC power drain 2014-03-26 22:34:17 -04:00
Novatux b28001e36f Infinite stacks fix 2014-01-18 13:29:06 +01:00
Novatux e1c995f654 Actually call the mvps callback 2014-01-18 13:29:06 +01:00
Novatux 52e7014b7c Mesecons mvps support, better frames 2014-01-18 13:29:06 +01:00
Novatux 8c1be3b48e A few fixes 2014-01-18 13:29:06 +01:00
Novatux 8fba5e1140 Make those frames able to move 2014-01-18 13:29:06 +01:00
Novatux 68f7d34e1b First tests 2014-01-18 13:29:06 +01:00
Carter Kolwey ebc114df71 Fixed music player 2014-01-11 12:30:10 -05:00
Vanessa Ezekowitz 749df3b581 Fix all recipes that use pipeworks pneumatic tubes to follow latest changes
in pipeworks node namining conventions.
2014-01-01 23:27:51 -05:00
ShadowNinja 93b0d25cbc Use get_string for owner string 2013-12-29 10:59:04 -05:00
ShadowNinja 2df417feb7 Localize generator fuel 2013-12-23 16:38:05 -05:00
Vanessa Ezekowitz 018b248d51 fix crash in constructor 2013-12-21 02:26:19 -05:00
Vanessa Ezekowitz f3bba0aaac move inject_items to top of file (so that it's above the abm that calls it) 2013-12-18 20:41:08 -05:00
ShadowNinja d8437faebc More global localiztions 2013-12-17 19:56:01 -05:00
ShadowNinja c5d287f5f5 Make tube sending faster 2013-12-17 14:37:02 -05:00
ShadowNinja 5cf765b2f1 Localize most variables 2013-12-17 13:56:37 -05:00
ShadowNinja 0ea1bd1fa2 Fix music player
Sounds not included
2013-12-16 18:57:56 -05:00
Vanessa Ezekowitz ae235ee8f3 more pipeworks API-change updates 2013-12-15 15:49:28 -05:00
Vanessa Ezekowitz 8ef3f20c3c adapt to changes in Pipeworks API 2013-12-15 15:03:41 -05:00
ShadowNinja f3d8b47b20 Add support for minetest.swap_node 2013-12-10 20:14:39 -05:00
ShadowNinja 47b0b59884 Generators don't send items 2013-12-03 15:30:09 -05:00
SmallJoker 7a3cd49597 Add pipeworks support to generators 2013-12-03 11:22:48 -05:00
Bryant Mairs 37acdc77f7 Move production percentage for geothermal generators to infotext 2013-12-03 10:57:16 -05:00
ShadowNinja a35db449b3 Fix generators 2013-11-27 16:56:09 -05:00
ShadowNinja 354ee6f313 Add missing translations 2013-11-27 16:18:52 -05:00
ShadowNinja 0809dd747e Externalize common functions and protect inventories 2013-11-27 12:28:56 -05:00
ShadowNinja 76a8acbe5b Use upvalues in registrations 2013-11-26 16:53:52 -05:00
ShadowNinja 08db41ee4d Don't allow tubing items into LV machines 2013-11-26 16:33:27 -05:00
ShadowNinja bde49aca61 Fix crash when quarrying a protected area 2013-11-18 15:27:17 -05:00
ShadowNinja 2d8ff45d9a Fix crash with invalid radius 2013-11-15 00:54:17 -05:00
Novatux 6d31965b36 Fix bug with translations. 2013-11-11 15:37:30 +01:00
ShadowNinja be2f30a1a2 Add support for translations via intllib 2013-10-30 13:48:39 -04:00
ShadowNinja 9aee83f921 Fix generator nodemane 2013-10-28 14:37:40 -04:00
ShadowNinja cee65bdd2a Fix crash when entering a non-number for forcefield range 2013-10-27 14:39:45 -04:00
pagliaccio 704925aa7b Add MV and HV generators and make coal dust a fuel 2013-10-27 14:39:44 -04:00
Novatux 76879424ae Add crafts for frames and templates. 2013-10-26 09:13:55 +02:00
Novatux 808d382867 Better tempaltes 2013-10-19 11:28:16 +02: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
Novatux 66e4b5ede4 Remove remaining frames.addVect 2013-10-17 18:33:21 +02:00
Novatux a73d568e58 Bugfix 2013-10-13 16:24:17 +02:00
Novatux 48d571bd90 Add drop to templates 2013-10-13 11:09:08 +02:00
Novatux 3cf0d331f0 Make template motors have an owner and check area protection 2013-10-13 10:34:58 +02:00
Novatux c06cdf603e Add templates 2013-10-13 10:30:14 +02:00
ShadowNinja 363f033278 Disable wind mill by default because it isn't ready yet 2013-10-06 12:42:41 -04:00
Novatux a579ee829a Make frame motors have an owner and check area protection 2013-10-06 14:20:13 +02:00
Novatux 468d79db61 Bugfixes with energy branch.
Conflicts:
	technic/machines/switching_station.lua
2013-10-04 10:50:51 -04:00
Novatux 12d29c2139 Forgot to update on cable add/destroy+use minetest.hash_node_position because else it did not work. 2013-10-04 10:49:06 -04:00
Novatux f4ac2b8c1e Make power distribution more efficient.
Conflicts:
	technic/machines/register/cables.lua
2013-10-04 10:48:39 -04:00
ShadowNinja bd3cc74d05 Don't consume items or drain power when there isn't room for the results 2013-09-24 17:09:20 -04:00
ShadowNinja ee0765804c Partial rewrite 2013-09-17 16:37:56 -04:00
Novatux 48ea6fb99d Use only 1 node for frame motors. 2013-08-31 15:04:08 +02:00
GloopMaster f8132c13a2 Update grinder_gloopores.lua 2013-08-24 18:20:11 -04:00
kol0 57dc8904a0 correction amount of energy produced
I correct amount of energy produced with descripton value.
2013-07-30 11:30:12 +02:00
Jonathan Raphael Joachim Kolberg 50b8aed01c Finaly fixed the statements
The idle condition for mv mashines is changed to what it should be
because sending items into the tube is done in idle, so we only care
if there is something left in src
2013-07-26 19:29:16 +02:00
RealBadAngel d8ec3f8bbe Deployer and node breaker are now moved to pipeworks. 2013-07-25 07:59:00 +02:00
hdastwb 2d7f750d9a fixed a condition with mv machines so as to not power down machines with stuff to grind/smelt but nothing to tube out 2013-07-23 21:43:36 -04:00
hdastwb 2e4d983be7 added connect_sides to appropriate tube tables 2013-07-21 17:15:03 -04:00
Jonathan Raphael Joachim Kolberg d37cf7d536 added a mv grinder 2013-07-19 10:58:38 +02:00
RealBadAngel acc7f71302 Commons for battery boxes 2013-07-17 19:14:40 +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
RealBadAngel 922d2554a9 LV batbox background 2013-07-15 21:39:31 +02:00
RealBadAngel 410afaa583 Add compressor 2013-07-15 20:21:49 +02:00
ShadowNinja 57cd394773 Gigh -> High 2013-07-12 20:32:38 -04:00
ShadowNinja 1f4c621ffc Fix code style of the high voltage battery box 2013-07-12 20:28:07 -04:00
ShadowNinja 187015e073 Fix coding style of nuclear reactor 2013-07-12 19:23:29 -04:00
ShadowNinja 4f35f407ce Add LuaVoxelManip support to forcefield 2013-07-12 15:41:59 -04:00
ShadowNinja 30361afb34 Fix forcefield 2013-07-12 15:07:02 -04:00
kpoppel fa846989ac Remove file that doesn't seem to have any use.
Fix typing error in register... file
Fix two issues with nuclear reactor and set the burn time to 24h.
2013-07-11 23:01:13 +02:00
ShadowNinja 5d470cd753 Move files to subfolders 2013-07-11 12:31:00 -04:00