aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
Commit message (Expand)AuthorAge
...
* Basic support for configuring which mods to load for each worldJürgen Doser2013-01-21
* Add a list of servers to the "Multiplayer" tabJeija2013-01-21
* Add particlesJeija2013-01-14
* L-System treegenRealBadAngel2012-12-30
* Tweak CMake files for cURLsfan52012-12-18
* Added ability to fetch media from remote server (using cURL library)Ilya Zhuravlev2012-12-16
* ShaderSource and silly example shadersKahrl2012-12-02
* Move util/serialize.h out from staticobject.h for smaller header dependenciesPerttu Ahola2012-11-26
* Move a function from clientserver.h to clientserver.cppPerttu Ahola2012-11-26
* Move chat commands to Lua and remove servercommand.{cpp,h}Matthew I2012-08-12
* Experimental-ish rollback functionalityPerttu Ahola2012-07-27
* Improve build configuration optionsPerttu Ahola2012-07-23
* Implement formspecdarkrose2012-07-22
* Properly and efficiently use split utility headersPerttu Ahola2012-06-17
* Initially split utility.h to multiple files in util/Perttu Ahola2012-06-17
* WIP node metadata, node timersKahrl2012-06-03
* Fix buildbotPerttu Ahola2012-04-03
* Add optional MINGWM10_DLL to cmake installPerttu Ahola2012-04-03
* Fix things for cross-compiling using mingwPerttu Ahola2012-04-02
* Add 'fly' and 'fast' privileges and the underlying privileges-to-client systemPerttu Ahola2012-03-31
* Reimplement authentication handler in Lua; now we have 1) infinite privilege ...Perttu Ahola2012-03-30
* ObjectPropertiesPerttu Ahola2012-03-30
* Add GenericCAO and player armor groups, but don't use them yetPerttu Ahola2012-03-29
* added PlayerSAO and RemotePlayer, removed ServerRemotePlayerKahrl2012-03-29
* Implement propagateSunlight for VoxelManipulatorPerttu Ahola2012-03-27
* Add OPENAL_DLL LIBOGG_DLL LIBVORBIS_DLL and LIBVORBISFILE_DLL to be used opti...Perttu Ahola2012-03-25
* Add OGG_INCLUDE_DIR to SOUND_INCLUDE_DIRSPerttu Ahola2012-03-25
* Don't try to use sound if building only serverPerttu Ahola2012-03-25
* Cache textures by checksumJonathan Neuschäfer2012-03-25
* Build configuration fixes/improvements on WindowsPerttu Ahola2012-03-25
* Fix build on MinGW (as compared to Linux)Perttu Ahola2012-03-24
* c55sound continuedPerttu Ahola2012-03-24
* celeron55's sound system initial frameworkPerttu Ahola2012-03-24
* Fix for MSVC and move stuff around a bit in CMakeLists.txt and src/CMakeLists...Perttu Ahola2012-03-20
* Flatten share/ and user/ in the source and for the RUN_IN_PLACE buildPerttu Ahola2012-03-20
* Fix installation in cmake project filesPerttu Ahola2012-03-18
* Dynamic sky, fog and cloud colors; sun and moonPerttu Ahola2012-03-18
* Move ClientMap to clientmap.{h,cpp}Perttu Ahola2012-03-16
* Add confirmation menu and make world deletion possible in GUIPerttu Ahola2012-03-13
* World creation button and dialog and functionalityPerttu Ahola2012-03-13
* Add quicktune.{cpp,h}Perttu Ahola2012-03-12
* command-line/world game selectionPerttu Ahola2012-03-11
* Chat console, including a number of rebases and modifications.Kahrl2012-03-10
* Remove servermain.cpp, use main.cpp with a couple of #ifdefs insteadPerttu Ahola2012-03-10
* Immediate smoke puff when a normal entity is punched to deathPerttu Ahola2012-03-10
* Digging time groups WIPPerttu Ahola2012-03-10
* Node placement / mineral / serialization / iron freq / node_dig callbackKahrl2012-01-22
* The huge item definition and item namespace unification patch (itemdef), see ...Kahrl2012-01-12
* Add InvRef and InvStack (currently untested and unusable)Perttu Ahola2012-01-02
* Use plain IBillboardSceneNode instead of MyBillboardSceneNode (improvesKahrl2011-12-04
/span> addlevel == nil or addlevel <= 0 then addlevel = bcd.leveled end if core.add_node_level(bcp, addlevel) == 0 then self.object:remove() return end elseif bcd and bcd.buildable_to and (core.get_item_group(self.node.name, "float") == 0 or bcd.liquidtype == "none") then core.remove_node(bcp) return end local np = {x=bcp.x, y=bcp.y+1, z=bcp.z} -- Check what's here local n2 = core.get_node(np) -- If it's not air or liquid, remove node and replace it with -- it's drops if n2.name ~= "air" and (not core.registered_nodes[n2.name] or core.registered_nodes[n2.name].liquidtype == "none") then core.remove_node(np) if core.registered_nodes[n2.name].buildable_to == false then -- Add dropped items local drops = core.get_node_drops(n2.name, "") local _, dropped_item for _, dropped_item in ipairs(drops) do core.add_item(np, dropped_item) end end -- Run script hook local _, callback for _, callback in ipairs(core.registered_on_dignodes) do callback(np, n2, nil) end end -- Create node and remove entity core.add_node(np, self.node) self.object:remove() nodeupdate(np) return end local vel = self.object:getvelocity() if vector.equals(vel, {x=0,y=0,z=0}) then local npos = self.object:getpos() self.object:setpos(vector.round(npos)) end end }) function spawn_falling_node(p, node) local obj = core.add_entity(p, "__builtin:falling_node") obj:get_luaentity():set_node(node) end function drop_attached_node(p) local nn = core.get_node(p).name core.remove_node(p) for _,item in ipairs(core.get_node_drops(nn, "")) do local pos = { x = p.x + math.random()/2 - 0.25, y = p.y + math.random()/2 - 0.25, z = p.z + math.random()/2 - 0.25, } core.add_item(pos, item) end end function check_attached_node(p, n) local def = core.registered_nodes[n.name] local d = {x=0, y=0, z=0} if def.paramtype2 == "wallmounted" then if n.param2 == 0 then d.y = 1 elseif n.param2 == 1 then d.y = -1 elseif n.param2 == 2 then d.x = 1 elseif n.param2 == 3 then d.x = -1 elseif n.param2 == 4 then d.z = 1 elseif n.param2 == 5 then d.z = -1 end else d.y = -1 end local p2 = {x=p.x+d.x, y=p.y+d.y, z=p.z+d.z} local nn = core.get_node(p2).name local def2 = core.registered_nodes[nn] if def2 and not def2.walkable then return false end return true end -- -- Some common functions -- function nodeupdate_single(p, delay) local n = core.get_node(p) if core.get_item_group(n.name, "falling_node") ~= 0 then local p_bottom = {x=p.x, y=p.y-1, z=p.z} local n_bottom = core.get_node(p_bottom) -- Note: walkable is in the node definition, not in item groups if core.registered_nodes[n_bottom.name] and (core.get_item_group(n.name, "float") == 0 or core.registered_nodes[n_bottom.name].liquidtype == "none") and (n.name ~= n_bottom.name or (core.registered_nodes[n_bottom.name].leveled and core.get_node_level(p_bottom) < core.get_node_max_level(p_bottom))) and (not core.registered_nodes[n_bottom.name].walkable or core.registered_nodes[n_bottom.name].buildable_to) then if delay then core.after(0.1, nodeupdate_single, {x=p.x, y=p.y, z=p.z}, false) else n.level = core.get_node_level(p) core.remove_node(p) spawn_falling_node(p, n) nodeupdate(p) end end end if core.get_item_group(n.name, "attached_node") ~= 0 then if not check_attached_node(p, n) then drop_attached_node(p) nodeupdate(p) end end end function nodeupdate(p, delay) -- Round p to prevent falling entities to get stuck p.x = math.floor(p.x+0.5) p.y = math.floor(p.y+0.5) p.z = math.floor(p.z+0.5) for x = -1,1 do for y = -1,1 do for z = -1,1 do nodeupdate_single({x=p.x+x, y=p.y+y, z=p.z+z}, delay or not (x==0 and y==0 and z==0)) end end end end -- -- Global callbacks -- function on_placenode(p, node) nodeupdate(p) end core.register_on_placenode(on_placenode) function on_dignode(p, node) nodeupdate(p) end core.register_on_dignode(on_dignode)