forked from nalc/homedecor_modpack
		
	Merge branch 'master' into nalc-1.2
This commit is contained in:
		| @@ -63,23 +63,5 @@ Recipes: | ||||
|  | ||||
| Mod dependencies: default, wool | ||||
|  | ||||
| License: | ||||
| Sourcecode: WTFPL (see below) | ||||
| Graphics: WTFPL (see below) | ||||
|  | ||||
| See also: | ||||
| http://minetest.net/ | ||||
|  | ||||
|          DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||||
|                     Version 2, December 2004 | ||||
|  | ||||
|  Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | ||||
|  | ||||
|  Everyone is permitted to copy and distribute verbatim or modified | ||||
|  copies of this license document, and changing it is allowed as long | ||||
|  as the name is changed. | ||||
|  | ||||
|             DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||||
|    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||||
|  | ||||
|   0. You just DO WHAT THE FUCK YOU WANT TO. | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
|  | ||||
| local S = homedecor_i18n.gettext | ||||
| local S = homedecor.gettext | ||||
| local armchair_cbox = { | ||||
| 	type = "fixed", | ||||
| 	fixed = { | ||||
| @@ -25,9 +25,7 @@ minetest.register_node("lrfurn:armchair", { | ||||
| 	node_box = armchair_cbox, | ||||
| 	after_place_node = function(pos, placer, itemstack, pointed_thing) | ||||
| 		unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) | ||||
| 		unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing) | ||||
| 	end, | ||||
| 	after_dig_node = unifieddyes.after_dig_node, | ||||
| 	on_rotate = unifieddyes.fix_after_screwdriver_nsew, | ||||
| 	on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) | ||||
| 		if not clicker:is_player() then | ||||
| @@ -58,6 +56,17 @@ minetest.register_craft({ | ||||
| 	} | ||||
| }) | ||||
|  | ||||
| unifieddyes.register_color_craft({ | ||||
| 	output = "lrfurn:armchair", | ||||
| 	palette = "wallmounted", | ||||
| 	type = "shapeless", | ||||
| 	neutral_node = "lrfurn:armchair", | ||||
| 	recipe = { | ||||
| 		"NEUTRAL_NODE", | ||||
| 		"MAIN_DYE" | ||||
| 	} | ||||
| }) | ||||
|  | ||||
| -- convert old static nodes to param2 color | ||||
|  | ||||
| lrfurn.old_static_armchairs = {} | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
|  | ||||
| local S = homedecor_i18n.gettext | ||||
| local S = homedecor.gettext | ||||
|  | ||||
| minetest.register_alias("lrfurn:coffeetable_back", "lrfurn:coffeetable") | ||||
| minetest.register_alias("lrfurn:coffeetable_front", "air") | ||||
| @@ -47,6 +47,15 @@ minetest.register_node("lrfurn:coffeetable", { | ||||
| 	end, | ||||
| }) | ||||
|  | ||||
| minetest.register_craft({ | ||||
| 	output = "lrfurn:coffeetable", | ||||
| 	type = "shapeless", | ||||
| 	recipe = { | ||||
| 		"lrfurn:endtable", | ||||
| 		"lrfurn:endtable" | ||||
| 	} | ||||
| }) | ||||
|  | ||||
| minetest.register_craft({ | ||||
| 	output = "lrfurn:coffeetable", | ||||
| 	recipe = { | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| default | ||||
| wool | ||||
| homedecor_i18n | ||||
| homedecor_common | ||||
| unifieddyes | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
|  | ||||
| local S = homedecor_i18n.gettext | ||||
| local S = homedecor.gettext | ||||
|  | ||||
| minetest.register_node("lrfurn:endtable", { | ||||
| 	description = S("End Table"), | ||||
|   | ||||
| @@ -1,3 +1,4 @@ | ||||
| local S = homedecor.gettext | ||||
|  | ||||
| lrfurn = {} | ||||
| screwdriver = screwdriver or {} | ||||
| @@ -60,10 +61,11 @@ end | ||||
|  | ||||
| function lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing) | ||||
| 	local node = minetest.get_node(pos) | ||||
| 	local colorbits = node.param2 - (node.param2 % 8) | ||||
| 	local yaw = placer:get_look_yaw() | ||||
| 	local dir = minetest.yaw_to_dir(yaw-1.5) | ||||
| 	local fdir = minetest.dir_to_wallmounted(dir) | ||||
| 	minetest.swap_node(pos, { name = node.name, param2 = fdir }) | ||||
| 	minetest.swap_node(pos, { name = node.name, param2 = fdir+colorbits }) | ||||
| end | ||||
|  | ||||
| dofile(minetest.get_modpath("lrfurn").."/longsofas.lua") | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
|  | ||||
| local S = homedecor_i18n.gettext | ||||
| local S = homedecor.gettext | ||||
|  | ||||
| local longsofa_cbox = { | ||||
| 	type = "wallmounted", | ||||
| @@ -26,7 +26,6 @@ minetest.register_node("lrfurn:longsofa", { | ||||
| 	on_rotate = screwdriver.disallow, | ||||
| 	after_place_node = function(pos, placer, itemstack, pointed_thing) | ||||
| 		lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing) | ||||
| 		unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing) | ||||
| 		local playername = placer:get_player_name() | ||||
| 		if minetest.is_protected(pos, placer:get_player_name()) then return true end | ||||
|  | ||||
| @@ -42,7 +41,6 @@ minetest.register_node("lrfurn:longsofa", { | ||||
| 		end | ||||
| 		return itemstack | ||||
| 	end, | ||||
| 	after_dig_node = unifieddyes.after_dig_node, | ||||
| 	on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) | ||||
| 		if not clicker:is_player() then | ||||
| 			return itemstack | ||||
| @@ -72,6 +70,17 @@ minetest.register_craft({ | ||||
| 	} | ||||
| }) | ||||
|  | ||||
| unifieddyes.register_color_craft({ | ||||
| 	output = "lrfurn:longsofa", | ||||
| 	palette = "wallmounted", | ||||
| 	type = "shapeless", | ||||
| 	neutral_node = "lrfurn:longsofa", | ||||
| 	recipe = { | ||||
| 		"NEUTRAL_NODE", | ||||
| 		"MAIN_DYE" | ||||
| 	} | ||||
| }) | ||||
|  | ||||
| -- convert old static nodes to param2 colorization | ||||
|  | ||||
| lrfurn.old_static_longsofas = {} | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
|  | ||||
| local S = homedecor_i18n.gettext | ||||
| local S = homedecor.gettext | ||||
|  | ||||
| local sofa_cbox = { | ||||
| 	type = "wallmounted", | ||||
| @@ -26,7 +26,6 @@ minetest.register_node("lrfurn:sofa", { | ||||
| 	on_rotate = screwdriver.disallow, | ||||
| 	after_place_node = function(pos, placer, itemstack, pointed_thing) | ||||
| 		lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing) | ||||
| 		unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing) | ||||
| 		local playername = placer:get_player_name() | ||||
| 		if minetest.is_protected(pos, placer:get_player_name()) then return true end | ||||
|  | ||||
| @@ -42,7 +41,6 @@ minetest.register_node("lrfurn:sofa", { | ||||
| 		end | ||||
| 		return itemstack | ||||
| 	end, | ||||
| 	after_dig_node = unifieddyes.after_dig_node, | ||||
| 	on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) | ||||
| 		if not clicker:is_player() then | ||||
| 			return itemstack | ||||
| @@ -72,6 +70,17 @@ minetest.register_craft({ | ||||
| 	} | ||||
| }) | ||||
|  | ||||
| unifieddyes.register_color_craft({ | ||||
| 	output = "lrfurn:sofa", | ||||
| 	palette = "wallmounted", | ||||
| 	type = "shapeless", | ||||
| 	neutral_node = "lrfurn:sofa", | ||||
| 	recipe = { | ||||
| 		"NEUTRAL_NODE", | ||||
| 		"MAIN_DYE" | ||||
| 	} | ||||
| }) | ||||
|  | ||||
| -- convert old static nodes to param2 color | ||||
|  | ||||
| lrfurn.old_static_sofas = {} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user