This file contains hidden or 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
-- Simple logging mod | |
local path = minetest.get_modpath("log").."/data/" | |
-- returns block coordinates containing [pos] node | |
local function convert_position(pos) | |
return {x = math.floor(pos.x / 16), y = math.floor(pos.y / 16), z = math.floor(pos.z / 16)} | |
end | |
local function filename(pos, short) | |
if short == true then |
This file contains hidden or 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 grass_gen = function( minp, maxp ) | |
if maxp.y < 40 then | |
for lx = minp.x, maxp.x do | |
for ly = minp.y, maxp.y do | |
for lz = minp.z, maxp.z do | |
local p = { x = lx, y = ly, z = lz } | |
local n = minetest.env:get_node( p ) | |
if n.name == "air" then | |
minetest.env:place_node( p, { name = "default:dirt_with_grass" } ) | |
end |
This file contains hidden or 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 grass_gen = function( minp, maxp ) | |
if maxp.y < 40 then | |
for lx = minp.x, maxp.x do | |
for ly = minp.y, maxp.y do | |
for lz = minp.z, maxp.z do | |
local p = { x = lx, y = ly, z = lz } | |
local n = minetest.env:get_node( p ) | |
minetest.env:add_node( p, { name = "default:dirt_with_grass" } ) | |
end | |
end |
This file contains hidden or 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 generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max) | |
if maxp.y < height_min or minp.y > height_max then | |
return | |
end | |
local y_min = math.max(minp.y, height_min) | |
local y_max = math.min(maxp.y, height_max) | |
local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1) | |
local pr = PseudoRandom(seed) | |
local num_chunks = math.floor(chunks_per_volume * volume) | |
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk) |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int goals_of_first_team; | |
int goals_of_second_team; | |
int points_of_ManC; |
This file contains hidden or 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
terminal_version = "0.1.4" | |
system_drive = "nil" --possibly irrelevant for UNIX systems. todo: these need to be loaded at startup | |
working_dir = "nil" | |
folder_dir = "nil" | |
os_name = "nil" | |
user_is_windows = "unsure" --until proven guilty....fact: Lua Terminal was made on windows. |
This file contains hidden or 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
function DecToBase(IN,BASE) | |
local B,K,OUT,D=BASE or 10,"0123456789ABCDEFGHIJKLMNOPQRSTUVW","" | |
while IN>0 do | |
IN,D=math.floor(IN/B),math.mod(IN,B)+1 | |
OUT=string.sub(K,D,D)..OUT | |
end | |
if string.len(OUT) == 1 then | |
OUT = "0000000" .. OUT | |
elseif string.len(OUT) == 2 then | |
OUT = "000000" .. OUT |
This file contains hidden or 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
--Global variables | |
Assumed_Hour = 7.50 | |
Tax_Level = 0.2 | |
-- Options | |
print ('Please select your options:') | |
print ('1: Get payroll record.') | |
print ('2: Calculate net pay.') | |
print ('3: Print paycheck.') |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int length, width, perimeter, area; | |
cout << "Length = "; | |
cin >> length; | |
This file contains hidden or 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
breath = 65535 | |
hp = 20 | |
name = Jordach | |
pitch = 16.6 | |
position = (90,15,20) | |
version = 1 | |
yaw = -14.79 | |
PlayerArgsEnd | |
List main 32 | |
Width 0 |
OlderNewer