aboutsummaryrefslogtreecommitdiff
path: root/src/sound.h
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2020-11-10 21:02:53 +0100
committerGitHub <noreply@github.com>2020-11-10 21:02:53 +0100
commitfca4db4184ac054c53446c0960ec578ebc6b5857 (patch)
treed47685dde19e906b5aa2868c90c7e71da9720c43 /src/sound.h
parent97aefe9b81414fa560d1ff37a3060266ac9735a9 (diff)
downloadminetest-fca4db4184ac054c53446c0960ec578ebc6b5857.tar.gz
minetest-fca4db4184ac054c53446c0960ec578ebc6b5857.tar.bz2
minetest-fca4db4184ac054c53446c0960ec578ebc6b5857.zip
ObjectRef: Re-add legacy code for set_physics_override (#10585)
These arguments are used at least by MTG beds and homedecor_common. A deprecation warning is shown to safely remove it in a future release.
Diffstat (limited to 'src/sound.h')
0 files changed, 0 insertions, 0 deletions
d='n116' href='#n116'>116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
--Minetest
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify
--it under the terms of the GNU Lesser General Public License as published by
--the Free Software Foundation; either version 2.1 of the License, or
--(at your option) any later version.
--
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--GNU Lesser General Public License for more details.
--
--You should have received a copy of the GNU Lesser General Public License along
--with this program; if not, write to the Free Software Foundation, Inc.,
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

--------------------------------------------------------------------------------
local function get_formspec(tabview, name, tabdata)
	
	local index = menudata.worldlist:get_current_index(
				tonumber(core.setting_get("mainmenu_last_selected_world"))
				)

	local retval =
		"button[4,4.15;2.6,0.5;world_delete;" .. fgettext("Delete") .. "]" ..
		"button[6.5,4.15;2.8,0.5;world_create;" .. fgettext("New") .. "]" ..
		"button[9.2,4.15;2.55,0.5;world_configure;" .. fgettext("Configure") .. "]" ..
		"button[8.5,4.95;3.25,0.5;start_server;" .. fgettext("Start Game") .. "]" ..
		"label[4,-0.25;" .. fgettext("Select World:") .. "]" ..
		"checkbox[0.25,0.25;cb_creative_mode;" .. fgettext("Creative Mode") .. ";" ..
		dump(core.setting_getbool("creative_mode")) .. "]" ..
		"checkbox[0.25,0.7;cb_enable_damage;" .. fgettext("Enable Damage") .. ";" ..
		dump(core.setting_getbool("enable_damage")) .. "]" ..
		"checkbox[0.25,1.15;cb_server_announce;" .. fgettext("Public") .. ";" ..
		dump(core.setting_getbool("server_announce")) .. "]" ..
		"label[0.25,2.2;" .. fgettext("Name/Password") .. "]" ..
		"field[0.55,3.2;3.5,0.5;te_playername;;" ..
		core.formspec_escape(core.setting_get("name")) .. "]" ..
		"pwdfield[0.55,4;3.5,0.5;te_passwd;]"

	local bind_addr = core.setting_get("bind_address")
	if bind_addr ~= nil and bind_addr ~= "" then
		retval = retval ..
			"field[0.55,5.2;2.25,0.5;te_serveraddr;" .. fgettext("Bind Address") .. ";" ..
			core.formspec_escape(core.setting_get("bind_address")) .. "]" ..
			"field[2.8,5.2;1.25,0.5;te_serverport;" .. fgettext("Port") .. ";" ..
			core.formspec_escape(core.setting_get("port")) .. "]"
	else
		retval = retval ..
			"field[0.55,5.2;3.5,0.5;te_serverport;" .. fgettext("Server Port") .. ";" ..
			core.formspec_escape(core.setting_get("port")) .. "]"
	end
	
	retval = retval ..
		"textlist[4,0.25;7.5,3.7;srv_worlds;" ..
		menu_render_worldlist() ..
		";" .. index .. "]"
	
	return retval