aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_item.cpp
Commit message (Expand)AuthorAge
* script: Replace calls to depreated luaL_openlibsfan52021-05-30
* Pass ContentFeatures as reference to read_content_features (#10464)JosiahWI2020-10-13
* Add a short_description to be used by mods (#8980)DS2020-10-09
* LuaItemStack: Add __tostring metamethod (#8785)Paul Ouellette2020-06-09
* Fix alias handling of get_content_id (#9712)sfan52020-04-19
* Drop content_sao.{cpp,h}Loic Blot2020-04-11
* Overall improvements to log messages (#9598)sfan52020-04-08
* minetest.get_content_id: error if the node does not exist (#9458)HybridDog2020-03-11
* Allow calling ItemStack with no arguments (#8783)Paul Ouellette2019-10-23
* Add ItemStack:get_description() to get tooltip (#8847)Paul Ouellette2019-08-24
* Modernize lua read (part 2 & 3): C++ templating assurance (#7410)Loïc Blot2018-06-30
* Fix missing ignore textures (#7326)you2018-05-20
* Node definition manager refactor (#7016)Dániel Juhász2018-02-10
* Code modernization: subfolders (#6283)Loïc Blot2017-08-19
* Fix various copy instead of const ref reported by cppcheck (#5615)Loïc Blot2017-04-19
* Fix inability to change metadata using stack:to_table() (#5547)numberZero2017-04-12
* Replace luaL_reg with luaL_Reg as recent LuaJIT dropped the Lua 5.0 compat (#...Loïc Blot2017-04-08
* Add `get_wielded_item`red-0012017-03-13
* Fix incompatibility of ItemStack.to_table() introduced by stack metarubenwardy2017-02-07
* Add ItemStack key-value meta storagerubenwardy2017-02-04
* Add minetest.unregister_item and minetest.register_alias_forcepaly22016-09-08
* Make ItemStack:set_count(0) clear the item stacksfan52016-01-15
* LuaItemStack: Fix and document behavior of set_name, set_count, set_wear, set...kwolekr2014-12-28
* Use "core" namespace internallyShadowNinja2014-05-08
* Remove lua_State parameter from LuaError::LuaErrorShadowNinja2014-03-15
* Handle LuaErrors in Lua -> C++ calls on LuaJITShadowNinja2013-12-18
* Add set_name(), set_count(), set_wear() and set_metadata() to Lua ItemStackPilzAdam2013-09-28
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
* Change ContentFeatures array to a vectorKahrl2013-07-14
* Add minetest.get_mapgen_object to APIkwolekr2013-06-27
* Add LuaVoxelManipkwolekr2013-06-27
* Fix itemstack:add item not working correctsapier2013-05-25
* Move scriptapi to separate folder (by sapier)sapier2013-05-25
s="hl opt">::SColor &fallback_bg_color){ m_fallback_bg_color = fallback_bg_color; } private: core::aabbox3d<f32> Box; video::SMaterial m_materials[SKY_MATERIAL_COUNT]; // How much sun & moon transition should affect horizon color float m_horizon_blend() { if (!m_sunlight_seen) return 0; float x = m_time_of_day >= 0.5 ? (1 - m_time_of_day) * 2 : m_time_of_day * 2; if (x <= 0.3) return 0; if (x <= 0.4) // when the sun and moon are aligned return (x - 0.3) * 10; if (x <= 0.5) return (0.5 - x) * 10; return 0; } // Mix two colors by a given amount video::SColor m_mix_scolor(video::SColor col1, video::SColor col2, f32 factor) { video::SColor result = video::SColor( col1.getAlpha() * (1 - factor) + col2.getAlpha() * factor, col1.getRed() * (1 - factor) + col2.getRed() * factor, col1.getGreen() * (1 - factor) + col2.getGreen() * factor, col1.getBlue() * (1 - factor) + col2.getBlue() * factor); return result; } video::SColorf m_mix_scolorf(video::SColorf col1, video::SColorf col2, f32 factor) { video::SColorf result = video::SColorf( col1.r * (1 - factor) + col2.r * factor, col1.g * (1 - factor) + col2.g * factor, col1.b * (1 - factor) + col2.b * factor, col1.a * (1 - factor) + col2.a * factor); return result; } bool m_visible; video::SColor m_fallback_bg_color; // Used when m_visible=false bool m_first_update; float m_time_of_day; float m_time_brightness; bool m_sunlight_seen; float m_brightness; float m_cloud_brightness; bool m_clouds_visible; bool m_directional_colored_fog; video::SColorf m_bgcolor_bright_f; video::SColorf m_skycolor_bright_f; video::SColorf m_cloudcolor_bright_f; video::SColor m_bgcolor; video::SColor m_skycolor; video::SColorf m_cloudcolor_f; v3f m_stars[SKY_STAR_COUNT]; video::S3DVertex m_star_vertices[SKY_STAR_COUNT*4]; video::ITexture* m_sun_texture; video::ITexture* m_moon_texture; video::ITexture* m_sun_tonemap; video::ITexture* m_moon_tonemap; }; #endif