summaryrefslogtreecommitdiff
path: root/boost_cart
diff options
context:
space:
mode:
Diffstat (limited to 'boost_cart')
-rw-r--r--boost_cart/README.txt57
-rw-r--r--boost_cart/cart_entity.lua419
-rw-r--r--boost_cart/depends.txt4
-rw-r--r--boost_cart/description.txt1
-rw-r--r--boost_cart/detector.lua58
-rw-r--r--boost_cart/functions.lua248
-rw-r--r--boost_cart/init.lua46
-rw-r--r--boost_cart/mod.conf1
-rw-r--r--boost_cart/models/cart.pngbin216 -> 0 bytes
-rw-r--r--boost_cart/models/cart.x339
-rw-r--r--boost_cart/rails.lua137
-rw-r--r--boost_cart/screenshot.pngbin157823 -> 0 bytes
-rw-r--r--boost_cart/settingtypes.txt6
-rw-r--r--boost_cart/sounds/cart_rail.1.oggbin7543 -> 0 bytes
-rw-r--r--boost_cart/sounds/cart_rail.2.oggbin8080 -> 0 bytes
-rw-r--r--boost_cart/sounds/cart_rail.3.oggbin7232 -> 0 bytes
-rw-r--r--boost_cart/textures/cart_bottom.pngbin114 -> 0 bytes
-rw-r--r--boost_cart/textures/cart_side.pngbin147 -> 0 bytes
-rw-r--r--boost_cart/textures/cart_top.pngbin131 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_crossing.pngbin755 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_crossing_brk.pngbin765 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_crossing_cp.pngbin735 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_crossing_dtc.pngbin823 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_crossing_dtc_on.pngbin823 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_crossing_pwr.pngbin847 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_crossing_ss.pngbin813 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_curved.pngbin750 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_curved_brk.pngbin738 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_curved_cp.pngbin691 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_curved_dtc.pngbin780 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_curved_dtc_on.pngbin780 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_curved_pwr.pngbin798 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_curved_ss.pngbin832 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_straight.pngbin785 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_straight_brk.pngbin789 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_straight_cp.pngbin728 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_straight_dtc.pngbin830 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_straight_dtc_on.pngbin830 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_straight_pwr.pngbin836 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_straight_ss.pngbin843 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_t_junction.pngbin789 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_t_junction_brk.pngbin714 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_t_junction_cp.pngbin715 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_t_junction_dtc.pngbin752 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_t_junction_dtc_on.pngbin808 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_t_junction_pwr.pngbin761 -> 0 bytes
-rw-r--r--boost_cart/textures/carts_rail_t_junction_ss.pngbin813 -> 0 bytes
-rw-r--r--boost_cart/textures/templates/crossing.pngbin368 -> 0 bytes
-rw-r--r--boost_cart/textures/templates/curved.pngbin400 -> 0 bytes
-rw-r--r--boost_cart/textures/templates/straight.pngbin248 -> 0 bytes
-rw-r--r--boost_cart/textures/templates/t_junction.pngbin323 -> 0 bytes
51 files changed, 0 insertions, 1316 deletions
diff --git a/boost_cart/README.txt b/boost_cart/README.txt
deleted file mode 100644
index 994a6ef..0000000
--- a/boost_cart/README.txt
+++ /dev/null
@@ -1,57 +0,0 @@
- Minetest mod: boost_cart
-==========================
-Based on (and fully compatible with) the mod "carts" by PilzAdam
-and the one contained in the subgame "minetest_game".
-Target: Run smoothly as possible, even on laggy servers.
-
-
- Features
-----------
-- A fast cart for your railway or roller coaster
-- Easily configurable cart speed using the Advanced Settings
-- Boost and brake rails
-- By mesecons controlled Start-Stop rails
-- Detector rails that send a mesecons signal when the cart drives over them
-- Rail junction switching with the 'right/left' walking keys
-- Handbrake with the 'back' key
-- Support for non-minetest_game subgames
-
-
- Settings
-----------
-This mod can be adjusted to fit the conditions of a player or server.
-Use the Advanced Settings dialog in the main menu or tune your
-minetest.conf file manually:
-
-boost_cart.speed_max = 10
- ^ Possible values: 1 ... 100
- ^ Maximal speed of the cart in m/s
-
-boost_cart.punch_speed_max = 7
- ^ Possible values: -1 ... 100
- ^ Maximal speed to which the driving player can accelerate the cart
- by punching from inside the cart. -1 will disable this feature.
-
-
- License for everything
-------------------------
-CC-0, if not specified otherwise below
-
-
- Authors
----------
-Various authors
- carts_rail_*.png
-
-kddekadenz
- cart_bottom.png
- cart_side.png
- cart_top.png
-
-klankbeeld (CC-BY 3.0)
- http://freesound.org/people/klankbeeld/sounds/174042/
- cart_rail.*.ogg
-
-Zeg9
- cart.x
- cart.png \ No newline at end of file
diff --git a/boost_cart/cart_entity.lua b/boost_cart/cart_entity.lua
deleted file mode 100644
index 69f45fb..0000000
--- a/boost_cart/cart_entity.lua
+++ /dev/null
@@ -1,419 +0,0 @@
-
-local HAVE_MESECONS_ENABLED = minetest.global_exists("mesecon")
-
-function boost_cart:on_rail_step(entity, pos, distance)
- -- Play rail sound
- if entity.sound_counter <= 0 then
- minetest.sound_play("cart_rail", {
- pos = pos,
- max_hear_distance = 40,
- gain = 0.5
- })
- entity.sound_counter = math.random(4, 15)
- end
- entity.sound_counter = entity.sound_counter - distance
-
- if HAVE_MESECONS_ENABLED then
- boost_cart:signal_detector_rail(pos)
- end
-end
-
-local cart_entity = {
- physical = false,
- collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
- visual = "mesh",
- mesh = "cart.x",
- visual_size = {x=1, y=1},
- textures = {"cart.png"},
-
- driver = nil,
- punched = false, -- used to re-send velocity and position
- velocity = {x=0, y=0, z=0}, -- only used on punch
- old_dir = {x=1, y=0, z=0}, -- random value to start the cart on punch
- old_pos = nil,
- old_switch = 0,
- sound_counter = 0,
- railtype = nil,
- attached_items = {}
-}
-
--- Model and textures
-if boost_cart.mtg_compat then
- cart_entity.mesh = "carts_cart.b3d"
- cart_entity.textures = {"carts_cart.png"}
-end
-
-function cart_entity:on_rightclick(clicker)
- if not clicker or not clicker:is_player() then
- return
- end
- local player_name = clicker:get_player_name()
- if self.driver and player_name == self.driver then
- self.driver = nil
- boost_cart:manage_attachment(clicker, nil)
- elseif not self.driver then
- self.driver = player_name
- boost_cart:manage_attachment(clicker, self.object)
- end
-end
-
-function cart_entity:on_activate(staticdata, dtime_s)
- self.object:set_armor_groups({immortal=1})
- self.sound_counter = math.random(4, 15)
-
- if string.sub(staticdata, 1, string.len("return")) ~= "return" then
- return
- end
- local data = minetest.deserialize(staticdata)
- if type(data) ~= "table" then
- return
- end
- self.railtype = data.railtype
- if data.old_dir then
- self.old_dir = data.old_dir
- end
-end
-
-function cart_entity:get_staticdata()
- return minetest.serialize({
- railtype = self.railtype,
- old_dir = self.old_dir
- })
-end
-
-function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities, direction)
- local pos = self.object:get_pos()
- local vel = self.object:get_velocity()
- if not self.railtype or vector.equals(vel, {x=0, y=0, z=0}) then
- local node = minetest.get_node(pos).name
- self.railtype = minetest.get_item_group(node, "connect_to_raillike")
- end
-
- if not puncher or not puncher:is_player() then
- local cart_dir = boost_cart:get_rail_direction(pos, self.old_dir, nil, nil, self.railtype)
- if vector.equals(cart_dir, {x=0, y=0, z=0}) then
- return
- end
- self.velocity = vector.multiply(cart_dir, 3)
- self.punched = true
- return
- end
-
- if puncher:get_player_control().sneak then
- -- Pick up cart: Drop all attachments
- if self.driver then
- if self.old_pos then
- self.object:set_pos(self.old_pos)
- end
- local player = minetest.get_player_by_name(self.driver)
- boost_cart:manage_attachment(player, nil)
- end
- for _, obj_ in pairs(self.attached_items) do
- if obj_ then
- obj_:set_detach()
- end
- end
-
- local leftover = puncher:get_inventory():add_item("main", "carts:cart")
- if not leftover:is_empty() then
- minetest.add_item(pos, leftover)
- end
-
- self.object:remove()
- return
- end
-
- -- Driver punches to accelerate the cart
- if puncher:get_player_name() == self.driver then
- if math.abs(vel.x + vel.z) > boost_cart.punch_speed_max then
- return
- end
- end
-
- local punch_dir = boost_cart:velocity_to_dir(puncher:get_look_dir())
- punch_dir.y = 0
- local cart_dir = boost_cart:get_rail_direction(pos, punch_dir, nil, nil, self.railtype)
- if vector.equals(cart_dir, {x=0, y=0, z=0}) then
- return
- end
-
- local punch_interval = 1
- if tool_capabilities and tool_capabilities.full_punch_interval then
- punch_interval = tool_capabilities.full_punch_interval
- end
- time_from_last_punch = math.min(time_from_last_punch or punch_interval, punch_interval)
- local f = 3 * (time_from_last_punch / punch_interval)
-
- self.velocity = vector.multiply(cart_dir, f)
- self.old_dir = cart_dir
- self.punched = true
-end
-
-local v3_len = vector.length
-function cart_entity:on_step(dtime)
- local vel = self.object:get_velocity()
- if self.punched then
- vel = vector.add(vel, self.velocity)
- self.object:set_velocity(vel)
- self.old_dir.y = 0
- elseif vector.equals(vel, {x=0, y=0, z=0}) then
- return
- end
-
- local pos = self.object:get_pos()
- local cart_dir = boost_cart:velocity_to_dir(vel)
- local same_dir = vector.equals(cart_dir, self.old_dir)
- local update = {}
-
- if self.old_pos and not self.punched and same_dir then
- local flo_pos = vector.round(pos)
- local flo_old = vector.round(self.old_pos)
- if vector.equals(flo_pos, flo_old) then
- -- Do not check one node multiple times
- return
- end
- end
-
- local ctrl, player
- local distance = 1
-
- -- Get player controls
- if self.driver then
- player = minetest.get_player_by_name(self.driver)
- if player then
- ctrl = player:get_player_control()
- end
- end
-
- local stop_wiggle = false
- if self.old_pos and same_dir then
- -- Detection for "skipping" nodes (perhaps use average dtime?)
- -- It's sophisticated enough to take the acceleration in account
- local acc = self.object:get_acceleration()
- distance = dtime * (v3_len(vel) + 0.5 * dtime * v3_len(acc))
-
- local new_pos, new_dir = boost_cart:pathfinder(
- pos, self.old_pos, self.old_dir, distance, ctrl,
- self.old_switch, self.railtype
- )
-
- if new_pos then
- -- No rail found: set to the expected position
- pos = new_pos
- update.pos = true
- cart_dir = new_dir
- end
- elseif self.old_pos and cart_dir.y ~= -1 and not self.punched then
- -- Stop wiggle
- stop_wiggle = true
- end
-
- -- dir: New moving direction of the cart
- -- switch_keys: Currently pressed L(1) or R(2) key,
- -- used to ignore the key on the next rail node
- local dir, switch_keys = boost_cart:get_rail_direction(
- pos, cart_dir, ctrl, self.old_switch, self.railtype
- )
-
- local new_acc = {x=0, y=0, z=0}
- if stop_wiggle or vector.equals(dir, {x=0, y=0, z=0}) then
- vel = {x=0, y=0, z=0}
- local pos_r = vector.round(pos)
- if not boost_cart:is_rail(pos_r, self.railtype) then
- pos = self.old_pos
- elseif not stop_wiggle then
- pos = pos_r
- else
- pos.y = math.floor(pos.y + 0.5)
- end
- update.pos = true
- update.vel = true
- else
- -- Direction change detected
- if not vector.equals(dir, self.old_dir) then
- vel = vector.multiply(dir, v3_len(vel))
- update.vel = true
- if dir.y ~= self.old_dir.y then
- pos = vector.round(pos)
- update.pos = true
- end
- end
- -- Center on the rail
- if dir.z ~= 0 and math.floor(pos.x + 0.5) ~= pos.x then
- pos.x = math.floor(pos.x + 0.5)
- update.pos = true
- end
- if dir.x ~= 0 and math.floor(pos.z + 0.5) ~= pos.z then
- pos.z = math.floor(pos.z + 0.5)
- update.pos = true
- end
-
- -- Calculate current cart acceleration
- local acc = nil
-
- local acc_meta = minetest.get_meta(pos):get_string("cart_acceleration")
- if acc_meta == "halt" and not self.punched then
- -- Stop rail
- vel = {x=0, y=0, z=0}
- acc = false
- pos = vector.round(pos)
- update.pos = true
- update.vel = true
- end
- if acc == nil then
- -- Meta speed modifier
- local speed_mod = tonumber(acc_meta)
- if speed_mod and speed_mod ~= 0 then
- -- Try to make it similar to the original carts mod
- acc = speed_mod * 10
- end
- end
- if acc == nil and boost_cart.mtg_compat then
- -- MTG Cart API adaption
- local rail_node = minetest.get_node(vector.round(pos))
- local railparam = carts.railparams[rail_node.name]
- if railparam and railparam.acceleration then
- acc = railparam.acceleration
- end
- end
- if acc == nil then
- -- Handbrake
- if ctrl and ctrl.down then
- acc = -2
- else
- acc = -0.4
- end
- end
-
- if acc then
- -- Slow down or speed up, depending on Y direction
- acc = acc + dir.y * -2
- else
- acc = 0
- end
-
- new_acc = vector.multiply(dir, acc)
- end
-
- -- Limits
- local max_vel = boost_cart.speed_max
- for _,v in pairs({"x","y","z"}) do
- if math.abs(vel[v]) > max_vel then
- vel[v] = boost_cart:get_sign(vel[v]) * max_vel
- new_acc[v] = 0
- update.vel = true
- end
- end
-
- self.object:set_acceleration(new_acc)
- self.old_pos = vector.round(pos)
- local old_y_dir = self.old_dir.y
- if not vector.equals(dir, {x=0, y=0, z=0}) and not stop_wiggle then
- self.old_dir = dir
- end
- self.old_switch = switch_keys
-
- boost_cart:on_rail_step(self, self.old_pos, distance)
-
- if self.punched then
- -- Collect dropped items
- for _, obj_ in pairs(minetest.get_objects_inside_radius(pos, 1)) do
- if not obj_:is_player() and
- obj_:get_luaentity() and
- not obj_:get_luaentity().physical_state and
- obj_:get_luaentity().name == "__builtin:item" then
-
- obj_:set_attach(self.object, "", {x=0, y=0, z=0}, {x=0, y=0, z=0})
- self.attached_items[#self.attached_items + 1] = obj_
- end
- end
- self.punched = false
- update.vel = true
- end
-
- if not (update.vel or update.pos) then
- return
- end
-
- local yaw = 0
- if self.old_dir.x < 0 then
- yaw = 0.5
- elseif self.old_dir.x > 0 then
- yaw = 1.5
- elseif self.old_dir.z < 0 then
- yaw = 1
- end
- self.object:set_yaw(yaw * math.pi)
-
- local anim = {x=0, y=0}
- if dir.y == -1 then
- anim = {x=1, y=1}
- elseif dir.y == 1 then
- anim = {x=2, y=2}
- end
- self.object:set_animation(anim, 1, 0)
- if player and dir.y ~= old_y_dir then
- local feet = {x=0, y=0, z=0}
- local eye = {x=0, y=-4, z=0}
- feet.y = boost_cart.old_player_model and 6 or -4.2
- if dir.y ~= 0 then
- -- TODO: Find a better way to calculate this
- if boost_cart.old_player_model then
- feet.y = 6 + 1.5
- feet.z = -dir.y * 7
- else
- feet.y = -4.2 + 3
- feet.z = -dir.y
- end
- eye.z = -dir.y * 10
- end
- player:set_attach(self.object, "", feet,
- {x=dir.y * -45, y=0, z=0})
- player:set_eye_offset(eye, eye)
- end
-
- self.object:set_velocity(vel)
- if update.pos then
- self.object:set_pos(pos)
- end
-end
-
-minetest.register_entity(":carts:cart", cart_entity)
-
--- Register item to place the entity
-if not boost_cart.mtg_compat then
- minetest.register_craftitem(":carts:cart", {
- description = "Cart (Sneak+Click to pick up)",
- inventory_image = minetest.inventorycube(
- "cart_top.png",
- "cart_side.png",
- "cart_side.png"
- ),
- wield_image = "cart_side.png",
- on_place = function(itemstack, placer, pointed_thing)
- if not pointed_thing.type == "node" then
- return
- end
- if boost_cart:is_rail(pointed_thing.under) then
- minetest.add_entity(pointed_thing.under, "carts:cart")
- elseif boost_cart:is_rail(pointed_thing.above) then
- minetest.add_entity(pointed_thing.above, "carts:cart")
- else
- return
- end
-
- if not minetest.settings:get_bool("creative_mode") then
- itemstack:take_item()
- end
- return itemstack
- end,
- })
-
- minetest.register_craft({
- output = "carts:cart",
- recipe = {
- {"default:steel_ingot", "", "default:steel_ingot"},
- {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
- },
- })
-end
diff --git a/boost_cart/depends.txt b/boost_cart/depends.txt
deleted file mode 100644
index 705a8eb..0000000
--- a/boost_cart/depends.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-default
-mesecons?
-moreores?
-carts? \ No newline at end of file
diff --git a/boost_cart/description.txt b/boost_cart/description.txt
deleted file mode 100644
index bbb244c..0000000
--- a/boost_cart/description.txt
+++ /dev/null
@@ -1 +0,0 @@
-This mod offers improved minecarts and a few more rail types. \ No newline at end of file
diff --git a/boost_cart/detector.lua b/boost_cart/detector.lua
deleted file mode 100644
index f345ac6..0000000
--- a/boost_cart/detector.lua
+++ /dev/null
@@ -1,58 +0,0 @@
-local mesecons_rules = mesecon.rules.flat
-
-function boost_cart:turnoff_detector_rail(pos)
- local node = minetest.get_node(pos)
- if minetest.get_item_group(node.name, "detector_rail") == 1 then
- if node.name == "boost_cart:detectorrail_on" then --has not been dug
- minetest.swap_node(pos, {name = "boost_cart:detectorrail", param2=node.param2})
- end
- mesecon.receptor_off(pos, mesecons_rules)
- end
-end
-
-function boost_cart:signal_detector_rail(pos)
- local node = minetest.get_node(pos)
- if minetest.get_item_group(node.name, "detector_rail") ~= 1 then
- return
- end
-
- if node.name == "boost_cart:detectorrail" then
- minetest.swap_node(pos, {name = "boost_cart:detectorrail_on", param2=node.param2})
- end
- mesecon.receptor_on(pos, mesecons_rules)
- minetest.after(0.5, boost_cart.turnoff_detector_rail, boost_cart, pos)
-end
-
-boost_cart:register_rail("boost_cart:detectorrail", {
- description = "Detector rail",
- tiles = {
- "carts_rail_straight_dtc.png", "carts_rail_curved_dtc.png",
- "carts_rail_t_junction_dtc.png", "carts_rail_crossing_dtc.png"
- },
- groups = boost_cart:get_rail_groups({detector_rail = 1}),
-
- mesecons = {receptor = {state = "off", rules = mesecons_rules}},
-})
-
-boost_cart:register_rail("boost_cart:detectorrail_on", {
- description = "Detector rail ON (you hacker you)",
- tiles = {
- "carts_rail_straight_dtc_on.png", "carts_rail_curved_dtc_on.png",
- "carts_rail_t_junction_dtc_on.png", "carts_rail_crossing_dtc_on.png"
- },
- groups = boost_cart:get_rail_groups({
- detector_rail = 1, not_in_creative_inventory = 1
- }),
- drop = "boost_cart:detectorrail",
-
- mesecons = {receptor = {state = "on", rules = mesecons_rules}},
-})
-
-minetest.register_craft({
- output = "boost_cart:detectorrail 6",
- recipe = {
- {"default:steel_ingot", "mesecons:wire_00000000_off", "default:steel_ingot"},
- {"default:steel_ingot", "group:stick", "default:steel_ingot"},
- {"default:steel_ingot", "mesecons:wire_00000000_off", "default:steel_ingot"},
- },
-})
diff --git a/boost_cart/functions.lua b/boost_cart/functions.lua
deleted file mode 100644
index ec04bb7..0000000
--- a/boost_cart/functions.lua
+++ /dev/null
@@ -1,248 +0,0 @@
-function boost_cart:get_sign(z)
- if z == 0 then
- return 0
- else
- return z / math.abs(z)
- end
-end
-
-function boost_cart:manage_attachment(player, obj)
- if not player then
- return
- end
- local status = obj ~= nil
- local player_name = player:get_player_name()
- if default.player_attached[player_name] == status then
- return
- end
- default.player_attached[player_name] = status
-
- if status then
- local y_pos = self.old_player_model and 6 or -4.2
- player:set_attach(obj, "", {x=0, y=y_pos, z=0}, {x=0, y=0, z=0})
- player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0})
- else
- player:set_detach()
- player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
- end
-end
-
-function boost_cart:velocity_to_dir(v)
- if math.abs(v.x) > math.abs(v.z) then
- return {x=self:get_sign(v.x), y=self:get_sign(v.y), z=0}
- else
- return {x=0, y=self:get_sign(v.y), z=self:get_sign(v.z)}
- end
-end
-
-local get_node = minetest.get_node
-local get_item_group = minetest.get_item_group
-function boost_cart:is_rail(pos, railtype)
- local node = get_node(pos).name
- if node == "ignore" then
- local vm = minetest.get_voxel_manip()
- local emin, emax = vm:read_from_map(pos, pos)
- local area = VoxelArea:new{
- MinEdge = emin,
- MaxEdge = emax,
- }
- local data = vm:get_data()
- local vi = area:indexp(pos)
- node = minetest.get_name_from_content_id(data[vi])
- end
- if get_item_group(node, "rail") == 0 then
- return false
- end
- if not railtype then
- return true
- end
- return get_item_group(node, "connect_to_raillike") == railtype
-end
-
-function boost_cart:check_front_up_down(pos, dir_, check_up, railtype)
- local dir = vector.new(dir_)
- local cur = nil
-
- -- Front
- dir.y = 0
- cur = vector.add(pos, dir)
- if self:is_rail(cur, railtype) then
- return dir
- end
- -- Up
- if check_up then
- dir.y = 1
- cur = vector.add(pos, dir)
- if self:is_rail(cur, railtype) then
- return dir
- end
- end
- -- Down
- dir.y = -1
- cur = vector.add(pos, dir)
- if self:is_rail(cur, railtype) then
- return dir
- end
- return nil
-end
-
-function boost_cart:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
- local pos = vector.round(pos_)
- local cur = nil
- local left_check, right_check = true, true
-
- -- Check left and right
- local left = {x=0, y=0, z=0}
- local right = {x=0, y=0, z=0}
- if dir.z ~= 0 and dir.x == 0 then
- left.x = -dir.z
- right.x = dir.z
- elseif dir.x ~= 0 and dir.z == 0 then
- left.z = dir.x
- right.z = -dir.x
- end
-
- if ctrl then
- if old_switch == 1 then
- left_check = false
- elseif old_switch == 2 then
- right_check = false
- end
- if ctrl.left and left_check then
- cur = self:check_front_up_down(pos, left, false, railtype)
- if cur then
- return cur, 1
- end
- left_check = false
- end
- if ctrl.right and right_check then
- cur = self:check_front_up_down(pos, right, false, railtype)
- if cur then
- return cur, 2
- end
- right_check = true
- end
- end
-
- -- Normal
- cur = self:check_front_up_down(pos, dir, true, railtype)
- if cur then
- return cur
- end
-
- -- Left, if not already checked
- if left_check then
- cur = self:check_front_up_down(pos, left, false, railtype)
- if cur then
- return cur
- end
- end
-
- -- Right, if not already checked
- if right_check then
- cur = self:check_front_up_down(pos, right, false, railtype)
- if cur then
- return cur
- end
- end
-
- -- Backwards
- if not old_switch then
- cur = self:check_front_up_down(pos, {
- x = -dir.x,
- y = dir.y,
- z = -dir.z
- }, true, railtype)
- if cur then
- return cur
- end
- end
-
- return {x=0, y=0, z=0}
-end
-
-function boost_cart:pathfinder(pos_, old_pos, old_dir, distance, ctrl,
- pf_switch, railtype)
-
- local pos = vector.round(pos_)
- if vector.equals(old_pos, pos) then
- return
- end
-
- local pf_pos = vector.round(old_pos)
- local pf_dir = vector.new(old_dir)
- distance = math.min(boost_cart.path_distance_max,
- math.floor(distance + 1))
-
- for i = 1, distance do
- pf_dir, pf_switch = self:get_rail_direction(
- pf_pos, pf_dir, ctrl, pf_switch or 0, railtype)
-
- if vector.equals(pf_dir, {x=0, y=0, z=0}) then
- -- No way forwards
- return pf_pos, pf_dir
- end
-
- pf_pos = vector.add(pf_pos, pf_dir)
-
- if vector.equals(pf_pos, pos) then
- -- Success! Cart moved on correctly
- return
- end
- end
- -- Not found. Put cart to predicted position
- return pf_pos, pf_dir
-end
-
-function boost_cart:boost_rail(pos, amount)
- minetest.get_meta(pos):set_string("cart_acceleration", tostring(amount))
- for _,obj_ in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do
- if not obj_:is_player() and
- obj_:get_luaentity() and
- obj_:get_luaentity().name == "carts:cart" then
- obj_:get_luaentity():on_punch()
- end
- end
-end
-
-function boost_cart:register_rail(name, def_overwrite)
- local def = {
- drawtype = "raillike",
- paramtype = "light",
- sunlight_propagates = true,
- is_ground_content = false,
- walkable = false,
- selection_box = {
- type = "fixed",
- fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
- }
- }
- for k, v in pairs(def_overwrite) do
- def[k] = v
- end
- if not def.inventory_image then
- def.wield_image = def.tiles[1]
- def.inventory_image = def.tiles[1]
- end
-
- minetest.register_node(name, def)
-end
-
-function boost_cart:get_rail_groups(additional_groups)
- -- Get the default rail groups and add more when a table is given
- local groups = {
- dig_immediate = 2,
- attached_node = 1,
- rail = 1,
- connect_to_raillike = 1
- }
- if minetest.raillike_group then
- groups.connect_to_raillike = minetest.raillike_group("rail")
- end
- if type(additional_groups) == "table" then
- for k, v in pairs(additional_groups) do
- groups[k] = v
- end
- end
- return groups
-end
diff --git a/boost_cart/init.lua b/boost_cart/init.lua
deleted file mode 100644
index 755ab9d..0000000
--- a/boost_cart/init.lua
+++ /dev/null
@@ -1,46 +0,0 @@
-
-boost_cart = {}
-boost_cart.modpath = minetest.get_modpath("boost_cart")
-
-
-if not minetest.settings then
- error("[boost_cart] Your Minetest version is no longer supported."
- .. " (Version <= 0.4.15)")
-end
-
-local function getNum(setting)
- return tonumber(minetest.settings:get(setting))
-end
-
--- Maximal speed of the cart in m/s
-boost_cart.speed_max = getNum("boost_cart.speed_max") or 10
--- Set to -1 to disable punching the cart from inside
-boost_cart.punch_speed_max = getNum("boost_cart.punch_speed_max") or 7
--- Maximal distance for the path correction (for dtime peaks)
-boost_cart.path_distance_max = 3
-
-
--- Support for non-default games
-if not default.player_attached then
- default.player_attached = {}
-end
-
-minetest.after(1, function()
- boost_cart.old_player_model = type(player_api) ~= "table"
-end)
-
-dofile(boost_cart.modpath.."/functions.lua")
-dofile(boost_cart.modpath.."/rails.lua")
-
-if minetest.global_exists("mesecon") then
- dofile(boost_cart.modpath.."/detector.lua")
---else
--- minetest.register_alias("carts:powerrail", "boost_cart:detectorrail")
--- minetest.register_alias("carts:powerrail", "boost_cart:detectorrail_on")
-end
-
-boost_cart.mtg_compat = minetest.global_exists("carts") and carts.pathfinder
-if boost_cart.mtg_compat then
- minetest.log("action", "[boost_cart] Overwriting definitions of similar carts mod")
-end
-dofile(boost_cart.modpath.."/cart_entity.lua")
diff --git a/boost_cart/mod.conf b/boost_cart/mod.conf
deleted file mode 100644
index 7da19df..0000000
--- a/boost_cart/mod.conf
+++ /dev/null
@@ -1 +0,0 @@
-name = boost_cart \ No newline at end of file
diff --git a/boost_cart/models/cart.png b/boost_cart/models/cart.png
deleted file mode 100644
index d4b12d6..0000000
--- a/boost_cart/models/cart.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/models/cart.x b/boost_cart/models/cart.x
deleted file mode 100644
index 3325aaf..0000000
--- a/boost_cart/models/cart.x
+++ /dev/null
@@ -1,339 +0,0 @@
-xof 0303txt 0032
-
-Frame Root {
- FrameTransformMatrix {
- 1.000000, 0.000000, 0.000000, 0.000000,
- 0.000000, 0.000000, 1.000000, 0.000000,
- 0.000000, 1.000000,-0.000000, 0.000000,
- 0.000000, 0.000000, 0.000000, 1.000000;;
- }
- Frame Cube {
- FrameTransformMatrix {
- 5.000000, 0.000000,-0.000000, 0.000000,
- -0.000000, 3.535534, 3.535534, 0.000000,
- 0.000000,-3.535534, 3.535534, 0.000000,
- 0.000000,-3.000000, 3.000000, 1.000000;;
- }
- Mesh { //Cube_001 Mesh
- 72;
- -1.000000; 1.000000;-1.000000;,
- -1.000000;-1.000000;-1.000000;,
- 1.000000;-1.000000;-1.000000;,
- 1.000000; 1.000000;-1.000000;,
- -0.833334;-1.000000; 1.000000;,
- -1.000000;-1.000000; 1.000000;,
- -1.000000;-0.833333; 1.000000;,
- -0.833334;-0.833333; 1.000000;,
- -1.000000;-1.000000;-1.000000;,
- -1.000000;-1.000000; 1.000000;,
- 0.999999;-1.000001; 1.000000;,
- 1.000000;-1.000000;-1.000000;,
- 0.999999;-1.000001; 1.000000;,
- 0.833332;-1.000000; 1.000000;,
- 0.833333;-0.833334; 1.000000;,
- 1.000000;-0.833334; 1.000000;,
- 0.833332;-1.000000; 1.000000;,
- -0.833334;-1.000000; 1.000000;,
- -0.833334;-0.833333; 1.000000;,
- 0.833333;-0.833334; 1.000000;,
- 1.000000; 0.833333; 1.000000;,
- 0.833334; 0.833333; 1.000000;,
- 0.833334; 1.000000; 1.000000;,
- 1.000000; 0.999999; 1.000000;,
- 1.000000;-0.833334; 1.000000;,
- 0.833333;-0.833334; 1.000000;,
- 0.833334; 0.833333; 1.000000;,
- 1.000000; 0.833333; 1.000000;,
- 0.833334; 0.833333; 1.000000;,
- -0.833333; 0.833333; 1.000000;,
- -0.833333; 1.000000; 1.000000;,
- 0.833334; 1.000000; 1.000000;,
- 0.833334; 0.833333;-0.800000;,
- -0.833333; 0.833333;-0.800000;,
- -0.833333; 0.833333; 1.000000;,
- 0.833334; 0.833333; 1.000000;,
- -0.833333; 0.833333; 1.000000;,
- -1.000000; 0.833333; 1.000000;,
- -1.000000; 1.000000; 1.000000;,
- -0.833333; 1.000000; 1.000000;,
- -0.833334;-0.833333; 1.000000;,
- -1.000000;-0.833333; 1.000000;,
- -1.000000; 0.833333; 1.000000;,
- -0.833333; 0.833333; 1.000000;,
- 0.833333;-0.833334;-0.800000;,
- -0.833334;-0.833333;-0.800000;,
- -0.833333; 0.833333;-0.800000;,
- 0.833334; 0.833333;-0.800000;,
- -0.833333; 0.833333;-0.800000;,
- -0.833334;-0.833333;-0.800000;,
- -0.833334;-0.833333; 1.000000;,
- -0.833333; 0.833333; 1.000000;,
- -0.833334;-0.833333;-0.800000;,
- 0.833333;-0.833334;-0.800000;,
- 0.833333;-0.833334; 1.000000;,
- -0.833334;-0.833333; 1.000000;,
- 0.833333;-0.833334;-0.800000;,
- 0.833334; 0.833333;-0.800000;,
- 0.833334; 0.833333; 1.000000;,
- 0.833333;-0.833334; 1.000000;,
- -1.000000; 1.000000;-1.000000;,
- -1.000000; 1.000000; 1.000000;,
- -1.000000;-1.000000; 1.000000;,
- -1.000000;-1.000000;-1.000000;,
- -1.000000; 1.000000; 1.000000;,
- -1.000000; 1.000000;-1.000000;,
- 1.000000; 1.000000;-1.000000;,
- 1.000000; 0.999999; 1.000000;,
- 1.000000;-1.000000;-1.000000;,
- 0.999999;-1.000001; 1.000000;,
- 1.000000; 0.999999; 1.000000;,
- 1.000000; 1.000000;-1.000000;;
- 18;
- 4;0;1;2;3;,
- 4;4;5;6;7;,
- 4;8;9;10;11;,
- 4;12;13;14;15;,
- 4;16;17;18;19;,
- 4;20;21;22;23;,
- 4;24;25;26;27;,
- 4;28;29;30;31;,
- 4;32;33;34;35;,
- 4;36;37;38;39;,
- 4;40;41;42;43;,
- 4;44;45;46;47;,
- 4;48;49;50;51;,
- 4;52;53;54;55;,
- 4;56;57;58;59;,
- 4;60;61;62;63;,
- 4;64;65;66;67;,
- 4;68;69;70;71;;
- MeshNormals { //Cube_001 Normals
- 72;
- 0.000000; 0.000000;-1.000000;,
- 0.000000; 0.000000;-1.000000;,
- 0.000000; 0.000000;-1.000000;,
- 0.000000; 0.000000;-1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- -0.000000;-1.000000;-0.000000;,
- -0.000000;-1.000000;-0.000000;,
- -0.000000;-1.000000;-0.000000;,
- -0.000000;-1.000000;-0.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- -0.000000;-1.000000; 0.000000;,
- -0.000000;-1.000000; 0.000000;,
- -0.000000;-1.000000; 0.000000;,
- -0.000000;-1.000000; 0.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 0.000000;-0.000000; 1.000000;,
- 1.000000;-0.000000; 0.000000;,
- 1.000000;-0.000000; 0.000000;,
- 1.000000;-0.000000; 0.000000;,
- 1.000000;-0.000000; 0.000000;,
- 0.000000; 1.000000; 0.000000;,
- 0.000000; 1.000000; 0.000000;,
- 0.000000; 1.000000; 0.000000;,
- 0.000000; 1.000000; 0.000000;,
- -1.000000; 0.000000; 0.000000;,
- -1.000000; 0.000000; 0.000000;,
- -1.000000; 0.000000; 0.000000;,
- -1.000000; 0.000000; 0.000000;,
- -1.000000; 0.000000;-0.000000;,
- -1.000000; 0.000000;-0.000000;,
- -1.000000; 0.000000;-0.000000;,
- -1.000000; 0.000000;-0.000000;,
- 0.000000; 1.000000; 0.000000;,
- 0.000000; 1.000000; 0.000000;,
- 0.000000; 1.000000; 0.000000;,
- 0.000000; 1.000000; 0.000000;,
- 1.000000;-0.000000; 0.000000;,
- 1.000000;-0.000000; 0.000000;,
- 1.000000;-0.000000; 0.000000;,
- 1.000000;-0.000000; 0.000000;;
- 18;
- 4;0;1;2;3;,
- 4;4;5;6;7;,
- 4;8;9;10;11;,
- 4;12;13;14;15;,
- 4;16;17;18;19;,
- 4;20;21;22;23;,
- 4;24;25;26;27;,
- 4;28;29;30;31;,
- 4;32;33;34;35;,
- 4;36;37;38;39;,
- 4;40;41;42;43;,
- 4;44;45;46;47;,
- 4;48;49;50;51;,
- 4;52;53;54;55;,
- 4;56;57;58;59;,
- 4;60;61;62;63;,
- 4;64;65;66;67;,
- 4;68;69;70;71;;
- } //End of Cube_001 Normals
- MeshMaterialList { //Cube_001 Material List
- 1;
- 18;
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0;;
- Material Material {
- 0.640000; 0.640000; 0.640000; 1.000000;;
- 96.078431;
- 0.500000; 0.500000; 0.500000;;
- 0.000000; 0.000000; 0.000000;;
- TextureFilename {"cart.png";}
- }
- } //End of Cube_001 Material List
- MeshTextureCoords { //Cube_001 UV Coordinates
- 72;
- 0.000000; 0.500000;,
- 0.500000; 0.500000;,
- 0.500000; 1.000000;,
- 0.000000; 1.000000;,
- 0.031250; 0.500000;,
- -0.000000; 0.500000;,
- -0.000000; 0.468750;,
- 0.031250; 0.468750;,
- 0.500000; 0.500000;,
- 0.500000; 0.000000;,
- 1.000000; 0.000000;,
- 1.000000; 0.500000;,
- 0.468750; 0.468750;,
- 0.500000; 0.468750;,
- 0.500000; 0.500000;,
- 0.468750; 0.500000;,
- 0.031250; 0.468750;,
- 0.468750; 0.468750;,
- 0.468750; 0.500000;,
- 0.031250; 0.500000;,
- 0.468750; 0.000000;,
- 0.500000; 0.000000;,
- 0.500000; 0.031250;,
- 0.468750; 0.031250;,
- 0.468750; 0.031250;,
- 0.500000; 0.031250;,
- 0.500000; 0.468750;,
- 0.468750; 0.468750;,
- 0.468750; 0.031250;,
- 0.031250; 0.031250;,
- 0.031250; 0.000000;,
- 0.468750; 0.000000;,
- 1.000000; 0.500000;,
- 0.500000; 0.500000;,
- 0.500000; 0.000000;,
- 1.000000; 0.000000;,
- 0.031250; 0.031250;,
- 0.000000; 0.031250;,
- 0.000000; 0.000000;,
- 0.031250; 0.000000;,
- 0.031250; 0.468750;,
- -0.000000; 0.468750;,
- 0.000000; 0.031250;,
- 0.031250; 0.031250;,
- 0.000000; 0.500000;,
- 0.500000; 0.500000;,
- 0.500000; 1.000000;,
- 0.000000; 1.000000;,
- 1.000000; 0.500000;,
- 0.500000; 0.500000;,
- 0.500000; 0.000000;,
- 1.000000; 0.000000;,
- 1.000000; 0.500000;,
- 0.500000; 0.500000;,
- 0.500000; 0.000000;,
- 1.000000; 0.000000;,
- 1.000000; 0.500000;,
- 0.500000; 0.500000;,
- 0.500000; 0.000000;,
- 1.000000; 0.000000;,
- 0.500000; 0.500000;,
- 0.500000; 0.000000;,
- 1.000000; 0.000000;,
- 1.000000; 0.500000;,
- 1.000000; 0.000000;,
- 1.000000; 0.500000;,
- 0.500000; 0.500000;,
- 0.500000; 0.000000;,
- 0.500000; 0.500000;,
- 0.500000; 0.000000;,
- 1.000000; 0.000000;,
- 1.000000; 0.500000;;
- } //End of Cube_001 UV Coordinates
- } //End of Cube_001 Mesh
- } //End of Cube
-} //End of Root Frame
-AnimationSet {
- Animation {
- {Cube}
- AnimationKey { //Position
- 2;
- 4;
- 0;3; 0.000000, 0.000000, 0.000000;;,
- 1;3; 0.000000, 3.000000, 3.000000;;,
- 2;3; 0.000000,-3.000000, 3.000000;;,
- 3;3; 0.000000,-3.000000, 3.000000;;;
- }
- AnimationKey { //Rotation
- 0;
- 4;
- 0;4; -1.000000, 0.000000, 0.000000, 0.000000;;,
- 1;4; -0.923880,-0.382683,-0.000000, 0.000000;;,
- 2;4; -0.923880, 0.382683, 0.000000, 0.000000;;,
- 3;4; -0.923880, 0.382683, 0.000000, 0.000000;;;
- }
- AnimationKey { //Scale
- 1;
- 4;
- 0;3; 5.000000, 5.000000, 5.000000;;,
- 1;3; 5.000000, 5.000000, 5.000000;;,
- 2;3; 5.000000, 5.000000, 5.000000;;,
- 3;3; 5.000000, 5.000000, 5.000000;;;
- }
- }
-} //End of AnimationSet
diff --git a/boost_cart/rails.lua b/boost_cart/rails.lua
deleted file mode 100644
index a03961b..0000000
--- a/boost_cart/rails.lua
+++ /dev/null
@@ -1,137 +0,0 @@
--- Common rail registrations
-
-local regular_rail_itemname = "default:rail"
-if minetest.registered_nodes["carts:rail"] then
- -- MTG Compatibility
- regular_rail_itemname = "carts:rail"
-end
-
-boost_cart:register_rail(":"..regular_rail_itemname, {
- description = "Rail",
- tiles = {
- "carts_rail_straight.png", "carts_rail_curved.png",
- "carts_rail_t_junction.png", "carts_rail_crossing.png"
- },
- groups = boost_cart:get_rail_groups()
-})
-
--- Moreores' copper rail
-if minetest.get_modpath("moreores") then
- minetest.register_alias("carts:copperrail", "moreores:copper_rail")
-else
- boost_cart:register_rail(":carts:copperrail", {
- description = "Copper rail",
- tiles = {
- "carts_rail_straight_cp.png", "carts_rail_curved_cp.png",
- "carts_rail_t_junction_cp.png", "carts_rail_crossing_cp.png"
- },
- groups = boost_cart:get_rail_groups()
- })
-
- minetest.register_craft({
- output = "carts:copperrail 12",
- recipe = {
- {"default:copper_ingot", "", "default:copper_ingot"},
- {"default:copper_ingot", "group:stick", "default:copper_ingot"},
- {"default:copper_ingot", "", "default:copper_ingot"},
- }
- })
-end
-
--- Power rail
-boost_cart:register_rail(":carts:powerrail", {
- description = "Powered rail",
- tiles = {
- "carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png",
- "carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png"
- },
- groups = boost_cart:get_rail_groups(),
- after_place_node = function(pos, placer, itemstack)
- if not mesecon then
- minetest.get_meta(pos):set_string("cart_acceleration", "0.5")
- end
- end,
- mesecons = {
- effector = {
- action_on = function(pos, node)
- boost_cart:boost_rail(pos, 0.5)
- end,
- action_off = function(pos, node)
- minetest.get_meta(pos):set_string("cart_acceleration", "0")
- end,
- },
- },
-})
-
-minetest.register_craft({
- output = "carts:powerrail 6",
- recipe = {
- {"default:steel_ingot", "default:mese_crystal_fragment", "default:steel_ingot"},
- {"default:steel_ingot", "group:stick", "default:steel_ingot"},
- {"default:steel_ingot", "default:mese_crystal_fragment", "default:steel_ingot"},
- }
-})
-
--- Brake rail
-boost_cart:register_rail(":carts:brakerail", {
- description = "Brake rail",
- tiles = {
- "carts_rail_straight_brk.png", "carts_rail_curved_brk.png",
- "carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png"
- },
- groups = boost_cart:get_rail_groups(),
- after_place_node = function(pos, placer, itemstack)
- if not mesecon then
- minetest.get_meta(pos):set_string("cart_acceleration", "-0.3")
- end
- end,
- mesecons = {
- effector = {
- action_on = function(pos, node)
- minetest.get_meta(pos):set_string("cart_acceleration", "-0.3")
- end,
- action_off = function(pos, node)
- minetest.get_meta(pos):set_string("cart_acceleration", "0")
- end,
- },
- },
-})
-
-minetest.register_craft({
- output = "carts:brakerail 6",
- recipe = {
- {"default:steel_ingot", "default:coal_lump", "default:steel_ingot"},
- {"default:steel_ingot", "group:stick", "default:steel_ingot"},
- {"default:steel_ingot", "default:coal_lump", "default:steel_ingot"},
- }
-})
-
-boost_cart:register_rail("boost_cart:startstoprail", {
- description = "Start-stop rail",
- tiles = {
- "carts_rail_straight_ss.png", "carts_rail_curved_ss.png",
- "carts_rail_t_junction_ss.png", "carts_rail_crossing_ss.png"
- },
- groups = boost_cart:get_rail_groups(),
- after_place_node = function(pos, placer, itemstack)
- if not mesecon then
- minetest.get_meta(pos):set_string("cart_acceleration", "halt")
- end
- end,
- mesecons = {
- effector = {
- action_on = function(pos, node)
- boost_cart:boost_rail(pos, 0.5)
- end,
- action_off = function(pos, node)
- minetest.get_meta(pos):set_string("cart_acceleration", "halt")
- end,
- },
- },
-})
-
-minetest.register_craft({
- type = "shapeless",
- output = "boost_cart:startstoprail 2",
- recipe = {"carts:powerrail", "carts:brakerail"},
-})
diff --git a/boost_cart/screenshot.png b/boost_cart/screenshot.png
deleted file mode 100644
index e9eaa5b..0000000
--- a/boost_cart/screenshot.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/settingtypes.txt b/boost_cart/settingtypes.txt
deleted file mode 100644
index d64d88a..0000000
--- a/boost_cart/settingtypes.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Maximal speed of the cart in m/s (min=1, max=100)
-boost_cart.speed_max (Maximal speed) int 10 1 100
-
-# Maximal speed to which the driving player can accelerate the cart by punching
-# from inside the cart. -1 will disable this feature. (min=-1, max=100)
-boost_cart.punch_speed_max (Maximal punch speed) int 7 -1 100 \ No newline at end of file
diff --git a/boost_cart/sounds/cart_rail.1.ogg b/boost_cart/sounds/cart_rail.1.ogg
deleted file mode 100644
index ba2d9ef..0000000
--- a/boost_cart/sounds/cart_rail.1.ogg
+++ /dev/null
Binary files differ
diff --git a/boost_cart/sounds/cart_rail.2.ogg b/boost_cart/sounds/cart_rail.2.ogg
deleted file mode 100644
index 1b930f0..0000000
--- a/boost_cart/sounds/cart_rail.2.ogg
+++ /dev/null
Binary files differ
diff --git a/boost_cart/sounds/cart_rail.3.ogg b/boost_cart/sounds/cart_rail.3.ogg
deleted file mode 100644
index 2db4991..0000000
--- a/boost_cart/sounds/cart_rail.3.ogg
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/cart_bottom.png b/boost_cart/textures/cart_bottom.png
deleted file mode 100644
index e74ef2b..0000000
--- a/boost_cart/textures/cart_bottom.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/cart_side.png b/boost_cart/textures/cart_side.png
deleted file mode 100644
index 1bd55e7..0000000
--- a/boost_cart/textures/cart_side.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/cart_top.png b/boost_cart/textures/cart_top.png
deleted file mode 100644
index b763025..0000000
--- a/boost_cart/textures/cart_top.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_crossing.png b/boost_cart/textures/carts_rail_crossing.png
deleted file mode 100644
index 1591c70..0000000
--- a/boost_cart/textures/carts_rail_crossing.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_crossing_brk.png b/boost_cart/textures/carts_rail_crossing_brk.png
deleted file mode 100644
index 0e6adfa..0000000
--- a/boost_cart/textures/carts_rail_crossing_brk.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_crossing_cp.png b/boost_cart/textures/carts_rail_crossing_cp.png
deleted file mode 100644
index b2cd736..0000000
--- a/boost_cart/textures/carts_rail_crossing_cp.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_crossing_dtc.png b/boost_cart/textures/carts_rail_crossing_dtc.png
deleted file mode 100644
index 8558c02..0000000
--- a/boost_cart/textures/carts_rail_crossing_dtc.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_crossing_dtc_on.png b/boost_cart/textures/carts_rail_crossing_dtc_on.png
deleted file mode 100644
index c5d0bf4..0000000
--- a/boost_cart/textures/carts_rail_crossing_dtc_on.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_crossing_pwr.png b/boost_cart/textures/carts_rail_crossing_pwr.png
deleted file mode 100644
index ca9eac4..0000000
--- a/boost_cart/textures/carts_rail_crossing_pwr.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_crossing_ss.png b/boost_cart/textures/carts_rail_crossing_ss.png
deleted file mode 100644
index d7b945a..0000000
--- a/boost_cart/textures/carts_rail_crossing_ss.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_curved.png b/boost_cart/textures/carts_rail_curved.png
deleted file mode 100644
index 8db11f3..0000000
--- a/boost_cart/textures/carts_rail_curved.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_curved_brk.png b/boost_cart/textures/carts_rail_curved_brk.png
deleted file mode 100644
index 03f8bda..0000000
--- a/boost_cart/textures/carts_rail_curved_brk.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_curved_cp.png b/boost_cart/textures/carts_rail_curved_cp.png
deleted file mode 100644
index b950453..0000000
--- a/boost_cart/textures/carts_rail_curved_cp.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_curved_dtc.png b/boost_cart/textures/carts_rail_curved_dtc.png
deleted file mode 100644
index 67cc18b..0000000
--- a/boost_cart/textures/carts_rail_curved_dtc.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_curved_dtc_on.png b/boost_cart/textures/carts_rail_curved_dtc_on.png
deleted file mode 100644
index b000d7b..0000000
--- a/boost_cart/textures/carts_rail_curved_dtc_on.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_curved_pwr.png b/boost_cart/textures/carts_rail_curved_pwr.png
deleted file mode 100644
index 11d2dbf..0000000
--- a/boost_cart/textures/carts_rail_curved_pwr.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_curved_ss.png b/boost_cart/textures/carts_rail_curved_ss.png
deleted file mode 100644
index 934f499..0000000
--- a/boost_cart/textures/carts_rail_curved_ss.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_straight.png b/boost_cart/textures/carts_rail_straight.png
deleted file mode 100644
index 36fdf4e..0000000
--- a/boost_cart/textures/carts_rail_straight.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_straight_brk.png b/boost_cart/textures/carts_rail_straight_brk.png
deleted file mode 100644
index d68e396..0000000
--- a/boost_cart/textures/carts_rail_straight_brk.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_straight_cp.png b/boost_cart/textures/carts_rail_straight_cp.png
deleted file mode 100644
index 232cee8..0000000
--- a/boost_cart/textures/carts_rail_straight_cp.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_straight_dtc.png b/boost_cart/textures/carts_rail_straight_dtc.png
deleted file mode 100644
index 85a76b2..0000000
--- a/boost_cart/textures/carts_rail_straight_dtc.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_straight_dtc_on.png b/boost_cart/textures/carts_rail_straight_dtc_on.png
deleted file mode 100644
index 68bfa14..0000000
--- a/boost_cart/textures/carts_rail_straight_dtc_on.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_straight_pwr.png b/boost_cart/textures/carts_rail_straight_pwr.png
deleted file mode 100644
index 252dea4..0000000
--- a/boost_cart/textures/carts_rail_straight_pwr.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_straight_ss.png b/boost_cart/textures/carts_rail_straight_ss.png
deleted file mode 100644
index b0f537e..0000000
--- a/boost_cart/textures/carts_rail_straight_ss.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_t_junction.png b/boost_cart/textures/carts_rail_t_junction.png
deleted file mode 100644
index 0b55a0a..0000000
--- a/boost_cart/textures/carts_rail_t_junction.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_t_junction_brk.png b/boost_cart/textures/carts_rail_t_junction_brk.png
deleted file mode 100644
index d6fc78a..0000000
--- a/boost_cart/textures/carts_rail_t_junction_brk.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_t_junction_cp.png b/boost_cart/textures/carts_rail_t_junction_cp.png
deleted file mode 100644
index e266bcc..0000000
--- a/boost_cart/textures/carts_rail_t_junction_cp.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_t_junction_dtc.png b/boost_cart/textures/carts_rail_t_junction_dtc.png
deleted file mode 100644
index b69c649..0000000
--- a/boost_cart/textures/carts_rail_t_junction_dtc.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_t_junction_dtc_on.png b/boost_cart/textures/carts_rail_t_junction_dtc_on.png
deleted file mode 100644
index 2a21d1f..0000000
--- a/boost_cart/textures/carts_rail_t_junction_dtc_on.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_t_junction_pwr.png b/boost_cart/textures/carts_rail_t_junction_pwr.png
deleted file mode 100644
index a2e0f1d..0000000
--- a/boost_cart/textures/carts_rail_t_junction_pwr.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/carts_rail_t_junction_ss.png b/boost_cart/textures/carts_rail_t_junction_ss.png
deleted file mode 100644
index 303c6cf..0000000
--- a/boost_cart/textures/carts_rail_t_junction_ss.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/templates/crossing.png b/boost_cart/textures/templates/crossing.png
deleted file mode 100644
index 67b7168..0000000
--- a/boost_cart/textures/templates/crossing.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/templates/curved.png b/boost_cart/textures/templates/curved.png
deleted file mode 100644
index a9070dc..0000000
--- a/boost_cart/textures/templates/curved.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/templates/straight.png b/boost_cart/textures/templates/straight.png
deleted file mode 100644
index 9911b36..0000000
--- a/boost_cart/textures/templates/straight.png
+++ /dev/null
Binary files differ
diff --git a/boost_cart/textures/templates/t_junction.png b/boost_cart/textures/templates/t_junction.png
deleted file mode 100644
index 8c6b621..0000000
--- a/boost_cart/textures/templates/t_junction.png
+++ /dev/null
Binary files differ