aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api
Commit message (Expand)AuthorAge
* Add Lua bitop library (#9847)Lejo2021-11-26
* Fix item duplication if player dies during interact callback (alternative) (#...sfan52021-10-25
* Split liquid_viscosity to liquid_viscosity and move_resistance (#10810)Wuzzy2021-10-01
* Fix trivial typossfan52021-09-19
* Clean up/improve some scriptapi error handling codesfan52021-09-10
* Dynamic_Add_Media v2 (#11550)sfan52021-09-09
* Async-related script cleanupssfan52021-08-28
* Add API for mods to hook liquid transformation events (#11405)Warr10242021-07-09
* Add min_y and max_y checks for Active Block Modifiers (ABM) (#11333)sfence2021-06-20
* Isolate library tables between sandbox and insecure envsfan52021-04-18
* Degrotate support for mesh nodes (#7840)Vitaliy2021-03-30
* Fix minetest.dig_node returning true when node isn't diggable (#10890)rubenwardy2021-01-31
* Rework use_texture_alpha to provide three opaque/clip/blend modessfan52021-01-29
* Remove dead code (#10845)rubenwardy2021-01-22
* Implement on_rightclickplayer callback (#10775)JDiaz2021-01-11
* Add on_deactivate callback for luaentities (#10723)hecks2021-01-02
* Fix some minor code issues all over the placesfan52020-12-24
* Fix CSMs on arm64 (#10553)luk3yx2020-10-25
* Fix Lua panic when error() message is not a stringPaul Ouellette2020-06-07
* Value copy / allocation optimizations mostly in server, SAO and serialize codesfan52020-05-27
* Add on_authplayer callback and 'last_login' to on_joinplayer (#9574)sorcerykid2020-05-23
* Expose collision information to LuaEntity on_stepsfan52020-04-27
* script: Put getGuiEngine() inside a client-only #ifdefsfan52020-04-27
* Drop content_sao.{cpp,h}Loic Blot2020-04-11
* Move PlayerSAO to dedicated filesLoic Blot2020-04-11
* Move serveractiveobject & unitsaoLoic Blot2020-04-11
* Work around LuaJIT issues on aarch64 (#9614)sfan52020-04-08
* Overall improvements to log messages (#9598)sfan52020-04-08
* Script API: Document ObjectRef handling in a commentsfan52020-02-23
* [CSM] Expose more env functionssfan52019-11-11
* Call on_secondary_use when object is right-clickedsfan52019-11-10
* Load client mods into memory before execution.sfan52019-11-09
* Refactor loading of Lua code with mod securitysfan52019-11-09
* CSM: Fix itemstack:get_meta() 'metadata' indexing errorSmallJoker2019-09-14
* Load CSM environment after the restrictions are knownSmallJoker2019-09-14
* Merge pull request #8776 from osjc/FixGetNodeJozef Behran2019-08-10
* Allow customizing chat message format (#8529)ANAND2019-08-08
* Move the clamping of hp/breath when their maximums change to read_object_prop...Beha2019-07-30
* Check for 'action' field in ABMs & LBMsSmallJoker2019-07-27
* Removed debug.upvaluejoin to prevent leak of insecure environmenty2019-07-24
* Add node field to PlayerHPChangeReason table (#8368)Paul Ouellette2019-04-11
* HPChange Reason: Fix push after free, and type being overwritten (#8359)rubenwardy2019-03-12
* Consistent HP and damage types (#8167)SmallJoker2019-02-10
* Fix wrong code comment (#8061)DS2019-01-06
* Move client-specific files to 'src/client' (#7902)Quentin Bazin2018-11-28
* Raycast: export exact pointing location (#6304)Dániel Juhász2018-08-16
* Add a MSVC / Windows compatible snprintf function (#7353)nOOb31672018-07-22
* Modernize lua read (part 2 & 3): C++ templating assurance (#7410)Loïc Blot2018-06-30
* CSM/SSM: Add on_mods_loaded callback (#7411)Loïc Blot2018-06-06
* Fix builtin inventory list crash when size = 0 (#7297)SmallJoker2018-05-05
"hl opt">{-0.5, -0.125, 0.25, 0.5, 0, 0.5}, } } local box_slope_half_raised = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0.125, 0.5}, {-0.5, 0.125, -0.25, 0.5, 0.25, 0.5}, {-0.5, 0.25, 0, 0.5, 0.375, 0.5}, {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5}, } } --============================================================== local box_slope_inner = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, {-0.5, -0.5, -0.25, 0.5, 0, 0.5}, {-0.5, -0.5, -0.5, 0.25, 0, 0.5}, {-0.5, 0, -0.5, 0, 0.25, 0.5}, {-0.5, 0, 0, 0.5, 0.25, 0.5}, {-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}, {-0.5, 0.25, -0.5, -0.25, 0.5, 0.5}, } } local box_slope_inner_half = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.375, -0.25, 0.5, -0.25, 0.5}, {-0.5, -0.375, -0.5, 0.25, -0.25, 0.5}, {-0.5, -0.25, -0.5, 0, -0.125, 0.5}, {-0.5, -0.25, 0, 0.5, -0.125, 0.5}, {-0.5, -0.125, 0.25, 0.5, 0, 0.5}, {-0.5, -0.125, -0.5, -0.25, 0, 0.5}, } } local box_slope_inner_half_raised = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0.125, 0.5}, {-0.5, 0.125, -0.25, 0.5, 0.25, 0.5}, {-0.5, 0.125, -0.5, 0.25, 0.25, 0.5}, {-0.5, 0.25, -0.5, 0, 0.375, 0.5}, {-0.5, 0.25, 0, 0.5, 0.375, 0.5}, {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5}, {-0.5, 0.375, -0.5, -0.25, 0.5, 0.5}, } } --============================================================== local box_slope_outer = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, {-0.5, -0.25, -0.25, 0.25, 0, 0.5}, {-0.5, 0, 0, 0, 0.25, 0.5}, {-0.5, 0.25, 0.25, -0.25, 0.5, 0.5} } } local box_slope_outer_half = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.375, -0.25, 0.25, -0.25, 0.5}, {-0.5, -0.25, 0, 0, -0.125, 0.5}, {-0.5, -0.125, 0.25, -0.25, 0, 0.5} } } local box_slope_outer_half_raised = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0.125, 0.5}, {-0.5, 0.125, -0.25, 0.25, 0.25, 0.5}, {-0.5, 0.25, 0, 0, 0.375, 0.5}, {-0.5, 0.375, 0.25, -0.25, 0.5, 0.5} } } -- Node will be called <modname>:slope_<subname> function register_slope(modname, subname, recipeitem, groups, images, description, drop, light) stairsplus:register_slope(modname, subname, recipeitem, { groups = groups, tiles = images, description = description, drop = drop, light_source = light, sounds = default.node_sound_stone_defaults(), }) end function stairsplus:register_slope(modname, subname, recipeitem, fields) local defs = { [""] = { mesh = "moreblocks_slope.obj", collision_box = box_slope, selection_box = box_slope, }, ["_half"] = { mesh = "moreblocks_slope_half.obj", collision_box = box_slope_half, selection_box = box_slope_half, }, ["_half_raised"] = { mesh = "moreblocks_slope_half_raised.obj", collision_box = box_slope_half_raised, selection_box = box_slope_half_raised, }, --============================================================== ["_inner"] = { mesh = "moreblocks_slope_inner.obj", collision_box = box_slope_inner, selection_box = box_slope_inner, }, ["_inner_half"] = { mesh = "moreblocks_slope_inner_half.obj", collision_box = box_slope_inner_half, selection_box = box_slope_inner_half, }, ["_inner_half_raised"] = { mesh = "moreblocks_slope_inner_half_raised.obj", collision_box = box_slope_inner_half_raised, selection_box = box_slope_inner_half_raised, }, --============================================================== ["_inner_cut"] = { mesh = "moreblocks_slope_inner_cut.obj", collision_box = box_slope_inner, selection_box = box_slope_inner, }, ["_inner_cut_half"] = { mesh = "moreblocks_slope_inner_cut_half.obj", collision_box = box_slope_inner_half, selection_box = box_slope_inner_half, }, ["_inner_cut_half_raised"] = { mesh = "moreblocks_slope_inner_cut_half_raised.obj", collision_box = box_slope_inner_half_raised, selection_box = box_slope_inner_half_raised, }, --============================================================== ["_outer"] = { mesh = "moreblocks_slope_outer.obj", collision_box = box_slope_outer, selection_box = box_slope_outer, }, ["_outer_half"] = { mesh = "moreblocks_slope_outer_half.obj", collision_box = box_slope_outer_half, selection_box = box_slope_outer_half, }, ["_outer_half_raised"] = { mesh = "moreblocks_slope_outer_half_raised.obj", collision_box = box_slope_outer_half_raised, selection_box = box_slope_outer_half_raised, }, --============================================================== ["_outer_cut"] = { mesh = "moreblocks_slope_outer_cut.obj", collision_box = box_slope_outer, selection_box = box_slope_outer, }, ["_outer_cut_half"] = { mesh = "moreblocks_slope_outer_cut_half.obj", collision_box = box_slope_outer_half, selection_box = box_slope_outer_half, }, ["_outer_cut_half_raised"] = { mesh = "moreblocks_slope_outer_cut_half_raised.obj", collision_box = box_slope_outer_half_raised, selection_box = box_slope_outer_half_raised, }, ["_cut"] = { mesh = "moreblocks_slope_cut.obj", collision_box = box_slope_outer, selection_box = box_slope_outer, }, } local desc = S("%s Slope"):format(fields.description) for alternate, def in pairs(defs) do for k, v in pairs(fields) do def[k] = v end def.drawtype = "mesh" def.paramtype = "light" def.paramtype2 = "facedir" def.on_place = minetest.rotate_node def.description = desc def.groups = stairsplus:prepare_groups(fields.groups) if fields.drop then def.drop = modname.. ":slope_" ..fields.drop..alternate end minetest.register_node(":" ..modname.. ":slope_" ..subname..alternate, def) end circular_saw.known_nodes[recipeitem] = {modname, subname} -- Some saw-less recipes: minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname, modname .. ":slope_" .. subname}, }) minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half_raised"}, }) minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"}, }) minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname .. "_outer", modname .. ":slope_" .. subname .. "_inner"}, }) minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half_raised"}, }) minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname .. "_outer_half_raised", modname .. ":slope_" .. subname .. "_inner_half"}, }) minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname .. "_outer_cut", modname .. ":slope_" .. subname .. "_inner_cut"}, }) minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half_raised"}, }) minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname .. "_cut", modname .. ":slope_" .. subname .. "_cut"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slab_" .. subname, recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slab_" .. subname, recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slab_" .. subname, recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_half_raised", recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_half_raised", recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_inner_half_raised", recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_outer_half_raised", recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_inner_cut_half_raised", recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_cut_half"}, }) end