48 Commits

Author SHA1 Message Date
Aaron Suen
4dd97d3b2c Tweak cheat torch command decription 2020-03-22 08:15:50 -04:00
Aaron Suen
63ee28c8e0 Base torch life variance on base life. 2020-03-15 09:11:51 -04:00
Aaron Suen
bd9edb15c4 Buff base torch lifetime to 2 minutes. 2020-03-15 09:06:08 -04:00
Aaron Suen
0f474b90e4 Remove debug code. 2020-03-15 09:03:44 -04:00
Aaron Suen
8a5835f21b Add visible stages of lit torch decay. 2020-03-15 09:02:58 -04:00
Aaron Suen
48e7bab366 More torch smoothing.
- Smoother entity light casting.
- Fix flicker on torch pickup.
2020-03-15 08:34:45 -04:00
Aaron Suen
0a26b5bdec Preserve all torch metadata, not just expire. 2020-03-15 08:24:48 -04:00
Aaron Suen
82bc47642e Smoother torch light operation.
Also reduce client packets by tracking dynalight node
ttl in-memory instead of meta.  Lights might flicker out
a bit on area first loading, but some startup judder is
expected on any unloaded area anyway.

Add a "cheat" code for torch testing, and possibly for
other dev uses.
2020-03-15 08:20:56 -04:00
Aaron Suen
3200149cc4 Buff torch and scaling light sources.
- Better compat with low gamma play.
- Torch now emits some light when in inventory, even
  if not actively wielded.
- Dynamic light API for mod use.
2020-02-22 21:57:08 -05:00
Aaron Suen
e3599fb4cf Belt-and-suspenders for wield-light.
It seems there are a couple of scenarios in which MT
doesn't correctly run wield light timers to remove the
wield light; use an ABM to catch anything left over.
2020-01-31 07:25:30 -05:00
Aaron Suen
4d47ab2e75 NC API dependency simplification.
Treat all API mods as a "layer", and use the new
nc_api_all registration to indicate that a mod depends
on the NC API (which ALL NC mods assume they do).
This means that each non-API mod does not need to
worry about which API mods it really needs and which
it does not, nor will they need to be updated for any
internal API restructures.

This is a game, not a modpack, so all mods will be
loaded anyway, and we only care about order.  That
means that we don't really need to worry about
having excess dependencies because any mod we
don't actually need will be needed by something that's
loaded anyway.  If somebody wants to reuse a
component elsewhere, they're likely to need to do
some work to untangle it anyway, because of the
amount that NodeCore mechanics interact and
interdepend.
2020-01-05 12:59:12 -05:00
Aaron Suen
dcfc80b367 Remove explicit names in mod.confs. 2020-01-05 12:38:45 -05:00
Aaron Suen
89020e8340 Major rebuild of item_entity.
This created a ton of dependency inversions, which
necessitated moving a number of API functions up into
higher layers, and restructuring dependency lists for
a number of mods.

BOLO: non-deterministic load errors due to missed
dependencies.
2020-01-05 11:42:22 -05:00
Aaron Suen
6013583e4c Item dispersal tweaks/cleanup. 2019-11-28 11:40:28 -05:00
Aaron Suen
9afeebe215 Standardize item dispersal. 2019-11-28 11:29:21 -05:00
Aaron Suen
9beebc3498 Conservation of mass for burning stacks. 2019-11-28 11:18:03 -05:00
Aaron Suen
061d100723 Re-increase torch water quenching radius a little. 2019-11-18 22:55:36 -05:00
Aaron Suen
b9fb3660d0 Run AISMs on item_entities too.
Even though they're ephemeral and supposedly short-lived,
throwing a torch into water should probably extinguish it
before it lands at the bottom.
2019-11-18 22:35:10 -05:00
Aaron Suen
8c45be8abb Make handheld torches more forgiving.
You can now wade in shallow water or stand closer to a
waterfall without torches going out.
2019-11-18 22:17:17 -05:00
Aaron Suen
07850123d7 Standardize high-resolution gametime.
Use high-res version in a few places we were using integer-res
timer before.  This should e.g. smooth time variation of wind
strength for ambient sounds.
2019-11-10 08:10:34 -05:00
Aaron Suen
fdd881ae53 Active ItemStack Modifier overhaul.
AISM's now tick against stacks, including in piles, shelves,
and player inventories, (hopefully) efficiently compared to
the old way with separate ABMs.  Item entity support is also
possible, but not necessary yet.

