Commit Graph

24 Commits

Author SHA1 Message Date
David Leal d5df30c3ff Replace deprecated functions with newer ones (#510)
Use mod.conf
2019-09-14 12:55:41 +02:00
Vanessa Dannenberg 44cb8df048 use basic_materials mod where possible. 2018-11-11 09:54:20 +01:00
HybridDog f013d2dd1f Mining laser fixes (#421)
Do not remove air and group:hot nodes instead of using a fixed list
Abort mining when encountering an unknown node
Add random to the smoke puff particle
Set mining laser tool range to 0
2018-07-21 19:10:32 +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 cfd4cb7871 Update mining laser particle API usage 2016-11-17 11:48:19 -05:00
ShadowNinja 2b0a283556 Adjust mining laser start offset 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
MT-Modder b8c9028681 Tools don't wear in creative mode v2
- Removed cans (will add again per request)
- Added creative check to global namespace (checking only once as
requested by VanessaE)
2015-03-11 18:08:16 -04:00
ShadowNinja 42d0081367 Replace mining laser ray tracer with a simpler iterable one 2014-09-24 20:32:36 -04:00
HybridDog 4d1f9753e3 update mining lasers 2014-09-16 15:23:46 -04:00
Zefram 5e4a87b925 Rework some recipes to use more varied ingredients 2014-07-09 09:17:44 +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 ecb53e9717 Mining lasers: don't dig the node the player is in. 2014-05-18 16:11:06 +02:00
asl97 45e1f05ffc Move checking of node that should be ignore above protection checking
firing a laser into a sky while in someone land without hitting anything but air shouldn't get anyone ban
2014-05-06 04:22:51 +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
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 db20250371 Fix laser discharging
Commit a6dae893d6 introduced per-version
charge cost for firing mining lasers, but applies this in addition to
the old fixed cost which it was meant to replace.  Fix by removing the
application of the fixed cost.

The same commit did successfully change the check for a laser having
sufficient charge to fire, so that's based purely on the variable cost.
As a consequence, firing a laser that has just enough charge to cover the
variable cost could cause its charge to go negative.  (For example, by
fully charging a Mk1 laser and then firing it until it empties, resulting
in a charge of -400.)  It turned out that set_RE_wear handled that badly,
producing an over-100% wear value that would wrap to a *low* wear value,
leading to the laser's wear bar looking as if it's fully charged.

To protect against silly wear values, make set_RE_wear clamp the wear
value to avoid wrapping.  Handle specially the case of a fully-discharged
tool, where there was desirable wrapping to zero.
2014-04-22 12:48:55 -04:00
ShadowNinja 7dc21cec40 Fix steel ingot item name in laser Mk1 crafting recipe 2014-04-02 23:03:51 -04:00
Bryant Mairs a6dae893d6 Modify the cost, range, and cost-per-shot of all 3 lasers. 2014-03-30 17:40:54 -04:00
Bryant Mairs 49052d6f4a Revised recipe for mk1 laser and added mk2 & mk3 laser recipes. 2014-03-30 17:40:54 -04:00
ShadowNinja bab8517b2a Add protection support to tools
This adds support to the chainsaw, mining drill, mining laser,
sonic screwdriver, and tree tap.
2013-12-17 14:22:10 -05:00
ShadowNinja 5cf765b2f1 Localize most variables 2013-12-17 13:56:37 -05:00
ShadowNinja 2d7c1d7252 Readd craft recipe for the Mk1 mining laser 2013-10-30 15:18:18 -04:00
HybridDog f90915c408 Add Mk2 and Mk3 mining lasers 2013-10-30 15:09:31 -04:00