Initial commit
389
bb_schems/init.lua
Normal file
@ -0,0 +1,389 @@
|
||||
-- bb_schems is an api table
|
||||
-- bb_schems.arenas is a table of arena definitions
|
||||
-- an arena definition requires the following fields:
|
||||
|
||||
-- name = string, --the name of the arenas
|
||||
-- author = string, --the author of the arenas
|
||||
-- schem = string, --the absolute file location of the schematic
|
||||
-- min = number, --minimum players
|
||||
-- max = number, --maximum players
|
||||
-- spawns = table, --a table of spawn locations
|
||||
-- --it has entries that follow the format:
|
||||
-- {x=number,y=number,z=number},
|
||||
-- spectator_pos = vector location
|
||||
|
||||
|
||||
|
||||
|
||||
bb_schems = {}
|
||||
bb_schems.arenas = {}
|
||||
-- arena registration
|
||||
|
||||
local modpath = minetest.get_modpath("bb_schems")
|
||||
local schemdir = modpath.."/schems/"
|
||||
|
||||
bb_schems.register_arena = function( n_table )
|
||||
table.insert( bb_schems.arenas , n_table )
|
||||
end
|
||||
|
||||
-- gets a random arena from available arenas for the number of players available.
|
||||
-- input: number, player count
|
||||
-- output: table, the arena which is chosen
|
||||
|
||||
bb_schems.get_arena_by_playercount = function( count )
|
||||
-- minetest.debug("count:"..count)
|
||||
-- make a list of available arenas
|
||||
local available = {}
|
||||
-- add arenas based on players
|
||||
for _ , arena in pairs( bb_schems.arenas ) do
|
||||
if count >= arena.min and count <= arena.max then
|
||||
table.insert( available , arena )
|
||||
end
|
||||
end
|
||||
-- choose one, prevent the same arena from running twice, if possible
|
||||
|
||||
local chosen = math.random( 1 , #available )
|
||||
if #available > 1 and bb_schems.last_arena and bb_schems.last_arena == available[ chosen ].name then
|
||||
while bb_schems.last_arena == available[ chosen ].name do
|
||||
chosen = math.random( 1 , #available )
|
||||
end
|
||||
end
|
||||
|
||||
--return the chosen arena
|
||||
-- minetest.debug(dump(chosen))
|
||||
-- minetest.debug(dump(available[chosen]))
|
||||
bb_schems.last_arena = available[ chosen ].name
|
||||
return available[ chosen ]
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- searches the arenas and finds the one by the name given
|
||||
-- input: arena name
|
||||
-- output: arena table
|
||||
bb_schems.get_arena_by_name = function(name)
|
||||
local ret
|
||||
for _, arena in pairs( bb_schems.arenas) do
|
||||
if arena.name == name then
|
||||
ret = arena
|
||||
end
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
-- places the arena at the origin.
|
||||
-- input: arena_name
|
||||
-- places the arena at 0,0
|
||||
|
||||
bb_schems.place_arena = function(name, pos)
|
||||
|
||||
local schem_arena = bb_schems.get_arena_by_name( name )
|
||||
|
||||
-- clear the board by placing an empty air schem
|
||||
minetest.place_schematic(pos, schemdir.."clear.mts")
|
||||
-- place the new schem
|
||||
minetest.place_schematic(pos, schem_arena.schem)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bb_schems.register_arena({
|
||||
|
||||
name = "Four Leaf Clover", --the name of the arenas
|
||||
author = "MisterE", --the author of the arenas
|
||||
schem = schemdir.."4_leaf_clover.mts", --the absolute file location of the schematic
|
||||
min = 2, --minimum players
|
||||
max = 4, --maximum players
|
||||
spawns = {
|
||||
vector.new(2,1,2),
|
||||
vector.new(19,1,19),
|
||||
vector.new(2,1,19),
|
||||
vector.new(19,1,2),
|
||||
}, --a table of spawn locations
|
||||
spectator_pos = vector.new(10,14,10), -- spectator position
|
||||
})
|
||||
|
||||
|
||||
bb_schems.register_arena({
|
||||
|
||||
name = "Aech", --the name of the arenas
|
||||
author = "MisterE", --the author of the arenas
|
||||
schem = schemdir.."Aech.mts", --the absolute file location of the schematic
|
||||
min = 2, --minimum players
|
||||
max = 4, --maximum players
|
||||
spawns = {
|
||||
vector.new(4,1,2),
|
||||
vector.new(15,1,18),
|
||||
vector.new(15,1,2),
|
||||
vector.new(4,1,18),
|
||||
}, --a table of spawn locations
|
||||
spectator_pos = vector.new(10,16,10), -- spectator position
|
||||
})
|
||||
|
||||
|
||||
bb_schems.register_arena({
|
||||
|
||||
name = "iheartBB", --the name of the arenas
|
||||
author = "MisterE", --the author of the arenas
|
||||
schem = schemdir.."iheartbb.mts", --the absolute file location of the schematic
|
||||
min = 2, --minimum players
|
||||
max = 3, --maximum players
|
||||
spawns = {
|
||||
vector.new(2,1,4),
|
||||
vector.new(12,1,4),
|
||||
vector.new(7,1,12),
|
||||
}, --a table of spawn locations
|
||||
spectator_pos = vector.new(7,12,7), -- spectator position
|
||||
})
|
||||
|
||||
|
||||
bb_schems.register_arena({
|
||||
|
||||
name = "BombasticSix", --the name of the arenas
|
||||
author = "MisterE", --the author of the arenas
|
||||
schem = schemdir.."bombasticsix.mts", --the absolute file location of the schematic
|
||||
min = 2, --minimum players
|
||||
max = 6, --maximum players
|
||||
spawns = {
|
||||
vector.new(1,1,1),
|
||||
vector.new(19,1,10),
|
||||
vector.new(1,1,10),
|
||||
vector.new(19,1,1),
|
||||
vector.new(10,1,1),
|
||||
vector.new(10,1,10)
|
||||
}, --a table of spawn locations
|
||||
spectator_pos = vector.new(10,11,6), -- spectator position
|
||||
})
|
||||
|
||||
|
||||
bb_schems.register_arena({
|
||||
|
||||
name = "Classic", --the name of the arenas
|
||||
author = "MisterE", --the author of the arenas
|
||||
schem = schemdir.."Classic.mts", --the absolute file location of the schematic
|
||||
min = 2, --minimum players
|
||||
max = 4, --maximum players
|
||||
spawns = {
|
||||
vector.new(1,1,1),
|
||||
vector.new(17,1,17),
|
||||
vector.new(1,1,17),
|
||||
vector.new(17,1,1),
|
||||
}, --a table of spawn locations
|
||||
spectator_pos = vector.new(9,16,9), -- spectator position
|
||||
})
|
||||
|
||||
|
||||
|
||||
bb_schems.register_arena({
|
||||
|
||||
name = "FourWays", --the name of the arenas
|
||||
author = "MisterE", --the author of the arenas
|
||||
schem = schemdir.."fourways.mts", --the absolute file location of the schematic
|
||||
min = 2, --minimum players
|
||||
max = 4, --maximum players
|
||||
spawns = {
|
||||
vector.new(5,1,2),
|
||||
vector.new(13,1,12),
|
||||
vector.new(13,1,2),
|
||||
vector.new(5,1,12),
|
||||
}, --a table of spawn locations
|
||||
spectator_pos = vector.new(9,13,7), -- spectator position
|
||||
})
|
||||
|
||||
|
||||
|
||||
bb_schems.register_arena({
|
||||
|
||||
name = "NineIsles", --the name of the arenas
|
||||
author = "MisterE", --the author of the arenas
|
||||
schem = schemdir.."nineisles.mts", --the absolute file location of the schematic
|
||||
min = 3, --minimum players
|
||||
max = 8, --maximum players
|
||||
spawns = {
|
||||
vector.new(2,1,2),
|
||||
vector.new(14,1,14),
|
||||
vector.new(2,1,14),
|
||||
vector.new(14,1,2),
|
||||
vector.new(16,1,8),
|
||||
vector.new(0,1,8),
|
||||
vector.new(8,1,16),
|
||||
vector.new(8,1,0),
|
||||
}, --a table of spawn locations
|
||||
spectator_pos = vector.new(8,13,8), -- spectator position
|
||||
})
|
||||
|
||||
|
||||
bb_schems.register_arena({
|
||||
|
||||
name = "Asterisk", --the name of the arenas
|
||||
author = "MisterE", --the author of the arenas
|
||||
schem = schemdir.."asterisk.mts", --the absolute file location of the schematic
|
||||
min = 3, --minimum players
|
||||
max = 8, --maximum players
|
||||
spawns = {
|
||||
vector.new(2,1,2),
|
||||
vector.new(17,1,17),
|
||||
vector.new(17,1,2),
|
||||
vector.new(2,1,17),
|
||||
vector.new(1,1,10),
|
||||
vector.new(18,1,9),
|
||||
vector.new(9,1,1),
|
||||
vector.new(10,1,18),
|
||||
}, --a table of spawn locations
|
||||
spectator_pos = vector.new(10,15,10), -- spectator position
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
bb_schems.register_arena({
|
||||
|
||||
name = "Diamond", --the name of the arenas
|
||||
author = "MisterE", --the author of the arenas
|
||||
schem = schemdir.."diamond.mts", --the absolute file location of the schematic
|
||||
min = 2, --minimum players
|
||||
max = 4, --maximum players
|
||||
spawns = {
|
||||
vector.new(1,1,8),
|
||||
vector.new(15,1,8),
|
||||
vector.new(8,1,1),
|
||||
vector.new(8,1,15),
|
||||
}, --a table of spawn locations
|
||||
spectator_pos = vector.new(8,12,8), -- spectator position
|
||||
})
|
||||
|
||||
|
||||
|
||||
bb_schems.register_arena({
|
||||
|
||||
name = "ToThePoint", --the author of the arenas
|
||||
author = "MisterE",
|
||||
schem = schemdir.."tothepoint.mts", --the absolute file location of the schematic
|
||||
min = 2, --minimum players
|
||||
max = 2, --maximum players
|
||||
spawns = {
|
||||
vector.new(12,1,5),
|
||||
vector.new(1,1,1),
|
||||
}, --a table of spawn locations
|
||||
spectator_pos = vector.new(7,13,4), -- spectator position
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- bb_schems.spawns = {}
|
||||
|
||||
-- -- tools to make level creation easier
|
||||
|
||||
-- -- a spawn indicator node
|
||||
-- minetest.register_node("bb_nodes:spawn", {
|
||||
-- description = "spawn_location",
|
||||
-- tiles = {"bb_schems_spawn.png"},
|
||||
-- groups = {not_in_creative_inventory = 1},
|
||||
-- })
|
||||
|
||||
-- minetest.register_privilege( "level" , "allows level creation" )
|
||||
|
||||
|
||||
-- minetest.register_chatcommand( "setspawn" , {
|
||||
-- privs = {
|
||||
-- level = true,
|
||||
-- },
|
||||
-- func = function( name , param )
|
||||
-- local player = minetest.get_player_by_name( name )
|
||||
-- if not player then return end
|
||||
-- if not minetest.get_modpath("worldedit") then
|
||||
-- return "you need worldedit for this, please install it."
|
||||
-- end
|
||||
-- local pos = player:get_pos()
|
||||
-- pos = vector.round( pos )
|
||||
-- table.insert( bb_schems.spawns , pos )
|
||||
-- minetest.set_node( pos , { name = "bb_nodes:spawn" } )
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
-- minetest.register_chatcommand( "clearspawns" , {
|
||||
-- privs = {
|
||||
-- level = true,
|
||||
-- },
|
||||
-- func = function( name , param )
|
||||
-- local player = minetest.get_player_by_name( name )
|
||||
-- if not player then return end
|
||||
-- for _ , pos in pairs( bb_schems.spawns ) do
|
||||
-- minetest.set_node( pos , { name = "air" } )
|
||||
-- end
|
||||
-- bb_schems.spawns = {}
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
-- minetest.register_chatcommand( "savearena" , {
|
||||
-- privs = {
|
||||
-- level = true,
|
||||
-- },
|
||||
-- func = function( name , param )
|
||||
-- local player = minetest.get_player_by_name( name )
|
||||
-- if not player then return end
|
||||
-- if not minetest.get_modpath("worldedit") then
|
||||
-- return "you need worldedit for this, please install it"
|
||||
-- end
|
||||
-- local pos1 = worldedit.pos1[name]
|
||||
-- local pos2 = worldedit.pos2[name]
|
||||
-- local path = minetest.get_worldpath().."/arenas"
|
||||
-- for _ , pos in pairs( bb_schems.spawns ) do
|
||||
-- minetest.set_node( pos , { name = "air" } )
|
||||
-- end
|
||||
-- if not path then minetest.mkdir(path) end
|
||||
-- local file = path .."/".. param .. ".mts"
|
||||
-- minetest.create_schematic(pos1, pos2, worldedit.probability_list[name], file)
|
||||
|
||||
|
||||
|
||||
-- end,
|
||||
-- })
|
29
bb_schems/license.txt
Normal file
@ -0,0 +1,29 @@
|
||||
Copyright 2021 MisterE
|
||||
Copyright 2021 threehymns
|
||||
|
||||
THE MIT LICENSE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
Media
|
||||
%%%%%%%%%%%%%%%
|
||||
|
||||
Schems
|
||||
-------------
|
||||
CC0 MisterE
|
||||
4_leaf_clover
|
||||
Aech
|
||||
asterisk
|
||||
bombasticsix
|
||||
Classic
|
||||
clear
|
||||
diamond
|
||||
fourways
|
||||
iheartbb
|
||||
nineisles
|
||||
tothepoint
|
3
bb_schems/mod.conf
Normal file
@ -0,0 +1,3 @@
|
||||
name = bb_schems
|
||||
depends = arena_lib, block_bomber_mg
|
||||
optional_depends = player_api
|
BIN
bb_schems/schems/4_leaf_clover.mts
Normal file
BIN
bb_schems/schems/Aech.mts
Normal file
BIN
bb_schems/schems/Classic.mts
Normal file
BIN
bb_schems/schems/asterisk.mts
Normal file
BIN
bb_schems/schems/bombasticsix.mts
Normal file
BIN
bb_schems/schems/clear.mts
Normal file
BIN
bb_schems/schems/diamond.mts
Normal file
BIN
bb_schems/schems/fourways.mts
Normal file
BIN
bb_schems/schems/iheartbb.mts
Normal file
BIN
bb_schems/schems/nineisles.mts
Normal file
BIN
bb_schems/schems/tothepoint.mts
Normal file
BIN
bb_schems/textures/bb_schems_spawn.png
Normal file
After Width: | Height: | Size: 174 B |
87
block_bomber_mg/init.lua
Normal file
@ -0,0 +1,87 @@
|
||||
-- tofix: player models animations, HUD being removed, reasonable sudden_death
|
||||
|
||||
local modname = "block_bomber_mg"
|
||||
blockbomber = {}
|
||||
blockbomber.modname = modname
|
||||
|
||||
arena_lib.register_minigame(modname,{
|
||||
name = "Blockbomber",
|
||||
prefix = "BB: ",
|
||||
icon = "blbmr_icon.png",
|
||||
-- min_version = 43,
|
||||
player_aspect = {
|
||||
visual = "mesh",
|
||||
mesh = "bb_character.b3d",
|
||||
textures = {"blank.png","blank.png"},
|
||||
visual_size = {x = 4, y = 4},
|
||||
collisionbox = {-0.4, 0.0, -0.4, 0.4, 0.9,0.4},
|
||||
stepheight = 0.3,
|
||||
eye_height = 1.3,
|
||||
physical = false,
|
||||
collides_with_objects = false,
|
||||
},
|
||||
hud_flags = {wielditem=false,healthbar=false,crosshair=true,breathbar=false,minimap=true},
|
||||
damage_modifiers = {fall_damage_add_percent=-100},
|
||||
-- camera_offset = {},
|
||||
hotbar = {
|
||||
slots = 2,
|
||||
background_image = "bb_player_gui_hotbar_2.png",
|
||||
selected_image = "blank.png",
|
||||
},
|
||||
min_players = 2,
|
||||
regenerate_map = true,
|
||||
disable_inventory = true,
|
||||
show_nametags = true,
|
||||
time_mode = "incremental",
|
||||
in_game_physics = {
|
||||
-- physics override parameters
|
||||
speed = 0,
|
||||
gravity = 70,
|
||||
jump = 0,
|
||||
sneak = false,
|
||||
},
|
||||
disabled_damage_types = {"fall","punch"},
|
||||
properties = {
|
||||
sudden_death_time = 180,
|
||||
origin = {x=0,y=0,z=0}, -- this will be set to a position inside the arena arena; where the schematic is placed and the offset for player spawns
|
||||
},
|
||||
temp_properties = {
|
||||
match_id = 0,
|
||||
countdown = -1,
|
||||
sudden_death = false,
|
||||
sudden_death_timer = 0,
|
||||
map = {},
|
||||
},
|
||||
player_properties = {
|
||||
speed = 0,
|
||||
dead = false,
|
||||
cause = "",
|
||||
anim = "stand",
|
||||
-- original_attached = false,
|
||||
},
|
||||
})
|
||||
|
||||
local path = minetest.get_modpath(modname)
|
||||
|
||||
-- // load files from the src directory
|
||||
|
||||
local files = {
|
||||
"storage",
|
||||
"bombs",
|
||||
"controls",
|
||||
"deathmessages",
|
||||
"globalstep",
|
||||
"hud",
|
||||
"items",
|
||||
"minigame_manager",
|
||||
"misc_entities",
|
||||
"nodes",
|
||||
"player_colors",
|
||||
"sudden_death"
|
||||
}
|
||||
|
||||
|
||||
|
||||
for _, item in ipairs(files) do
|
||||
dofile(path .. DIR_DELIM .. "src" .. DIR_DELIM .. item .. ".lua")
|
||||
end
|
2
block_bomber_mg/mod.conf
Normal file
@ -0,0 +1,2 @@
|
||||
name = block_bomber_mg
|
||||
depends = arena_lib, controls
|
BIN
block_bomber_mg/models/bb_bomb.b3d
Normal file
BIN
block_bomber_mg/models/bb_bomb.blend
Normal file
BIN
block_bomber_mg/models/bb_bomb.blend1
Normal file
BIN
block_bomber_mg/models/bb_character.b3d
Normal file
BIN
block_bomber_mg/models/bb_character.blend
Normal file
4
block_bomber_mg/models/bb_character_keyframes.txt
Normal file
@ -0,0 +1,4 @@
|
||||
Wait/stand: 0-40
|
||||
walk: 60-100
|
||||
fall: 110-150
|
||||
die: 170-210
|
5
block_bomber_mg/models/bomb_keyframes.txt
Normal file
@ -0,0 +1,5 @@
|
||||
wait: 0-40
|
||||
throw: 60-100
|
||||
bounce: 120- 150 ( for kick start)
|
||||
kick: 160-200 - unused
|
||||
fall: 220-260
|
314
block_bomber_mg/models/bush.obj
Normal file
@ -0,0 +1,314 @@
|
||||
# Blender v2.93.6 OBJ File: 'untitled.blend'
|
||||
# www.blender.org
|
||||
mtllib bush.mtl
|
||||
o Cube_Cube.001
|
||||
v 0.375000 0.375000 -0.437500
|
||||
v 0.375000 -0.250000 -0.437500
|
||||
v 0.437500 0.375000 0.375000
|
||||
v 0.437500 -0.250000 0.375000
|
||||
v -0.375000 0.375000 -0.437500
|
||||
v -0.375000 -0.250000 -0.437500
|
||||
v -0.375000 0.437500 0.375000
|
||||
v -0.375000 -0.250000 0.437500
|
||||
v 0.437500 0.375000 -0.375000
|
||||
v 0.437500 -0.250000 -0.375000
|
||||
v -0.375000 0.437500 -0.375000
|
||||
v -0.437500 -0.250000 -0.375000
|
||||
v 0.375000 0.437500 -0.375000
|
||||
v 0.375000 0.437500 0.375000
|
||||
v 0.375000 -0.312500 -0.375000
|
||||
v 0.375000 -0.250000 0.437500
|
||||
v 0.375000 0.375000 0.437500
|
||||
v -0.375000 0.375000 0.437500
|
||||
v 0.437500 0.437500 -0.437500
|
||||
v -0.437500 0.375000 -0.375000
|
||||
v 0.437500 0.437500 0.437500
|
||||
v -0.437500 0.375000 0.375000
|
||||
v -0.437500 -0.250000 0.375000
|
||||
v 0.375000 -0.312500 0.375000
|
||||
v -0.375000 -0.312500 -0.375000
|
||||
v -0.375000 -0.312500 0.375000
|
||||
v -0.437500 0.437500 -0.437500
|
||||
v -0.437500 0.437500 0.437500
|
||||
v -0.500000 -0.250000 -0.375000
|
||||
v -0.500000 -0.250000 0.375000
|
||||
v -0.500000 0.375000 -0.375000
|
||||
v -0.500000 0.375000 0.375000
|
||||
v 0.375000 0.500000 0.375000
|
||||
v -0.375000 0.500000 0.375000
|
||||
v 0.375000 0.500000 -0.375000
|
||||
v -0.375000 0.500000 -0.375000
|
||||
v 0.375000 0.375000 0.500000
|
||||
v -0.375000 0.375000 0.500000
|
||||
v -0.375000 -0.250000 0.500000
|
||||
v 0.375000 -0.250000 0.500000
|
||||
v 0.375000 0.375000 -0.500000
|
||||
v 0.375000 -0.250000 -0.500000
|
||||
v -0.375000 0.375000 -0.500000
|
||||
v -0.375000 -0.250000 -0.500000
|
||||
v 0.500000 0.375000 -0.375000
|
||||
v 0.500000 0.375000 0.375000
|
||||
v 0.500000 -0.250000 -0.375000
|
||||
v 0.500000 -0.250000 0.375000
|
||||
v -0.437500 -0.312500 0.437500
|
||||
v 0.437500 -0.312500 0.437500
|
||||
v 0.437500 -0.312500 -0.437500
|
||||
v -0.437500 -0.312500 -0.437500
|
||||
v -0.187500 -0.375000 0.187500
|
||||
v 0.187500 -0.375000 0.187500
|
||||
v 0.187500 -0.375000 -0.187500
|
||||
v -0.187500 -0.375000 -0.187500
|
||||
v -0.375000 -0.375000 0.375000
|
||||
v 0.375000 -0.375000 0.375000
|
||||
v 0.375000 -0.375000 -0.375000
|
||||
v -0.375000 -0.375000 -0.375000
|
||||
v -0.187500 -0.500000 0.187500
|
||||
v 0.187500 -0.500000 0.187500
|
||||
v 0.187500 -0.500000 -0.187500
|
||||
v -0.187500 -0.500000 -0.187500
|
||||
vt 0.937500 0.593750
|
||||
vt 0.562500 0.593750
|
||||
vt 0.562500 0.562500
|
||||
vt 0.937500 0.562500
|
||||
vt 0.437500 0.968750
|
||||
vt 0.062500 0.968750
|
||||
vt 0.062500 1.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.031250 0.562500
|
||||
vt 0.031250 0.937500
|
||||
vt -0.000000 0.937500
|
||||
vt -0.000000 0.562500
|
||||
vt 0.531250 0.937500
|
||||
vt 0.531250 0.625000
|
||||
vt 0.500000 0.625000
|
||||
vt 0.500000 0.937500
|
||||
vt 0.937500 0.968750
|
||||
vt 0.562500 0.968750
|
||||
vt 0.562500 1.000000
|
||||
vt 0.937500 1.000000
|
||||
vt 0.468750 0.562500
|
||||
vt 0.468750 0.937500
|
||||
vt 0.500000 0.937500
|
||||
vt 0.500000 0.562500
|
||||
vt 0.937500 0.625000
|
||||
vt 0.937500 0.937500
|
||||
vt 0.968750 0.968750
|
||||
vt 0.968750 0.593750
|
||||
vt 0.562500 0.937500
|
||||
vt 0.531250 0.968750
|
||||
vt 0.562500 0.625000
|
||||
vt 0.531250 0.593750
|
||||
vt 0.562500 0.937500
|
||||
vt 0.937500 0.937500
|
||||
vt 0.531250 0.968750
|
||||
vt 0.937500 0.625000
|
||||
vt 0.562500 0.625000
|
||||
vt 0.531250 0.593750
|
||||
vt 0.437500 0.562500
|
||||
vt 0.062500 0.562500
|
||||
vt 0.031250 0.531250
|
||||
vt 0.468750 0.531250
|
||||
vt 0.437500 0.937500
|
||||
vt 0.468750 0.968750
|
||||
vt 0.062500 0.937500
|
||||
vt 0.031250 0.968750
|
||||
vt 0.562500 0.937500
|
||||
vt 0.937500 0.937500
|
||||
vt 0.968750 0.968750
|
||||
vt 0.531250 0.968750
|
||||
vt 0.937500 0.625000
|
||||
vt 0.562500 0.625000
|
||||
vt 0.531250 0.593750
|
||||
vt 0.968750 0.593750
|
||||
vt 0.562500 0.625000
|
||||
vt 0.937500 0.625000
|
||||
vt 0.968750 0.593750
|
||||
vt 0.937500 0.937500
|
||||
vt 0.968750 0.968750
|
||||
vt 0.562500 0.937500
|
||||
vt 0.562500 0.625000
|
||||
vt 0.562500 0.937500
|
||||
vt 0.937500 0.937500
|
||||
vt 0.937500 0.625000
|
||||
vt 0.531250 0.937500
|
||||
vt 0.531250 0.625000
|
||||
vt 0.500000 0.625000
|
||||
vt 0.500000 0.937500
|
||||
vt 0.531250 0.625000
|
||||
vt 0.531250 0.937500
|
||||
vt 0.500000 0.937500
|
||||
vt 0.500000 0.625000
|
||||
vt 0.031250 0.937500
|
||||
vt 0.031250 0.562500
|
||||
vt 0.000000 0.562500
|
||||
vt 0.000000 0.937500
|
||||
vt 0.437500 0.937500
|
||||
vt 0.062500 0.937500
|
||||
vt 0.062500 0.562500
|
||||
vt 0.437500 0.562500
|
||||
vt 0.562500 0.968750
|
||||
vt 0.937500 0.968750
|
||||
vt 0.937500 1.000000
|
||||
vt 0.562500 1.000000
|
||||
vt 0.562500 0.968750
|
||||
vt 0.562500 1.000000
|
||||
vt 0.937500 0.968750
|
||||
vt 0.937500 1.000000
|
||||
vt 0.937500 0.625000
|
||||
vt 0.937500 0.937500
|
||||
vt 0.562500 0.937500
|
||||
vt 0.562500 0.625000
|
||||
vt 0.437500 0.531250
|
||||
vt 0.062500 0.531250
|
||||
vt 0.062500 0.500000
|
||||
vt 0.437500 0.500000
|
||||
vt 0.531250 0.625000
|
||||
vt 0.531250 0.937500
|
||||
vt 0.500000 0.937500
|
||||
vt 0.500000 0.625000
|
||||
vt 0.062500 0.531250
|
||||
vt 0.437500 0.531250
|
||||
vt 0.437500 0.500000
|
||||
vt 0.062500 0.500000
|
||||
vt 0.562500 0.625000
|
||||
vt 0.562500 0.937500
|
||||
vt 0.937500 0.937500
|
||||
vt 0.937500 0.625000
|
||||
vt 0.968750 0.937500
|
||||
vt 0.968750 0.625000
|
||||
vt 1.000000 0.625000
|
||||
vt 1.000000 0.937500
|
||||
vt 0.968750 0.625000
|
||||
vt 0.968750 0.937500
|
||||
vt 1.000000 0.937500
|
||||
vt 1.000000 0.625000
|
||||
vt 0.062500 0.968750
|
||||
vt 0.437500 0.968750
|
||||
vt 0.437500 1.000000
|
||||
vt 0.062500 1.000000
|
||||
vt 0.937500 0.625000
|
||||
vt 0.937500 0.937500
|
||||
vt 0.562500 0.937500
|
||||
vt 0.562500 0.625000
|
||||
vt 0.968750 0.625000
|
||||
vt 0.968750 0.937500
|
||||
vt 1.000000 0.937500
|
||||
vt 1.000000 0.625000
|
||||
vt 0.968750 0.937500
|
||||
vt 0.968750 0.625000
|
||||
vt 1.000000 0.625000
|
||||
vt 1.000000 0.937500
|
||||
vt 0.468750 0.937500
|
||||
vt 0.468750 0.562500
|
||||
vt 0.500000 0.562500
|
||||
vt 0.500000 0.937500
|
||||
vt 0.062500 0.562500
|
||||
vt 0.437500 0.562500
|
||||
vt 0.468750 0.531250
|
||||
vt 0.031250 0.531250
|
||||
vt 0.437500 0.937500
|
||||
vt 0.062500 0.937500
|
||||
vt 0.031250 0.968750
|
||||
vt 0.468750 0.968750
|
||||
vt 0.656250 0.562500
|
||||
vt 0.843750 0.562500
|
||||
vt 0.843750 0.500000
|
||||
vt 0.656250 0.500000
|
||||
vt 0.562500 0.593750
|
||||
vt 0.562500 0.562500
|
||||
vt 0.562500 0.593750
|
||||
vt 0.937500 0.593750
|
||||
vt 0.937500 0.562500
|
||||
vt 0.562500 0.562500
|
||||
vt 0.937500 0.593750
|
||||
vt 0.937500 0.562500
|
||||
vt 0.156250 0.656250
|
||||
vt 0.343750 0.656250
|
||||
vt 0.437500 0.562500
|
||||
vt 0.062500 0.562500
|
||||
vt 0.343750 0.843750
|
||||
vt 0.156250 0.843750
|
||||
vt 0.062500 0.937500
|
||||
vt 0.437500 0.937500
|
||||
vt 0.656250 0.343750
|
||||
vt 0.843750 0.343750
|
||||
vt 0.843750 0.156250
|
||||
vt 0.656250 0.156250
|
||||
vt 0.843750 0.562500
|
||||
vt 0.843750 0.500000
|
||||
vt 0.843750 0.562500
|
||||
vt 0.656250 0.562500
|
||||
vt 0.656250 0.500000
|
||||
vt 0.843750 0.500000
|
||||
vt 0.656250 0.562500
|
||||
vt 0.656250 0.500000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
usemtl Material.001
|
||||
s off
|
||||
f 15/1/1 24/2/1 58/3/1 59/4/1
|
||||
f 2/5/2 6/6/2 44/7/2 42/8/2
|
||||
f 22/9/3 20/10/3 31/11/3 32/12/3
|
||||
f 18/13/4 8/14/4 39/15/4 38/16/4
|
||||
f 11/17/4 7/18/4 34/19/4 36/20/4
|
||||
f 4/21/2 10/22/2 47/23/2 48/24/2
|
||||
f 2/25/5 1/26/5 19/27/5 51/28/5
|
||||
f 1/26/5 5/29/5 27/30/5 19/27/5
|
||||
f 6/31/5 2/25/5 51/28/5 52/32/5
|
||||
f 5/29/5 6/31/5 52/32/5 27/30/5
|
||||
f 3/33/1 9/34/1 19/27/1 21/35/1
|
||||
f 9/34/1 10/36/1 51/28/1 19/27/1
|
||||
f 4/37/1 3/33/1 21/35/1 50/38/1
|
||||
f 10/36/1 4/37/1 50/38/1 51/28/1
|
||||
f 14/39/3 7/40/3 28/41/3 21/42/3
|
||||
f 13/43/3 14/39/3 21/42/3 19/44/3
|
||||
f 11/45/3 13/43/3 19/44/3 27/46/3
|
||||
f 7/40/3 11/45/3 27/46/3 28/41/3
|
||||
f 18/47/6 17/48/6 21/49/6 28/50/6
|
||||
f 16/51/6 8/52/6 49/53/6 50/54/6
|
||||
f 8/52/6 18/47/6 28/50/6 49/53/6
|
||||
f 17/48/6 16/51/6 50/54/6 21/49/6
|
||||
f 23/55/4 12/56/4 52/57/4 49/53/4
|
||||
f 12/56/4 20/58/4 27/59/4 52/57/4
|
||||
f 22/60/4 23/55/4 49/53/4 28/50/4
|
||||
f 20/58/4 22/60/4 28/50/4 27/59/4
|
||||
f 30/61/4 32/62/4 31/63/4 29/64/4
|
||||
f 20/65/5 12/66/5 29/67/5 31/68/5
|
||||
f 23/69/6 22/70/6 32/71/6 30/72/6
|
||||
f 12/73/2 23/74/2 30/75/2 29/76/2
|
||||
f 35/77/3 36/78/3 34/79/3 33/80/3
|
||||
f 14/81/1 13/82/1 35/83/1 33/84/1
|
||||
f 13/82/5 11/85/5 36/86/5 35/83/5
|
||||
f 7/18/6 14/87/6 33/88/6 34/19/6
|
||||
f 40/89/6 37/90/6 38/91/6 39/92/6
|
||||
f 17/93/3 18/94/3 38/95/3 37/96/3
|
||||
f 16/97/1 17/98/1 37/99/1 40/100/1
|
||||
f 8/101/2 16/102/2 40/103/2 39/104/2
|
||||
f 44/105/5 43/106/5 41/107/5 42/108/5
|
||||
f 1/109/1 2/110/1 42/111/1 41/112/1
|
||||
f 6/113/4 5/114/4 43/115/4 44/116/4
|
||||
f 5/117/3 1/118/3 41/119/3 43/120/3
|
||||
f 47/121/1 45/122/1 46/123/1 48/124/1
|
||||
f 10/125/5 9/126/5 45/127/5 47/128/5
|
||||
f 3/129/6 4/130/6 48/131/6 46/132/6
|
||||
f 9/133/3 3/134/3 46/135/3 45/136/3
|
||||
f 26/137/2 24/138/2 50/139/2 49/140/2
|
||||
f 15/141/2 25/142/2 52/143/2 51/144/2
|
||||
f 25/142/2 26/137/2 49/140/2 52/143/2
|
||||
f 24/138/2 15/141/2 51/144/2 50/139/2
|
||||
f 53/145/4 56/146/4 64/147/4 61/148/4
|
||||
f 25/149/5 15/1/5 59/4/5 60/150/5
|
||||
f 26/151/4 25/152/4 60/153/4 57/154/4
|
||||
f 24/155/6 26/151/6 57/154/6 58/156/6
|
||||
f 53/157/2 54/158/2 58/159/2 57/160/2
|
||||
f 55/161/2 56/162/2 60/163/2 59/164/2
|
||||
f 56/162/2 53/157/2 57/160/2 60/163/2
|
||||
f 54/158/2 55/161/2 59/164/2 58/159/2
|
||||
f 64/165/2 63/166/2 62/167/2 61/168/2
|
||||
f 54/169/6 53/145/6 61/148/6 62/170/6
|
||||
f 55/171/1 54/172/1 62/173/1 63/174/1
|
||||
f 56/175/5 55/171/5 63/174/5 64/176/5
|
23
block_bomber_mg/models/fence.mtl
Normal file
@ -0,0 +1,23 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 2
|
||||
|
||||
newmtl Material.001
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
|
||||
newmtl Material.002
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd C:\\Users\\gbrru\\Desktop\\minetest5.5_2\\games\\blockbomber\\mods\\bb_nodes\\textures\\fence_classic.png
|
367
block_bomber_mg/models/fence.obj
Normal file
@ -0,0 +1,367 @@
|
||||
# Blender v2.93.6 OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib fence.mtl
|
||||
o Cube_Cube.001
|
||||
v 0.437500 -0.625000 0.500000
|
||||
v 0.437500 0.312500 0.500000
|
||||
v 0.437500 0.312500 0.437500
|
||||
v 0.437500 -0.625000 0.437500
|
||||
v 0.500000 0.312500 0.437500
|
||||
v 0.500000 -0.625000 0.437500
|
||||
v 0.500000 0.312500 0.500000
|
||||
v 0.500000 -0.625000 0.500000
|
||||
v -0.500000 -0.625000 0.500000
|
||||
v -0.500000 0.312500 0.500000
|
||||
v -0.500000 0.312500 0.437500
|
||||
v -0.500000 -0.625000 0.437500
|
||||
v -0.437500 0.312500 0.437500
|
||||
v -0.437500 -0.625000 0.437500
|
||||
v -0.437500 0.312500 0.500000
|
||||
v -0.437500 -0.625000 0.500000
|
||||
v -0.062500 -0.625000 0.500000
|
||||
v -0.062500 0.312500 0.500000
|
||||
v -0.062500 0.312500 0.437500
|
||||
v -0.062500 -0.625000 0.437500
|
||||
v 0.062500 0.312500 0.437500
|
||||
v 0.062500 -0.625000 0.437500
|
||||
v 0.062500 0.312500 0.500000
|
||||
v 0.062500 -0.625000 0.500000
|
||||
v -0.500000 0.187500 0.562500
|
||||
v 0.500000 0.187500 0.562500
|
||||
v 0.500000 0.187500 0.500000
|
||||
v -0.500000 0.187500 0.500000
|
||||
v 0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.000000 0.500000
|
||||
v 0.500000 -0.000000 0.562500
|
||||
v -0.500000 -0.000000 0.562500
|
||||
v -0.500000 -0.125000 0.562500
|
||||
v 0.500000 -0.125000 0.562500
|
||||
v 0.500000 -0.125000 0.500000
|
||||
v -0.500000 -0.125000 0.500000
|
||||
v 0.500000 -0.312500 0.500000
|
||||
v -0.500000 -0.312500 0.500000
|
||||
v 0.500000 -0.312500 0.562500
|
||||
v -0.500000 -0.312500 0.562500
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt 0.000000 0.000000
|
||||
vt 0.125000 -0.000000
|
||||
vt 0.125000 0.937500
|
||||
vt -0.000000 0.062500
|
||||
vt 0.062500 0.062500
|
||||
vt 0.062500 -0.000000
|
||||
vt -0.000000 -0.000000
|
||||
vt -0.000000 0.937500
|
||||
vt -0.000000 0.875000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.000000 0.937500
|
||||
vt 0.062500 0.937500
|
||||
vt 0.062500 -0.000000
|
||||
vt 0.000000 0.937500
|
||||
vt -0.000000 0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt -0.000000 0.937500
|
||||
vt -0.000000 0.000000
|
||||
vt 0.000000 0.062500
|
||||
vt 0.062500 0.062500
|
||||
vt -0.000000 0.875000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.000000 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 -0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt -0.000000 0.000000
|
||||
vt 0.125000 0.000000
|
||||
vt 0.125000 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt 0.000000 0.000000
|
||||
vt -0.000000 0.062500
|
||||
vt 0.125000 0.062500
|
||||
vt 0.000000 0.875000
|
||||
vt 0.125000 0.875000
|
||||
vt 0.250000 1.062500
|
||||
vt 0.250000 0.062500
|
||||
vt 0.312500 0.062500
|
||||
vt 0.312500 1.062500
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.312500 0.937500
|
||||
vt 0.312500 -0.062500
|
||||
vt 0.250000 -0.062500
|
||||
vt 0.250000 0.937500
|
||||
vt 0.250000 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.500000
|
||||
vt 0.437500 0.312500
|
||||
vt 0.375000 0.312500
|
||||
vt 0.375000 0.500000
|
||||
vt 0.437500 0.312500
|
||||
vt 0.437500 0.500000
|
||||
vt 0.375000 0.500000
|
||||
vt 0.375000 0.312500
|
||||
vt 0.250000 1.062500
|
||||
vt 0.250000 0.062500
|
||||
vt 0.312500 0.062500
|
||||
vt 0.312500 1.062500
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.312500 0.937500
|
||||
vt 0.312500 -0.062500
|
||||
vt 0.250000 -0.062500
|
||||
vt 0.250000 0.937500
|
||||
vt 0.250000 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.187500
|
||||
vt 0.437500 -0.000000
|
||||
vt 0.375000 -0.000000
|
||||
vt 0.375000 0.187500
|
||||
vt 0.437500 -0.000000
|
||||
vt 0.437500 0.187500
|
||||
vt 0.375000 0.187500
|
||||
vt 0.375000 -0.000000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 -0.0000 1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
usemtl Material.001
|
||||
s 1
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 4/5/2 3/6/2 5/7/2 6/8/2
|
||||
f 6/9/3 5/10/3 7/11/3 8/12/3
|
||||
f 8/13/4 7/14/4 2/2/4 1/1/4
|
||||
f 4/15/5 6/16/5 8/17/5 1/18/5
|
||||
f 5/10/6 3/19/6 2/20/6 7/21/6
|
||||
f 9/22/1 10/23/1 11/24/1 12/25/1
|
||||
f 12/26/2 11/27/2 13/28/2 14/29/2
|
||||
f 14/29/3 13/28/3 15/30/3 16/31/3
|
||||
f 16/32/4 15/33/4 10/34/4 9/35/4
|
||||
f 12/36/5 14/37/5 16/32/5 9/35/5
|
||||
f 13/28/6 11/27/6 10/38/6 15/39/6
|
||||
f 17/40/1 18/41/1 19/42/1 20/43/1
|
||||
f 20/44/2 19/45/2 21/46/2 22/47/2
|
||||
f 22/48/3 21/49/3 23/50/3 24/51/3
|
||||
f 24/52/4 23/53/4 18/54/4 17/55/4
|
||||
f 20/56/5 22/57/5 24/52/5 17/55/5
|
||||
f 21/46/6 19/45/6 18/58/6 23/59/6
|
||||
f 25/60/6 26/61/6 27/62/6 28/63/6
|
||||
f 28/64/2 27/65/2 29/66/2 30/67/2
|
||||
f 30/68/5 29/69/5 31/70/5 32/71/5
|
||||
f 32/72/4 31/73/4 26/74/4 25/75/4
|
||||
f 28/76/1 30/77/1 32/78/1 25/79/1
|
||||
f 29/80/3 27/81/3 26/82/3 31/83/3
|
||||
f 33/84/6 34/85/6 35/86/6 36/87/6
|
||||
f 36/88/2 35/89/2 37/90/2 38/91/2
|
||||
f 38/92/5 37/93/5 39/94/5 40/95/5
|
||||
f 40/96/4 39/97/4 34/98/4 33/99/4
|
||||
f 36/100/1 38/101/1 40/102/1 33/103/1
|
||||
f 37/104/3 35/105/3 34/106/3 39/107/3
|
||||
o Cube_Cube.002
|
||||
v 0.437500 -0.625000 0.500000
|
||||
v 0.437500 0.312500 0.500000
|
||||
v 0.437500 0.312500 0.437500
|
||||
v 0.437500 -0.625000 0.437500
|
||||
v 0.500000 0.312500 0.437500
|
||||
v 0.500000 -0.625000 0.437500
|
||||
v 0.500000 0.312500 0.500000
|
||||
v 0.500000 -0.625000 0.500000
|
||||
v -0.500000 -0.625000 0.500000
|
||||
v -0.500000 0.312500 0.500000
|
||||
v -0.500000 0.312500 0.437500
|
||||
v -0.500000 -0.625000 0.437500
|
||||
v -0.437500 0.312500 0.437500
|
||||
v -0.437500 -0.625000 0.437500
|
||||
v -0.437500 0.312500 0.500000
|
||||
v -0.437500 -0.625000 0.500000
|
||||
v -0.062500 -0.625000 0.500000
|
||||
v -0.062500 0.312500 0.500000
|
||||
v -0.062500 0.312500 0.437500
|
||||
v -0.062500 -0.625000 0.437500
|
||||
v 0.062500 0.312500 0.437500
|
||||
v 0.062500 -0.625000 0.437500
|
||||
v 0.062500 0.312500 0.500000
|
||||
v 0.062500 -0.625000 0.500000
|
||||
v -0.500000 0.187500 0.562500
|
||||
v 0.500000 0.187500 0.562500
|
||||
v 0.500000 0.187500 0.500000
|
||||
v -0.500000 0.187500 0.500000
|
||||
v 0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.000000 0.500000
|
||||
v 0.500000 -0.000000 0.562500
|
||||
v -0.500000 -0.000000 0.562500
|
||||
v -0.500000 -0.125000 0.562500
|
||||
v 0.500000 -0.125000 0.562500
|
||||
v 0.500000 -0.125000 0.500000
|
||||
v -0.500000 -0.125000 0.500000
|
||||
v 0.500000 -0.312500 0.500000
|
||||
v -0.500000 -0.312500 0.500000
|
||||
v 0.500000 -0.312500 0.562500
|
||||
v -0.500000 -0.312500 0.562500
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt 0.000000 0.000000
|
||||
vt 0.125000 -0.000000
|
||||
vt 0.125000 0.937500
|
||||
vt -0.000000 0.062500
|
||||
vt 0.062500 0.062500
|
||||
vt 0.062500 -0.000000
|
||||
vt -0.000000 -0.000000
|
||||
vt -0.000000 0.937500
|
||||
vt -0.000000 0.875000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.000000 0.937500
|
||||
vt 0.062500 0.937500
|
||||
vt 0.062500 -0.000000
|
||||
vt 0.000000 0.937500
|
||||
vt -0.000000 0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt -0.000000 0.937500
|
||||
vt -0.000000 0.000000
|
||||
vt 0.000000 0.062500
|
||||
vt 0.062500 0.062500
|
||||
vt -0.000000 0.875000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.000000 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 -0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt -0.000000 0.000000
|
||||
vt 0.125000 0.000000
|
||||
vt 0.125000 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt 0.000000 0.000000
|
||||
vt -0.000000 0.062500
|
||||
vt 0.125000 0.062500
|
||||
vt 0.000000 0.875000
|
||||
vt 0.125000 0.875000
|
||||
vt 0.375000 1.000000
|
||||
vt 0.375000 0.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.312500 1.000000
|
||||
vt 0.312500 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.562500
|
||||
vt 0.437500 0.375000
|
||||
vt 0.375000 0.375000
|
||||
vt 0.375000 0.562500
|
||||
vt 0.437500 0.312500
|
||||
vt 0.437500 0.500000
|
||||
vt 0.375000 0.500000
|
||||
vt 0.375000 0.312500
|
||||
vt 0.375000 1.000000
|
||||
vt 0.375000 0.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.312500 1.000000
|
||||
vt 0.312500 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.062500
|
||||
vt 0.437500 -0.125000
|
||||
vt 0.375000 -0.125000
|
||||
vt 0.375000 0.062500
|
||||
vt 0.437500 0.062500
|
||||
vt 0.437500 0.250000
|
||||
vt 0.375000 0.250000
|
||||
vt 0.375000 0.062500
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 -0.0000 1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
usemtl Material.002
|
||||
s 1
|
||||
f 41/108/7 42/109/7 43/110/7 44/111/7
|
||||
f 44/112/8 43/113/8 45/114/8 46/115/8
|
||||
f 46/116/9 45/117/9 47/118/9 48/119/9
|
||||
f 48/120/10 47/121/10 42/109/10 41/108/10
|
||||
f 44/122/11 46/123/11 48/124/11 41/125/11
|
||||
f 45/117/12 43/126/12 42/127/12 47/128/12
|
||||
f 49/129/7 50/130/7 51/131/7 52/132/7
|
||||
f 52/133/8 51/134/8 53/135/8 54/136/8
|
||||
f 54/136/9 53/135/9 55/137/9 56/138/9
|
||||
f 56/139/10 55/140/10 50/141/10 49/142/10
|
||||
f 52/143/11 54/144/11 56/139/11 49/142/11
|
||||
f 53/135/12 51/134/12 50/145/12 55/146/12
|
||||
f 57/147/7 58/148/7 59/149/7 60/150/7
|
||||
f 60/151/8 59/152/8 61/153/8 62/154/8
|
||||
f 62/155/9 61/156/9 63/157/9 64/158/9
|
||||
f 64/159/10 63/160/10 58/161/10 57/162/10
|
||||
f 60/163/11 62/164/11 64/159/11 57/162/11
|
||||
f 61/153/12 59/152/12 58/165/12 63/166/12
|
||||
f 65/167/12 66/168/12 67/169/12 68/170/12
|
||||
f 68/170/8 67/169/8 69/171/8 70/172/8
|
||||
f 70/173/11 69/174/11 71/175/11 72/176/11
|
||||
f 72/176/10 71/175/10 66/177/10 65/178/10
|
||||
f 68/179/7 70/180/7 72/181/7 65/182/7
|
||||
f 69/183/9 67/184/9 66/185/9 71/186/9
|
||||
f 73/187/12 74/188/12 75/189/12 76/190/12
|
||||
f 76/190/8 75/189/8 77/191/8 78/192/8
|
||||
f 78/193/11 77/194/11 79/195/11 80/196/11
|
||||
f 80/196/10 79/195/10 74/197/10 73/198/10
|
||||
f 76/199/7 78/200/7 80/201/7 73/202/7
|
||||
f 77/203/9 75/204/9 74/205/9 79/206/9
|
23
block_bomber_mg/models/fence_corner.mtl
Normal file
@ -0,0 +1,23 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 2
|
||||
|
||||
newmtl Material.001
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
|
||||
newmtl Material.002
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd C:\\Users\\gbrru\\Desktop\\minetest5.5_2\\games\\blockbomber\\mods\\bb_nodes\\textures\\fence_classic.png
|
335
block_bomber_mg/models/fence_corner.obj
Normal file
@ -0,0 +1,335 @@
|
||||
# Blender v2.93.6 OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib fence_corner.mtl
|
||||
o Cube_Cube.001
|
||||
v -0.500000 -0.625000 0.437500
|
||||
v -0.500000 0.312500 0.437500
|
||||
v -0.437500 0.312500 0.437500
|
||||
v -0.437500 -0.625000 0.437500
|
||||
v -0.437500 0.312500 0.500000
|
||||
v -0.437500 -0.625000 0.500000
|
||||
v -0.500000 0.312500 0.500000
|
||||
v -0.500000 -0.625000 0.500000
|
||||
v -0.500000 -0.625000 -0.500000
|
||||
v -0.500000 0.312500 -0.500000
|
||||
v -0.437500 0.312500 -0.500000
|
||||
v -0.437500 -0.625000 -0.500000
|
||||
v -0.437500 0.312500 -0.437500
|
||||
v -0.437500 -0.625000 -0.437500
|
||||
v -0.500000 0.312500 -0.437500
|
||||
v -0.500000 -0.625000 -0.437500
|
||||
v -0.500000 -0.625000 -0.062500
|
||||
v -0.500000 0.312500 -0.062500
|
||||
v -0.437500 0.312500 -0.062500
|
||||
v -0.437500 -0.625000 -0.062500
|
||||
v -0.437500 0.312500 0.062500
|
||||
v -0.437500 -0.625000 0.062500
|
||||
v -0.500000 0.312500 0.062500
|
||||
v -0.500000 -0.625000 0.062500
|
||||
v -0.562500 0.187500 -0.500000
|
||||
v -0.562500 0.187500 0.500000
|
||||
v -0.500000 0.187500 0.500000
|
||||
v -0.500000 0.187500 -0.500000
|
||||
v -0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.000000 -0.500000
|
||||
v -0.562500 -0.000000 0.500000
|
||||
v -0.562500 -0.000000 -0.500000
|
||||
v -0.562500 -0.125000 -0.500000
|
||||
v -0.562500 -0.125000 0.500000
|
||||
v -0.500000 -0.125000 0.500000
|
||||
v -0.500000 -0.125000 -0.500000
|
||||
v -0.500000 -0.312500 0.500000
|
||||
v -0.500000 -0.312500 -0.500000
|
||||
v -0.562500 -0.312500 0.500000
|
||||
v -0.562500 -0.312500 -0.500000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt 0.000000 0.000000
|
||||
vt 0.125000 -0.000000
|
||||
vt 0.125000 0.937500
|
||||
vt -0.000000 0.062500
|
||||
vt 0.062500 0.062500
|
||||
vt 0.062500 -0.000000
|
||||
vt -0.000000 -0.000000
|
||||
vt -0.000000 0.937500
|
||||
vt -0.000000 0.875000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.000000 0.937500
|
||||
vt 0.062500 0.937500
|
||||
vt 0.062500 -0.000000
|
||||
vt 0.000000 0.937500
|
||||
vt -0.000000 0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt -0.000000 0.937500
|
||||
vt -0.000000 0.000000
|
||||
vt 0.000000 0.062500
|
||||
vt 0.062500 0.062500
|
||||
vt -0.000000 0.875000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.000000 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 -0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt -0.000000 0.000000
|
||||
vt 0.125000 0.000000
|
||||
vt 0.125000 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt 0.000000 0.000000
|
||||
vt -0.000000 0.062500
|
||||
vt 0.125000 0.062500
|
||||
vt 0.000000 0.875000
|
||||
vt 0.125000 0.875000
|
||||
vt 0.250000 1.062500
|
||||
vt 0.250000 0.062500
|
||||
vt 0.312500 0.062500
|
||||
vt 0.312500 1.062500
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.312500 0.937500
|
||||
vt 0.312500 -0.062500
|
||||
vt 0.250000 -0.062500
|
||||
vt 0.250000 0.937500
|
||||
vt 0.250000 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.500000
|
||||
vt 0.437500 0.312500
|
||||
vt 0.375000 0.312500
|
||||
vt 0.375000 0.500000
|
||||
vt 0.437500 0.312500
|
||||
vt 0.437500 0.500000
|
||||
vt 0.375000 0.500000
|
||||
vt 0.375000 0.312500
|
||||
vt 0.250000 1.062500
|
||||
vt 0.250000 0.062500
|
||||
vt 0.312500 0.062500
|
||||
vt 0.312500 1.062500
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.312500 0.937500
|
||||
vt 0.312500 -0.062500
|
||||
vt 0.250000 -0.062500
|
||||
vt 0.250000 0.937500
|
||||
vt 0.250000 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.187500
|
||||
vt 0.437500 -0.000000
|
||||
vt 0.375000 -0.000000
|
||||
vt 0.375000 0.187500
|
||||
vt 0.437500 -0.000000
|
||||
vt 0.437500 0.187500
|
||||
vt 0.375000 0.187500
|
||||
vt 0.375000 -0.000000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -1.0000 -0.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn -0.0000 1.0000 0.0000
|
||||
usemtl Material.001
|
||||
s 1
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 4/5/2 3/6/2 5/7/2 6/8/2
|
||||
f 6/9/3 5/10/3 7/11/3 8/12/3
|
||||
f 8/13/4 7/14/4 2/2/4 1/1/4
|
||||
f 4/15/5 6/16/5 8/17/5 1/18/5
|
||||
f 5/10/6 3/19/6 2/20/6 7/21/6
|
||||
f 9/22/1 10/23/1 11/24/1 12/25/1
|
||||
f 12/26/2 11/27/2 13/28/2 14/29/2
|
||||
f 14/29/3 13/28/3 15/30/3 16/31/3
|
||||
f 16/32/4 15/33/4 10/34/4 9/35/4
|
||||
f 12/36/5 14/37/5 16/32/5 9/35/5
|
||||
f 13/28/6 11/27/6 10/38/6 15/39/6
|
||||
f 17/40/1 18/41/1 19/42/1 20/43/1
|
||||
f 20/44/2 19/45/2 21/46/2 22/47/2
|
||||
f 22/48/3 21/49/3 23/50/3 24/51/3
|
||||
f 24/52/4 23/53/4 18/54/4 17/55/4
|
||||
f 20/56/5 22/57/5 24/52/5 17/55/5
|
||||
f 21/46/6 19/45/6 18/58/6 23/59/6
|
||||
f 25/60/6 26/61/6 27/62/6 28/63/6
|
||||
f 28/64/2 27/65/2 29/66/2 30/67/2
|
||||
f 30/68/5 29/69/5 31/70/5 32/71/5
|
||||
f 32/72/4 31/73/4 26/74/4 25/75/4
|
||||
f 28/76/1 30/77/1 32/78/1 25/79/1
|
||||
f 29/80/3 27/81/3 26/82/3 31/83/3
|
||||
f 33/84/6 34/85/6 35/86/6 36/87/6
|
||||
f 36/88/2 35/89/2 37/90/2 38/91/2
|
||||
f 38/92/5 37/93/5 39/94/5 40/95/5
|
||||
f 40/96/4 39/97/4 34/98/4 33/99/4
|
||||
f 36/100/1 38/101/1 40/102/1 33/103/1
|
||||
f 37/104/3 35/105/3 34/106/3 39/107/3
|
||||
o Cube_Cube.002
|
||||
v 0.437500 -0.625000 0.500000
|
||||
v 0.437500 0.312500 0.500000
|
||||
v 0.437500 0.312500 0.437500
|
||||
v 0.437500 -0.625000 0.437500
|
||||
v 0.500000 0.312500 0.437500
|
||||
v 0.500000 -0.625000 0.437500
|
||||
v 0.500000 0.312500 0.500000
|
||||
v 0.500000 -0.625000 0.500000
|
||||
v -0.062500 -0.625000 0.500000
|
||||
v -0.062500 0.312500 0.500000
|
||||
v -0.062500 0.312500 0.437500
|
||||
v -0.062500 -0.625000 0.437500
|
||||
v 0.062500 0.312500 0.437500
|
||||
v 0.062500 -0.625000 0.437500
|
||||
v 0.062500 0.312500 0.500000
|
||||
v 0.062500 -0.625000 0.500000
|
||||
v -0.500000 0.187500 0.562500
|
||||
v 0.500000 0.187500 0.562500
|
||||
v 0.500000 0.187500 0.500000
|
||||
v -0.500000 0.187500 0.500000
|
||||
v 0.500000 -0.000000 0.500000
|
||||
v -0.500000 -0.000000 0.500000
|
||||
v 0.500000 -0.000000 0.562500
|
||||
v -0.500000 -0.000000 0.562500
|
||||
v -0.500000 -0.125000 0.562500
|
||||
v 0.500000 -0.125000 0.562500
|
||||
v 0.500000 -0.125000 0.500000
|
||||
v -0.500000 -0.125000 0.500000
|
||||
v 0.500000 -0.312500 0.500000
|
||||
v -0.500000 -0.312500 0.500000
|
||||
v 0.500000 -0.312500 0.562500
|
||||
v -0.500000 -0.312500 0.562500
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt 0.000000 0.000000
|
||||
vt 0.125000 -0.000000
|
||||
vt 0.125000 0.937500
|
||||
vt -0.000000 0.062500
|
||||
vt 0.062500 0.062500
|
||||
vt 0.062500 -0.000000
|
||||
vt -0.000000 -0.000000
|
||||
vt -0.000000 0.937500
|
||||
vt -0.000000 0.875000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.000000 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 -0.000000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt -0.000000 0.000000
|
||||
vt 0.125000 0.000000
|
||||
vt 0.125000 0.937500
|
||||
vt 0.000000 0.937500
|
||||
vt 0.000000 0.000000
|
||||
vt -0.000000 0.062500
|
||||
vt 0.125000 0.062500
|
||||
vt 0.000000 0.875000
|
||||
vt 0.125000 0.875000
|
||||
vt 0.375000 1.000000
|
||||
vt 0.375000 0.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.312500 1.000000
|
||||
vt 0.312500 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.562500
|
||||
vt 0.437500 0.375000
|
||||
vt 0.375000 0.375000
|
||||
vt 0.375000 0.562500
|
||||
vt 0.437500 0.312500
|
||||
vt 0.437500 0.500000
|
||||
vt 0.375000 0.500000
|
||||
vt 0.375000 0.312500
|
||||
vt 0.375000 1.000000
|
||||
vt 0.375000 0.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.312500 1.000000
|
||||
vt 0.312500 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.437500 1.000000
|
||||
vt 0.437500 0.062500
|
||||
vt 0.437500 -0.125000
|
||||
vt 0.375000 -0.125000
|
||||
vt 0.375000 0.062500
|
||||
vt 0.437500 0.062500
|
||||
vt 0.437500 0.250000
|
||||
vt 0.375000 0.250000
|
||||
vt 0.375000 0.062500
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 -0.0000 1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
usemtl Material.002
|
||||
s 1
|
||||
f 41/108/7 42/109/7 43/110/7 44/111/7
|
||||
f 44/112/8 43/113/8 45/114/8 46/115/8
|
||||
f 46/116/9 45/117/9 47/118/9 48/119/9
|
||||
f 48/120/10 47/121/10 42/109/10 41/108/10
|
||||
f 44/122/11 46/123/11 48/124/11 41/125/11
|
||||
f 45/117/12 43/126/12 42/127/12 47/128/12
|
||||
f 49/129/7 50/130/7 51/131/7 52/132/7
|
||||
f 52/133/8 51/134/8 53/135/8 54/136/8
|
||||
f 54/137/9 53/138/9 55/139/9 56/140/9
|
||||
f 56/141/10 55/142/10 50/143/10 49/144/10
|
||||
f 52/145/11 54/146/11 56/141/11 49/144/11
|
||||
f 53/135/12 51/134/12 50/147/12 55/148/12
|
||||
f 57/149/12 58/150/12 59/151/12 60/152/12
|
||||
f 60/152/8 59/151/8 61/153/8 62/154/8
|
||||
f 62/155/11 61/156/11 63/157/11 64/158/11
|
||||
f 64/158/10 63/157/10 58/159/10 57/160/10
|
||||
f 60/161/7 62/162/7 64/163/7 57/164/7
|
||||
f 61/165/9 59/166/9 58/167/9 63/168/9
|
||||
f 65/169/12 66/170/12 67/171/12 68/172/12
|
||||
f 68/172/8 67/171/8 69/173/8 70/174/8
|
||||
f 70/175/11 69/176/11 71/177/11 72/178/11
|
||||
f 72/178/10 71/177/10 66/179/10 65/180/10
|
||||
f 68/181/7 70/182/7 72/183/7 65/184/7
|
||||
f 69/185/9 67/186/9 66/187/9 71/188/9
|
56
block_bomber_mg/models/moreblocks_slope.obj
Normal file
@ -0,0 +1,56 @@
|
||||
g top
|
||||
v 0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vn 0.0000 0.7071 -0.7071
|
||||
s off
|
||||
f 2/1/1 1/2/1 4/3/1 3/4/1
|
||||
g bottom
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
vt 0.0000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.0000 1.0000
|
||||
vn 0.0000 -1.0000 -0.0000
|
||||
s off
|
||||
f 6/5/2 5/6/2 7/7/2 8/8/2
|
||||
g right
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
s off
|
||||
f 9/9/3 11/10/3 10/11/3
|
||||
g left
|
||||
v 0.500000 0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
vt 0.0000 1.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
s off
|
||||
f 12/12/4 13/13/4 14/14/4
|
||||
g back
|
||||
v 0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vn 0.0000 -0.0000 1.0000
|
||||
s off
|
||||
f 15/15/5 16/16/5 17/17/5 18/18/5
|
418
block_bomber_mg/models/rock.obj
Normal file
@ -0,0 +1,418 @@
|
||||
# Blender v2.93.6 OBJ File: 'untitled.blend'
|
||||
# www.blender.org
|
||||
mtllib rock.mtl
|
||||
o Cube_Cube.001
|
||||
v 0.375000 0.375000 -0.437500
|
||||
v 0.375000 -0.375000 -0.437500
|
||||
v 0.437500 0.375000 0.375000
|
||||
v 0.437500 -0.375000 0.375000
|
||||
v -0.375000 0.375000 -0.437500
|
||||
v -0.375000 -0.375000 -0.437500
|
||||
v -0.375000 0.437500 0.375000
|
||||
v -0.375000 -0.375000 0.437500
|
||||
v 0.437500 0.375000 -0.375000
|
||||
v 0.437500 -0.375000 -0.375000
|
||||
v -0.375000 0.437500 -0.375000
|
||||
v -0.437500 -0.375000 -0.375000
|
||||
v 0.375000 0.437500 -0.375000
|
||||
v 0.375000 0.437500 0.375000
|
||||
v 0.375000 -0.437500 -0.375000
|
||||
v 0.375000 -0.375000 0.437500
|
||||
v 0.375000 0.375000 0.437500
|
||||
v -0.375000 0.375000 0.437500
|
||||
v 0.437500 0.437500 -0.437500
|
||||
v -0.437500 0.375000 -0.375000
|
||||
v 0.437500 0.437500 0.437500
|
||||
v -0.437500 0.375000 0.375000
|
||||
v -0.437500 -0.375000 0.375000
|
||||
v 0.375000 -0.437500 0.375000
|
||||
v -0.375000 -0.437500 -0.375000
|
||||
v -0.375000 -0.437500 0.375000
|
||||
v -0.437500 0.437500 -0.437500
|
||||
v -0.437500 0.437500 0.437500
|
||||
v -0.500000 -0.062500 -0.000000
|
||||
v -0.500000 -0.062500 0.250000
|
||||
v -0.500000 0.187500 -0.000000
|
||||
v -0.500000 0.187500 0.250000
|
||||
v 0.375000 0.500000 0.375000
|
||||
v -0.375000 0.500000 0.375000
|
||||
v 0.375000 0.500000 -0.375000
|
||||
v -0.375000 0.500000 -0.375000
|
||||
v 0.000000 0.187500 0.500000
|
||||
v -0.125000 0.187500 0.500000
|
||||
v -0.125000 0.062500 0.500000
|
||||
v 0.000000 0.062500 0.500000
|
||||
v -0.187500 0.375000 -0.500000
|
||||
v -0.187500 0.187500 -0.500000
|
||||
v -0.375000 0.187500 -0.500000
|
||||
v 0.500000 0.062500 -0.062500
|
||||
v 0.500000 0.062500 0.250000
|
||||
v 0.500000 -0.250000 -0.062500
|
||||
v 0.500000 -0.250000 0.250000
|
||||
v -0.437500 -0.437500 0.437500
|
||||
v 0.437500 -0.437500 0.437500
|
||||
v 0.437500 -0.437500 -0.437500
|
||||
v -0.437500 -0.437500 -0.437500
|
||||
v -0.375000 -0.500000 0.375000
|
||||
v 0.375000 -0.500000 0.375000
|
||||
v 0.375000 -0.500000 -0.375000
|
||||
v -0.375000 -0.500000 -0.375000
|
||||
v -0.500000 -0.375000 -0.375000
|
||||
v -0.500000 -0.375000 0.375000
|
||||
v -0.500000 0.375000 -0.375000
|
||||
v -0.500000 0.375000 0.375000
|
||||
v -0.437500 -0.062500 -0.000000
|
||||
v -0.437500 -0.062500 0.250000
|
||||
v -0.437500 0.187500 -0.000000
|
||||
v -0.437500 0.187500 0.250000
|
||||
v 0.375000 0.375000 0.500000
|
||||
v -0.375000 0.375000 0.500000
|
||||
v -0.375000 -0.375000 0.500000
|
||||
v 0.375000 -0.375000 0.500000
|
||||
v 0.000000 0.187500 0.437500
|
||||
v -0.125000 0.187500 0.437500
|
||||
v -0.125000 0.062500 0.437500
|
||||
v 0.000000 0.062500 0.437500
|
||||
v 0.500000 0.375000 -0.375000
|
||||
v 0.500000 0.375000 0.375000
|
||||
v 0.500000 -0.375000 -0.375000
|
||||
v 0.500000 -0.375000 0.375000
|
||||
v 0.437500 0.062500 -0.062500
|
||||
v 0.437500 0.062500 0.250000
|
||||
v 0.437500 -0.250000 -0.062500
|
||||
v 0.437500 -0.250000 0.250000
|
||||
v 0.375000 0.375000 -0.500000
|
||||
v 0.375000 -0.375000 -0.500000
|
||||
v -0.375000 -0.375000 -0.500000
|
||||
v -0.187500 0.375000 -0.437500
|
||||
v -0.187500 0.187500 -0.437500
|
||||
v -0.375000 0.375000 -0.437500
|
||||
v -0.375000 0.187500 -0.437500
|
||||
v -0.375000 0.437500 0.375000
|
||||
v -0.375000 0.437500 0.375000
|
||||
v -0.375000 0.437500 -0.375000
|
||||
v -0.375000 0.437500 -0.375000
|
||||
v -0.375000 0.500000 0.375000
|
||||
v -0.375000 0.500000 -0.375000
|
||||
vt 0.875000 0.062500
|
||||
vt 0.125000 0.062500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.875000 0.000000
|
||||
vt 0.875000 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 1.000000
|
||||
vt 0.875000 1.000000
|
||||
vt 0.062500 0.125000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.062500 0.125000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.875000 0.937500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 1.000000
|
||||
vt 0.875000 1.000000
|
||||
vt 0.937500 0.125000
|
||||
vt 0.937500 0.875000
|
||||
vt 1.000000 0.875000
|
||||
vt 1.000000 0.125000
|
||||
vt 0.875000 0.125000
|
||||
vt 0.875000 0.875000
|
||||
vt 0.937500 0.937500
|
||||
vt 0.937500 0.062500
|
||||
vt 0.125000 0.875000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.125000 0.125000
|
||||
vt 0.062500 0.062500
|
||||
vt 0.125000 0.875000
|
||||
vt 0.875000 0.875000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.875000 0.125000
|
||||
vt 0.125000 0.125000
|
||||
vt 0.062500 0.062500
|
||||
vt 0.062500 0.562500
|
||||
vt 0.062500 0.562500
|
||||
vt 0.062500 0.562500
|
||||
vt 0.875000 0.875000
|
||||
vt 0.875000 0.125000
|
||||
vt 0.937500 0.062500
|
||||
vt 0.062500 0.937500
|
||||
vt 0.062500 0.937500
|
||||
vt 0.062500 0.937500
|
||||
vt 0.562500 0.968750
|
||||
vt 0.937500 0.968750
|
||||
vt 0.937500 0.968750
|
||||
vt 0.562500 0.968750
|
||||
vt 0.125000 0.875000
|
||||
vt 0.875000 0.875000
|
||||
vt 0.937500 0.937500
|
||||
vt 0.062500 0.937500
|
||||
vt 0.875000 0.125000
|
||||
vt 0.125000 0.125000
|
||||
vt 0.062500 0.062500
|
||||
vt 0.937500 0.062500
|
||||
vt 0.125000 0.125000
|
||||
vt 0.875000 0.125000
|
||||
vt 0.937500 0.062500
|
||||
vt 0.875000 0.875000
|
||||
vt 0.937500 0.937500
|
||||
vt 0.125000 0.875000
|
||||
vt 0.687500 0.833333
|
||||
vt 0.812500 0.833333
|
||||
vt 0.812500 0.833333
|
||||
vt 0.687500 0.833333
|
||||
vt 0.062500 0.125000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.062500 0.125000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.937500 1.000000
|
||||
vt 0.937500 1.000000
|
||||
vt 0.562500 1.000000
|
||||
vt 0.562500 1.000000
|
||||
vt 0.125000 0.937500
|
||||
vt 0.875000 0.937500
|
||||
vt 0.875000 1.000000
|
||||
vt 0.125000 1.000000
|
||||
vt 0.937500 0.968750
|
||||
vt 0.562500 0.968750
|
||||
vt 0.781250 0.755208
|
||||
vt 0.781250 0.807292
|
||||
vt 0.781250 0.807292
|
||||
vt 0.781250 0.755208
|
||||
vt 0.875000 0.062500
|
||||
vt 0.125000 0.062500
|
||||
vt 0.125000 0.000000
|
||||
vt 0.875000 0.000000
|
||||
vt 0.062500 0.125000
|
||||
vt 0.062500 0.875000
|
||||
vt 0.000000 0.875000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.125000 0.062500
|
||||
vt 0.875000 0.062500
|
||||
vt 0.875000 0.000000
|
||||
vt 0.125000 0.000000
|
||||
vt 1.000000 0.125000
|
||||
vt 0.937500 0.125000
|
||||
vt 0.937500 0.687500
|
||||
vt 1.000000 0.687500
|
||||
vt 0.937500 0.875000
|
||||
vt 0.937500 0.125000
|
||||
vt 1.000000 0.125000
|
||||
vt 1.000000 0.875000
|
||||
vt 0.671875 0.846354
|
||||
vt 0.671875 0.716146
|
||||
vt 0.671875 0.716146
|
||||
vt 0.671875 0.846354
|
||||
vt 0.937500 0.125000
|
||||
vt 0.937500 0.875000
|
||||
vt 1.000000 0.875000
|
||||
vt 1.000000 0.125000
|
||||
vt 0.937500 0.875000
|
||||
vt 1.000000 0.875000
|
||||
vt 0.937500 0.125000
|
||||
vt 1.000000 0.125000
|
||||
vt 0.125000 0.125000
|
||||
vt 0.875000 0.125000
|
||||
vt 0.875000 0.875000
|
||||
vt 0.125000 0.875000
|
||||
vt 0.062500 0.937500
|
||||
vt 0.937500 0.937500
|
||||
vt 0.125000 0.062500
|
||||
vt 0.125000 -0.000000
|
||||
vt 0.125000 0.062500
|
||||
vt 0.875000 0.062500
|
||||
vt 0.875000 -0.000000
|
||||
vt 0.125000 -0.000000
|
||||
vt 0.875000 0.062500
|
||||
vt 0.875000 -0.000000
|
||||
vt 0.125000 0.125000
|
||||
vt 0.125000 0.875000
|
||||
vt 0.875000 0.875000
|
||||
vt 0.875000 0.125000
|
||||
vt 0.250000 0.437500
|
||||
vt 0.500000 0.437500
|
||||
vt 0.875000 0.125000
|
||||
vt 0.125000 0.125000
|
||||
vt 0.500000 0.687500
|
||||
vt 0.875000 0.875000
|
||||
vt 0.250000 0.687500
|
||||
vt 0.125000 0.875000
|
||||
vt 0.250000 0.437500
|
||||
vt 0.250000 0.687500
|
||||
vt 0.500000 0.687500
|
||||
vt 0.500000 0.437500
|
||||
vt 0.812500 0.729167
|
||||
vt 0.812500 0.729167
|
||||
vt 0.687500 0.729167
|
||||
vt 0.687500 0.729167
|
||||
vt 0.375000 0.687500
|
||||
vt 0.500000 0.687500
|
||||
vt 0.875000 0.875000
|
||||
vt 0.125000 0.875000
|
||||
vt 0.500000 0.562500
|
||||
vt 0.375000 0.562500
|
||||
vt 0.125000 0.125000
|
||||
vt 0.875000 0.125000
|
||||
vt 0.500000 0.562500
|
||||
vt 0.500000 0.687500
|
||||
vt 0.375000 0.687500
|
||||
vt 0.375000 0.562500
|
||||
vt 0.718750 0.755208
|
||||
vt 0.718750 0.755208
|
||||
vt 0.718750 0.807292
|
||||
vt 0.718750 0.807292
|
||||
vt 0.250000 0.562500
|
||||
vt 0.562500 0.562500
|
||||
vt 0.875000 0.875000
|
||||
vt 0.125000 0.875000
|
||||
vt 0.562500 0.250000
|
||||
vt 0.875000 0.125000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.125000 0.125000
|
||||
vt 0.562500 0.250000
|
||||
vt 0.562500 0.562500
|
||||
vt 0.250000 0.562500
|
||||
vt 0.250000 0.250000
|
||||
vt 0.828125 0.846354
|
||||
vt 0.828125 0.846354
|
||||
vt 0.828125 0.716146
|
||||
vt 0.828125 0.716146
|
||||
vt 0.312500 0.687500
|
||||
vt 0.312500 0.875000
|
||||
vt 0.875000 0.875000
|
||||
vt 0.875000 0.125000
|
||||
vt 0.125000 0.687500
|
||||
vt 0.125000 0.125000
|
||||
vt 0.125000 0.687500
|
||||
vt 0.125000 0.875000
|
||||
vt 0.312500 0.875000
|
||||
vt 0.312500 0.687500
|
||||
vt 0.875000 0.937500
|
||||
vt 0.875000 1.000000
|
||||
vt 0.312500 1.000000
|
||||
vt 0.312500 0.937500
|
||||
vt 0.312500 1.000000
|
||||
vt 0.125000 1.000000
|
||||
vt 0.125000 0.937500
|
||||
vt 0.312500 0.937500
|
||||
vt 1.000000 0.875000
|
||||
vt 1.000000 0.687500
|
||||
vt 0.937500 0.687500
|
||||
vt 0.937500 0.875000
|
||||
vt 0.125000 0.125000
|
||||
vt 0.125000 0.125000
|
||||
vt 0.062500 0.062500
|
||||
vt 0.125000 0.937500
|
||||
vt 0.875000 0.937500
|
||||
vt 0.875000 1.000000
|
||||
vt 0.125000 1.000000
|
||||
vt 0.125000 0.875000
|
||||
vt 0.125000 0.875000
|
||||
vt 0.875000 0.875000
|
||||
vt 0.125000 0.875000
|
||||
vt 0.125000 0.125000
|
||||
vt 0.875000 0.125000
|
||||
vt 0.125000 0.937500
|
||||
vt 0.125000 1.000000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
usemtl Material.001
|
||||
s off
|
||||
f 15/1/1 24/2/1 53/3/1 54/4/1
|
||||
f 2/5/2 6/6/2 82/7/2 81/8/2
|
||||
f 22/9/3 20/10/3 58/11/3 59/12/3
|
||||
f 18/13/4 8/14/4 66/15/4 65/16/4
|
||||
f 11/17/4 7/18/4 34/19/4 36/20/4
|
||||
f 4/21/2 10/22/2 74/23/2 75/24/2
|
||||
f 2/25/5 1/26/5 19/27/5 50/28/5
|
||||
f 1/26/5 5/29/5 27/30/5 19/27/5
|
||||
f 6/31/5 2/25/5 50/28/5 51/32/5
|
||||
f 5/29/5 6/31/5 51/32/5 27/30/5
|
||||
f 3/33/1 9/34/1 19/27/1 21/35/1
|
||||
f 9/34/1 10/36/1 50/28/1 19/27/1
|
||||
f 4/37/1 3/33/1 21/35/1 49/38/1
|
||||
f 10/36/1 4/37/1 49/38/1 50/28/1
|
||||
f 87/39/6 7/40/6 88/41/6
|
||||
f 13/42/3 14/43/3 21/44/3 19/27/3
|
||||
f 11/45/6 89/46/6 90/47/6
|
||||
f 7/48/6 11/49/6 90/50/6 88/51/6
|
||||
f 18/52/6 17/53/6 21/54/6 28/55/6
|
||||
f 16/56/6 8/57/6 48/58/6 49/59/6
|
||||
f 8/57/6 18/52/6 28/55/6 48/58/6
|
||||
f 17/53/6 16/56/6 49/59/6 21/54/6
|
||||
f 23/60/4 12/61/4 51/62/4 48/58/4
|
||||
f 12/61/4 20/63/4 27/64/4 51/62/4
|
||||
f 22/65/4 23/60/4 48/58/4 28/55/4
|
||||
f 20/63/4 22/65/4 28/55/4 27/64/4
|
||||
f 32/66/2 31/67/2 62/68/2 63/69/2
|
||||
f 20/10/5 12/70/5 56/71/5 58/11/5
|
||||
f 23/72/6 22/73/6 59/74/6 57/75/6
|
||||
f 12/76/2 23/72/2 57/75/2 56/77/2
|
||||
f 92/78/6 36/79/6 34/80/6 91/81/6
|
||||
f 14/82/1 13/83/1 35/84/1 33/85/1
|
||||
f 89/86/6 11/49/6 36/79/6 92/78/6
|
||||
f 7/48/6 87/87/6 91/81/6 34/80/6
|
||||
f 40/88/4 37/89/4 68/90/4 71/91/4
|
||||
f 17/92/3 18/93/3 65/94/3 64/95/3
|
||||
f 16/96/1 17/97/1 64/98/1 67/99/1
|
||||
f 8/100/2 16/101/2 67/102/2 66/103/2
|
||||
f 82/104/4 6/105/4 86/106/4 43/107/4
|
||||
f 1/108/1 2/109/1 81/110/1 80/111/1
|
||||
f 45/112/5 47/113/5 79/114/5 77/115/5
|
||||
f 10/116/5 9/117/5 72/118/5 74/119/5
|
||||
f 3/120/6 4/21/6 75/24/6 73/121/6
|
||||
f 9/117/3 3/122/3 73/123/3 72/118/3
|
||||
f 26/124/2 24/125/2 49/59/2 48/58/2
|
||||
f 15/126/2 25/127/2 51/128/2 50/129/2
|
||||
f 25/127/2 26/124/2 48/58/2 51/128/2
|
||||
f 24/125/2 15/126/2 50/129/2 49/59/2
|
||||
f 25/130/5 15/1/5 54/4/5 55/131/5
|
||||
f 26/132/4 25/133/4 55/134/4 52/135/4
|
||||
f 24/136/6 26/132/6 52/135/6 53/137/6
|
||||
f 52/138/2 55/139/2 54/140/2 53/141/2
|
||||
f 30/142/4 29/143/4 56/144/4 57/145/4
|
||||
f 29/143/4 31/146/4 58/147/4 56/144/4
|
||||
f 32/148/4 30/142/4 57/145/4 59/149/4
|
||||
f 31/146/4 32/148/4 59/149/4 58/147/4
|
||||
f 61/150/4 63/151/4 62/152/4 60/153/4
|
||||
f 31/67/6 29/154/6 60/155/6 62/68/6
|
||||
f 30/156/5 32/66/5 63/69/5 61/157/5
|
||||
f 29/154/3 30/156/3 61/157/3 60/155/3
|
||||
f 38/158/6 37/159/6 64/160/6 65/161/6
|
||||
f 40/162/6 39/163/6 66/164/6 67/165/6
|
||||
f 39/163/6 38/158/6 65/161/6 66/164/6
|
||||
f 37/159/6 40/162/6 67/165/6 64/160/6
|
||||
f 71/166/6 68/167/6 69/168/6 70/169/6
|
||||
f 39/170/3 40/88/3 71/91/3 70/171/3
|
||||
f 38/172/1 39/170/1 70/171/1 69/173/1
|
||||
f 37/89/2 38/172/2 69/173/2 68/90/2
|
||||
f 45/174/1 44/175/1 72/176/1 73/177/1
|
||||
f 44/175/1 46/178/1 74/179/1 72/176/1
|
||||
f 47/180/1 45/174/1 73/177/1 75/181/1
|
||||
f 46/178/1 47/180/1 75/181/1 74/179/1
|
||||
f 78/182/1 76/183/1 77/184/1 79/185/1
|
||||
f 44/186/2 45/112/2 77/115/2 76/187/2
|
||||
f 47/113/3 46/188/3 78/189/3 79/114/3
|
||||
f 46/188/6 44/186/6 76/187/6 78/189/6
|
||||
f 42/190/5 41/191/5 80/192/5 81/193/5
|
||||
f 43/194/5 42/190/5 81/193/5 82/195/5
|
||||
f 86/196/5 85/197/5 83/198/5 84/199/5
|
||||
f 1/200/3 80/201/3 41/202/3 83/203/3
|
||||
f 42/204/3 43/205/3 86/206/3 84/207/3
|
||||
f 41/208/4 42/209/4 84/210/4 83/211/4
|
||||
f 14/43/3 87/212/3 88/213/3 28/214/3 21/44/3
|
||||
f 87/215/6 14/216/6 33/217/6 91/218/6
|
||||
f 89/219/3 13/42/3 19/27/3 27/30/3 90/220/3
|
||||
f 88/213/3 90/220/3 27/30/3 28/214/3
|
||||
f 35/221/3 92/222/3 91/223/3 33/224/3
|
||||
f 13/83/5 89/225/5 92/226/5 35/84/5
|
36
block_bomber_mg/models/slope.obj
Normal file
@ -0,0 +1,36 @@
|
||||
# Blender v2.93.6 OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib slope.mtl
|
||||
o Cube_Cube.001
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
vt 1.000000 -0.000000
|
||||
vt -0.000000 1.000000
|
||||
vt -0.000000 -0.000000
|
||||
vt 0.000084 0.000084
|
||||
vt 1.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000084 0.999916
|
||||
vt 1.000000 -0.000000
|
||||
vt -0.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.7071 -0.7071
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
usemtl Material.001
|
||||
s off
|
||||
f 6/1/1 5/2/1 4/3/1
|
||||
f 2/4/2 5/5/2 6/6/2 3/7/2
|
||||
f 1/8/3 2/9/3 3/10/3
|
||||
f 4/3/4 5/5/4 2/11/4 1/12/4
|
||||
f 3/13/5 6/1/5 4/14/5 1/12/5
|
42
block_bomber_mg/models/slope_inside.obj
Normal file
@ -0,0 +1,42 @@
|
||||
# Blender v2.93.6 OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib slope_inside.mtl
|
||||
o Cube_Cube.001
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
vt 1.000000 -0.000000
|
||||
vt -0.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt -0.000000 1.000000
|
||||
vt -0.000000 -0.000000
|
||||
vt 0.999900 0.000100
|
||||
vt 0.999900 0.999900
|
||||
vt 0.000100 0.999900
|
||||
vt -0.000000 0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.999900 0.999900
|
||||
vt 0.000100 0.999900
|
||||
vt 0.000100 0.000100
|
||||
vt 0.000100 0.000100
|
||||
vt 0.999900 0.000100
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn -0.5774 0.5774 -0.5774
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
usemtl Material.001
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1
|
||||
f 5/4/2 3/5/2 6/6/2
|
||||
f 2/7/3 7/8/3 5/9/3
|
||||
f 3/10/4 2/11/4 5/12/4
|
||||
f 2/7/2 1/13/2 4/14/2 7/15/2
|
||||
f 5/9/1 6/16/1 4/17/1 7/8/1
|
||||
f 3/5/5 6/6/5 4/17/5 1/13/5
|
13
block_bomber_mg/models/slope_outside.mtl
Normal file
@ -0,0 +1,13 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl Material.001
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd C:\\Users\\gbrru\\Desktop\\minetest5.5_2\\games\\blockbomber\\mods\\bb_nodes\\textures\\bb_nodes_floor_forest.png
|
27
block_bomber_mg/models/slope_outside.obj
Normal file
@ -0,0 +1,27 @@
|
||||
# Blender v2.93.6 OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib slope_outside.mtl
|
||||
o Cube_Cube.001
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt -0.000000 1.000000
|
||||
vn -0.0000 -0.0000 1.0000
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn 0.5774 0.5774 -0.5774
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
usemtl Material.001
|
||||
s 1
|
||||
f 1/1/1 2/2/1 3/3/1
|
||||
f 2/2/2 4/4/2 3/5/2
|
||||
f 4/6/3 2/7/3 1/8/3
|
||||
f 1/9/4 3/3/4 4/4/4
|
BIN
block_bomber_mg/sounds/GameOver.ogg
Normal file
BIN
block_bomber_mg/sounds/alarm.ogg
Normal file
BIN
block_bomber_mg/sounds/death.ogg
Normal file
BIN
block_bomber_mg/sounds/eew.ogg
Normal file
BIN
block_bomber_mg/sounds/respawn.ogg
Normal file
BIN
block_bomber_mg/sounds/respawn2.ogg
Normal file
BIN
block_bomber_mg/sounds/sfx_exp_medium6.ogg
Normal file
BIN
block_bomber_mg/sounds/sfx_sounds_impact4.ogg
Normal file
BIN
block_bomber_mg/sounds/theme.ogg
Normal file
BIN
block_bomber_mg/sounds/win.ogg
Normal file
BIN
block_bomber_mg/sounds/yippee.ogg
Normal file
658
block_bomber_mg/src/bombs.lua
Normal file
@ -0,0 +1,658 @@
|
||||
-- note: this depends on bb_loop because we need to know when suddendeath is
|
||||
-- (bb_loop.suddendeath = true) for the abm to place bombs
|
||||
local bb_bomb = {}
|
||||
|
||||
local function return_bomb(owner) end
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
--settings
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
bb_bomb.debug = false
|
||||
bb_bomb.bombtimer = 3.5 -- time to explosion in sec
|
||||
bb_bomb.explosiontimer = .5 -- time that an explosion ent lasts
|
||||
bb_bomb.visual_size = {x = 4.5, y = 4.5} -- visual size for bomb ent
|
||||
bb_bomb.visual_size2m = 1.1 -- visual size multiplier for bomb ent every sec, expands and shrinks to and from this
|
||||
bb_bomb.brick_drop_chance = 60 -- chance out of 100 that a brick will drop a powerup
|
||||
bb_bomb.powerups = { -- a list of powerups to drop from explosions
|
||||
"bb_powerup:extra_bomb",
|
||||
"bb_powerup:extra_bomb",
|
||||
"bb_powerup:extra_bomb",
|
||||
"bb_powerup:extra_bomb",
|
||||
"bb_powerup:extra_bomb",
|
||||
|
||||
"bb_powerup:extra_speed",
|
||||
"bb_powerup:extra_speed",
|
||||
"bb_powerup:extra_speed",
|
||||
"bb_powerup:extra_speed",
|
||||
"bb_powerup:extra_speed",
|
||||
|
||||
"bb_powerup:extra_power",
|
||||
"bb_powerup:extra_power",
|
||||
"bb_powerup:extra_power",
|
||||
"bb_powerup:extra_power",
|
||||
"bb_powerup:extra_power",
|
||||
|
||||
"bb_powerup:extra_life",
|
||||
"bb_powerup:extra_life",
|
||||
"bb_powerup:extra_life",
|
||||
|
||||
"bb_powerup:throw",
|
||||
"bb_powerup:throw",
|
||||
"bb_powerup:throw",
|
||||
"bb_powerup:throw",
|
||||
"bb_powerup:throw",
|
||||
|
||||
"bb_powerup:kick",
|
||||
"bb_powerup:kick",
|
||||
"bb_powerup:kick",
|
||||
"bb_powerup:kick",
|
||||
"bb_powerup:kick",
|
||||
|
||||
-- "bb_powerup:resurect",
|
||||
|
||||
"bb_powerup:superfast",
|
||||
"bb_powerup:superfast",
|
||||
"bb_powerup:superfast",
|
||||
|
||||
"bb_powerup:slow",
|
||||
"bb_powerup:slow",
|
||||
"bb_powerup:slow",
|
||||
|
||||
"bb_powerup:weird_control",
|
||||
"bb_powerup:weird_control",
|
||||
|
||||
"bb_powerup:no_placebomb",
|
||||
"bb_powerup:no_placebomb",
|
||||
"bb_powerup:no_placebomb",
|
||||
|
||||
"bb_powerup:party",
|
||||
"bb_powerup:party",
|
||||
"bb_powerup:party",
|
||||
|
||||
"bb_powerup:multidir",
|
||||
"bb_powerup:multidir",
|
||||
|
||||
}
|
||||
|
||||
|
||||
-- note that nodes have groups that identify what to do with then during and explosion
|
||||
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
-- the explosion entity
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
minetest.register_entity("block_bomber_mg:explosion",{
|
||||
initial_properties = {
|
||||
physical = false,
|
||||
use_texture_alpha = true,
|
||||
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
visual = "sprite",
|
||||
textures = {"bb_bomb_explosion.png"},
|
||||
visual_size = {x = 1, y = 1, z = 1},
|
||||
static_save = false,
|
||||
},
|
||||
on_step = function(self, dtime, moveresult)
|
||||
|
||||
self._timer = self._timer + dtime
|
||||
if self._timer > bb_bomb.explosiontimer then
|
||||
self.object:remove()
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
_timer = 0,
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
-- local Explosion function
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
-- "explodes" a single node, used by the explosion function
|
||||
-- input: pos (p)
|
||||
-- returns: true if the location p was a node (further explosion should be blocked), false otherwise
|
||||
function bb_bomb.local_explode(p)
|
||||
|
||||
-- add the explosion ent
|
||||
minetest.add_entity(p, "block_bomber_mg:explosion" )
|
||||
-- remove powerups
|
||||
local pos1 = vector.add(p, vector.new(-.6,0,-.6))
|
||||
local pos2 = vector.add(p, vector.new(.6,0,.6))
|
||||
|
||||
local objs = minetest.get_objects_in_area(pos1, pos2)
|
||||
local objs = minetest.get_objects_inside_radius(p, .5)
|
||||
for k,v in ipairs(objs) do
|
||||
local ent = v:get_luaentity()
|
||||
if ent and ent.name == "__builtin:item" then
|
||||
v:remove()
|
||||
end
|
||||
-- explode other bombs
|
||||
if ent and ent.name == "block_bomber_mg:bomb" then
|
||||
ent:_explode()
|
||||
end
|
||||
end
|
||||
|
||||
local node_name = minetest.get_node(p).name
|
||||
local removable = minetest.get_item_group(node_name, "removable")
|
||||
local powerup = minetest.get_item_group(node_name, "powerup")
|
||||
|
||||
-- add new powerups
|
||||
if powerup ~= 0 then
|
||||
if powerup == 2 or (powerup == 1 and math.random(1,100) < bb_bomb.brick_drop_chance) then
|
||||
local item = bb_bomb.powerups[math.random(1,#bb_bomb.powerups)]
|
||||
|
||||
minetest.after(0, function(p,item)
|
||||
local obj = minetest.add_item(p,item)
|
||||
-- change visual size of dropped item
|
||||
obj:set_properties({collisionbox = {-0.49,-0.49,-0.49,0.49,0.49,0.49,},visual_size = {x = .45, y = .45}})
|
||||
local ent = obj:get_luaentity()
|
||||
local old_on_punch = ent.on_punch
|
||||
|
||||
-- override the on_punch in a way that won't change the behavior outside the minigame, since we are affecting the entire template for builtin item
|
||||
ent.on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir, damage)
|
||||
if not arena_lib then return old_on_punch(self, puncher, time_from_last_punch, tool_capabilities, dir, damage) end
|
||||
local pos = self.object:get_pos()
|
||||
local arena = arena_lib.get_arena_by_pos(pos, blockbomber.modname)
|
||||
if (not arena) or (arena and not(arena.in_game)) then
|
||||
return old_on_punch(self, puncher, time_from_last_punch, tool_capabilities, dir, damage)
|
||||
end
|
||||
end
|
||||
end,p,item)
|
||||
end
|
||||
end
|
||||
|
||||
-- remove nodes
|
||||
if removable == 1 then
|
||||
minetest.set_node(p, {name = "air"})
|
||||
end
|
||||
if node_name == "air" then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
-- return_bomb function
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
-- gives a bomb back to player (p_name not objref)
|
||||
function return_bomb(owner)
|
||||
if owner and owner ~= "" then
|
||||
-- minetest.debug("Attempting to return bomb to ".. owner)
|
||||
local mod = arena_lib.get_mod_by_player(owner)
|
||||
if not mod or mod ~= blockbomber.modname then return end
|
||||
local arena = arena_lib.get_arena_by_player(owner)
|
||||
if not arena then return end
|
||||
if not arena.in_game then return end
|
||||
if not arena.players[owner] then return end
|
||||
|
||||
local player = minetest.get_player_by_name(owner)
|
||||
if player then
|
||||
local inv = player:get_inventory()
|
||||
inv:add_item("main", ItemStack("bb_powerup:extra_bomb"))
|
||||
end
|
||||
end
|
||||
end
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
-- Explosion function
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
-- required: pos
|
||||
-- optional: poser, multidir, owner
|
||||
|
||||
-- defaults: power: 1, multidir: false, owner: nil
|
||||
|
||||
function bb_bomb.explode(pos,power,multidir,owner)
|
||||
|
||||
local power = power or 1
|
||||
local multidir = multidir or false
|
||||
local owner = owner or nil
|
||||
|
||||
-- if there is an owner, add the bomb back to their inv
|
||||
return_bomb(owner)
|
||||
|
||||
minetest.sound_play({
|
||||
name = "sfx_exp_medium6",
|
||||
gain = 0.7,
|
||||
}, {
|
||||
pos = pos,
|
||||
max_hear_distance = 32, -- default, uses an euclidean metric
|
||||
}, true)
|
||||
|
||||
|
||||
bb_bomb.local_explode(pos)
|
||||
|
||||
local dir_table = {
|
||||
vector.new(1,0,0),
|
||||
vector.new(-1,0,0),
|
||||
vector.new(0,0,1),
|
||||
vector.new(0,0,-1),
|
||||
}
|
||||
|
||||
if multidir then
|
||||
table.insert(dir_table,vector.new(1,0,1))
|
||||
table.insert(dir_table,vector.new(-1,0,-1))
|
||||
table.insert(dir_table,vector.new(-1,0,1))
|
||||
table.insert(dir_table,vector.new(1,0,-1))
|
||||
end
|
||||
|
||||
for _, dir_vect in pairs(dir_table) do
|
||||
|
||||
for i = 1, power do
|
||||
-- get the position (p)
|
||||
local p = vector.add(pos,vector.multiply(dir_vect, i))
|
||||
if bb_bomb.local_explode(p) then
|
||||
break
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- returns an axis-aligned direction vector and angle (in radians)
|
||||
function bb_bomb.yaw_to_dirvect(look_yaw)
|
||||
local pi = 3.14159
|
||||
local dir_vect = vector.new(0,0,0)
|
||||
local angle = 0
|
||||
if (look_yaw >= 7 * pi / 4 and look_yaw < 2 * pi) or (look_yaw >= 0 and look_yaw < pi / 4 ) then
|
||||
dir_vect.z = 1
|
||||
angle = 0
|
||||
end
|
||||
|
||||
if (look_yaw >= pi / 4) and (look_yaw < 3* pi / 4) then
|
||||
dir_vect.x = -1
|
||||
angle = pi/2
|
||||
end
|
||||
|
||||
if (look_yaw >= 3* pi / 4) and (look_yaw < 5 * pi / 4) then
|
||||
dir_vect.z = -1
|
||||
angle = pi
|
||||
end
|
||||
|
||||
if (look_yaw >= 5* pi / 4) and (look_yaw < 7 * pi / 4) then
|
||||
dir_vect.x = 1
|
||||
angle = 3*pi/2
|
||||
end
|
||||
return dir_vect,angle
|
||||
end
|
||||
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
-- The bomb entity
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
|
||||
-- set the bomb's properties, if defined
|
||||
|
||||
-- on_activate is called and staticdata is a string passed to it that can store key values in json format. Use
|
||||
-- minetest.write_json(table_with_key_values) to make the staticdata table and minetest.parse_json(staticdata) to
|
||||
-- get the values back here
|
||||
function bb_bomb.bomb_on_activate(self, staticdata, dtime_s)
|
||||
if staticdata ~= "" and staticdata ~= nil then
|
||||
local data = minetest.parse_json(staticdata) or {}
|
||||
if data._power then
|
||||
self._power = data._power
|
||||
end
|
||||
if data._owner then
|
||||
self._owner = data._owner
|
||||
end
|
||||
if data._multidir then
|
||||
self._multidir = data._multidir
|
||||
end
|
||||
end
|
||||
self.object:set_animation({x=0,y=40}, 40, 0, true)
|
||||
end
|
||||
|
||||
-- implements pushing the bomb
|
||||
function bb_bomb.bomb_on_punch(self, puncher, time_from_last_punch, tool_capabilities, dir)
|
||||
if puncher:is_player() then
|
||||
local player = puncher
|
||||
local p_name = player:get_player_name()
|
||||
local mod = arena_lib.get_mod_by_player(p_name)
|
||||
if not mod then return end
|
||||
if not mod == blockbomber.modname then return end
|
||||
local arena = arena_lib.get_arena_by_player(p_name)
|
||||
if not arena.players[p_name] then return end
|
||||
local inv = player:get_inventory()
|
||||
if inv:contains_item("main", ItemStack("bb_powerup:kick")) then
|
||||
-- they must be outside of the bomb to punch it
|
||||
if vector.distance(vector.add(player:get_pos(),vector.new(0,0.5,0)),self.object:get_pos()) >.5 then
|
||||
--punch bomb
|
||||
local pl_look_yaw = player:get_look_horizontal()
|
||||
local dir_vect, angle = bb_bomb.yaw_to_dirvect(pl_look_yaw)
|
||||
local dir = minetest.yaw_to_dir(pl_look_yaw)
|
||||
local vel = vector.multiply(dir,vector.new(3,0,3))
|
||||
self.object:set_velocity(vel)
|
||||
--self.object:set_yaw(angle)
|
||||
self.object:set_animation({x = 120, y = 150}, 70, 0, false)
|
||||
self.object:set_properties({collides_with_objects = false})
|
||||
self._kick = true
|
||||
self._kicktimer = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- what the bomb does each globalstep
|
||||
function bb_bomb.bomb_on_step(self, dtime, moveresult)
|
||||
|
||||
|
||||
-- bombs should not exist when the game is not running
|
||||
local arena = arena_lib.get_arena_by_pos(self.object:get_pos(), blockbomber.modname)
|
||||
if not arena then self.object:remove() return end
|
||||
if not arena.in_game then self.object:remove() return end
|
||||
|
||||
if self._runtimer then
|
||||
self._timer = self._timer + dtime
|
||||
end
|
||||
|
||||
if self._falling then
|
||||
self._falling_timer = self._falling_timer + dtime
|
||||
if self._falling_timer > 2 then
|
||||
self.object:remove()
|
||||
return_bomb(self._owner)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if self._kick then
|
||||
self._kicktimer = self._kicktimer + dtime
|
||||
if self._kicktimer > .5 then
|
||||
-- regular stationary anim, even tho moving
|
||||
self.object:set_animation({x=0,y=40}, 40, 0, true)
|
||||
end
|
||||
-- if we have mostly stopped moving, enter the stationary state
|
||||
if vector.length(self.object:get_velocity()) < .2 then
|
||||
self.object:set_velocity(vector.new(0,0,0))
|
||||
self.object:set_properties({collides_with_objects = true})
|
||||
-- stationary anim
|
||||
self.object:set_animation({x=0,y=40}, 40, 0, true)
|
||||
self._kick = false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if self._timer > self._inc_timer then
|
||||
-- called about every second
|
||||
self._inc_timer = self._inc_timer + 1
|
||||
end
|
||||
|
||||
|
||||
|
||||
if self._throwing then
|
||||
self._throw_timer = self._throw_timer + dtime
|
||||
if self._throw_timer > self._throw_finish_time then
|
||||
self:_throw_finish()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- get info for throwing on players
|
||||
local p = self.object:get_pos()
|
||||
local throwable_player = nil -- player who can throw the bomb
|
||||
local closest_dist = .6
|
||||
|
||||
if self._timer > .5 and self._throwing == false then
|
||||
for pl_name, stats in pairs(arena.players) do
|
||||
-- if stats.alive then
|
||||
local player = minetest.get_player_by_name(pl_name)
|
||||
local pl_pos = player:get_pos()
|
||||
local p_dist = vector.distance(pl_pos, vector.add(p,vector.new(0,-.5,0)))
|
||||
if p_dist < .5 and p_dist < closest_dist then
|
||||
local inv = player:get_inventory()
|
||||
if inv:contains_item("main", ItemStack("bb_powerup:throw")) then
|
||||
local p_controls = player:get_player_control()
|
||||
if p_controls.jump == true then
|
||||
throwable_player = player
|
||||
closest_dist = p_dist
|
||||
end
|
||||
end
|
||||
end
|
||||
-- end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
-- implement throwing
|
||||
|
||||
|
||||
if throwable_player then
|
||||
-- get target position
|
||||
local pi = 3.14159
|
||||
-- get player's look direction
|
||||
local look_yaw = throwable_player:get_look_horizontal()
|
||||
local dir_vect = bb_bomb.yaw_to_dirvect(look_yaw)
|
||||
|
||||
local target = vector.add(p,vector.multiply(dir_vect,2))
|
||||
self:_start_throw(target,1.5)
|
||||
end
|
||||
|
||||
|
||||
if self._throwing == false then
|
||||
-- check under_nodes, do something special for special under nodes
|
||||
local o_pos = self.object:get_pos()
|
||||
local pos = vector.add(o_pos,vector.new(0,-1,0))
|
||||
local under_node = minetest.get_node(pos)
|
||||
|
||||
if vector.round(pos) ~= self._coursechange_pos then
|
||||
self._coursechange_pos = vector.round(pos)
|
||||
|
||||
local arrow_group = minetest.get_item_group(under_node.name,"arrow")
|
||||
if arrow_group == 1 then
|
||||
self._last_arrow = vector.round(pos)
|
||||
self.object:move_to(vector.round(o_pos), false)
|
||||
local facedir = under_node.param2
|
||||
local dir = minetest.facedir_to_dir(facedir)
|
||||
self.object:set_velocity(vector.multiply(dir,3))
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
local mortar_group = minetest.get_item_group(under_node.name,"mortar")
|
||||
if mortar_group == 1 then
|
||||
self.object:set_animation({x = 120, y = 150}, 30, 0, false)
|
||||
self.object:move_to(pos)
|
||||
local pos1 = vector.add(pos,vector.new(-20,-20,-20))
|
||||
local pos2 = vector.add(pos,vector.new(20,20,20))
|
||||
|
||||
local possible_pos = minetest.find_nodes_in_area(pos1, pos2, "group:floor", false)
|
||||
|
||||
local target = vector.new(0,1,0) -- default, should always be changed.
|
||||
|
||||
local nodepos = possible_pos[math.random(1,#possible_pos)]
|
||||
if nodepos then
|
||||
target = vector.add(nodepos,vector.new(0,1,0))
|
||||
end
|
||||
self.object:move_to(vector.add(vector.new(0,2,0),pos))
|
||||
self:_start_throw(target,2,10*2)
|
||||
end
|
||||
|
||||
-- make bombs fall if there is air under them.
|
||||
|
||||
if under_node.name == "air" then
|
||||
local found_node = false
|
||||
for i=0,20 do
|
||||
if minetest.find_node_near(vector.add(p,vector.new(0,-i,0)), .3, {"group:solid"}, true) then
|
||||
found_node = true
|
||||
end
|
||||
|
||||
end
|
||||
if found_node then
|
||||
local vel = self.object:get_velocity()
|
||||
self.object:set_pos(vector.round(o_pos))
|
||||
self.object:set_velocity(vector.new(0,-25,0))
|
||||
minetest.after(.5,function()
|
||||
if self and self.object then
|
||||
self.object:set_velocity(vel)
|
||||
end
|
||||
end)
|
||||
else
|
||||
self._falling = true
|
||||
self._runtimer = false
|
||||
self.object:set_animation({x=220,y=260}, 15, 0, false)
|
||||
self.object:set_pos(vector.round(o_pos))
|
||||
self.object:set_properties({physical = false})
|
||||
self.object:set_velocity(vector.new(0,0,0))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- explode if timer is reached
|
||||
if self._runtimer and self._timer > bb_bomb.bombtimer then
|
||||
self:_explode()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- -- get staticdata is called about every 18 sec while the ent is active, and saves the data for later use. because we do not need bombs to be saved, we dont need this.
|
||||
-- function bb_bomb.bomb_get_staticdata(self)
|
||||
-- return
|
||||
-- end
|
||||
|
||||
|
||||
minetest.register_entity("block_bomber_mg:bomb",{
|
||||
initial_properties = {
|
||||
physical = true,
|
||||
stepheight = 0.5,
|
||||
collide_with_objects = true,
|
||||
collisionbox = {-0.45, -0.45, -0.45, 0.45, 0.45, 0.45},
|
||||
visual = "mesh",
|
||||
mesh = "bb_bomb.b3d",
|
||||
textures = {"bb_bomb_texture.png"},
|
||||
visual_size = bb_bomb.visual_size,
|
||||
static_save = false,
|
||||
},
|
||||
|
||||
on_activate = bb_bomb.bomb_on_activate,
|
||||
on_step = bb_bomb.bomb_on_step,
|
||||
-- get_staticdata = bb_bomb.bomb_get_staticdata,
|
||||
on_punch = bb_bomb.bomb_on_punch,
|
||||
_power = 1,
|
||||
_owner = "",
|
||||
_multidir = false,
|
||||
_timer = 0,
|
||||
_inc_timer = 0,
|
||||
_runtimer = true,
|
||||
_throw_timer = 0,
|
||||
_throwing = false,
|
||||
_throw_target = nil,
|
||||
_throw_finish_time = nil,
|
||||
_kicktimer = 0,
|
||||
_kick = false,
|
||||
_coursechange_pos = vector.new(0,0,0),
|
||||
_falling = false,
|
||||
_falling_timer = 0,
|
||||
_exploding = false,
|
||||
|
||||
_start_throw = function(self,target_pos,time,anim_time)
|
||||
anim_time = anim_time or 16*time
|
||||
|
||||
self._runtimer = false
|
||||
self._throwing = true
|
||||
self._throw_target = target_pos
|
||||
self._throw_finish_time = time
|
||||
self.object:set_properties({physical = false})
|
||||
|
||||
-- set throw anitmation
|
||||
self.object:set_animation({x=60,y=100}, anim_time, 0, false)
|
||||
local dir = vector.direction(self.object:get_pos(), target_pos)
|
||||
local dist = vector.distance(self.object:get_pos(), target_pos)
|
||||
local speed = dist / time
|
||||
local send_vect = vector.multiply(dir,speed)
|
||||
self.object:set_velocity(send_vect)
|
||||
|
||||
end,
|
||||
|
||||
_throw_finish = function(self)
|
||||
self.object:set_properties({physical = true})
|
||||
self.object:set_velocity(vector.new(0,0,0))
|
||||
self.object:set_pos(self._throw_target)
|
||||
self._runtimer = true
|
||||
self._throw_timer = 0
|
||||
self._throwing = false
|
||||
self.object:set_animation({x=0,y=40}, 40, 0, true)
|
||||
end,
|
||||
|
||||
_explode = function(self)
|
||||
if self._exploding == false then
|
||||
self._exploding = true
|
||||
if bb_bomb.debug then
|
||||
minetest.log("error","power:"..tostring(self._power)..", multidir:".. tostring(self._multidir)..", owner:".. tostring(self._owner))
|
||||
end
|
||||
--bb_bomb.explode(pos,power,multidir,owner)
|
||||
|
||||
bb_bomb.explode(vector.round(self.object:get_pos()), self._power,self._multidir,self._owner)
|
||||
|
||||
--particlepos variable set
|
||||
local particlepos = self.object:get_pos()
|
||||
--minetest.log(particlepos)
|
||||
|
||||
minetest.add_particlespawner({
|
||||
amount = 40,
|
||||
time = 0.2,
|
||||
minpos = {x=particlepos.x - 0.7, y=particlepos.y - 0.7, z=particlepos.z - 0.7},
|
||||
maxpos = {x=particlepos.x + 0.7, y=particlepos.y + 0.7, z=particlepos.z + 0.7},
|
||||
minvel = {x=-2, y=2, z=-1},
|
||||
maxvel = {x=2, y=4, z=1},
|
||||
minacc = {x=-1, y=-6, z=-1},
|
||||
maxacc = {x=1, y=-5, z=1},
|
||||
minexptime = 1,
|
||||
maxexptime = 2,
|
||||
minsize = 2,
|
||||
maxsize = 6,
|
||||
collisiondetection = true,
|
||||
vertical = false,
|
||||
texture = "bb_bomb_particle.png",
|
||||
--playername = "singleplayer"
|
||||
})
|
||||
self.object:remove()
|
||||
end
|
||||
end,
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
144
block_bomber_mg/src/controls.lua
Normal file
@ -0,0 +1,144 @@
|
||||
local try_to_place_bomb = function(player) end
|
||||
local get_count_in_inv = function (player,item) end
|
||||
|
||||
controls.register_on_press(function(player, control_name)
|
||||
local placekey = "sneak"
|
||||
if control_name ~= placekey then return end
|
||||
local p_name = player:get_player_name()
|
||||
local mod = arena_lib.get_mod_by_player(p_name)
|
||||
if not mod then return end
|
||||
local arena = arena_lib.get_arena_by_player(p_name)
|
||||
if not arena.in_game then return end
|
||||
if arena.in_loading then return end
|
||||
if not arena.players[p_name] then return end
|
||||
|
||||
try_to_place_bomb(player)
|
||||
end)
|
||||
|
||||
|
||||
controls.register_on_press(function(player, control_name)
|
||||
if not (control_name == "left" or control_name == "right" or control_name == "up" or control_name == "down") then
|
||||
return
|
||||
end
|
||||
|
||||
local p_name = player:get_player_name()
|
||||
local mod = arena_lib.get_mod_by_player(p_name)
|
||||
if not mod then return end
|
||||
local arena = arena_lib.get_arena_by_player(p_name)
|
||||
if not arena.in_game then return end
|
||||
|
||||
local inv = player:get_inventory()
|
||||
if inv:contains_item("main", "bb_powerup:weird_control") then
|
||||
local look = player:get_look_horizontal()
|
||||
player:set_look_horizontal(look - 3.14)
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
|
||||
-- implement party here because try_to_place_bomb is here
|
||||
local partytimer = 0
|
||||
minetest.register_globalstep(function(dtime)
|
||||
partytimer = partytimer + dtime
|
||||
if partytimer > .5 then
|
||||
partytimer = 0
|
||||
for arenaID, arena in pairs(arena_lib.mods[blockbomber.modname].arenas) do
|
||||
if arena.in_game and not arena.in_loading and not arena.in_celebration then
|
||||
for p_name, stats in pairs(arena.players) do
|
||||
local player = minetest.get_player_by_name(p_name)
|
||||
|
||||
|
||||
-- partaaae!
|
||||
|
||||
local inv = player:get_inventory()
|
||||
if inv:contains_item("main", "bb_powerup:party") then
|
||||
try_to_place_bomb(player)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
function try_to_place_bomb(player)
|
||||
--get our vars
|
||||
local p_name = player:get_player_name()
|
||||
local inv = player:get_inventory()
|
||||
local pos = vector.add(player:get_pos(),vector.new(0,.5,0))
|
||||
|
||||
-- booleans
|
||||
-- note: bomb throwing is handled in bomb code
|
||||
local can_placebomb = false
|
||||
if inv:contains_item("main", "bb_powerup:extra_bomb") and not inv:contains_item("main", "bb_powerup:no_placebomb") then
|
||||
can_placebomb = true
|
||||
end
|
||||
|
||||
-- if there is a bomb that the player has just placed (they are standing on it) and they have throw ability, then throw it
|
||||
|
||||
local near_bomb = false
|
||||
local pos1 = vector.add(pos, vector.new(-.5,0,-.5))
|
||||
local pos2 = vector.add(pos, vector.new(.5,0,.5))
|
||||
|
||||
local objs = minetest.get_objects_in_area(pos1, pos2)
|
||||
for k,v in ipairs(objs) do
|
||||
if v and not ( v:is_player() ) and v:get_luaentity() and v:get_luaentity().name == "block_bomber_mg:bomb" then
|
||||
near_bomb = true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if can_placebomb and near_bomb ~= true then
|
||||
|
||||
-- place bomb, remove bomb item from inv
|
||||
local power = get_count_in_inv(player,"bb_powerup:extra_power")
|
||||
|
||||
local multidir = false
|
||||
if inv:contains_item("main", ItemStack('bb_powerup:multidir')) then
|
||||
multidir = true
|
||||
for k,v in pairs(inv:get_list("main")) do
|
||||
if v:get_name() == 'bb_powerup:multidir' then
|
||||
|
||||
v:add_wear((65535/3)+3)
|
||||
inv:set_stack("main",k,v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local staticdata = minetest.write_json({
|
||||
_power = power,
|
||||
_owner = p_name,
|
||||
_multidir = multidir,
|
||||
})
|
||||
|
||||
minetest.sound_play({
|
||||
name = "sfx_sounds_impact4",
|
||||
gain = 0.6,
|
||||
}, {
|
||||
pos = player:get_pos(),
|
||||
max_hear_distance = 10,
|
||||
}, true)
|
||||
|
||||
minetest.add_entity(vector.round(pos), "block_bomber_mg:bomb", staticdata)
|
||||
|
||||
inv:remove_item("main", "bb_powerup:extra_bomb")
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
function get_count_in_inv(player,item)
|
||||
local count = 0
|
||||
local inv = player:get_inventory()
|
||||
local lists = inv:get_lists()
|
||||
for listname,itemstacklist in pairs(lists) do
|
||||
for _,stack in pairs( itemstacklist ) do
|
||||
if stack:get_name() == item then
|
||||
count = count + stack:get_count()
|
||||
end
|
||||
end
|
||||
end
|
||||
return count
|
||||
end
|
167
block_bomber_mg/src/deathmessages.lua
Normal file
@ -0,0 +1,167 @@
|
||||
|
||||
blockbomber.messages={}
|
||||
blockbomber.messages["explosion"] = {
|
||||
" was burnt to a crisp.",
|
||||
" is flat-out done.",
|
||||
" was pancaked by a small explosion.",
|
||||
" turned into small specks.",
|
||||
" is toast. Literally.",
|
||||
" tried biting off more than they could chew, and burnt their mouth.",
|
||||
" popped.",
|
||||
" was killed by death.",
|
||||
" learned explosions aren't powerups.",
|
||||
" terminated by THE GAME.",
|
||||
" lost their appitite.",
|
||||
" didnt think good.",
|
||||
" was slightly too slow.",
|
||||
" flew on a blast of hot air.",
|
||||
" might have lacked intellignce, but compensated with plenty of explosive.",
|
||||
' made a small "pop" and disappeared.',
|
||||
" became a star!",
|
||||
" had a new experience.",
|
||||
" was struck by an interesting thought.",
|
||||
" tried, at least.",
|
||||
" realized their mistake.",
|
||||
" had a bright idea!",
|
||||
" was fired.",
|
||||
" will rest in pieces.",
|
||||
" underestimated their invincibility.",
|
||||
" accurately simulated sublimation.",
|
||||
" was fully oxidized.",
|
||||
" learned the hard way.",
|
||||
" reached escape velocity",
|
||||
" had an explosion of intelligence",
|
||||
" wanted to spectate.",
|
||||
" witnessed the Big Bang.",
|
||||
" caused an eruption",
|
||||
" doesnt feel like it anymore.",
|
||||
" went for a coffee.",
|
||||
" croaked.",
|
||||
" got too excited.",
|
||||
" felt slightly discombobulated.",
|
||||
" died a little on the inside.",
|
||||
" spontaneously combusted.",
|
||||
" lived the fast life.",
|
||||
" loves particles, I guess.",
|
||||
" went out with a bang.",
|
||||
" is flashy.",
|
||||
"'s hypothesis was incorrect.",
|
||||
" theory was disproved by The Universe.",
|
||||
" played with fire.",
|
||||
" was too eager.",
|
||||
" ate something hot.",
|
||||
" is well done.",
|
||||
" is ready.",
|
||||
" looked too far into the oven.",
|
||||
"; rest in peices.",
|
||||
" checked if the oven was warm enough.",
|
||||
" is creating a toxic atmosphere.",
|
||||
" is letting their mind wander again.",
|
||||
" failed fire safety class.",
|
||||
" has some spare parts now.",
|
||||
" is no longer with us.",
|
||||
" is at large.",
|
||||
" is experiencing a chemical imbalence.",
|
||||
" didnt know the game was hot potato.",
|
||||
" went out with a whimper AND a bang.",
|
||||
" didn't really need those organs anyway.",
|
||||
" is just fine ... honest!",
|
||||
" is having regrets already.",
|
||||
" will be sure to return the favor.",
|
||||
" decided to keep the game short and to the point.",
|
||||
" earned a much-needed break.",
|
||||
" was doing really well there for a while.",
|
||||
" wants a do-over.",
|
||||
" doesn't remember this part from the training video.",
|
||||
" is trying to any% their bucket list.",
|
||||
" forgot to take their body.",
|
||||
" is visiting many exotic places, simultaneously.",
|
||||
" turned out for the party.",
|
||||
" needs to keep their insides where they belong.",
|
||||
" opened up shop, and business is booming!",
|
||||
" went out with a bang.",
|
||||
" is *not* invincible, after all.",
|
||||
" suffered a minor case of death.",
|
||||
" popped off.",
|
||||
" suddenly discovered the meaning of life, the universe, and everything.",
|
||||
" is one with the universe.",
|
||||
" found out what happens when the bomber becomes the bombed."
|
||||
|
||||
}
|
||||
|
||||
blockbomber.messages["falling"] = {
|
||||
|
||||
" forgot to miss the ground.",
|
||||
" is off to new horizons.",
|
||||
" reached termnal velocity",
|
||||
" apparently had too much pride",
|
||||
" is flying. No wait, im looking at this backwards...",
|
||||
" believed they could fly.",
|
||||
" went down to the bottom.",
|
||||
" is still falling...",
|
||||
" is playing on a whole other level",
|
||||
" has embraced his deepest tendency",
|
||||
" saw a bird, or a plane, or something... anyhow they're gone now.",
|
||||
" went exploring.",
|
||||
" slipped.",
|
||||
" flopped.",
|
||||
" learned flying is for the birds.",
|
||||
" tried to find the surface.",
|
||||
' says: "hey guys things look different from here! *zcchzz* "',
|
||||
': "over and out"',
|
||||
" went down the rabbithole.",
|
||||
" overstepped his boundaries.",
|
||||
" zoomed waaay out.",
|
||||
" is reaching for the stars.",
|
||||
" went off the deep end.",
|
||||
" went skydiving.",
|
||||
" became smaller and smaller in the distance.",
|
||||
" is approching the speed of light.",
|
||||
' says: "hey guys, what happened to the gravity? ... oh."',
|
||||
" sprouted wings.",
|
||||
" reached for the horizon and slipped.",
|
||||
" found the event horizon.",
|
||||
" entered the twilight zone.",
|
||||
" forgot their chute.",
|
||||
" has their head in the clouds.",
|
||||
" passed out.",
|
||||
" lacked a safety net.",
|
||||
" tried living on the edge.",
|
||||
" realized the meaning of gravity.",
|
||||
" didnt watch their step.",
|
||||
" forgot that there was no atmosphere in space.",
|
||||
" dident realize that total vacuum kills.",
|
||||
" was caught breaking the Law... Of Gravity.",
|
||||
" is boldly going where no one has gone before.",
|
||||
" is exploring the final frontier.",
|
||||
" is assuming a new perspective.",
|
||||
" failed to miss the ground.",
|
||||
" forgot to pack a parachute",
|
||||
" can't fly, and found out the hard way.",
|
||||
" is looking up ... with regret.",
|
||||
" fellout.",
|
||||
" has their feet planted firmly on the ... oh wait.",
|
||||
" was once mighty, but is fallen!",
|
||||
" thought the floor was invisible. FYI: its not.",
|
||||
" and the playing field have had a bit of a falling out.",
|
||||
" sailed through the air... AND DIED.",
|
||||
" wanted to see what's under the map.",
|
||||
" tried to noclip without fly privs.",
|
||||
" tried to noclip without fly privs.",
|
||||
" is testing the effect of gravity on a mass.",
|
||||
" is somewhere... over the rainbow.",
|
||||
" is measuring terminal velocity.",
|
||||
" likes the feeling of weightlessness.",
|
||||
" clearly flies more like a banana than an arrow.",
|
||||
" shouldn't have booked the cheap flight.",
|
||||
" wanted a window seat, but got more than they bargained for.",
|
||||
" confused personal and outer space.",
|
||||
" cures insomnia by lying down hard enough.",
|
||||
" is enjoying the breeze.",
|
||||
" finds it peaceful out here.",
|
||||
" de-orbited.",
|
||||
" contracted Kessler Syndrome.",
|
||||
" wonders if there eventually is a ground below.",
|
||||
" thought they were an admin.",
|
||||
|
||||
}
|
505
block_bomber_mg/src/globalstep.lua
Normal file
@ -0,0 +1,505 @@
|
||||
|
||||
local function clear_inv(player) end
|
||||
local function check_for_air_under(player) end
|
||||
local function get_count_in_inv(player, item) end
|
||||
local function clear_inv(player) end
|
||||
local function kill_player(player, cause, arena) end
|
||||
|
||||
|
||||
local bb_powerup = {}
|
||||
bb_powerup.normal_speed = .5 -- the speed players start at
|
||||
bb_powerup.speed_boost = .2 -- the speed ech speed boost adds
|
||||
bb_powerup.speed_snail = .25
|
||||
bb_powerup.speed_super = 30
|
||||
|
||||
|
||||
local bb_player = {}
|
||||
bb_player.wear_amt = 300 -- amount of wear to add to bad powerups each globalstep
|
||||
|
||||
|
||||
|
||||
|
||||
minetest.register_globalstep(function(dtime)
|
||||
|
||||
for arenaID, arena in pairs(arena_lib.mods[blockbomber.modname].arenas) do
|
||||
if arena.in_game and not arena.in_loading and not arena.in_celebration then
|
||||
for p_name, stats in pairs(arena.players) do
|
||||
local player = minetest.get_player_by_name(p_name)
|
||||
|
||||
|
||||
-- set animations
|
||||
local controls = player:get_player_control()
|
||||
|
||||
if (controls.up or controls.down or controls.left or controls.right) then
|
||||
if not stats.anim == "walk" then
|
||||
player:set_animation({x=60,y=100}, 50, 0, true)
|
||||
stats.anim = "walk"
|
||||
end
|
||||
else
|
||||
if not stats.anim == "stand" then
|
||||
player:set_animation({x=0,y=40}, 20, 0, true)
|
||||
stats.anim = "stand"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if not player:get_hp() == 300 then
|
||||
player:set_hp(300)
|
||||
end
|
||||
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
--collect nearby items
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
local pos = player:get_pos()
|
||||
local inv = player:get_inventory()
|
||||
|
||||
local objs = minetest.get_objects_inside_radius(vector.add(pos,vector.new(0,.5,0)), 0.7)
|
||||
for k,v in ipairs(objs) do
|
||||
if v and not ( v:is_player() ) and v:get_luaentity() and v:get_luaentity().name == '__builtin:item' then
|
||||
local stack = ItemStack(v:get_luaentity().itemstring)
|
||||
local stack_name = stack:get_name()
|
||||
local goodgroup = minetest.get_item_group(stack_name, "good")
|
||||
local badgroup = minetest.get_item_group(stack_name, "bad")
|
||||
|
||||
|
||||
v:remove()
|
||||
|
||||
-- play sounds
|
||||
if goodgroup == 1 then
|
||||
minetest.sound_play({
|
||||
name = "yippee",
|
||||
gain = 1.0,
|
||||
}, {
|
||||
pos = player:get_pos(),
|
||||
max_hear_distance = 32, -- default, uses an euclidean metric
|
||||
}, true)
|
||||
end
|
||||
if badgroup == 1 then
|
||||
minetest.sound_play({
|
||||
name = "eew",
|
||||
gain = .1,
|
||||
}, {
|
||||
pos = player:get_pos(),
|
||||
max_hear_distance = 32, -- default, uses an euclidean metric
|
||||
}, true)
|
||||
end
|
||||
|
||||
-- if there is a bad powerup in the inv, remove it, whenever you get any powerup
|
||||
local list = inv:get_list("main")
|
||||
for l, m in ipairs(list) do
|
||||
local stack = m
|
||||
local i_name = stack:get_name()
|
||||
if i_name == "bb_powerup:superfast" or
|
||||
i_name == "bb_powerup:slow" or
|
||||
i_name == "bb_powerup:weird_control" or
|
||||
i_name == "bb_powerup:party" or
|
||||
i_name == "bb_powerup:no_placebomb" then
|
||||
|
||||
stack:take_item()
|
||||
inv:set_stack("main", l, stack)
|
||||
end
|
||||
end
|
||||
|
||||
-- if stack_name == "bb_powerup:resurect" then
|
||||
-- -- resurrect all players!!!
|
||||
-- bb_player.resurrect_all_players()
|
||||
|
||||
if stack_name == "bb_powerup:throw" or
|
||||
stack_name == "bb_powerup:kick" or
|
||||
stack_name == "bb_powerup:extra_life" or
|
||||
stack_name == "bb_powerup:multidir" then
|
||||
|
||||
-- if the item is one of the pernament powerups then only add the item if the player doesnt already have one
|
||||
|
||||
if not(inv:contains_item("main", stack_name)) then
|
||||
inv:add_item("main", stack)
|
||||
end
|
||||
|
||||
else
|
||||
-- for everything else, we can just add the item
|
||||
inv:add_item("main", stack)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
--set player speed
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
|
||||
local snail = false
|
||||
local superfast = false
|
||||
local num_speed_boosts = get_count_in_inv(player,"bb_powerup:extra_speed")
|
||||
-- determine the value of the above variables
|
||||
|
||||
|
||||
if inv:contains_item("main", ItemStack("bb_powerup:slow")) then
|
||||
snail = true
|
||||
end
|
||||
if inv:contains_item("main", ItemStack("bb_powerup:superfast")) then
|
||||
superfast = true
|
||||
end
|
||||
|
||||
-- if they have a slow modifier then set their speed to slow
|
||||
if snail then
|
||||
arena.players[p_name].speed = bb_powerup.speed_snail
|
||||
-- if they have a super fast modifier then set their speed to very fast
|
||||
elseif superfast then
|
||||
arena.players[p_name].speed = bb_powerup.speed_super
|
||||
-- else just set their speed based on the number of speed boosts they have collected
|
||||
else
|
||||
local normal_speed = bb_powerup.normal_speed --.75
|
||||
local speed_boost = bb_powerup.speed_boost -- .5
|
||||
local newspeed = normal_speed + num_speed_boosts * speed_boost
|
||||
arena.players[p_name].speed = newspeed
|
||||
end
|
||||
|
||||
player:set_physics_override({speed = arena.players[p_name].speed})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
--inventory sorting
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
|
||||
local inv = player:get_inventory()
|
||||
local list = inv:get_list("main")
|
||||
|
||||
local bombs = nil
|
||||
local power = nil
|
||||
local speed = nil
|
||||
local life = nil
|
||||
local throw = nil
|
||||
local kick = nil
|
||||
local multidir = nil
|
||||
local bad = nil
|
||||
local new_list = {}
|
||||
for _,stack in pairs(list) do
|
||||
if stack:get_name() == "bb_powerup:extra_bomb" then
|
||||
bombs = stack
|
||||
elseif stack:get_name() == "bb_powerup:extra_power" then
|
||||
power = stack
|
||||
elseif stack:get_name() == "bb_powerup:extra_speed" then
|
||||
speed = stack
|
||||
elseif stack:get_name() == "bb_powerup:extra_life" then
|
||||
life = stack
|
||||
elseif stack:get_name() == "bb_powerup:throw" then
|
||||
throw = stack
|
||||
elseif stack:get_name() == "bb_powerup:kick" then
|
||||
kick = stack
|
||||
elseif stack:get_name() == "bb_powerup:multidir" then
|
||||
multidir = stack
|
||||
elseif stack:get_name() ~= "" then
|
||||
bad = stack
|
||||
end
|
||||
end
|
||||
|
||||
local counter = 1
|
||||
|
||||
clear_inv(player)
|
||||
|
||||
if bombs ~= nil then
|
||||
inv:set_stack("main", counter, bombs)
|
||||
counter = counter + 1
|
||||
end
|
||||
if power ~= nil then
|
||||
inv:set_stack("main", counter, power)
|
||||
counter = counter + 1
|
||||
end
|
||||
if speed ~= nil then
|
||||
inv:set_stack("main", counter, speed)
|
||||
counter = counter + 1
|
||||
end
|
||||
if life ~= nil then
|
||||
inv:set_stack("main", counter, life)
|
||||
counter = counter + 1
|
||||
end
|
||||
if throw ~= nil then
|
||||
inv:set_stack("main", counter, throw)
|
||||
counter = counter + 1
|
||||
end
|
||||
if kick ~= nil then
|
||||
inv:set_stack("main", counter, kick)
|
||||
counter = counter + 1
|
||||
end
|
||||
if multidir ~= nil then
|
||||
inv:set_stack("main", counter, multidir)
|
||||
counter = counter + 1
|
||||
end
|
||||
if bad ~= nil then
|
||||
inv:set_stack("main", counter, bad)
|
||||
counter = counter + 1
|
||||
end
|
||||
local hotbar = counter - 1
|
||||
|
||||
player:hud_set_hotbar_itemcount(hotbar)
|
||||
player:hud_set_hotbar_image("bb_player_gui_hotbar_"..hotbar..".png")
|
||||
|
||||
|
||||
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
--add wear to time limited powerups
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
|
||||
local inv = player:get_inventory()
|
||||
for v = 1 , inv:get_size("main") do
|
||||
local stack = inv:get_stack("main", v)
|
||||
local i_name = stack:get_name()
|
||||
if i_name == "bb_powerup:superfast" or
|
||||
i_name == "bb_powerup:slow" or
|
||||
i_name == "bb_powerup:weird_control" or
|
||||
i_name == "bb_powerup:party" or
|
||||
i_name == "bb_powerup:no_placebomb" then
|
||||
|
||||
stack:add_wear(bb_player.wear_amt)
|
||||
inv:set_stack("main", v, stack)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
--check for nearby explosions, kill players too close
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
|
||||
-- if arena.players[p_name].alive then
|
||||
local pos = player:get_pos()
|
||||
local near_exp = false
|
||||
local pos1 = vector.add(pos, vector.new(-.5,-.2,-.5))
|
||||
local pos2 = vector.add(pos, vector.new(.5,1,.5))
|
||||
|
||||
local objs = minetest.get_objects_in_area(pos1, pos2)
|
||||
local o = nil -- we will store the explosion objectref in case we need to remove it
|
||||
for k,v in ipairs(objs) do
|
||||
if v and not ( v:is_player() ) and v:get_luaentity() and v:get_luaentity().name == "block_bomber_mg:explosion" then
|
||||
near_exp = true
|
||||
o = v
|
||||
end
|
||||
end
|
||||
if near_exp then
|
||||
|
||||
-- if there was a nearby explosion, kill them if they dont have extra life. remove it if they do.
|
||||
local inv = player:get_inventory()
|
||||
if inv:contains_item("main", "bb_powerup:extra_life") == true then
|
||||
|
||||
if o then -- remove the killing explosion
|
||||
o:remove()
|
||||
end
|
||||
inv:remove_item("main", "bb_powerup:extra_life")
|
||||
else
|
||||
--update the players respawn point
|
||||
|
||||
local pmeta = player:get_meta()
|
||||
pmeta:set_string("spawn", minetest.serialize( player:get_pos() ))
|
||||
|
||||
minetest.sound_play({
|
||||
name = "death",
|
||||
gain = 2.0,
|
||||
},
|
||||
{
|
||||
pos = player:get_pos(),
|
||||
max_hear_distance = 32, -- default, uses an euclidean metric
|
||||
}, true)
|
||||
|
||||
kill_player(player,"explosion", arena)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
--check for air under player, move them to center of block and kill them
|
||||
--%%%%%%%%%%%%%%%%%%
|
||||
|
||||
local pos = player:get_pos()
|
||||
|
||||
if check_for_air_under(player) then
|
||||
local p_props = player:get_properties()
|
||||
|
||||
minetest.sound_play({
|
||||
name = "GameOver",
|
||||
gain = 1.0,
|
||||
}, {
|
||||
pos = player:get_pos(),
|
||||
gain = 1, -- default
|
||||
max_hear_distance = 10,
|
||||
}, true)
|
||||
|
||||
-- TODO: play falling sound
|
||||
kill_player(player,"falling", arena)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
-- check for alive players. If there are no alive players then end the game without winners. If there are alive players, then remove them.
|
||||
local found_alive = false
|
||||
for pl_name, stats in pairs(arena.players) do
|
||||
if stats.dead == false then
|
||||
found_alive = true
|
||||
end
|
||||
end
|
||||
|
||||
if found_alive then
|
||||
for pl_name, stats in pairs(arena.players) do
|
||||
if stats.dead then
|
||||
local msg = pl_name .. " was removed from the arena."
|
||||
if stats.cause == "falling" or stats.cause == "explosion" then
|
||||
msg = pl_name .. blockbomber.messages[stats.cause][math.random(1,#blockbomber.messages[stats.cause])]
|
||||
end
|
||||
|
||||
arena_lib.remove_player_from_arena(pl_name, 1, nil, msg)
|
||||
end
|
||||
end
|
||||
else
|
||||
-- send a death message for each player
|
||||
for pl_name, stats in pairs(arena.players) do
|
||||
|
||||
local msg = pl_name .. " was removed from the arena."
|
||||
if stats.cause == "falling" or stats.cause == "explosion" then
|
||||
msg = pl_name .. blockbomber.messages[stats.cause][math.random(1,#blockbomber.messages[stats.cause])]
|
||||
end
|
||||
arena_lib.send_message_in_arena(arena, "both", msg)
|
||||
|
||||
-- end the arena
|
||||
arena_lib.load_celebration(blockbomber.modname, arena, nil)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function check_for_air_under(player)
|
||||
--return true if the player should fall out and lose the game
|
||||
local pos = player:get_pos()
|
||||
-- checkdistance to check for solid nodes under player in. it defines the distance players may step off a ledge without falling.
|
||||
local cdist = .2
|
||||
local check_for_floor = 30 -- distance to detect if player can fall to floor below instead of falling out.
|
||||
--player pos is at the floor of the player's hitbox, where they are standing, in the center of the x,z
|
||||
-- u_pos is the pos under that
|
||||
local u_pos = vector.add(pos, vector.new(0,-.7,0))
|
||||
--iff all checkpoints have air, then the player has stepped off
|
||||
|
||||
if minetest.get_node(vector.add(u_pos,vector.new(-cdist,0,-cdist))).name == "air" and
|
||||
minetest.get_node(vector.add(u_pos,vector.new(-cdist,0,0))).name == "air" and
|
||||
minetest.get_node(vector.add(u_pos,vector.new(-cdist,0,cdist))).name == "air" and
|
||||
minetest.get_node(vector.add(u_pos,vector.new(0,0,-cdist))).name == "air" and
|
||||
minetest.get_node(vector.add(u_pos,vector.new(0,0,0))).name == "air" and
|
||||
minetest.get_node(vector.add(u_pos,vector.new(0,0,cdist))).name == "air" and
|
||||
minetest.get_node(vector.add(u_pos,vector.new(cdist,0,-cdist))).name == "air" and
|
||||
minetest.get_node(vector.add(u_pos,vector.new(cdist,0,0))).name == "air" and
|
||||
minetest.get_node(vector.add(u_pos,vector.new(cdist,0,cdist))).name == "air" then
|
||||
|
||||
local floor_found = false
|
||||
for i = 0,check_for_floor do
|
||||
if minetest.get_node(vector.add(u_pos,vector.new(0,-i,0))).name ~= "air" then
|
||||
floor_found = true
|
||||
end
|
||||
end
|
||||
|
||||
if floor_found then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function clear_inv(player)
|
||||
local inv = player:get_inventory()
|
||||
local list = inv:get_list("main")
|
||||
for k, v in pairs(list) do
|
||||
inv:remove_item("main", v)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function get_count_in_inv(player, item)
|
||||
local count = 0
|
||||
local inv = player:get_inventory()
|
||||
local lists = inv:get_lists()
|
||||
for listname,itemstacklist in pairs(lists) do
|
||||
for _,stack in pairs( itemstacklist ) do
|
||||
if stack:get_name() == item then
|
||||
count = count + stack:get_count()
|
||||
end
|
||||
end
|
||||
end
|
||||
return count
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function kill_player(player, cause, arena)
|
||||
local p_name = player:get_player_name()
|
||||
local death_pos = player:get_pos()
|
||||
local death_dir = player:get_look_horizontal()
|
||||
cause = cause or "unknown"
|
||||
|
||||
clear_inv(player)
|
||||
|
||||
-- add a fake player object for the death animation
|
||||
local look_dir = player:get_look_horizontal()
|
||||
local p_props = player:get_properties()
|
||||
|
||||
local static_data = minetest.write_json({
|
||||
_falling = cause == "falling",
|
||||
_arena_name = arena.name,
|
||||
_match_id = arena.match_id
|
||||
})
|
||||
local obj = minetest.add_entity(vector.add(vector.round(death_pos), vector.new(0,-.5,0)) ,"block_bomber_mg:dead_player", static_data)
|
||||
|
||||
-- arena.players[p_name].dead_marker = obj
|
||||
p_props.physical = false
|
||||
obj:set_properties(p_props)
|
||||
obj:set_yaw(look_dir)
|
||||
-- set animation
|
||||
if cause == "falling" then
|
||||
obj:set_animation({x=110,y=150}, 20, 2, false)
|
||||
else
|
||||
obj:set_animation({x=170,y=210}, 90, 2, false)
|
||||
end
|
||||
|
||||
arena.players[p_name].dead = true
|
||||
arena.players[p_name].cause = cause
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
function clear_inv(player)
|
||||
local inv = player:get_inventory()
|
||||
local list = inv:get_list("main")
|
||||
for k, v in pairs(list) do
|
||||
inv:remove_item("main", v)
|
||||
end
|
||||
end
|
33
block_bomber_mg/src/hud.lua
Normal file
@ -0,0 +1,33 @@
|
||||
local infohuds = {}
|
||||
|
||||
function blockbomber.add_info_hud(p_name)
|
||||
local player = minetest.get_player_by_name(p_name)
|
||||
if not player then return end
|
||||
infohuds[p_name] = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
number = 0xE6482E,
|
||||
position = { x = .97, y = .03},
|
||||
offset = {x = 0, y = 0},
|
||||
text = "Timer",
|
||||
alignment = {x = -1, y = 1}, -- change y later!
|
||||
scale = {x = 100, y = 100}, -- covered later
|
||||
size = {x = 2 },
|
||||
})
|
||||
end
|
||||
|
||||
function blockbomber.remove_info_hud(p_name)
|
||||
local player = minetest.get_player_by_name(p_name)
|
||||
if not player then return end
|
||||
if infohuds[p_name] then
|
||||
player:hud_remove(infohuds[p_name])
|
||||
infohuds[p_name] = nil
|
||||
end
|
||||
end
|
||||
|
||||
function blockbomber.set_info_hud(p_name, info)
|
||||
local player = minetest.get_player_by_name(p_name)
|
||||
if not player then return end
|
||||
if infohuds[p_name] then
|
||||
player:hud_change(infohuds[p_name],"text", info)
|
||||
end
|
||||
end
|
117
block_bomber_mg/src/items.lua
Normal file
@ -0,0 +1,117 @@
|
||||
|
||||
-- +1 powerups
|
||||
|
||||
minetest.register_craftitem(":bb_powerup:extra_bomb",{
|
||||
description = "extra bomb",
|
||||
inventory_image = "bb_powerup_bomb.png",
|
||||
on_drop = function() return end,
|
||||
groups = {good = 1},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":bb_powerup:extra_life",{
|
||||
description = "extra life",
|
||||
inventory_image = "bb_powerup_extra_life.png",
|
||||
on_drop = function(itemstack) return itemstack end,
|
||||
groups = {good = 1},
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":bb_powerup:extra_speed",{
|
||||
description = "extra speed",
|
||||
inventory_image = "bb_powerup_fast.png",
|
||||
on_drop = function(itemstack) return itemstack end,
|
||||
groups = {good = 1},
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":bb_powerup:extra_power",{
|
||||
description = "extra power",
|
||||
inventory_image = "bb_powerup_power.png",
|
||||
on_drop = function(itemstack) return itemstack end,
|
||||
groups = {good = 1},
|
||||
})
|
||||
|
||||
|
||||
-- permanent powerups
|
||||
|
||||
minetest.register_craftitem(":bb_powerup:throw",{
|
||||
description = "throw bombs",
|
||||
inventory_image = "bb_powerup_throw.png",
|
||||
on_drop = function(itemstack) return itemstack end,
|
||||
groups = {good = 1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craftitem(":bb_powerup:kick",{
|
||||
description = "kick bombs",
|
||||
inventory_image = "bb_powerup_kick.png",
|
||||
on_drop = function(itemstack) return itemstack end,
|
||||
groups = {good = 1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_tool(":bb_powerup:multidir",{
|
||||
description = "multidir",
|
||||
inventory_image = "bb_powerup_multidir.png",
|
||||
on_drop = function(itemstack) return itemstack end,
|
||||
groups = {good = 1},
|
||||
})
|
||||
|
||||
-- neutral modifiers
|
||||
|
||||
-- minetest.register_craftitem(":bb_powerup:resurect",{
|
||||
-- description = "Resurrect yourself",
|
||||
-- inventory_image = "bb_powerup_resurect.png",
|
||||
-- on_drop = function(itemstack) return itemstack end,
|
||||
-- groups = {good = 1},
|
||||
-- })
|
||||
|
||||
|
||||
minetest.register_tool(":bb_powerup:superfast",{
|
||||
description = "superfast",
|
||||
inventory_image = "bb_powerup_superfast.png",
|
||||
on_drop = function(itemstack) return itemstack end,
|
||||
groups = {bad = 1},
|
||||
})
|
||||
|
||||
-- bad modifiers
|
||||
|
||||
minetest.register_tool(":bb_powerup:slow",{
|
||||
description = "slow",
|
||||
inventory_image = "bb_powerup_slow.png",
|
||||
on_drop = function(itemstack) return itemstack end,
|
||||
groups = {bad = 1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_tool(":bb_powerup:weird_control",{
|
||||
description = "weird_control",
|
||||
inventory_image = "bb_powerup_weird_control.png",
|
||||
on_drop = function(itemstack) return itemstack end,
|
||||
groups = {bad = 1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_tool(":bb_powerup:no_placebomb",{
|
||||
description = "no_placebomb",
|
||||
inventory_image = "bb_powerup_no_placebomb.png",
|
||||
on_drop = function(itemstack) return itemstack end,
|
||||
groups = {bad = 1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_tool(":bb_powerup:party",{
|
||||
description = "party: causes bad cases of bomb placement",
|
||||
inventory_image = "bb_powerup_party.png",
|
||||
on_drop = function(itemstack) return itemstack end,
|
||||
groups = {bad = 1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_item("block_bomber_mg:bb_hand", {
|
||||
type = "none",
|
||||
range = 1.0,
|
||||
groups = {not_in_creative_inventory=1},
|
||||
})
|
||||
|
||||
|
||||
|
225
block_bomber_mg/src/minigame_manager.lua
Normal file
@ -0,0 +1,225 @@
|
||||
local cleanup_player = function(p_name, p_properties) end
|
||||
|
||||
|
||||
|
||||
arena_lib.on_load(blockbomber.modname, function(arena)
|
||||
arena.match_id = blockbomber.get_new_match_id()
|
||||
-- place the arena
|
||||
local num_players = 0
|
||||
for pl_name,stats in pairs(arena.players) do
|
||||
num_players = num_players + 1
|
||||
end
|
||||
arena.map = bb_schems.get_arena_by_playercount(num_players)
|
||||
bb_schems.place_arena(arena.map.name, arena.origin)
|
||||
local msg = "Loading Arena ["..arena.map.name.."], made by ["..arena.map.author.."]"
|
||||
arena_lib.send_message_in_arena(arena, "both", msg)
|
||||
-- set the players' hand inventories
|
||||
for pl_name, stats in pairs(arena.players) do
|
||||
local player = minetest.get_player_by_name(pl_name)
|
||||
|
||||
-- -- set players to not get updated by player_api
|
||||
-- if minetest.get_modpath("player_api") then
|
||||
-- if player_api.player_attached and player_api.player_attached[pl_name] ~= nil then
|
||||
-- stats.original_attached = player_api.player_attached[pl_name] or false
|
||||
-- player_api.player_attached[pl_name] = true
|
||||
-- end
|
||||
-- end
|
||||
|
||||
|
||||
-- -- change player models for player_api
|
||||
-- if minetest.get_modpath("player_api") then
|
||||
-- if player_api.set_model then
|
||||
-- player_api.set_model(player, "bb_character.b3d")
|
||||
-- player_api.set_textures(player, {"white.png^[colorize:"..blockbomber.player_colors[pl_name]..":255","player_parts.png"})
|
||||
-- end
|
||||
-- else
|
||||
-- player:set_properties({textures={"white.png^[colorize:"..blockbomber.player_colors[pl_name]..":255","player_parts.png"}})
|
||||
-- end
|
||||
|
||||
-- attempt to set the player's model to just a head
|
||||
|
||||
-- set hand to only select items within 1 node
|
||||
local inv = player:get_inventory()
|
||||
inv:set_size("hand",1)
|
||||
inv:set_stack("hand",1,ItemStack("block_bomber_mg:bb_hand"))
|
||||
|
||||
-- update player visuals
|
||||
blockbomber.add_info_hud(pl_name)
|
||||
|
||||
-- attach players to a holding ent until the arena can be loaded
|
||||
local pos = player:get_pos()
|
||||
local att = minetest.add_entity(pos, "block_bomber_mg:att")
|
||||
player:set_attach(att)
|
||||
end
|
||||
end)
|
||||
|
||||
arena_lib.on_start(blockbomber.modname, function(arena)
|
||||
local spawns = table.copy(arena.map.spawns)
|
||||
for pl_name, stats in pairs(arena.players) do
|
||||
blockbomber.set_info_hud(pl_name, tostring(arena.sudden_death_time - arena.current_time))
|
||||
local player = minetest.get_player_by_name(pl_name)
|
||||
player:set_detach()
|
||||
-- choose a spawn location
|
||||
local pos_i = math.random(#spawns)
|
||||
local pos_p = spawns[pos_i]
|
||||
player:set_pos(vector.copy(pos_p)+vector.copy(arena.origin))
|
||||
table.remove(spawns, pos_i)
|
||||
-- give players the initial items
|
||||
local inv = player:get_inventory()
|
||||
local list = inv:get_list("main")
|
||||
for k, v in pairs(list) do
|
||||
inv:remove_item("main", v)
|
||||
end
|
||||
inv:add_item("main", ItemStack("bb_powerup:extra_bomb"))
|
||||
inv:add_item("main", ItemStack("bb_powerup:extra_power"))
|
||||
end
|
||||
|
||||
|
||||
|
||||
end)
|
||||
|
||||
arena_lib.on_celebration(blockbomber.modname, function(arena, winner)
|
||||
-- update leaderboard
|
||||
if winner then
|
||||
if blockbomber.leaderboard[winner] then
|
||||
blockbomber.leaderboard[winner] = blockbomber.leaderboard[winner] + 1
|
||||
else
|
||||
blockbomber.leaderboard[winner] = 1
|
||||
end
|
||||
blockbomber.save_leaderboard()
|
||||
local player = minetest.get_player_by_name(winner)
|
||||
if player then
|
||||
local sppos = player:get_pos()
|
||||
sppos = vector.add(sppos,vector.new(0,1,0))
|
||||
minetest.add_particlespawner({
|
||||
amount = 20,
|
||||
time = .5,
|
||||
minpos = vector.add(sppos,vector.new(-.7,-.4,-.7)),
|
||||
maxpos = vector.add(sppos,vector.new(.7,.4,.7)),
|
||||
minvel = vector.new(.1,3,.1),
|
||||
maxvel = vector.new(1.5,7,1.5),
|
||||
minacc = vector.new(0,-9.8,0),
|
||||
maxacc = vector.new(0,-9.8,0),
|
||||
minexptime = 1,
|
||||
maxexptime = 1,
|
||||
minsize = 3,
|
||||
maxsize = 4,
|
||||
collisiondetection = true,
|
||||
collision_removal = false,
|
||||
object_collision = true,
|
||||
--attached = ObjectRef,
|
||||
vertical = false,
|
||||
texture = "bb_spawn_particle.png",
|
||||
glow = 2,
|
||||
})
|
||||
minetest.add_particlespawner({
|
||||
amount = 20,
|
||||
time = .5,
|
||||
minpos = vector.add(sppos,vector.new(-.7,-.4,-.7)),
|
||||
maxpos = vector.add(sppos,vector.new(.7,.4,.7)),
|
||||
minvel = vector.new(.1,3,.1),
|
||||
maxvel = vector.new(1.5,7,1.5),
|
||||
minacc = vector.new(0,-9.8,0),
|
||||
maxacc = vector.new(0,-9.8,0),
|
||||
minexptime = 1,
|
||||
maxexptime = 1,
|
||||
minsize = 3,
|
||||
maxsize = 4,
|
||||
collisiondetection = true,
|
||||
collision_removal = false,
|
||||
object_collision = true,
|
||||
vertical = false,
|
||||
texture = "bb_respawn_particle.png",
|
||||
glow = 2,
|
||||
})
|
||||
end
|
||||
|
||||
for pl_name, stats in pairs(arena.players) do
|
||||
cleanup_player(pl_name, stats)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
end)
|
||||
|
||||
arena_lib.on_end(blockbomber.modname, function(arena, winners, is_forced)
|
||||
for pl_name, stats in pairs(arena.players) do
|
||||
cleanup_player(pl_name, stats)
|
||||
end
|
||||
end)
|
||||
|
||||
arena_lib.on_time_tick(blockbomber.modname, function(arena)
|
||||
-- handle sudden death
|
||||
if arena.current_time > arena.sudden_death_time and not arena.sudden_death then
|
||||
arena.sudden_death = true
|
||||
for p_name, stats in pairs(arena.players_and_spectators) do
|
||||
-- sudden death warning
|
||||
minetest.sound_play({
|
||||
name = "alarm",
|
||||
gain = 0.1,
|
||||
}, {
|
||||
to_player = p_name,
|
||||
}, true)
|
||||
end
|
||||
end
|
||||
if arena.sudden_death then
|
||||
arena.sudden_death_time = arena.sudden_death_time + 1
|
||||
for p_name, stats in pairs(arena.players) do
|
||||
blockbomber.set_info_hud(p_name, "Sudden Death")
|
||||
end
|
||||
else
|
||||
for p_name, stats in pairs(arena.players) do
|
||||
blockbomber.set_info_hud(p_name, tostring(arena.sudden_death_time - arena.current_time))
|
||||
end
|
||||
end
|
||||
|
||||
-- make items jump
|
||||
|
||||
local objs = minetest.get_objects_in_area(arena.pos1, arena.pos2)
|
||||
for _, obj in pairs(objs) do
|
||||
local ent = obj:get_luaentity()
|
||||
if ent then
|
||||
local o_name = ent.name
|
||||
if o_name == "__builtin:item" then
|
||||
obj:add_velocity(vector.new(0,2,0))
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
arena_lib.on_quit(blockbomber.modname, function(arena, p_name, is_spectator, reason, p_properties)
|
||||
cleanup_player(p_name, p_properties)
|
||||
end)
|
||||
|
||||
|
||||
arena_lib.on_enable(blockbomber.modname, function(arena, p_name)
|
||||
if not (arena.pos1 and arena.pos2) then
|
||||
minetest.chat_send_player(p_name,"Arena area not set!")
|
||||
return false
|
||||
end
|
||||
if not ((math.abs(arena.pos2.x - arena.pos1.x) > 100) and (math.abs(arena.pos2.z - arena.pos1.z) > 100) ) then
|
||||
minetest.chat_send_player(p_name,"Arena area must be bigger than 100x100!")
|
||||
return false
|
||||
end
|
||||
|
||||
local mid = vector.apply(vector.divide(vector.add(arena.pos1,arena.pos2),2),math.floor)
|
||||
arena_lib.change_arena_property(p_name, blockbomber.modname, arena.name, "origin", dump(mid), true)
|
||||
return true
|
||||
end)
|
||||
|
||||
|
||||
|
||||
cleanup_player = function(p_name, p_properties)
|
||||
local player = minetest.get_player_by_name(p_name)
|
||||
if not player then return end
|
||||
local inv = player:get_inventory()
|
||||
inv:set_stack("hand",1,ItemStack(""))
|
||||
blockbomber.remove_info_hud(p_name)
|
||||
if minetest.get_modpath("player_api") then
|
||||
if player_api.player_attached and player_api.player_attached[p_name] ~= nil then
|
||||
player_api.player_attached[p_name] = p_properties.original_attached
|
||||
end
|
||||
end
|
||||
end
|
||||
|
71
block_bomber_mg/src/misc_entities.lua
Normal file
@ -0,0 +1,71 @@
|
||||
|
||||
minetest.register_entity("block_bomber_mg:dead_player",{
|
||||
initial_properties = {
|
||||
physical = false,
|
||||
use_texture_alpha = true,
|
||||
collisionbox = {-0.01, -0.01, -0.01, 0.01, 0.01, 0.01},
|
||||
visual = "sprite",
|
||||
textures = {"blank.png"},
|
||||
visual_size = {x = 0.01, y = 0.01, z = 0.01},
|
||||
static_save = false,
|
||||
},
|
||||
on_step = function(self, dtime, moveresult)
|
||||
local arenaID, arena = arena_lib.get_arena_by_name(blockbomber.modname, self._arena_name)
|
||||
if not (arena) or not (arena.in_game) then self.object:remove() return end
|
||||
|
||||
if arena.match_id ~= self._match_id then
|
||||
self.object:remove() return
|
||||
end
|
||||
|
||||
self._timer = self._timer + dtime
|
||||
if self._timer > 4 and self._falling then
|
||||
self.object:remove()
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
on_activate = function(self, staticdata, dtime)
|
||||
if staticdata ~= "" and staticdata ~= nil then
|
||||
local data = minetest.parse_json(staticdata) or {}
|
||||
if data._falling then
|
||||
self._falling = data._falling
|
||||
end
|
||||
if data._arena_name then
|
||||
self._arena_name = data._arena_name
|
||||
end
|
||||
if data._match_id then
|
||||
self._match_id = data._match_id
|
||||
end
|
||||
end
|
||||
end,
|
||||
_timer = 0,
|
||||
_falling = false,
|
||||
_arena_name = "",
|
||||
_match_id = 0,
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_entity("block_bomber_mg:att",{
|
||||
initial_properties = {
|
||||
physical = false,
|
||||
use_texture_alpha = true,
|
||||
collisionbox = {-0.01, -0.01, -0.01, 0.01, 0.01, 0.01},
|
||||
visual = "sprite",
|
||||
textures = {"blank.png"},
|
||||
visual_size = {x = 0.01, y = 0.01, z = 0.01},
|
||||
static_save = false,
|
||||
},
|
||||
on_step = function(self, dtime, moveresult)
|
||||
|
||||
self._timer = self._timer + dtime
|
||||
if self._timer > 300 then
|
||||
self.object:remove()
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
_timer = 0,
|
||||
|
||||
})
|
388
block_bomber_mg/src/nodes.lua
Normal file
@ -0,0 +1,388 @@
|
||||
local bb_nodes = {}
|
||||
|
||||
bb_nodes.slope_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.5000, 0.5000, 0.5000, 0.3750},
|
||||
{-0.5000, -0.5000, 0.3750, 0.5000, 0.3750, 0.2500},
|
||||
{-0.5000, -0.5000, 0.2500, 0.5000, 0.2500, 0.1250},
|
||||
{-0.5000, -0.5000, 0.1250, 0.5000, 0.1250, 0.000},
|
||||
{-0.5000, -0.5000, -0.000, 0.5000, 0.000, -0.1250},
|
||||
{-0.5000, -0.5000, -0.1250, 0.5000, -0.1250, -0.2500},
|
||||
{-0.5000, -0.5000, -0.2500, 0.5000, -0.2500, -0.3750},
|
||||
{-0.5000, -0.5000, -0.3750, 0.5000, -0.3750, -0.5000}
|
||||
}
|
||||
}
|
||||
bb_nodes.inner_slope_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.5000, 0.5000, 0.5000, 0.3750},
|
||||
{-0.5000, -0.5000, 0.3750, 0.5000, 0.3750, 0.2500},
|
||||
{-0.5000, -0.5000, 0.2500, 0.5000, 0.2500, 0.1250},
|
||||
{-0.5000, -0.5000, 0.1250, 0.5000, 0.1250, 0.000},
|
||||
{-0.5000, -0.5000, -0.000, 0.5000, 0.000, -0.1250},
|
||||
{-0.5000, -0.5000, -0.1250, 0.5000, -0.1250, -0.2500},
|
||||
{-0.5000, -0.5000, -0.2500, 0.5000, -0.2500, -0.3750},
|
||||
{-0.5000, -0.5000, -0.3750, 0.5000, -0.3750, -0.5000},
|
||||
|
||||
{-0.5000, -0.5000, -0.5000, -0.3750 , 0.5000 ,0.5000},
|
||||
{-0.5000, -0.5000, -0.3750, -0.2500 , 0.3750 ,0.5000},
|
||||
{-0.5000, -0.5000, -0.2500, -0.1250 , 0.2500 ,0.5000},
|
||||
{-0.5000, -0.5000, -0.1250, -0.000 , 0.1250 ,0.5000},
|
||||
{-0.5000, -0.5000, 0.000, 0.1250 , 0.000 ,0.5000},
|
||||
{-0.5000, -0.5000, 0.1250, 0.2500 , -0.1250, 0.5000},
|
||||
{-0.5000, -0.5000, 0.2500, 0.3750 , -0.2500,0.5000},
|
||||
{-0.5000, -0.5000, 0.3750, 0.5000 , -0.3750,0.5000}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bb_nodes.outer_slope_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0.5000, -0.5000, 0.5000, 0.3750, 0.5000, 0.3750},
|
||||
{0.3750, -0.5000, 0.5000, 0.2500, 0.3750, 0.3750},
|
||||
{0.5000, -0.5000, 0.3750, 0.3750, 0.3750, 0.2500},
|
||||
{0.2500, -0.5000, 0.5000, 0.1250, 0.2500, 0.3750},
|
||||
{0.3750, -0.5000, 0.3750, 0.2500, 0.2500, 0.2500},
|
||||
{0.5000, -0.5000, 0.2500, 0.3750, 0.2500, 0.1250},
|
||||
{0.1250, -0.5000, 0.5000, 0.000, 0.1250, 0.3750},
|
||||
{0.2500, -0.5000, 0.3750, 0.1250, 0.1250, 0.2500},
|
||||
{0.3750, -0.5000, 0.2500, 0.2500, 0.1250, 0.1250},
|
||||
{0.5000, -0.5000, 0.1250, 0.3750, 0.1250, 0.000},
|
||||
{-0.000, -0.5000, 0.5000, -0.1250, 0.000, 0.3750},
|
||||
{0.1250, -0.5000, 0.3750, 0.000, 0.000, 0.2500},
|
||||
{0.2500, -0.5000, 0.2500, 0.1250, 0.000, 0.1250},
|
||||
{0.3750, -0.5000, 0.1250, 0.2500, 0.000, 0.000},
|
||||
{0.5000, -0.5000, 0.000, 0.3750, 0.000, -0.1250},
|
||||
{0.1250, -0.5000, 0.5000, -0.2500, -0.1250, 0.3750},
|
||||
{0.000, -0.5000, 0.3750, -0.1250, -0.1250, 0.2500},
|
||||
{0.1250, -0.5000, 0.2500, 0.000, -0.1250, 0.1250},
|
||||
{0.2500, -0.5000, 0.1250, 0.1250, -0.1250, 0.000},
|
||||
{0.3750, -0.5000, 0.000, 0.2500, -0.1250, -0.1250},
|
||||
{0.5000, -0.5000, -0.1250, 0.3750, -0.1250, -0.2500},
|
||||
{-0.2500, -0.5000, 0.5000, -0.3750, -0.2500, 0.3750},
|
||||
{-0.1250, -0.5000, 0.3750, -0.2500, -0.2500, 0.2500},
|
||||
{-0.000, -0.5000, 0.2500, -0.1250, -0.2500, 0.1250},
|
||||
{0.1250, -0.5000, 0.1250, 0.000, -0.2500, 0.000},
|
||||
{0.2500, -0.5000, 0.000, 0.1250, -0.2500, -0.1250},
|
||||
{0.3750, -0.5000, -0.1250, 0.2500, -0.2500, -0.2500},
|
||||
{0.5000, -0.5000, -0.2500, 0.3750, -0.2500, -0.3750},
|
||||
{-0.3750, -0.5000, 0.5000, -0.5000, -0.3750, 0.3750},
|
||||
{-0.2500, -0.5000, 0.3750, -0.3750, -0.3750, 0.2500},
|
||||
{-0.1250, -0.5000, 0.2500, -0.2500, -0.3750, 0.1250},
|
||||
{-0.000, -0.5000, 0.1250, -0.1250, -0.3750, 0.000},
|
||||
{0.1250, -0.5000, 0.000, 0.000, -0.3750, -0.1250},
|
||||
{0.2500, -0.5000, -0.1250, 0.1250, -0.3750, -0.2500},
|
||||
{0.3750, -0.5000, -0.2500, 0.2500, -0.3750, -0.3750},
|
||||
{0.5000, -0.5000, -0.3750, 0.3750, -0.3750, -0.5000}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-- minetest.register_tool("bb_nodes:breaker", {
|
||||
-- description = "Node Breaker",
|
||||
-- inventory_image = "bb_nodes_breaker.png",
|
||||
-- tool_capabilities = {
|
||||
-- full_punch_interval = 1.5,
|
||||
-- max_drop_level = 1,
|
||||
-- groupcaps = {
|
||||
-- cracky = {
|
||||
-- maxlevel = 3,
|
||||
-- uses = 2000,
|
||||
-- times = { [1]=0.20, [2]=0.20, [3]=0.20 }
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- })
|
||||
|
||||
|
||||
|
||||
function bb_nodes.register_floor_set(name,desc,texture)
|
||||
|
||||
minetest.register_node(":bb_nodes:"..name.."_slope", {
|
||||
description = desc.." Slope",
|
||||
paramtype = "light",
|
||||
drawtype = "mesh",
|
||||
--drawtype = "nodebox",
|
||||
mesh = "slope.obj",
|
||||
node_box = bb_nodes.slope_box,
|
||||
paramtype2 = "facedir",
|
||||
selection_box = bb_nodes.slope_box,
|
||||
collision_box = bb_nodes.slope_box,
|
||||
tiles = {texture},
|
||||
groups = {cracky = 3, floor = 1,solid=1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:"..name, {
|
||||
description = desc,
|
||||
paramtype = "light",
|
||||
tiles = {texture},
|
||||
groups = {cracky = 3, floor = 1,solid=1},
|
||||
})
|
||||
|
||||
minetest.register_node(":bb_nodes:"..name.."_slope_inner", {
|
||||
description = desc.." Slope Inner",
|
||||
paramtype = "light",
|
||||
drawtype = "mesh",
|
||||
mesh = "slope_inside.obj",
|
||||
paramtype2 = "facedir",
|
||||
selection_box = bb_nodes.inner_slope_box,
|
||||
collision_box = bb_nodes.inner_slope_box,
|
||||
tiles = {texture},
|
||||
groups = {cracky = 3, floor = 1,solid=1},
|
||||
})
|
||||
|
||||
minetest.register_node(":bb_nodes:"..name.."_slope_outer", {
|
||||
description = desc.." Slope Outer",
|
||||
paramtype = "light",
|
||||
drawtype = "mesh",
|
||||
mesh = "slope_outside.obj",
|
||||
paramtype2 = "facedir",
|
||||
selection_box = bb_nodes.outer_slope_box,
|
||||
collision_box = bb_nodes.outer_slope_box,
|
||||
tiles = {texture},
|
||||
groups = {cracky = 3, floor = 1,solid=1},
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- classic set
|
||||
|
||||
|
||||
bb_nodes.register_floor_set("floor","Floor","bb_nodes_floor.png")
|
||||
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:floor_with_arrow", {
|
||||
description = "Floor Arrow\n Pushes bombs in this direction",
|
||||
tiles = {"bb_nodes_floor_with_arrow.png","bb_nodes_floor.png"},
|
||||
groups = {cracky = 3, floor = 1, arrow = 1,solid=1},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:floor_with_mortar", {
|
||||
description = "Floor Mortar\n Collects and randomly throws bombs",
|
||||
tiles = {"bb_nodes_floor_with_mortar.png","bb_nodes_floor.png"},
|
||||
groups = {cracky = 3, floor = 1, mortar = 1,solid=1},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:brick", {
|
||||
description = "Removable Wall",
|
||||
tiles = {"bb_nodes_brick.png^[transformFX","bb_nodes_brick.png"},
|
||||
paramtype = "light",
|
||||
groups = {cracky = 3,penetrable = 1,removable = 1,powerup = 1,solid=1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:crate", {
|
||||
description = "Removable Crate",
|
||||
tiles = {"bb_nodes_crate.png"},
|
||||
paramtype = "light",
|
||||
groups = {cracky = 3,penetrable = 1,removable = 1,powerup = 2,solid=1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:ice", {
|
||||
description = "Slippery Ice",
|
||||
tiles = {"bb_nodes_ice.png^[opacity:200"},
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike_framed_optional",
|
||||
groups = {cracky = 3, slippery = 9, floor = 1,solid=1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:wall", {
|
||||
description = "Solid Wall",
|
||||
tiles = {"bb_nodes_wall.png"},
|
||||
paramtype = "light",
|
||||
groups = {cracky = 3,penetrable = 1,solid=1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:fence", {
|
||||
description = "Fence",
|
||||
paramtype = "light",
|
||||
drawtype = "mesh",
|
||||
mesh = "fence.obj",
|
||||
paramtype2 = "facedir",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.5000, 0.5000, 0.5000, 0.3750}
|
||||
},
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.5000, 0.5000, 0.5000, 0.3750}
|
||||
},
|
||||
},
|
||||
tiles = {"fence_classic.png"},
|
||||
groups = {cracky = 3,penetrable = 1,solid=1},
|
||||
})
|
||||
|
||||
minetest.register_node(":bb_nodes:fence_corner", {
|
||||
description = "Fence (corner)",
|
||||
paramtype = "light",
|
||||
drawtype = "mesh",
|
||||
mesh = "fence_corner.obj",
|
||||
paramtype2 = "facedir",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.5000, 0.5000, 0.5000, 0.3750},
|
||||
{ 0.5000, 0.5000, -0.5000, 0.3750, -0.5000, 0.5000}
|
||||
},
|
||||
},
|
||||
collision_box ={
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.5000, 0.5000, 0.5000, 0.3750},
|
||||
{ 0.5000, 0.5000, -0.5000, 0.3750, -0.5000, 0.5000}
|
||||
},
|
||||
},
|
||||
tiles = {"fence_classic.png"},
|
||||
|
||||
groups = {cracky = 3,penetrable = 1,solid=1},
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
-- forest set
|
||||
|
||||
|
||||
bb_nodes.register_floor_set("forest_floor","Forest Floor","bb_nodes_floor_forest.png")
|
||||
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:forest_floor_with_arrow", {
|
||||
description = "Floor Arrow\n Pushes bombs in this direction",
|
||||
tiles = {"bb_nodes_floor_with_arrow_forest.png","bb_nodes_floor_forest.png"},
|
||||
groups = {cracky = 3, floor = 1, arrow = 1,solid=1},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:forest_floor_with_mortar", {
|
||||
description = "Floor Mortar\n Collects and randomly throws bombs",
|
||||
tiles = {"bb_nodes_floor_with_mortar_forest.png","bb_nodes_floor_forest.png"},
|
||||
groups = {cracky = 3, floor = 1, mortar = 1,solid=1},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:bush", {
|
||||
description = "Bush (forest brick)",
|
||||
paramtype = "light",
|
||||
drawtype = "mesh",
|
||||
mesh = "bush.obj",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"bush.png"},
|
||||
groups = {cracky = 3,penetrable = 1,removable = 1,powerup = 1,solid=1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:acorn", {
|
||||
description = "Acorn (forest Crate)",
|
||||
tiles = {"acorn_top.png","acorn_bottom.png","acorn_side.png"},
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.4375, -0.3750, -0.4375, 0.4375, 0.3750, 0.4375},
|
||||
{-0.3125, -0.5000, -0.3125, 0.3125, -0.3750, 0.3125},
|
||||
{-0.3750, 0.3750, -0.3750, 0.3750, 0.4375, 0.3750}
|
||||
}
|
||||
},
|
||||
paramtype = "light",
|
||||
groups = {cracky = 3,penetrable = 1,removable = 1,powerup = 2,solid=1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:mud", {
|
||||
description = "Mud (forest Ice)",
|
||||
tiles = {"mud_top.png","mud_top.png","mud_side.png"},
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, -0.5000, 0.5000, .5-(1/16), 0.5000 },
|
||||
},
|
||||
},
|
||||
groups = {cracky = 3, slippery = 9, floor = 1,solid=1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:rock", {
|
||||
description = "Rock (forest Solid Wall)",
|
||||
paramtype = "light",
|
||||
drawtype = "mesh",
|
||||
mesh = "rock.obj",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"rock.png"},
|
||||
groups = {cracky = 3,penetrable = 1,solid=1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node(":bb_nodes:fence_forest", {
|
||||
description = "Fence",
|
||||
paramtype = "light",
|
||||
drawtype = "mesh",
|
||||
mesh = "fence.obj",
|
||||
paramtype2 = "facedir",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.5000, 0.5000, 0.5000, 0.3750},
|
||||
},
|
||||
},
|
||||
collision_box ={
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.5000, 0.5000, 0.5000, 0.3750},
|
||||
},
|
||||
},
|
||||
tiles = {"fence.png"},
|
||||
groups = {cracky = 3,penetrable = 1,solid=1},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_node(":bb_nodes:fence_forest_corner", {
|
||||
description = "Fence (corner)",
|
||||
paramtype = "light",
|
||||
drawtype = "mesh",
|
||||
mesh = "fence_corner.obj",
|
||||
paramtype2 = "facedir",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.5000, 0.5000, 0.5000, 0.3750},
|
||||
{ 0.5000, 0.5000, -0.5000, 0.3750, -0.5000, 0.5000}
|
||||
},
|
||||
},
|
||||
collision_box ={
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.5000, 0.5000, 0.5000, 0.3750},
|
||||
{ 0.5000, 0.5000, -0.5000, 0.3750, -0.5000, 0.5000}
|
||||
},
|
||||
},
|
||||
tiles = {"fence.png"},
|
||||
groups = {cracky = 3,penetrable = 1,solid=1},
|
||||
|
||||
})
|
||||
|
52
block_bomber_mg/src/player_colors.lua
Normal file
@ -0,0 +1,52 @@
|
||||
local player_colors_avail = {
|
||||
"#472d3c",
|
||||
"#5e3643",
|
||||
"#7a444a",
|
||||
"#a05b53",
|
||||
"#bf7958",
|
||||
"#eea160",
|
||||
"#b6d53c",
|
||||
"#71aa34",
|
||||
"#397b44",
|
||||
"#3c5956",
|
||||
"#5a5353",
|
||||
"#dff6f5",
|
||||
"#8aebf1",
|
||||
"#28ccdf",
|
||||
"#3978a8",
|
||||
"#394778",
|
||||
"#39314b",
|
||||
"#564064",
|
||||
"#8e478c",
|
||||
"#cd6093",
|
||||
"#ffaeb6",
|
||||
"#f4b41b",
|
||||
"#f47e1b",
|
||||
"#e6482e",
|
||||
"#a93b3b",
|
||||
"#827094",
|
||||
"#4f546b",
|
||||
}
|
||||
|
||||
|
||||
function blockbomber.set_textures(player)
|
||||
local p_name = player:get_player_name()
|
||||
player:set_properties({textures={"white.png^[colorize:"..blockbomber.player_colors[p_name]..":255","player_parts.png"}})
|
||||
|
||||
end
|
||||
|
||||
|
||||
function blockbomber.set_ghost_textures(player)
|
||||
local p_name = player:get_player_name()
|
||||
player:set_properties({textures={"white.png^[colorize:"..blockbomber.player_colors[p_name]..":127","player_parts.png"}})
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local p_name = player:get_player_name()
|
||||
if not blockbomber.player_colors[p_name] then
|
||||
local randcolor = player_colors_avail[math.random(1,#player_colors_avail)]
|
||||
blockbomber.player_colors[p_name] = randcolor
|
||||
blockbomber.save_player_colors()
|
||||
end
|
||||
|
||||
end)
|
44
block_bomber_mg/src/player_model.lua
Normal file
@ -0,0 +1,44 @@
|
||||
if minetest.get_modpath("player_api") then
|
||||
player_api.register_model("bb_character.b3d", {
|
||||
animation_speed = 30,
|
||||
textures = {"blank.png","blank.png"},
|
||||
animations = {
|
||||
-- Standard animations.
|
||||
stand = {x = 0, y = 40},
|
||||
lay = {x = 0, y = 40},
|
||||
walk = {x = 60, y = 100},
|
||||
mine = {x = 0, y = 40},
|
||||
walk_mine = {x = 60, y = 100},
|
||||
sit = {x = 0, y = 40},
|
||||
},
|
||||
collisionbox = {-0.4, 0.0, -0.4, 0.4, 0.9,0.4},
|
||||
stepheight = 0.3,
|
||||
eye_height = 1.3,
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
-- visual = "mesh",
|
||||
-- mesh = "bb_character.b3d",
|
||||
-- textures = {"blank.png","blank.png"},
|
||||
-- visual_size = {x = 4, y = 4},
|
||||
-- collisionbox = {-0.4, 0.0, -0.4, 0.4, 0.9,0.4},
|
||||
-- stepheight = 0.3,
|
||||
-- eye_height = 1.3,
|
||||
-- physical = false,
|
||||
-- collides_with_objects = false,
|
||||
|
||||
|
||||
-- local controls = player:get_player_control()
|
||||
|
||||
-- if (controls.up or controls.down or controls.left or controls.right) then
|
||||
-- if not stats.anim == "walk" then
|
||||
-- player:set_animation({x=60,y=100}, 50, 0, true)
|
||||
-- stats.anim = "walk"
|
||||
-- end
|
||||
-- else
|
||||
-- if not stats.anim == "stand" then
|
||||
-- player:set_animation({x=0,y=40}, 20, 0, true)
|
||||
-- stats.anim = "stand"
|
||||
-- end
|
||||
-- end
|
23
block_bomber_mg/src/storage.lua
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
local storage = minetest.get_mod_storage()
|
||||
|
||||
|
||||
blockbomber.leaderboard = minetest.deserialize(storage:get_string("leaderboard")) or {}
|
||||
blockbomber.player_colors = minetest.deserialize(storage:get_string("player_colors")) or {}
|
||||
|
||||
|
||||
function blockbomber.save_leaderboard()
|
||||
storage:set_string("leaderboard", minetest.serialize(blockbomber.leaderboard))
|
||||
end
|
||||
|
||||
function blockbomber.save_player_colors()
|
||||
storage:set_string("player_colors", minetest.serialize(blockbomber.player_colors))
|
||||
end
|
||||
|
||||
|
||||
function blockbomber.get_new_match_id()
|
||||
local last_match_id = storage:get_int("last_match_id") or 1
|
||||
local match_id = last_match_id + 1
|
||||
storage:set_int("last_match_id", match_id)
|
||||
return match_id
|
||||
end
|
35
block_bomber_mg/src/sudden_death.lua
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
minetest.register_abm({
|
||||
label = "suddendeath",
|
||||
nodenames = {"group:floor"},
|
||||
interval = .5,
|
||||
chance = .25,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local arena = arena_lib.get_arena_by_pos(pos,blockbomber.modname)
|
||||
if not arena then return end
|
||||
if not arena.in_game then return end
|
||||
if not arena.sudden_death then return end
|
||||
|
||||
|
||||
local sec_since_sd = arena.sudden_death_time
|
||||
|
||||
if math.random(1,2000) < sec_since_sd then
|
||||
local objs = minetest.get_objects_inside_radius(pos, .4)
|
||||
local bomb_isthere = false
|
||||
for _,obj in pairs(objs) do
|
||||
if (not (obj:is_player())) and obj:get_luaentity().name == "block_bomber_mg:bomb" then
|
||||
bomb_isthere = true
|
||||
end
|
||||
end
|
||||
if bomb_isthere == true then return end
|
||||
pos = vector.add(pos,vector.new(0,1,0))
|
||||
local power = 1 --math.random(1,3)
|
||||
local multidir = false
|
||||
local staticdata = minetest.write_json({
|
||||
_power = power,
|
||||
_multidir = multidir,
|
||||
})
|
||||
minetest.add_entity(pos, "block_bomber_mg:bomb", staticdata)
|
||||
end
|
||||
end,
|
||||
})
|
BIN
block_bomber_mg/textures/acorn_bottom.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
block_bomber_mg/textures/acorn_side.png
Normal file
After Width: | Height: | Size: 227 B |
BIN
block_bomber_mg/textures/acorn_top.png
Normal file
After Width: | Height: | Size: 243 B |
BIN
block_bomber_mg/textures/bb_bomb_explosion.png
Normal file
After Width: | Height: | Size: 801 B |
BIN
block_bomber_mg/textures/bb_bomb_particle.png
Normal file
After Width: | Height: | Size: 647 B |
BIN
block_bomber_mg/textures/bb_bomb_side.png
Normal file
After Width: | Height: | Size: 746 B |
BIN
block_bomber_mg/textures/bb_bomb_texture.png
Normal file
After Width: | Height: | Size: 831 B |
BIN
block_bomber_mg/textures/bb_bomb_top.png
Normal file
After Width: | Height: | Size: 809 B |
BIN
block_bomber_mg/textures/bb_nodes_breaker.png
Normal file
After Width: | Height: | Size: 208 B |
BIN
block_bomber_mg/textures/bb_nodes_brick.png
Normal file
After Width: | Height: | Size: 408 B |
BIN
block_bomber_mg/textures/bb_nodes_crate.png
Normal file
After Width: | Height: | Size: 303 B |
BIN
block_bomber_mg/textures/bb_nodes_crate_old.png
Normal file
After Width: | Height: | Size: 871 B |
BIN
block_bomber_mg/textures/bb_nodes_floor.png
Normal file
After Width: | Height: | Size: 259 B |
BIN
block_bomber_mg/textures/bb_nodes_floor_forest.png
Normal file
After Width: | Height: | Size: 247 B |
BIN
block_bomber_mg/textures/bb_nodes_floor_with_arrow.png
Normal file
After Width: | Height: | Size: 349 B |
BIN
block_bomber_mg/textures/bb_nodes_floor_with_arrow_forest.png
Normal file
After Width: | Height: | Size: 310 B |
BIN
block_bomber_mg/textures/bb_nodes_floor_with_mortar.png
Normal file
After Width: | Height: | Size: 401 B |
BIN
block_bomber_mg/textures/bb_nodes_floor_with_mortar_forest.png
Normal file
After Width: | Height: | Size: 346 B |
BIN
block_bomber_mg/textures/bb_nodes_ice.png
Normal file
After Width: | Height: | Size: 644 B |
BIN
block_bomber_mg/textures/bb_nodes_ice_old.png
Normal file
After Width: | Height: | Size: 339 B |
BIN
block_bomber_mg/textures/bb_nodes_wall.png
Normal file
After Width: | Height: | Size: 315 B |
BIN
block_bomber_mg/textures/bb_player_gui_hotbar.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
block_bomber_mg/textures/bb_player_gui_hotbar_0.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
block_bomber_mg/textures/bb_player_gui_hotbar_1.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
block_bomber_mg/textures/bb_player_gui_hotbar_2.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
block_bomber_mg/textures/bb_player_gui_hotbar_3.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
block_bomber_mg/textures/bb_player_gui_hotbar_4.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
block_bomber_mg/textures/bb_player_gui_hotbar_5.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
block_bomber_mg/textures/bb_player_gui_hotbar_6.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
block_bomber_mg/textures/bb_player_gui_hotbar_7.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
block_bomber_mg/textures/bb_player_gui_hotbar_8.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
block_bomber_mg/textures/bb_powerup_bomb.png
Normal file
After Width: | Height: | Size: 516 B |
BIN
block_bomber_mg/textures/bb_powerup_extra_life.png
Normal file
After Width: | Height: | Size: 524 B |
BIN
block_bomber_mg/textures/bb_powerup_fast.png
Normal file
After Width: | Height: | Size: 737 B |
BIN
block_bomber_mg/textures/bb_powerup_kick.png
Normal file
After Width: | Height: | Size: 496 B |
BIN
block_bomber_mg/textures/bb_powerup_multidir.png
Normal file
After Width: | Height: | Size: 640 B |
BIN
block_bomber_mg/textures/bb_powerup_no_placebomb.png
Normal file
After Width: | Height: | Size: 639 B |
BIN
block_bomber_mg/textures/bb_powerup_party.png
Normal file
After Width: | Height: | Size: 814 B |
BIN
block_bomber_mg/textures/bb_powerup_power.png
Normal file
After Width: | Height: | Size: 720 B |
BIN
block_bomber_mg/textures/bb_powerup_resurect.png
Normal file
After Width: | Height: | Size: 767 B |
BIN
block_bomber_mg/textures/bb_powerup_slow.png
Normal file
After Width: | Height: | Size: 916 B |