aboutsummaryrefslogtreecommitdiff
path: root/src/mapnode.cpp
Commit message (Expand)AuthorAge
* Fix connected nodes' selection boxes.Auke Kok2016-03-21
* Nodebox: Allow nodeboxes to "connect"Auke Kok2016-03-12
* Mapnode: Replace rotateAlongYAxis with improved versionparamat2015-10-02
* Mapnode: Add rotateAlongYAxisFull supporting 24 facedirsparamat2015-09-22
* Change i++ to ++iDavid Jones2015-08-25
* RotateAlongYAxis: For facedir case, return if param2 >= 4paramat2015-05-03
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
* For usages of assert() that are meant to persist in Release builds (when NDEB...Craig Robbins2015-03-07
* Optimise MapBlockMesh related functionsgregorycu2015-02-23
* Increase MapBlock::actuallyUpdateDayNightDiff() performance by 2-8x. ok @cele...Craig Robbins2015-02-10
* Fix facedir > 23 causes segfault in clientCraig Robbins2015-01-09
* Remove freezemelt (the remainder of proller nonsense)kwolekr2015-01-04
* Increase performance of getLight() by at least 2xCraig Robbins2014-12-10
* Optimise getTileInfo()Craig Robbins2014-11-21
* Custom collision boxes node property.RealBadAngel2014-10-19
* Cavegen: Respect is_ground_content MapNode setting; fix some code formatting ...kwolekr2013-11-29
* Better snow fall, finite liquid transform, leveled nodes apiproller2013-07-28
* Weather supportproller2013-07-27
* Leveled nodeboxproller2013-07-13
* Fix wallmounted rotations along Y axis for 90 and 270 degree caseskwolekr2013-07-08
* Decoration: Handle facedir and wallmounted param2types with schematic rotationkwolekr2013-07-08
* 6d facedirRealBadAngel2013-03-23
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* darkrose should work at a nuclear power plant.Perttu Ahola2012-07-24
* Fix map deserialization and remove old serialization codePerttu Ahola2012-07-23
* Increase node id/param0 to 16 bits, leaving param2 always with 8 bitsdarkrose2012-07-23
* Custom boxy nodes (stairs, slabs) and collision changesKahrl2012-06-17
* Optimize headersPerttu Ahola2012-06-17
* Properly and efficiently use split utility headersPerttu Ahola2012-06-17
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric light,...Kahrl2012-03-15
* Cleanup (some stuff went wrong when reverting 4-byte mapnodes); fix legacy_wa...Kahrl2012-01-22
* Node placement / mineral / serialization / iron freq / node_dig callbackKahrl2012-01-22
* MapNode constructor to allow ndef+namePerttu Ahola2011-11-29
* Node definition namesPerttu Ahola2011-11-29
* Clean mapnode.h and fix other files accordinglyPerttu Ahola2011-11-29
* Completely generalized mesh generation; ContentFeatures serializationPerttu Ahola2011-11-29
* GameDef compilesPerttu Ahola2011-11-29
* Create framework for getting rid of global definitions of node/tool/item/what...Perttu Ahola2011-11-29
* Move ContentFeatures to mapnode_contentfeatures.{h,cpp} and clean stuffPerttu Ahola2011-11-29
* Fix water-glass and water-lava surfacesPerttu Ahola2011-11-08
* Make CONTENT_IGNORE to not block the view when occlusion cullingPerttu Ahola2011-11-03
* Automate texture listing for texture atlas makingPerttu Ahola2011-10-18
* Header file tweaking; mainly for speedPerttu Ahola2011-10-12
* lava!Perttu Ahola2011-08-15
* Added MaterialItem conversion from old content type namespace to newPerttu Ahola2011-07-31
* extended content-type rangePerttu Ahola2011-07-23
* Fixed the problem of <=r548 clients fucking up maps on >=r549 servers. Also, ...Perttu Ahola2011-07-22
* Fixed small error in mapnode.cpp (didn't cause any harm though)Perttu Ahola2011-07-22
/span>80}, advtrains.abs_ceil(velocity)*15, 0, true) self.old_anim_velocity=advtrains.abs_ceil(velocity) end end, custom_on_activate = function(self, staticdata_table, dtime_s) minetest.add_particlespawner({ amount = 10, time = 0, -- ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base minpos = {x=0, y=2, z=1.2}, maxpos = {x=0, y=2, z=1.2}, minvel = {x=-0.2, y=1.8, z=-0.2}, maxvel = {x=0.2, y=2, z=0.2}, minacc = {x=0, y=-0.1, z=0}, maxacc = {x=0, y=-0.3, z=0}, minexptime = 2, maxexptime = 4, minsize = 1, maxsize = 5, -- ^ The particle's properties are random values in between the bounds: -- ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration), -- ^ minsize/maxsize, minexptime/maxexptime (expirationtime) collisiondetection = true, -- ^ collisiondetection: if true uses collision detection vertical = false, -- ^ vertical: if true faces player using y axis only texture = "smoke_puff.png", -- ^ Uses texture (string) attached = self.object, }) end, drops={"default:steelblock 1"}, horn_sound = "advtrains_steam_whistle", glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright }, S("Steam Engine"), "advtrains_engine_steam_inv.png") advtrains.register_wagon("detailed_steam_engine", { mesh="advtrains_detailed_steam_engine.b3d", textures = {"advtrains_detailed_steam_engine.png"}, is_locomotive=true, drives_on={default=true}, max_speed=10, seats = { { name=S("Driver Stand (left)"), attach_offset={x=-5, y=10, z=-10}, view_offset={x=9, y=-2, z=-6}, group = "dstand", }, { name=S("Driver Stand (right)"), attach_offset={x=5, y=10, z=-10}, view_offset={x=0, y=6, z=0}, group = "dstand", }, }, seat_groups = { dstand={ name = "Driver Stand", driving_ctrl_access=true, access_to = {}, }, }, assign_to_seat_group = {"dstand"}, visual_size = {x=1, y=1}, wagon_span=2.05, collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0}, custom_on_velocity_change=function(self, velocity) if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then self.object:set_animation({x=1,y=80}, advtrains.abs_ceil(velocity)*15, 0, true) self.old_anim_velocity=advtrains.abs_ceil(velocity) end if velocity > 0 and not self.sound_loop_handle then self.sound_loop_handle = minetest.sound_play({name="advtrains_steam_loop", gain=2}, {object = self.object, loop=true}) elseif velocity==0 then if self.sound_loop_handle then minetest.sound_stop(self.sound_loop_handle) self.sound_loop_handle = nil end end end, custom_on_activate = function(self, staticdata_table, dtime_s) minetest.add_particlespawner({ amount = 10, time = 0, -- ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base minpos = {x=0, y=2.3, z=1.45}, maxpos = {x=0, y=2.3, z=1.4}, minvel = {x=-0.2, y=1.8, z=-0.2}, maxvel = {x=0.2, y=2, z=0.2}, minacc = {x=0, y=-0.1, z=0}, maxacc = {x=0, y=-0.3, z=0}, minexptime = 2, maxexptime = 4, minsize = 1, maxsize = 5, -- ^ The particle's properties are random values in between the bounds: -- ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration), -- ^ minsize/maxsize, minexptime/maxexptime (expirationtime) collisiondetection = true, -- ^ collisiondetection: if true uses collision detection vertical = false, -- ^ vertical: if true faces player using y axis only texture = "smoke_puff.png", -- ^ Uses texture (string) attached = self.object, }) end, drops={"default:steelblock 1"}, horn_sound = "advtrains_steam_whistle", glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright }, S("Detailed Steam Engine"), "advtrains_detailed_engine_steam_inv.png") advtrains.register_wagon("wagon_default", { mesh="advtrains_passenger_wagon.b3d", textures = {"advtrains_wagon.png"}, drives_on={default=true}, max_speed=10, seats = { { name="1", attach_offset={x=2, y=6, z=8}, view_offset={x=0, y=-4, z=0}, group="pass", }, { name="2", attach_offset={x=-1, y=6, z=8}, view_offset={x=0, y=-4, z=0}, group="pass", }, { name="3", attach_offset={x=-4, y=8, z=-8}, view_offset={x=0, y=0, z=0}, group="pass", }, { name="4", attach_offset={x=4, y=8, z=-8}, view_offset={x=0, y=0, z=0}, group="pass", }, }, seat_groups = { pass={ name = "Passenger area", access_to = {}, }, }, assign_to_seat_group = {"pass"}, visual_size = {x=1, y=1}, wagon_span=2.634, collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0}, drops={"default:steelblock 1"}, glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright }, S("Passenger Wagon"), "advtrains_wagon_inv.png") advtrains.register_wagon("wagon_box", { mesh="advtrains_wagon_box.b3d", textures = {"advtrains_wagon_box.png"}, drives_on={default=true}, max_speed=10, seats = {}, visual_size = {x=1, y=1}, wagon_span=2, collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0}, drops={"default:steelblock 1"}, has_inventory = true, get_inventory_formspec = function(self, pname, invname) return "size[8,11]".. "list["..invname..";box;0,0;8,3;]".. "list[current_player;main;0,5;8,4;]".. "listring[]" end, inventory_list_sizes = { box=8*3, }, glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright }, S("Box Wagon"), "advtrains_wagon_box_inv.png") minetest.register_craft({ output = 'advtrains:newlocomotive', recipe = { {'', '', 'advtrains:chimney'}, {'advtrains:driver_cab', 'dye:black', 'advtrains:boiler'}, {'advtrains:wheel', 'advtrains:wheel', 'advtrains:wheel'}, }, }) minetest.register_craft({ output = 'advtrains:detailed_steam_engine', recipe = { {'', '', 'advtrains:chimney'}, {'advtrains:driver_cab', 'dye:green', 'advtrains:boiler'}, {'advtrains:wheel', 'advtrains:wheel', 'advtrains:wheel'}, }, }) minetest.register_craft({ output = 'advtrains:wagon_default', recipe = { {'default:steelblock', 'default:steelblock', 'default:steelblock'}, {'default:glass', 'dye:dark_green', 'default:glass'}, {'advtrains:wheel', 'advtrains:wheel', 'advtrains:wheel'}, }, }) minetest.register_craft({ output = 'advtrains:wagon_box', recipe = { {'group:wood', 'group:wood', 'group:wood'}, {'group:wood', 'default:chest', 'group:wood'}, {'advtrains:wheel', '', 'advtrains:wheel'}, }, })