change of the mod name to avoid conflicts with the original mod

master
Alexsandro Percy 2021-10-26 21:19:14 -03:00
parent f3af6866f2
commit 3e53421137
7 changed files with 28 additions and 28 deletions

View File

@ -16,7 +16,7 @@ function helicopter.vector_length_sq(v)
end end
if not minetest.global_exists("matrix3") then if not minetest.global_exists("matrix3") then
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "matrix.lua") dofile(minetest.get_modpath("nss_helicopter") .. DIR_DELIM .. "matrix.lua")
end end
function helicopter.check_node_below(obj) function helicopter.check_node_below(obj)
@ -166,7 +166,7 @@ function helicopter.heli_control(self, dtime, touching_ground, liquid_below, vel
self.pointer:set_attach(self.object,'',{x=0,y=11.26,z=9.37},{x=0,y=0,z=energy_indicator_angle}) self.pointer:set_attach(self.object,'',{x=0,y=11.26,z=9.37},{x=0,y=0,z=energy_indicator_angle})
else else
--in case it have lost the entity by some conflict --in case it have lost the entity by some conflict
self.pointer=minetest.add_entity({x=0,y=11.26,z=9.37},'helicopter:pointer') self.pointer=minetest.add_entity({x=0,y=11.26,z=9.37},"nss_helicopter:pointer")
self.pointer:set_attach(self.object,'',{x=0,y=11.26,z=9.37},{x=0,y=0,z=energy_indicator_angle}) self.pointer:set_attach(self.object,'',{x=0,y=11.26,z=9.37},{x=0,y=0,z=energy_indicator_angle})
end end
end end

View File

@ -3,17 +3,17 @@
-- --
-- blades -- blades
minetest.register_craftitem("helicopter:blades",{ minetest.register_craftitem("nss_helicopter:blades",{
description = "Helicopter Blades", description = "Helicopter Blades",
inventory_image = "helicopter_blades_inv.png", inventory_image = "helicopter_blades_inv.png",
}) })
-- cabin -- cabin
minetest.register_craftitem("helicopter:cabin",{ minetest.register_craftitem("nss_helicopter:cabin",{
description = "Cabin for Helicopter", description = "Cabin for Helicopter",
inventory_image = "helicopter_cabin_inv.png", inventory_image = "helicopter_cabin_inv.png",
}) })
-- heli -- heli
minetest.register_craftitem("helicopter:heli", { minetest.register_craftitem("nss_helicopter:heli", {
description = "Helicopter", description = "Helicopter",
inventory_image = "helicopter_heli_inv.png", inventory_image = "helicopter_heli_inv.png",
@ -30,7 +30,7 @@ minetest.register_craftitem("helicopter:heli", {
if color == "" then color = nil end if color == "" then color = nil end
local fuel = math.floor(imeta:get_float("fuel") * 100) / 100 local fuel = math.floor(imeta:get_float("fuel") * 100) / 100
local obj = minetest.add_entity(pointed_thing.above, "helicopter:heli") local obj = minetest.add_entity(pointed_thing.above, "nss_helicopter:heli")
local ent = obj:get_luaentity() local ent = obj:get_luaentity()
local owner = placer:get_player_name() local owner = placer:get_player_name()
ent.owner = owner ent.owner = owner
@ -58,7 +58,7 @@ minetest.register_craftitem("helicopter:heli", {
if minetest.get_modpath("default") then if minetest.get_modpath("default") then
minetest.register_craft({ minetest.register_craft({
output = "helicopter:blades", output = "nss_helicopter:blades",
recipe = { recipe = {
{"", "default:steel_ingot", ""}, {"", "default:steel_ingot", ""},
{"default:steel_ingot", "default:diamond", "default:steel_ingot"}, {"default:steel_ingot", "default:diamond", "default:steel_ingot"},
@ -66,7 +66,7 @@ if minetest.get_modpath("default") then
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "helicopter:cabin", output = "nss_helicopter:cabin",
recipe = { recipe = {
{"default:copperblock", "default:diamondblock", ""}, {"default:copperblock", "default:diamondblock", ""},
{"default:steelblock", "default:mese_block", "default:glass"}, {"default:steelblock", "default:mese_block", "default:glass"},
@ -74,10 +74,10 @@ if minetest.get_modpath("default") then
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "helicopter:heli", output = "nss_helicopter:heli",
recipe = { recipe = {
{"", "helicopter:blades"}, {"", "nss_helicopter:blades"},
{"helicopter:blades", "helicopter:cabin"}, {"nss_helicopter:blades", "nss_helicopter:cabin"},
} }
}) })
end end

View File

@ -20,7 +20,7 @@ local color_def = {
["#ff0098"] = "Magenta", ["#ff0098"] = "Magenta",
} }
minetest.register_entity('helicopter:seat_base',{ minetest.register_entity("nss_helicopter:seat_base",{
initial_properties = { initial_properties = {
physical = false, physical = false,
collide_with_objects=false, collide_with_objects=false,
@ -42,7 +42,7 @@ initial_properties = {
}) })
minetest.register_entity("helicopter:heli", { minetest.register_entity("nss_helicopter:heli", {
initial_properties = { initial_properties = {
physical = true, physical = true,
collide_with_objects = true, collide_with_objects = true,
@ -98,16 +98,16 @@ minetest.register_entity("helicopter:heli", {
helicopter.paint(self, self.color) helicopter.paint(self, self.color)
local pos = self.object:get_pos() local pos = self.object:get_pos()
local pointer=minetest.add_entity(pos,'helicopter:pointer') local pointer=minetest.add_entity(pos,'nss_helicopter:pointer')
local energy_indicator_angle = ((self.energy * 18) - 90) * -1 local energy_indicator_angle = ((self.energy * 18) - 90) * -1
pointer:set_attach(self.object,'',{x=0,y=11.26,z=9.37},{x=0,y=0,z=energy_indicator_angle}) pointer:set_attach(self.object,'',{x=0,y=11.26,z=9.37},{x=0,y=0,z=energy_indicator_angle})
self.pointer = pointer self.pointer = pointer
local pilot_seat_base=minetest.add_entity(pos,'helicopter:seat_base') local pilot_seat_base=minetest.add_entity(pos,'nss_helicopter:seat_base')
pilot_seat_base:set_attach(self.object,'',{x=4.2,y=10,z=2},{x=0,y=0,z=0}) pilot_seat_base:set_attach(self.object,'',{x=4.2,y=10,z=2},{x=0,y=0,z=0})
self.pilot_seat_base = pilot_seat_base self.pilot_seat_base = pilot_seat_base
local passenger_seat_base=minetest.add_entity(pos,'helicopter:seat_base') local passenger_seat_base=minetest.add_entity(pos,'nss_helicopter:seat_base')
passenger_seat_base:set_attach(self.object,'',{x=-4.2,y=10,z=2},{x=0,y=0,z=0}) passenger_seat_base:set_attach(self.object,'',{x=-4.2,y=10,z=2},{x=0,y=0,z=0})
self.passenger_seat_base = passenger_seat_base self.passenger_seat_base = passenger_seat_base
@ -295,7 +295,7 @@ minetest.register_entity("helicopter:heli", {
if self.hp_max <= 0 then if self.hp_max <= 0 then
if helicopter.punch_inv then if helicopter.punch_inv then
local pinv = puncher:get_inventory() local pinv = puncher:get_inventory()
local stack = ItemStack("helicopter:heli") local stack = ItemStack("nss_helicopter:heli")
local imeta = stack:get_meta() local imeta = stack:get_meta()
-- store fuel level & color -- store fuel level & color

View File

@ -3,7 +3,7 @@
-- --
helicopter.fuel = {['biofuel:biofuel'] = 1,['biofuel:bottle_fuel'] = 1,['biofuel:phial_fuel'] = 0.25, ['biofuel:fuel_can'] = 10} helicopter.fuel = {['biofuel:biofuel'] = 1,['biofuel:bottle_fuel'] = 1,['biofuel:phial_fuel'] = 0.25, ['biofuel:fuel_can'] = 10}
minetest.register_entity('helicopter:pointer',{ minetest.register_entity("nss_helicopter:pointer",{
initial_properties = { initial_properties = {
physical = false, physical = false,
collide_with_objects=false, collide_with_objects=false,

View File

@ -158,5 +158,5 @@ function helicopter.destroy(self, puncher)
minetest.add_item({x=pos.x+math.random()-0.5,y=pos.y,z=pos.z+math.random()-0.5},'default:steelblock') minetest.add_item({x=pos.x+math.random()-0.5,y=pos.y,z=pos.z+math.random()-0.5},'default:steelblock')
minetest.add_item({x=pos.x+math.random()-0.5,y=pos.y,z=pos.z+math.random()-0.5},'default:copperblock') minetest.add_item({x=pos.x+math.random()-0.5,y=pos.y,z=pos.z+math.random()-0.5},'default:copperblock')
minetest.add_item({x=pos.x+math.random()-0.5,y=pos.y,z=pos.z+math.random()-0.5},'helicopter:blades') minetest.add_item({x=pos.x+math.random()-0.5,y=pos.y,z=pos.z+math.random()-0.5},'nss_helicopter:blades')
end end

View File

@ -29,14 +29,14 @@ helicopter.colors ={
yellow='#ffe400', yellow='#ffe400',
} }
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "settings.lua") dofile(minetest.get_modpath("nss_helicopter") .. DIR_DELIM .. "settings.lua")
--dofile(minetest.get_modpath(minetest.get_current_modname()) .. DIR_DELIM .. "heli_hud.lua") --dofile(minetest.get_modpath(minetest.get_current_modname()) .. DIR_DELIM .. "heli_hud.lua")
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "heli_hud.lua") dofile(minetest.get_modpath("nss_helicopter") .. DIR_DELIM .. "heli_hud.lua")
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "heli_utilities.lua") dofile(minetest.get_modpath("nss_helicopter") .. DIR_DELIM .. "heli_utilities.lua")
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "heli_entities.lua") dofile(minetest.get_modpath("nss_helicopter") .. DIR_DELIM .. "heli_entities.lua")
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "heli_crafts.lua") dofile(minetest.get_modpath("nss_helicopter") .. DIR_DELIM .. "heli_crafts.lua")
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "heli_control.lua") dofile(minetest.get_modpath("nss_helicopter") .. DIR_DELIM .. "heli_control.lua")
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "heli_fuel_management.lua") dofile(minetest.get_modpath("nss_helicopter") .. DIR_DELIM .. "heli_fuel_management.lua")
helicopter.helicopter_last_time_command = 0 helicopter.helicopter_last_time_command = 0
@ -46,7 +46,7 @@ helicopter.helicopter_last_time_command = 0
-- --
if not minetest.global_exists("matrix3") then if not minetest.global_exists("matrix3") then
dofile(minetest.get_modpath("helicopter") .. DIR_DELIM .. "matrix.lua") dofile(minetest.get_modpath("nss_helicopter") .. DIR_DELIM .. "matrix.lua")
end end
helicopter.creative = minetest.global_exists("creative") helicopter.creative = minetest.global_exists("creative")

View File

@ -1,4 +1,4 @@
name = helicopter name = nss_helicopter
depends = player_api, biofuel depends = player_api, biofuel
optional_depends = default, creative optional_depends = default, creative
description = It adds an expensive helicopter with power consumption. It uses biofuel to fly. With biofuel barrels on your inventory, you can recharge your helicopter attaching himself into it (with right click on seat) and punching the seat after. It does not refuel on flying, only when landed. The power consumption increases as high you climb, so, stay below the flight level 100. description = It adds an expensive helicopter with power consumption. It uses biofuel to fly. With biofuel barrels on your inventory, you can recharge your helicopter attaching himself into it (with right click on seat) and punching the seat after. It does not refuel on flying, only when landed. The power consumption increases as high you climb, so, stay below the flight level 100.