Tree XRay


Adds a way to see through trees around you

Utilities
3 years ago
1.0 - 1.1
8.59K

b Trees deleted when changing surface.

2 years ago
(updated 2 years ago)

Hi, I'm not entirely certain how it's happening, but when used with Factorissimo, trees get deleted when you enter (or perhaps leave?) a factory (the player is teleported to a new surface).

Edit: Aha. It's where you're working on already xrayed trees. You're operating on the surface where the player is now, not where the surface where the trees were. I'm reasonably sure that you want tree.surface as the argument to swapTree, not (player.)surface.

Edit: Limited testing suggests that this will work, though it won't be particularly efficient.

swapTree(tree.name:sub(1, -6), tree, tree.surface, player)

Perhaps keep a separate list of trees for each surface, and an expiry time for each tree; when you add a new tree or encounter an already x-rayed tree, update the expiry time; after you've visited all of the players, run through the list of trees and swap back the ones that have been expired?

It looks very much like you'll have all sorts of fun if you have more than one player with x-ray vision enabled interacting with the same set of trees.

New response