Skip to content

Instantly share code, notes, and snippets.

Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/textures/base/pack/menu_header.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/Solar_Plains/menu/header.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/Solar_Plains/menu/icon.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/minetest_game/menu/icon.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/minimal/menu/icon.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/textures/base/pack/menu_header.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/Solar_Plains/menu/header.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/textures/base/pack/menu_header.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/Solar_Plains/menu/header.png
2017-06-08 17:01:12: WARNING[Main]: BanManager: creating C:\Users\jorda\Desktop\minetest-0.4.15\bin\..\worlds\testgfse\ipban.txt
@Jordach
Jordach / gist:f66af33cc01f60da2e9fa790f7d85f22
Last active May 29, 2017 21:26
Simplified Power System
Alternative to Technic and Pipeworks:
Power can only be generated from renewable sources, such as water, lava[?], wind and solar[?].
All connected machines will consume active power at all time, whether the machines are depowered or not.
Each passive producer provides 1 EP indefinitely or add an active producer that uses fuel but for more EP,
perhaps make cabling slowly disintergrate or passive machines need repairs over time?
Tiered power is not nessessary at all.
--[[
Notes:
Times returned from "minetest.get_timeofday()"
Numbers have been trimmed to 2 significant figures.
0 is 12:00 AM
0.23 is 5:30 AM
Beds Flowchart:
|- 1) on_rightclick() (beds:bed_name or any node:here) (function call beds.bed_rightclick(pos, player))
|
|
|--- i) Is it night time and a player? (Gone 6pm in local clock?)
| |
| |
|------ I) else, return, end
| |
@Jordach
Jordach / .lua
Created February 22, 2017 21:39
-- how to add your own textures to the wardrobe;
--[[
Make sure your textures are in greyscale, eg, from black to white in 0-255 steps
The engine prefers this colour as it is easier to look right once a player has
set their colour preferences for a specific piece of clothing.
The only non-colourable texture is the mouth, as that either lightly shades the mouth area or
You guessed: 65
Too Small!
Please input your guess.
66
You guessed: 66
Too Big!
Please input your guess.
You guessed: 65
Too Small!
Please input your guess.
66
You guessed: 66
Too Big!
Please input your guess.
@Jordach
Jordach / .lua
Created February 22, 2017 17:02
function wardrobe.load_user_data(player)
local pname = player:get_player_name()
-- load non-RGB choices
if player:get_attribute("wardrobe_choices") == nil then
wardrobe.formspec_selections[pname] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
print ("[Wardrobe] Failed Loading Texture Data for Player: " .. pname)
player:set_attribute("wardrobe_choices", minetest.serialize(wardrobe.formspec_selections[pname]))
@Jordach
Jordach / .lua
Created February 22, 2017 16:55
wardrobe.formspec_selections_rgb[pname][22] = wardrobe.is_save_hex(fields.acc6)
if wardrobe.is_hex(fields.acc6) then
wardrobe.formspec_selections_rgb[pname][22] = fields.acc6
else
wardrobe.formspec_selections_rgb[pname][22] = "ffffff"
end
end
@Jordach
Jordach / .lua
Created February 22, 2017 14:10
function wardrobe.load_user_data(player)
local pname = player:get_player_name()
-- load non-RGB choices
if minetest.deserialize(player:get_attribute("wardrobe_choices")) == nil then
wardrobe.formspec_selections[pname] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}