Commit 84f1b0f3 authored by SmallJoker's avatar SmallJoker
Browse files

💥 Break old settings

- Rename bitchange_ -> bitchange.
- Better coding style
- Run OptiPNG
parent 20fcf0a0
textures/bitchange_toolrepair_top.png

928 Bytes | W: | H:

textures/bitchange_toolrepair_top.png

615 Bytes | W: | H:

textures/bitchange_toolrepair_top.png
textures/bitchange_toolrepair_top.png
textures/bitchange_toolrepair_top.png
textures/bitchange_toolrepair_top.png
  • 2-up
  • Swipe
  • Onion skin
textures/bitchange_warehouse_front.png

903 Bytes | W: | H:

textures/bitchange_warehouse_front.png

810 Bytes | W: | H:

textures/bitchange_warehouse_front.png
textures/bitchange_warehouse_front.png
textures/bitchange_warehouse_front.png
textures/bitchange_warehouse_front.png
  • 2-up
  • Swipe
  • Onion skin
textures/bitchange_warehouse_side.png

957 Bytes | W: | H:

textures/bitchange_warehouse_side.png

772 Bytes | W: | H:

textures/bitchange_warehouse_side.png
textures/bitchange_warehouse_side.png
textures/bitchange_warehouse_side.png
textures/bitchange_warehouse_side.png
  • 2-up
  • Swipe
  • Onion skin
textures/bitchange_warehouse_top.png

1.37 KB | W: | H:

textures/bitchange_warehouse_top.png

1.07 KB | W: | H:

textures/bitchange_warehouse_top.png
textures/bitchange_warehouse_top.png
textures/bitchange_warehouse_top.png
textures/bitchange_warehouse_top.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,20 +2,20 @@
--License: WTFPL
local function set_infotext(meta, mode)
if(mode == meta:get_int("state")) then
if mode == meta:get_int("state") then
return
end
local owner = meta:get_string("owner")
local text = "Tool Repair "
local text2 = "[Inactive]"
if(mode == 0) then
if mode == 0 then
text = text.."(constructing)"
elseif(mode == 1) then
elseif mode == 1 then
text2 = "Inactive"
elseif(mode == 2) then
elseif mode == 2 then
text2 = "Active"
end
if(mode ~= 0) then
if mode ~= 0 then
text = text.."["..text2.."] (owned by "..owner..")"
end
......@@ -59,19 +59,19 @@ minetest.register_node("bitchange:toolrepair", {
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if(player:get_player_name() ~= meta:get_string("owner")) then
if player:get_player_name() ~= meta:get_string("owner") then
return 0
end
if(listname == "src") then
if listname == "src" then
if(stack:get_wear() > 0
and stack:get_wear() < 65535
and stack:get_name() ~= "technic:water_can"
and stack:get_name() ~= "technic:lava_can") then
return 1
end
elseif(listname == "fuel") then
if(stack:get_name() == "bitchange:mineninth") then
elseif listname == "fuel" then
if stack:get_name() == "bitchange:mineninth" then
return stack:get_count()
end
end
......@@ -79,7 +79,7 @@ minetest.register_node("bitchange:toolrepair", {
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if(bitchange_has_access(meta:get_string("owner"), player:get_player_name())) then
if bitchange.has_access(meta:get_string("owner"), player:get_player_name()) then
return stack:get_count()
end
return 0
......@@ -87,7 +87,7 @@ minetest.register_node("bitchange:toolrepair", {
can_dig = function(pos, player)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if(bitchange_has_access(meta:get_string("owner"), player:get_player_name())) then
if bitchange.has_access(meta:get_string("owner"), player:get_player_name()) then
return inv:is_empty("src") and inv:is_empty("fuel")
end
return 0
......@@ -95,11 +95,11 @@ minetest.register_node("bitchange:toolrepair", {
})
minetest.register_craft({
output = 'bitchange:toolrepair',
output = "bitchange:toolrepair",
recipe = {
{'default:steel_ingot', 'default:stick', 'default:steel_ingot'},
{'default:jungletree', 'default:mese_crystal', 'default:jungletree'},
{'default:jungletree', 'bitchange:minecoinblock', 'default:jungletree'}
{"default:steel_ingot", "default:stick", "default:steel_ingot"},
{"default:jungletree", "default:mese_crystal", "default:jungletree"},
{"default:jungletree", "bitchange:minecoinblock", "default:jungletree"}
}
})
......
......@@ -3,7 +3,7 @@
--License: WTFPL
function get_warehouse_tube_config(mode)
if(bitchange_warehouse_pipeworks) then
if(bitchange.warehouse_pipeworks) then
if(mode == 1) then
return {cracky=1, level=2, tubedevice=1, tubedevice_receiver=1}
else
......@@ -11,22 +11,22 @@ function get_warehouse_tube_config(mode)
insert_object = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if(inv:room_for_item("main",stack)) then
return inv:add_item("main",stack)
if inv:room_for_item("main", stack) then
return inv:add_item("main", stack)
else
return inv:add_item("main2",stack)
return inv:add_item("main2", stack)
end
end,
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if(inv:room_for_item("main",stack)) then
if inv:room_for_item("main", stack) then
return true
else
return inv:room_for_item("main2",stack)
return inv:room_for_item("main2", stack)
end
end,
input_inventory="main",
input_inventory = "main",
connect_sides = {left=1, right=1, back=1, top=1, bottom=1}
}
end
......@@ -90,31 +90,31 @@ minetest.register_node("bitchange:warehouse", {
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local meta = minetest.get_meta(pos)
if(not bitchange_has_access(meta:get_string("owner"), player:get_player_name())) then
if not bitchange.has_access(meta:get_string("owner"), player:get_player_name()) then
return 0
end
return count
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if(not bitchange_has_access(meta:get_string("owner"), player:get_player_name())) then
if not bitchange.has_access(meta:get_string("owner"), player:get_player_name()) then
return 0
end
return stack:get_count()
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if(not bitchange_has_access(meta:get_string("owner"), player:get_player_name())) then
if not bitchange.has_access(meta:get_string("owner"), player:get_player_name()) then
return 0
end
return stack:get_count()
end,
on_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.get_meta(pos)
if(not bitchange_has_access(meta:get_string("owner"), sender:get_player_name())) then
if not bitchange.has_access(meta:get_string("owner"), sender:get_player_name()) then
return
end
if(fields.inv_lv1) then
if fields.inv_lv1 then
meta:set_string("formspec", "size[12,10;]"..
"label[0,0;Warehouse]"..
"label[2,0;Layer:]"..
......@@ -124,7 +124,7 @@ minetest.register_node("bitchange:warehouse", {
"list[current_name;main;0,1;12,4;]"..
"list[current_player;main;2,6;8,4;]")
end
if(fields.inv_lv2) then
if fields.inv_lv2 then
meta:set_string("formspec", "size[12,10;]"..
"label[0,0;Warehouse]"..
"label[2,0;Layer:]"..
......@@ -138,10 +138,10 @@ minetest.register_node("bitchange:warehouse", {
})
minetest.register_craft({
output = 'bitchange:warehouse',
output = "bitchange:warehouse",
recipe = {
{'default:chest_locked', 'bitchange:minecoinblock', 'default:chest_locked'},
{'default:chest_locked', 'default:mese', 'default:chest_locked'},
{'default:chest_locked', 'default:chest_locked', 'default:chest_locked'}
{"default:chest_locked", "bitchange:minecoinblock", "default:chest_locked"},
{"default:chest_locked", "default:mese", "default:chest_locked"},
{"default:chest_locked", "default:chest_locked", "default:chest_locked"}
}
})
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment