1654 Commits

Author SHA1 Message Date
Aaron Suen
e234033789 Make tool wear warning visual too. 2020-07-05 17:49:09 -04:00
Aaron Suen
caac2968dc Inventory dump on built-in teleport cmd
Allow the built-in teleport command to be used
with standard NodeCore rules, i.e. players
can move freely, but items cannot.  Players
travelling by use of this command need a
special priv to keep inventory.
2020-07-05 10:13:26 -04:00
Aaron Suen
553d67c538 Apply extra "hold" to controls for anim
This effectively "debounces" the controls for
waving and mining anims, so players who
are just doing quick punches like for pummel
will still animate visibly for other players
instead of just a "flickering" of the action.
2020-07-05 09:56:52 -04:00
Aaron Suen
ea43981588 Condense startup log noise 2020-07-05 09:45:53 -04:00
Aaron Suen
77bb713b77 Raise minimum log level to "action"
Log entries of "info" don't end up in server log
trace output by default; it's hard-coded to
LL_ACTION in main.cpp.
2020-07-05 08:14:52 -04:00
Aaron Suen
78d321c24f Support explicit TP overrides for special_tiles
Hughes Ross has started to work on a PR for this
(https://github.com/minetest/minetest/pull/10140)
but it doesn't look like it will be ready until 5.4 at
least, and we will support pre-5.4 versions for
some time yet.  The ability for TP artists to
override special_tiles is necessary to allow things
like flowing liquid textures to be customized in
texture packs.

Add a hack for these, similar to how we did the
inventory/wield image hacks.

Note that we are also forcing overrides for special
tiles, since there may be cases where we reuse a
base image without modifiers but TP artists may
still want an independent override.
2020-07-04 19:25:37 -04:00
Aaron Suen
3e3260f789 Back out optic "virtualization"
Apparently this interacts badly with
optomechanics when multiple optic
tick cycles are running on a single
globalstep, since it may cause doors to
miss signals if they quiesce back to
off during the step.
2020-07-03 22:12:10 -04:00
Aaron Suen
dc1fc75321 Log warning on optic limiter 2020-07-03 09:56:38 -04:00
Aaron Suen
efa43e972d Change optic limit to CPU time-based
Instead of limiting the number of cycles
to some arbitrary upper bound, run as
many cycles as necessary up to a CPU
time limit, i.e. we only allow expansion
of globalstep time by a fixed limit.
2020-07-03 09:32:46 -04:00
Aaron Suen
12302342dc Backout hashed value caching
At only 50% hit ratio, it's probably
costing as much to cache as to recalc,
and this simplifies the code better.
2020-07-03 09:26:26 -04:00
Aaron Suen
f27378ca12 Optic "virtualization"
If we're running multiple optic ticks in
rapid succession, then we don't return
control to the rest of the game between
ticks, so there's no point in reading the
map more than once per pos, and no
point in updating the map until the end
when optics may have oscillated
across multiple states.

Maintain a cache and commit buffer
during each globalstep and only flush
them at the end.
2020-07-03 09:23:19 -04:00
Aaron Suen
ed57861fcc Better param naming 2020-07-03 08:38:15 -04:00
Aaron Suen
d6426e9a9f Remove redundant dependency logic 2020-07-03 08:37:09 -04:00
Aaron Suen
32902d5554 Un-hard-code optic config parameters 2020-07-03 08:31:03 -04:00
Aaron Suen
0675d943ad Make lenses sense input immediately 2020-07-03 08:24:09 -04:00
Aaron Suen
478414385e Fix diagnostic for abm muxing 2020-07-02 00:10:16 -04:00
Aaron Suen
dafc220207 Allow DNTs to recheck
This should hopefully allow the "broken ziprune"
bug that happened on the Community server to
heal itself eventually if it happens again.
2020-07-01 22:17:49 -04:00
Aaron Suen
fe1a5e38b7 Microoptimization consistency
Carry the node pre-indexing a little further to
cover the scan case as well.
2020-07-01 21:40:32 -04:00
Aaron Suen
9203734e5a Optics overhaul: eliminate node meta
Apparently as oilboi pointed out, node metadata
is kinda gross, and in this case we didn't actually
need it, since the information could actually
always have been inferred from the nodes
themselves.

Instead of storing output state in node meta,
just register a callback on the node definition to
interrogate the node itself about its power output.
2020-07-01 21:35:23 -04:00
Aaron Suen
4ce7076708 Standardize and log players losing items
Item ejection due to injury or teleportation:
- Check for custom on_drop calls from items, e.g. admin tools
  that distintegrate instead of becoming items.
- Log players losing items so we can audit where things came from
  or went to.
- Make teleportation and injury APIs use the same methods.
2020-07-01 07:21:10 -04:00
Aaron Suen
94401942ee Protect doors, standardize protection 2020-07-01 00:30:40 -04:00
Aaron Suen
544b306660 Fix more protection mechanics
- Report violation on scaling
- Prevent optic rotation
2020-06-30 23:48:21 -04:00
Aaron Suen
e34ce24d74 Scaling node placement respects protection
Players can still product dynamic "touch"
lights in protected areas, but can't place
actual climbable scaling nodes.
2020-06-30 23:38:03 -04:00
Aaron Suen
943464be23 Fix hot potato running on stasis 2020-06-30 22:11:38 -04:00
Aaron Suen
338dc72e3b Remove /torchlite cheat, superseded by /nckfa 2020-06-30 19:30:30 -04:00
Aaron Suen
2bf8c4ee3c Remove debug code 2020-06-30 19:15:15 -04:00
Aaron Suen
b4c72c9b2c Default almost all node meta fields to private.
Trying to isolate server performance issues, it was pointed out
that clients are spending a LOT of time receiving and rebuilding
mapblock meshes, and that updating node meta triggers this, even
when that meta is not relevant to the rendering of nodes.

Rubenwardy added a suggestion to change this in the engine:
	https://github.com/minetest/minetest/issues/10127
This patch implements this suggestion at the game level, since
in NodeCore's case we already were making the assumption that
nearly all metadata fields were private.
2020-06-30 18:19:49 -04:00
Aaron Suen
cf799989b3 Fix players not dropping items on losing arms 2020-06-30 07:14:34 -04:00
Aaron Suen
e86545f5e7 Texture modifier helper library
Useful for more complex transformations like assembling
animations or tiling.

Use in a couple places to try it out, esp. the new living
sponge animation.
2020-06-30 07:10:48 -04:00
Aaron Suen
55f5e9bb25 Slightly improved subtle sponge effect 2020-06-30 00:42:42 -04:00
Aaron Suen
280661fddc Subtle living sponge visual 2020-06-30 00:42:38 -04:00
Aaron Suen
88c10d3d6e Mapgen optimization
Two optimizations that added up to a significant
time savings in on_generated:
- Replacing calls to area:index(x,y,z) to precalculating
  an offset and then using stride math inside the loops
  gives us a huge cost savings.
- Prefilling lookup-by-ID tables to force them into
  sequential arrays instead of hashmaps speeds up
  lookups, for a more moderate savings.
2020-06-28 20:24:15 -04:00
Aaron Suen
4053adfebc Merge branch 'writing2' into dev 2020-06-28 19:04:44 -04:00
Aaron Suen
b5accf9d90 Allow force-resetting DNT timer 2020-06-28 17:15:32 -04:00
Aaron Suen
9b5db81149 Document DNTs 2020-06-28 17:05:53 -04:00
Aaron Suen
736d3982f2 Merge branch 'writing2' into dev 2020-06-28 16:09:48 -04:00
Aaron Suen
ed9002e519 Fix crash on unknown item 2020-06-28 16:09:33 -04:00
Aaron Suen
34259f12fa Back out stylus for now
The stylus is not ready for use, BUT the
changes already in are worth merging.
2020-06-28 16:08:44 -04:00
Aaron Suen
f16acdc638 Initial glyph facing relative to player
When drawing a glyph, it will always be
oriented relative to the player's looking dir
(except in gymbal lock).
2020-06-28 16:04:44 -04:00
Aaron Suen
f8cfd5a316 Fix missing writing sounds 2020-06-28 15:32:27 -04:00
Aaron Suen
b65593dadc Fix writing glyph order 2020-06-28 15:21:49 -04:00
Aaron Suen
94a887266c Work around apparently-obscure inventory crash 2020-06-28 14:37:51 -04:00
Aaron Suen
4ba018b31f Assign a glyph to stylus on creation 2020-06-28 14:32:14 -04:00
Aaron Suen
76a4af96af Fix stack placement sounds again 2020-06-28 14:28:16 -04:00
Aaron Suen
4ff829d600 Revert "Predict item stack placement client-side"
This reverts commit 8d2a8c089096238fd47ed8f8a7c5d5b82ab79d48.
2020-06-28 14:18:20 -04:00
Aaron Suen
61b7fffd15 Create charcoal stylus item 2020-06-28 14:11:09 -04:00
Aaron Suen
32ab8b775a Refactor writing code 2020-06-28 13:55:43 -04:00
Aaron Suen
c910ef30c4 Make sure patterns are translatable 2020-06-28 12:56:38 -04:00
Aaron Suen
2d1f61ee97 Touchtips support "touch thru" API
Allow the "above" node to override the "under"
node's description.  Use this mechanism to
append charcoal glyph descriptions to the
touchtips, but only when punching a face that
has a glyph on it.
2020-06-28 12:38:14 -04:00
Aaron Suen
787d548e3b Make filenames consistent with new names 2020-06-28 12:13:41 -04:00