This started out as a bugfix for being able to put a torch inside a
shelf, which didn't make much sense gameplay-wise.  It ended up
going quite a bit further.

- Aggregate now gets wet in stack form.  Swimming with dry
  concrete now has consequences.
- Lux reactions, radiation, and infusion should now behave more
  consistently.
- Sponges can now wet or dry in stack form, including inside
  containers.
- Torch ignition, quenching, and extinguishing is now more
  consistent regardless of context, and torches are now more
  dangerous, and can ignite things in more contexts.
2019-10-29 20:03:18 -04:00
Aaron Suen
b6168151bf Style consistency.
Avoid redefining tables on every call.
2019-10-06 12:06:36 -04:00
Aaron Suen
1fbad4ad70 Buff torch firestarting ability. 2019-10-06 11:29:46 -04:00
Aaron Suen
d0ef7ab3ad Use torches for super-easy firestarting. 2019-10-06 11:26:30 -04:00
Aaron Suen
b8d340587e Deprecated function cleanup. 2019-10-05 17:49:16 -04:00
Aaron Suen
c147da4dde Convert from depends.txt to mod.conf 2019-10-05 11:24:16 -04:00
Aaron Suen
7fd1da272e Wield light effect works on thrown/dropped torches too. 2019-10-01 21:30:20 -04:00
Aaron Suen
2314097781 Tweak torch wield texture, extend avg life 50%. 2019-10-01 21:14:14 -04:00
Aaron Suen
0a29fd34e9 Clean up sound handling, fix floating point timers. 2019-10-01 19:24:39 -04:00
Aaron Suen
8a65ab5367 Torch logic refactors.
- Unify burn-out logic to just always become ash.
- Reduce logic depth a bit on wield tick, but look for some
  early bail-outs.
- Combine ABM's.
2019-10-01 19:01:06 -04:00
Aaron Suen
77de117ea1 Place certain stacks as nodes.
If a node is specially tagges with the stack_as_node group, and
the stack size is exactly 1, place as a real node instead of a
stack node.

This reinstates logic from WAY back in the super-early pre-alpha
days, except only for nodes explicitly tagged this way.

This should be applied only to nodes that aren't transformed in
any non-desirable way when placed as nodes instead of stacks, and
can be dug the same ways as stacks (i.e. snappy = 1 or
crumbly = 1).

Currently applied to sticks, staves, leaves, ladders/frames,
and torches.  Ladder/frame placement offers some interesting
possibilities in terms of throwing ladders to rappel down holes.
2019-10-01 18:59:53 -04:00
Aaron Suen
a193b966a2 Code reorg, texture optimization.
Use the upstream coal textures from the fire mod, since that's
already a dependency, and we can make sure our textures are
consistent with the upstream ones.  Make the burning torch tip
look embery and not just coaly.
2019-10-01 18:52:05 -04:00
Aaron Suen
b17845f949 Auto-format/check, including some bugs found and fixed. 2019-10-01 18:30:15 -04:00
GreenXenith
d3510d263a Add torch quirk note 2019-09-14 22:38:35 -07:00
GreenXenith
3a3eb976cd Torches depend on woodwork 2019-09-14 22:29:50 -07:00
GreenXenith
5c5de0813c Animate torch texture 2019-09-14 22:24:41 -07:00
GreenXenith
57dac2c808 Move torch blend file to src 2019-09-14 21:42:12 -07:00
GreenXenith
00b3e0f206 Snuff torches when underwater or quenched 2019-09-14 21:40:35 -07:00
GreenXenith
47e7ac505f Separate torch files 2019-09-14 20:35:58 -07:00
GreenXenith
86441e7179 Remove torch mtl file 2019-09-14 20:35:32 -07:00
GreenXenith
1ebe187cd1 Add torch wield light 2019-09-14 20:18:09 -07:00
GreenXenith
01438ca10b Make torch produce less light than fire 2019-09-14 19:49:27 -07:00
GreenXenith
688c750fe7 Adjust lit torch box 2019-09-14 19:48:26 -07:00
GreenXenith
c1d1243250 Only ignite torches if under air 2019-09-14 19:46:57 -07:00
GreenXenith
7b82a923ff Dont ignite materials underneath torch 2019-09-14 19:39:48 -07:00
GreenXenith
7f724fcb0a Fix re-placed expiration time 2019-09-14 18:29:52 -07:00
GreenXenith
833ae46716 Remove empty torch texture 2019-09-14 18:07:09 -07:00
GreenXenith
7647eb547a Add torches 2019-09-14 18:05:29 -07:00