aboutsummaryrefslogtreecommitdiff
path: root/advtrains
Commit message (Expand)AuthorAge
* Keep a backup file where stuff is written to when savingGabriel Pérez-Cerezo2019-07-16
* Railway Time: Basic time counter and utility functionsorwell962019-06-19
* Run entity overrun checking only in loaded areasorwell962019-06-05
* Fix occurences of old lzb_invalidateorwell962019-04-23
* Fix remote routesettingorwell962019-04-16
* Move LZB system to core and unify approach callback mechanismorwell962019-04-16
* Set wagon pitch on slopesPedro Gimeno2019-04-06
* Ugly workaround for green signals bugorwell962019-03-15
* Add setting for death behavior and implement damage checks betterorwell962019-03-09
* Configurable interval for get_off setpos and door pos fix for japanese trainorwell962019-03-09
* Restore old door status display behaviororwell962019-03-09
* Prioritize LZB callback (possible bugfix for H#100)orwell962019-02-19
* Fix stop rails sometimes not sending stop commandorwell962019-02-16
* No crash when train does not exist on check_collision()orwell962019-02-06
* Fix slope placer protectionorwell962019-02-05
* Force LZB Halt settingorwell962019-02-05
* Fix sending empty ATC commandsorwell962019-02-05
* Basic functions of "stop rail", missing ARS rules and signal.orwell962019-01-24
* Point speed restriction railsorwell962019-01-24
* Possible fix for braking problems + debug outputsorwell962019-01-23
* Fix last commit (and another warn2log)orwell962019-01-22
* Fix atc command evaluation BB commandorwell962019-01-22
* output step distance in train (debugging purposes)orwell962019-01-22
* Fix small bug in routeui and make another message log-onlyorwell962019-01-22
* Make "Can't restore train" a log message instead of atwarn()orwell962019-01-22
* Fix dropping of items on wagon destroyorwell962019-01-22
* Warn when something clears the path winthin train steporwell962019-01-22
* Revert "Correct last commit"orwell962019-01-22
* Revert "Debugging code to trace down path_invalidate within callbacks error"orwell962019-01-22
* Revert "Index NaN check (tracking obscure error detected on LW migration)"orwell962019-01-22
* Fix for path invalidation within update callbacks (issue was caused by detect...orwell962019-01-22
* Correct last commitorwell962019-01-22
* Debugging code to trace down path_invalidate within callbacks errororwell962019-01-22
* Workaroundorwell962019-01-21
* Do not run train steps when path has been deletedorwell962019-01-21
* Avoid division through zero in get_accelerationorwell962019-01-21
* Index NaN check (tracking obscure error detected on LW migration)orwell962019-01-21
* Additional info print for path_print()orwell962019-01-21
* Do not clear tarvelocity when setting new, potential no-op commandorwell962019-01-15
* Add "routingcode" propertyorwell962019-01-09
* Make track protection radius configurableorwell962018-12-18
* Fix player_to_train_mapping (H#74)orwell962018-12-16
* Fix 144e1fc4e01741f8cdd5a579ae84cde85c420d78 (there's no self in one of the i...orwell962018-12-10
* Fix crashes:orwell962018-12-10
* Change get_inventory_formspec API - add invname parameterorwell962018-12-10
* Shunt signals (not exactly Ks), along with fixes in other components that tho...orwell962018-12-08
* Apply speed restriction 0.5 indexes later, do not cap tarvelocity by speed_re...orwell962018-12-04
* Added on_train_approach callback, non-permanent external LZB brakepoints and ...orwell962018-11-29
* Implement new position encoding function and benchmark itorwell962018-11-29
* Fix discouple positioning when wagon was just loadedorwell962018-11-20
441'>441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517
--[[ Drawtype Test: This file tests out and provides examples for
all drawtypes in Minetest. It is attempted to keep the node
definitions as simple and minimal as possible to keep
side-effects to a minimum.

How to read the node definitions:
There are two parts which are separated by 2 newlines:
The first part contains the things that are more or less essential
for defining the drawtype (except description, which is
at the top for readability).
The second part (after the 2 newlines) contains stuff that are
unrelated to the drawtype, stuff that is mostly there to make
testing this node easier and more convenient.
]]

local S = minetest.get_translator("testnodes")

-- If set to true, will show an inventory image for nodes that have no inventory image as of Minetest 5.1.0.
-- This is due to <https://github.com/minetest/minetest/issues/9209>.
-- This is only added to make the items more visible to avoid confusion, but you will no longer see
-- the default inventory images for these items. When you want to test the default inventory image of drawtypes,
-- this should be turned off.
-- TODO: Remove support for fallback inventory image as soon #9209 is fixed.
local SHOW_FALLBACK_IMAGE = minetest.settings:get_bool("testnodes_show_fallback_image", false)

local fallback_image = function(img)
	if SHOW_FALLBACK_IMAGE then
		return img
	else
		return nil
	end
end

-- A regular cube
minetest.register_node("testnodes:normal", {
	description = S("Normal Drawtype Test Node"),
	drawtype = "normal",
	tiles = { "testnodes_normal.png" },

	groups = { dig_immediate = 3 },
})

-- Standard glasslike node
minetest.register_node("testnodes:glasslike", {
	description = S("Glasslike Drawtype Test Node"),
	drawtype = "glasslike",
	paramtype = "light",
	tiles = { "testnodes_glasslike.png" },

	groups = { dig_immediate = 3 },
})

-- Glasslike framed with the two textures (normal and "detail")
minetest.register_node("testnodes:glasslike_framed", {
	description = S("Glasslike Framed Drawtype Test Node"),
	drawtype = "glasslike_framed",
	paramtype = "light",
	tiles = {
		"testnodes_glasslike_framed.png",
		"testnodes_glasslike_detail.png",
	},


	sunlight_propagates = true,
	groups = { dig_immediate = 3 },
})

-- Like the one above, but without the "detail" texture (texture 2).
-- This node was added to see how the engine behaves when the "detail" texture
-- is missing.
minetest.register_node("testnodes:glasslike_framed_no_detail", {
	description = S("Glasslike Framed without Detail Drawtype Test Node"),
	drawtype = "glasslike_framed",
	paramtype = "light",
	tiles = { "testnodes_glasslike_framed2.png" },


	sunlight_propagates = true,
	groups = { dig_immediate = 3 },
})


minetest.register_node("testnodes:glasslike_framed_optional", {
	description = S("Glasslike Framed Optional Drawtype Test Node"),
	drawtype = "glasslike_framed_optional",
	paramtype = "light",
	tiles = {
		"testnodes_glasslike_framed_optional.png",
		"testnodes_glasslike_detail.png",
	},


	sunlight_propagates = true,
	groups = { dig_immediate = 3 },
})



minetest.register_node("testnodes:allfaces", {
	description = S("Allfaces Drawtype Test Node"),
	drawtype = "allfaces",
	paramtype = "light",
	tiles = { "testnodes_allfaces.png" },

	groups = { dig_immediate = 3 },
})

minetest.register_node("testnodes:allfaces_optional", {
	description = S("Allfaces Optional Drawtype Test Node"),
	drawtype = "allfaces_optional",
	paramtype = "light",
	tiles = { "testnodes_allfaces_optional.png" },

	groups = { dig_immediate = 3 },