This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local bedrock_timer = 0 | |
minetest.register_globalstep(function(dtime) | |
bedrock_timer = bedrock_timer + dtime | |
for k,player in ipairs(minetest.get_connected_players()) do | |
if bedrock_timer < 1 then return end | |
bedrock_timer = 0 | |
local pos = player:getpos() | |
if pos.y < -1 then | |
player:setpos({x=pos.x,y=2,z=pos.z}) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local bedrock_timer = 1 | |
minetest.register_globalstep(function(dtime) | |
bedrock_timer = bedrock_timer - dtime | |
if bedrock_timer > 0 then return end | |
for k,player in ipairs(minetest.get_connected_players()) do | |
bedrock_timer = 1 | |
local pos = player:getpos() | |
if pos.y < -1 then | |
player:setpos({x=pos.x,y=3,z=pos.z}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
minetest.register_on_generated(function(minp, maxp) | |
if minp.y < 0 and maxp.y > 0 then | |
for x = minp.x, maxp.x do | |
for z = minp.z, maxp.z do | |
minetest.env:add_node({x = x, y = -1, z = z}, {name="my_mod:bedrock"}) | |
minetest.env:add_node({x = x, y = 0, z = z}, {name="default:dirt_with_grass"}) | |
end | |
end | |
end | |
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This file supplies refrigerators | |
minetest.register_node('homedecor:refrigerator', { | |
drawtype = "nodebox", | |
description = "Refrigerator", | |
tiles = { | |
'homedecor_refrigerator_top.png', | |
'homedecor_refrigerator_bottom.png', | |
'homedecor_refrigerator_right.png', | |
'homedecor_refrigerator_left.png', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
minetest.register_node("default:glass", { | |
description = "Glass", | |
drawtype = "glasslike", | |
tiles = {"default_glass.png"}, | |
inventory_image = minetest.inventorycube("default_glass.png"), | |
paramtype = "light", | |
sunlight_propagates = true, | |
is_ground_content = true, | |
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, | |
sounds = default.node_sound_glass_defaults(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function xray(mode) | |
XRAY_MODE = mode | |
end | |
minetest.register_chatcommand("xray", { | |
params = "<mode>", | |
description = "Make stone invisible.", | |
privs = {xray=true}, | |
func = function(name, param) | |
if param == 'on' then xray('on') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
--Xray mod by InfinityProject | |
--Please read the README.txt file | |
-- | |
--This is a test version | |
minetest.register_privilege("xray", { | |
description = "Can use the xray command", | |
give_to_singleplayer = false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class m121114_001614_printmethod extends DbMigration | |
{ | |
public function up() | |
{ | |
$this->qs("ALTER TABLE `print_method` ADD COLUMN `default_printer_id` int(11) NOT NULL AFTER `printer_type`"); | |
Yii::app()->cache->flush(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* DbMigration | |
* | |
* @author Brett O'Donnell <[email protected]> | |
*/ | |
class DbMigration extends CDbMigration | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Debug the target with syntax highlighting on by default. | |
* @param null $var | |
* @param null $name | |
*/ | |
function debug($var = null, $name = null) | |
{ | |
$bt = debug_backtrace(); | |
if ($name !== false) { | |
$file = str_replace(bp(), '', $bt[0]['file']); |