Go to file
BuckarooBanzay 7e9e76b0a9 add example screenshot 2022-03-05 16:17:19 +01:00
.github/workflows Use `master` version instead of `@1` in workflows 2020-11-05 07:32:44 +01:00
compat clear_area fix / move_mapdata util 2021-05-22 11:03:14 +02:00
doc Updated fleet docs for set and simulate commands 2020-02-15 17:41:39 +02:00
engines Update upgrades on inventory move (#99) 2022-02-14 18:37:05 +11:00
fleet Revert "use `minetest.load_area()` instead of vmanip for loading areas" 2022-02-05 17:48:30 +02:00
move planet_mars:airlight docs 2021-08-23 08:07:13 +02:00
screenshots add example screenshot 2022-03-05 16:17:19 +01:00
sounds added sounds 2018-09-25 19:33:43 +02:00
textures area engine wip 2020-04-11 16:46:34 +02:00
.luacheckrc fix #46 2020-01-31 14:32:17 +01:00
backbone.lua crafts separation 2019-12-16 09:01:01 +01:00
blacklist.lua allow jumping of the forcefield but not the emitter_on 2019-07-24 08:54:41 +02:00
bookmark.lua prepare notification if no bookmark found 2020-10-12 17:00:47 +02:00
common.lua clear_area fix / move_mapdata util 2021-05-22 11:03:14 +02:00
crafts.lua crafts separation 2019-12-16 09:01:01 +01:00
digiline.lua sanitize coords from digilines and fleet formspec 2022-01-22 22:05:59 +11:00
fuel.lua optional technic 2019-12-16 09:10:27 +01:00
hooks.lua add "on_movenode" node field and jumpdrive.register_after_jump() 2020-10-25 21:51:54 +01:00
infotext.lua fix infotext not displaying without technic 2019-12-18 17:37:56 +11:00
init.lua clear_area fix / move_mapdata util 2021-05-22 11:03:14 +02:00
integration-test.sh Update integration test to MT 5.3.0 2020-11-05 07:32:44 +01:00
integration_test.lua fix areas and /home coord switch 2019-12-16 11:16:06 +01:00
is_area_empty.lua check buildable_to of nodes 2019-09-10 16:18:54 +02:00
is_area_protected.lua improved protection check 2019-12-16 10:05:42 +01:00
license.txt license 2018-05-07 21:22:13 +02:00
mapgen.lua shorter mapgen wait time 2021-05-22 10:34:55 +02:00
marker.lua show center marker 2019-07-16 13:52:00 +02:00
metrics.lua enable monitoring support 2019-07-16 13:18:58 +02:00
migrate.lua upgrade calculations 2019-12-16 09:59:54 +01:00
mod.conf alias planet_mars:airlight to air on jump 2021-08-22 18:28:17 +02:00
readme.md add example screenshot 2022-03-05 16:17:19 +01:00
technic_run.lua fix infotext not displaying without technic 2019-12-18 17:37:56 +11:00
testship.we add testship we schematic 2021-05-22 10:31:52 +02:00
upgrade.lua upgrade calculations 2019-12-16 09:59:54 +01:00

readme.md

Minetest jumpdrive

A simple Jumpdrive for minetest

Take your buildings with you on your journey

Operation

  • Place a 'jumpdrive:engine' into the center of your creation.
  • Connect the engine to a technic HV network
  • Let the engine charge
  • Choose your target coordinates (should be air or ignore blocks)
  • Select your cube-radius
  • Click "show" and check the green (source) and red (target) destination markers if everything is in range
  • Click "jump"

Example setup with technic:

Compatibility

Optional dependencies:

  • Mesecon interaction (execute jump on signal)
  • Technic rechargeable (HV)
  • Travelnet box (gets rewired after jump)
  • Elevator (on_place gets called after jump)
  • Locator (gets removed and added after each jump)
  • Pipeworks teleport tubes (with a patch to pipeworks)
  • Beds (thx to @tuedel)
  • Ropes (thx to @tuedel)
  • Mission-wand as coordinate bookmark (thx to @SwissalpS)
  • Compass as coordinate bookmark (thx to @SwissalpS)
  • Areas
  • Drawers

Fuel

The engine can be connected to a technic HV network or fuelled with power items. Power items are one of the following

  • default:mese_crystal_fragment
  • default:mese_crystal
  • default:mese

Energy requirements

The energy requirements formula looks like this: 10 x radius x distance

For example:

  • Distance: 100 blocks
  • Radius: 5 blocks
  • Required energy: 10 x 5 x 100 = 5000

Upgrades

If the technic mod is installed the following items can be used in the upgrade slot:

  • technic:red_energy_crystal increases power storage
  • technic:green_energy_crystal increases power storage
  • technic:blue_energy_crystal increases power storage
  • technic:control_logic_unit increases power recharge rate

Protection

The source and destination areas are checked for protection so you can't remove and jump into someone else's buildings.

Screenshots

Interface:

Example:

Advanced operation

Coordinate bookmarking

You can place empty books into the drive inventory and write the coordinates to them with the "Write to book" button. The "Read from bookmark" button reads the coordinates from the next valid bookmark item in the inventory. From right to left. A used bookmark item is placed in the first free slot from the left. Bookmark items are:

  • Written books saved by jumpdrive (or correctly by hand)
  • Mission position wands
  • Compasses

Diglines

Settings

Settings in minetest.conf:

  • jumpdrive.max_radius max radius of the jumpdrive (default: 15)
  • jumpdrive.max_area_radius max radius of the area jumpdrive (default: 25)
  • jumpdrive.powerstorage power storage of the drive (default: 1000000)
  • jumpdrive.power_requirement power requirement for chargin (default: 2500)

Lua api

Preflight check

The preflight check can be overriden to execute additional checks:

jumpdrive.preflight_check = function(source, destination, radius, player)
	-- check for height limit, only space travel allowed
	if destination.y < 1000 then
		return { success=false, message="Atmospheric travel not allowed!" }
	end

	-- everything ok
	return { success=true }
end

Fuel calc

The default fuel calc can be overwritten by a depending mod:

-- calculates the power requirements for a jump
jumpdrive.calculate_power = function(radius, distance, sourcePos, targetPos)
	return 10 * distance * radius
end

Movenode compatibility

Nodes can be made aware of a changing position if they implement a on_movenode function on the node-definition:

-- example with an override
minetest.override_item("travelnet:travelnet", {
  on_movenode = function(from_pos, to_pos, additional_info)
    -- additional_info = { edge = { x=0, y=0, z=0 } }
    -- magic!
  end
})
  • additional_info.edge is the vector to the nearest edge if any

Hooks

-- register a callback that is called upon jump completion
-- can also be used if the `on_movenode` above needs a kind of "commit" to write the changed state to files
jumpdrive.register_after_jump(function(from_area, to_area)
	-- from_area/to_area = { pos1, pos2 }
end)

Sources

Contributors

History

Next

  • optional technic mod
  • upgrade slots
  • "on_movenode" node definition
  • "jumpdrive.register_after_jump" function

2.0

  • various fixes and optimizations
  • Fleetcontroller
  • Digiline interface
  • mod.conf (minetest >= 5.0)
  • Beds,ropes,missions compatibility
  • calculate_power() override
  • overlap check
  • No fuel consumption if creative
  • Protection checks for source and destination
  • preflight check with custom override
  • Settings in minetest.conf
  • vacuum compatibility (jump into vacuum with air filled vessel)

1.1

  • improved performance
  • Documentation
  • Removed complicated cascade function

1.0

  • Initial version
  • Cascade operation (with issues)