mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-01-01 14:17:29 +01:00
Renamed mcl_fireworks to vl_fireworks
This commit is contained in:
parent
3291786c1f
commit
93a6ce6824
@ -8,7 +8,7 @@ local ROCKET_TIMEOUT = 1
|
||||
|
||||
local YAW_OFFSET = -math.pi/2
|
||||
|
||||
local particle_explosion = mcl_fireworks.particle_explosion
|
||||
local particle_explosion = vl_fireworks.particle_explosion
|
||||
|
||||
local function damage_explosion(self, damagemulitplier, pos)
|
||||
if self._harmless then return end
|
||||
@ -97,7 +97,7 @@ if core.get_modpath("mcl_core") and core.get_modpath("mcl_mobitems") then
|
||||
output = "mcl_bows:rocket 1",
|
||||
recipe = {
|
||||
{"mcl_core:paper"},
|
||||
{"mcl_fireworks:rocket_2"},
|
||||
{"vl_fireworks:rocket_2"},
|
||||
{"mcl_bows:arrow"},
|
||||
}
|
||||
})
|
||||
|
@ -1,17 +1,17 @@
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "mcl_fireworks:rocket_1 3",
|
||||
output = "vl_fireworks:rocket_1 3",
|
||||
recipe = {"mcl_core:paper", "mcl_mobitems:gunpowder"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "mcl_fireworks:rocket_2 3",
|
||||
output = "vl_fireworks:rocket_2 3",
|
||||
recipe = {"mcl_core:paper", "mcl_mobitems:gunpowder", "mcl_mobitems:gunpowder"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "mcl_fireworks:rocket_3 3",
|
||||
output = "vl_fireworks:rocket_3 3",
|
||||
recipe = {"mcl_core:paper", "mcl_mobitems:gunpowder", "mcl_mobitems:gunpowder", "mcl_mobitems:gunpowder"},
|
||||
})
|
||||
})
|
@ -1,8 +1,8 @@
|
||||
local path = minetest.get_modpath("mcl_fireworks")
|
||||
local path = minetest.get_modpath("vl_fireworks")
|
||||
|
||||
mcl_fireworks = {}
|
||||
vl_fireworks = {}
|
||||
|
||||
function mcl_fireworks.particle_explosion(pos)
|
||||
function vl_fireworks.generic_particle_explosion(pos)
|
||||
if pos.object then pos = pos.object:get_pos() end
|
||||
local particle_pattern = math.random(1, 3)
|
||||
local fpitch
|
@ -1,3 +1,3 @@
|
||||
name = mcl_fireworks
|
||||
name = vl_fireworks
|
||||
description = Adds fun fireworks to the game which players can use.
|
||||
depends = vl_projectile
|
@ -5,7 +5,7 @@ local description = S("Firework Rocket")
|
||||
|
||||
local function explode(self, pos)
|
||||
-- temp code
|
||||
mcl_fireworks.particle_explosion(pos)
|
||||
vl_fireworks.generic_particle_explosion(pos)
|
||||
mcl_mobs.mob_class.boom(self, pos, 1)
|
||||
end
|
||||
|
||||
@ -14,8 +14,8 @@ local firework_entity = {
|
||||
pointable = false,
|
||||
visual = "mesh",
|
||||
visual_size = {x=3, y=3},
|
||||
mesh = "mcl_fireworks_rocket.obj",
|
||||
textures = {"mcl_fireworks_entity.png"},
|
||||
mesh = "vl_fireworks_rocket.obj",
|
||||
textures = {"vl_fireworks_entity.png"},
|
||||
backface_culling = false,
|
||||
collisionbox = {-0.1, 0, -0.1, 0.1, 0.5, 0.1},
|
||||
collide_with_objects = false,
|
||||
@ -107,11 +107,11 @@ local firework_entity = {
|
||||
|
||||
local function register_rocket(n, duration, force)
|
||||
def = table.copy(firework_entity)
|
||||
vl_projectile.register("mcl_fireworks:rocket_" .. n, def) -- TODO one entity
|
||||
minetest.register_craftitem("mcl_fireworks:rocket_" .. n, { -- TODO one item, use metadata
|
||||
vl_projectile.register("vl_fireworks:rocket_" .. n, def) -- TODO one entity
|
||||
minetest.register_craftitem("vl_fireworks:rocket_" .. n, { -- TODO one item, use metadata
|
||||
description = description,
|
||||
_tt_help = tt_help .. " " .. duration,
|
||||
inventory_image = "mcl_fireworks_rocket.png",
|
||||
inventory_image = "vl_fireworks_rocket.png",
|
||||
stack_max = 64,
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
local elytra = mcl_playerplus.elytra[user]
|
||||
@ -120,14 +120,14 @@ local function register_rocket(n, duration, force)
|
||||
if not minetest.is_creative_enabled(user:get_player_name()) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
minetest.sound_play("mcl_fireworks_rocket", {pos = user:get_pos()})
|
||||
minetest.sound_play("vl_fireworks_rocket", {pos = user:get_pos()})
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
-- pos.y = pos.y + 1
|
||||
vl_projectile.create("mcl_fireworks:rocket_" .. n, {
|
||||
vl_projectile.create("vl_fireworks:rocket_" .. n, {
|
||||
pos=pos,
|
||||
velocity=vector.new(0,1,0)
|
||||
})
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 199 B |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B |
Loading…
Reference in New Issue
Block a user