diff options
23 files changed, 0 insertions, 275 deletions
diff --git a/nibbles/Nibbler_-_1983_-_Rocket_Company.jpg b/nibbles/Nibbler_-_1983_-_Rocket_Company.jpg Binary files differdeleted file mode 100644 index 3a9a41e..0000000 --- a/nibbles/Nibbler_-_1983_-_Rocket_Company.jpg +++ /dev/null diff --git a/nibbles/init.lua b/nibbles/init.lua deleted file mode 100644 index f2a6c60..0000000 --- a/nibbles/init.lua +++ /dev/null @@ -1,30 +0,0 @@ -minetest.register_node("nibbles:floor",{ - description = "Nibbles Floor", - tiles = {"nibbles_floor.png"}, - paramtype = "light", - groups = {cracky = 3, disable_jump = 1, not_in_creative_inventory = 0}, -}) - -minetest.register_node("nibbles:wall",{ - description = "Nibbles Wall", - tiles = { - "nibbles_wall.png", - "nibbles_wall.png", - "nibbles_wall_side.png", - "nibbles_wall_side.png", - "nibbles_wall_side.png", - "nibbles_wall_side.png", - }, - paramtype = "light", - groups = {cracky = 3, not_in_creative_inventory = 0}, -}) -minetest.register_node("nibbles:placer",{ - description = "Nibbles", - tiles = {"nibbles_wall_side.png^nibbles_button.png"}, - paramtype = "light", - groups = {cracky = 3, not_in_creative_inventory = 0}, - on_rightclick = function(pos, node, player, itemstack, pointed_thing) - local schem = minetest.get_modpath("nibbles").."/schems/nibbles_level_1.mts" - minetest.place_schematic({x=pos.x,y=pos.y-1,z=pos.z},schem,0, "air", true) - end, -}) diff --git a/nibbles/schems/nibbles_level_1.mts b/nibbles/schems/nibbles_level_1.mts Binary files differdeleted file mode 100644 index f63977a..0000000 --- a/nibbles/schems/nibbles_level_1.mts +++ /dev/null diff --git a/nibbles/schems/nibbles_level_2.mts b/nibbles/schems/nibbles_level_2.mts Binary files differdeleted file mode 100644 index 964dba0..0000000 --- a/nibbles/schems/nibbles_level_2.mts +++ /dev/null diff --git a/nibbles/schems/nibbles_level_3.mts b/nibbles/schems/nibbles_level_3.mts Binary files differdeleted file mode 100644 index 2d223e9..0000000 --- a/nibbles/schems/nibbles_level_3.mts +++ /dev/null diff --git a/nibbles/schems/nibbles_level_4.mts b/nibbles/schems/nibbles_level_4.mts Binary files differdeleted file mode 100644 index 512cc33..0000000 --- a/nibbles/schems/nibbles_level_4.mts +++ /dev/null diff --git a/nibbles/schems/nibbles_level_5.mts b/nibbles/schems/nibbles_level_5.mts Binary files differdeleted file mode 100644 index 5c94e9d..0000000 --- a/nibbles/schems/nibbles_level_5.mts +++ /dev/null diff --git a/nibbles/schems/nibbles_level_6.mts b/nibbles/schems/nibbles_level_6.mts Binary files differdeleted file mode 100644 index 016e160..0000000 --- a/nibbles/schems/nibbles_level_6.mts +++ /dev/null diff --git a/nibbles/schems/nibbles_level_7.mts b/nibbles/schems/nibbles_level_7.mts Binary files differdeleted file mode 100644 index c19b605..0000000 --- a/nibbles/schems/nibbles_level_7.mts +++ /dev/null diff --git a/nibbles/schems/nibbles_level_8.mts b/nibbles/schems/nibbles_level_8.mts Binary files differdeleted file mode 100644 index a1aa282..0000000 --- a/nibbles/schems/nibbles_level_8.mts +++ /dev/null diff --git a/nibbles/schems/nibbles_level_9.mts b/nibbles/schems/nibbles_level_9.mts Binary files differdeleted file mode 100644 index 9bf3daf..0000000 --- a/nibbles/schems/nibbles_level_9.mts +++ /dev/null diff --git a/nibbles/textures/nibbles_button.png b/nibbles/textures/nibbles_button.png Binary files differdeleted file mode 100644 index 07bfca1..0000000 --- a/nibbles/textures/nibbles_button.png +++ /dev/null diff --git a/nibbles/textures/nibbles_floor.png b/nibbles/textures/nibbles_floor.png Binary files differdeleted file mode 100644 index f9ab2ef..0000000 --- a/nibbles/textures/nibbles_floor.png +++ /dev/null diff --git a/nibbles/textures/nibbles_wall.png b/nibbles/textures/nibbles_wall.png Binary files differdeleted file mode 100644 index c7392e8..0000000 --- a/nibbles/textures/nibbles_wall.png +++ /dev/null diff --git a/nibbles/textures/nibbles_wall_side.png b/nibbles/textures/nibbles_wall_side.png Binary files differdeleted file mode 100644 index 40b2141..0000000 --- a/nibbles/textures/nibbles_wall_side.png +++ /dev/null diff --git a/pong/ball.lua b/pong/ball.lua deleted file mode 100755 index 91c48f3..0000000 --- a/pong/ball.lua +++ /dev/null @@ -1,108 +0,0 @@ - - - - -minetest.register_entity("pong:ball", { - hp_max = 1, - physical = false, - collide_with_objects = false, - visual = "cube", - visual_size = {x = 0.25, y = 0.25}, - textures = { - "default_cloud.png", "default_cloud.png", "default_cloud.png", - "default_cloud.png", "default_cloud.png", "default_cloud.png", - }, - velocity = {x=math.random(-1,1), y=0, z=math.random(-1,1)}, - direction = {x=1, y=0, z=1}, - collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25}, - is_visible = true, - automatic_rotate = false, - makes_footstep_sound = false, - speed = 4, - - update_velocity = function(self, direction) - if not self.speed then self.speed = 0 end - - if not direction then - local yaw = self.object:getyaw() - self.direction = {x= -math.sin(yaw), y=0, z=math.cos(yaw)} - else - self.direction = direction - end - self.object:setvelocity(vector.multiply(self.direction, self.speed)) - end, - - - on_player_collision = function(self, player) - local yaw = self.object:getyaw() - - local pos = self.object:getpos() - local playerpos = player:getpos() - - local playerdir = vector.direction(playerpos,pos) - playerdir.y = 0 - - local v = self.object:getvelocity() - if v.x < 1 and v.z < 1 then - self:update_velocity(playerdir) - return - end - - --[[ - if math.sign(playerdir.x) ~= math.sign(self.direction.x) then - self.direction.x = -self.direction.x - self:update_velocity(self.direction) - else - self.direction.z = -self.direction.z - self:update_velocity(self.direction) - end - --]] - - if math.sign(playerdir.x) ~= math.sign(self.direction.x) then - self.object:setyaw((yaw + 90)%360) - elseif pos.z < playerpos.z then - self.object:setyaw((yaw - 90)%360) - end - self:update_velocity() - end, - - on_step = function(self, dtime) - -- every 0.2 seconds - self.timer = (self.timer or 0) + dtime - if self.timer < 0.2 then return end - self.timer = 0 - - local pos = self.object:getpos() - local p = vector.add(pos, self.direction) - if p.x <= self.minp.x or p.x >= self.maxp.x then - self.direction.x = -self.direction.x - self:update_velocity(self.direction) - elseif p.z <= self.minp.z or p.z >= self.maxp.z then - self.direction.z = -self.direction.z - self:update_velocity(self.direction) - else - for _,obj in pairs(minetest.get_objects_inside_radius(pos,1)) do - if obj:is_player() == true then - self:on_player_collision(obj) - break - end - end - end - end, - - -- This function should return the saved state of the entity in a string - get_staticdata = function(self) - return minetest.serialize({minp = self.minp, maxp = self.maxp}) - end, - - -- This function should load the saved state of the entity from a string - on_activate = function(self, staticdata) - self.object:set_armor_groups({immortal=1}) - self.direction = vector.normalize(self.object:getvelocity()) - if staticdata and staticdata ~= "" then - staticdata = minetest.deserialize(staticdata) - self.minp = staticdata.minp - self.maxp = staticdata.maxp - end - end -}) diff --git a/pong/init.lua b/pong/init.lua deleted file mode 100644 index b2ed3e1..0000000 --- a/pong/init.lua +++ /dev/null @@ -1,137 +0,0 @@ - -dofile(minetest.get_modpath("pong").."/ball.lua") - -local blocks = { - {"floor","Floor"}, - {"dash","Dash"}, - {"side","Side"}, - {"corner","Corner"}, - } -for i in ipairs(blocks) do - local itm = blocks[i][1] - local des = blocks[i][2] - -minetest.register_node("pong:"..itm,{ - description = des, - tiles = { - "pong_"..itm..".png", - "pong_floor.png", - "pong_floor.png", - "pong_floor.png", - "pong_side.png", - "pong_floor.png", - }, - paramtype = "light", - paramtype2 = "facedir", - groups = {cracky = 3}, -}) -end -minetest.register_node("pong:doora", { - description = "Pong Door", - tiles = { - "pong_floor.png", - "pong_floor.png", - "pong_floor.png", - "pong_floor.png", - "pong_door.png", - "pong_door.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - groups = {cracky = 3}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.4375, 0.5, 0.5, -0.3125} - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.4375, 0.5, 1.5, -0.3125} - } - }, - -after_place_node = function(pos, placer, itemstack, pointed_thing) - local node = minetest.get_node(pos) - minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="pong:doorb",param2=node.param2}) -end, - -on_rightclick = function(pos, node, player, itemstack, pointed_thing) - local timer = minetest.get_node_timer(pos) - local par2 = node.param2 + 1 - if par2 == 4 then - par2 = 0 - end - minetest.set_node(pos,{name="pong:doora",param2 = par2}) - minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="pong:doorb",param2 = par2}) - timer:start(3) -end, -on_timer = function(pos, elapsed) - local node = minetest.get_node(pos) - local par2 = node.param2 - if par2 == 0 then - par2 = 3 - else par2 = node.param2 -1 - end - minetest.set_node(pos,{name="pong:doora",param2 = par2}) - minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="pong:doorb",param2 = par2}) -end, -}) -minetest.register_node("pong:doorb", { - --description = "Pong Door", - tiles = { - "pong_floor.png", - "pong_floor.png", - "pong_floor.png", - "pong_floor.png", - "pong_door.png", - "pong_door.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - groups = {cracky = 3}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.4375, 0.5, 0.5, -0.3125} - } - }, - selection_box = { - type = "fixed", - fixed = { - {0, 0, 0, 0, 0, 0} - } - }, -}) -minetest.register_node("pong:block",{ - description = "Pong", - --inventory_image = "pong_inv.png", - tiles = { - "pong_floor.png", - "pong_floor.png", - "pong_floor.png", - "pong_floor.png", - "pong_floor.png", - "pong_dash.png", - }, - drawtype = "normal", - paramtype = "light", - paramtype2 = "facedir", - light_source = 8, - groups = {cracky = 1}, - on_rightclick = function(pos, node, player, itemstack, pointed_thing) - local schem = minetest.get_modpath("pong").."/schems/pong.mts" - pos.y = pos.y - 1 - minetest.place_schematic(pos,schem,0, "air", true) - - local ballpos = vector.add(pos, {x=9,y=1,z=4}) - local ball = minetest.add_entity(ballpos, "pong:ball"):get_luaentity() - - -- give to the ball the boundaries of the field - ball.minp = vector.add(pos, {x=1,y=0,z=1}) - ball.maxp = vector.add(pos, {x=17,y=2,z=8}) - end, -}) diff --git a/pong/schems/pong.mts b/pong/schems/pong.mts Binary files differdeleted file mode 100644 index 20ec05f..0000000 --- a/pong/schems/pong.mts +++ /dev/null diff --git a/pong/textures/pong_corner.png b/pong/textures/pong_corner.png Binary files differdeleted file mode 100644 index 35a71ed..0000000 --- a/pong/textures/pong_corner.png +++ /dev/null diff --git a/pong/textures/pong_dash.png b/pong/textures/pong_dash.png Binary files differdeleted file mode 100644 index fc5ab4d..0000000 --- a/pong/textures/pong_dash.png +++ /dev/null diff --git a/pong/textures/pong_door.png b/pong/textures/pong_door.png Binary files differdeleted file mode 100644 index 39fdfa3..0000000 --- a/pong/textures/pong_door.png +++ /dev/null diff --git a/pong/textures/pong_floor.png b/pong/textures/pong_floor.png Binary files differdeleted file mode 100644 index 448b41a..0000000 --- a/pong/textures/pong_floor.png +++ /dev/null diff --git a/pong/textures/pong_side.png b/pong/textures/pong_side.png Binary files differdeleted file mode 100644 index 5c5fadb..0000000 --- a/pong/textures/pong_side.png +++ /dev/null |