aboutsummaryrefslogtreecommitdiff
path: root/textures/base/pack
ModeNameSize
-rw-r--r--air.png225logplain
-rw-r--r--blank.png95logplain
-rw-r--r--camera_btn.png729logplain
-rw-r--r--chat_btn.png399logplain
-rw-r--r--debug_btn.png895logplain
-rw-r--r--down.png1328logplain
-rw-r--r--down_arrow.png373logplain
-rw-r--r--drop_btn.png1035logplain
-rw-r--r--fast_btn.png875logplain
-rw-r--r--fly_btn.png720logplain
-rw-r--r--gear_icon.png1005logplain
-rw-r--r--halo.png144logplain
-rw-r--r--ignore.png234logplain
-rw-r--r--inventory_btn.png343logplain
-rw-r--r--jump_btn.png434logplain
-rw-r--r--left_arrow.png400logplain
-rw-r--r--logo.png12188logplain
-rw-r--r--menu_bg.png124logplain
-rw-r--r--menu_header.png1628logplain
-rw-r--r--minimap_mask_round.png1858logplain
-rw-r--r--minimap_mask_square.png420logplain
-rw-r--r--minimap_overlay_round.png22044logplain
-rw-r--r--minimap_overlay_square.png1686logplain
-rw-r--r--no_screenshot.png586logplain
-rw-r--r--noclip_btn.png1087logplain
-rw-r--r--object_marker_red.png449logplain
-rw-r--r--player_marker.png2166logplain
-rw-r--r--progress_bar.png413logplain
-rw-r--r--progress_bar_bg.png354logplain
-rw-r--r--rangeview_btn.png1476logplain
-rw-r--r--rare_controls.png349logplain
-rw-r--r--refresh.png3660logplain
-rw-r--r--right_arrow.png396logplain
-rw-r--r--server_flags_creative.png273logplain
-rw-r--r--server_flags_damage.png713logplain
-rw-r--r--server_flags_favorite.png916logplain
-rw-r--r--server_flags_pvp.png1048logplain
-rw-r--r--server_ping_1.png251logplain
-rw-r--r--server_ping_2.png244logplain
-rw-r--r--server_ping_3.png245logplain
-rw-r--r--server_ping_4.png213logplain
-rw-r--r--smoke_puff.png202logplain
-rw-r--r--sunrisebg.png4231logplain
-rw-r--r--unknown_item.png292logplain
-rw-r--r--unknown_node.png193logplain
-rw-r--r--unknown_object.png254logplain
-rw-r--r--up_arrow.png373logplain
class="hl kwd">lua_gettop(L); // Get get_staticdata function lua_getfield(L, -1, "get_staticdata"); if(lua_isnil(L, -1)) return ""; luaL_checktype(L, -1, LUA_TFUNCTION); lua_pushvalue(L, object); // self // Call with 1 arguments, 1 results if(lua_pcall(L, 1, 1, errorhandler)) scriptError(); lua_remove(L, object); // Remove object lua_remove(L, errorhandler); // Remove error handler size_t len = 0; const char *s = lua_tolstring(L, -1, &len); return std::string(s, len); } void ScriptApiEntity::luaentity_GetProperties(u16 id, ObjectProperties *prop) { SCRIPTAPI_PRECHECKHEADER //infostream<<"scriptapi_luaentity_get_properties: id="<<id<<std::endl; // Get minetest.luaentities[id] luaentity_get(L,id); //int object = lua_gettop(L); // Set default values that differ from ObjectProperties defaults prop->hp_max = 10; /* Read stuff */ prop->hp_max = getintfield_default(L, -1, "hp_max", 10); getboolfield(L, -1, "physical", prop->physical); getboolfield(L, -1, "collide_with_objects", prop->collideWithObjects); getfloatfield(L, -1, "weight", prop->weight); lua_getfield(L, -1, "collisionbox"); if(lua_istable(L, -1)) prop->collisionbox = read_aabb3f(L, -1, 1.0); lua_pop(L, 1); getstringfield(L, -1, "visual", prop->visual); getstringfield(L, -1, "mesh", prop->mesh); // Deprecated: read object properties directly read_object_properties(L, -1, prop); // Read initial_properties lua_getfield(L, -1, "initial_properties"); read_object_properties(L, -1, prop); lua_pop(L, 1); } void ScriptApiEntity::luaentity_Step(u16 id, float dtime) { SCRIPTAPI_PRECHECKHEADER lua_pushcfunction(L, script_error_handler); int errorhandler = lua_gettop(L); //infostream<<"scriptapi_luaentity_step: id="<<id<<std::endl; // Get minetest.luaentities[id] luaentity_get(L, id); int object = lua_gettop(L); // State: object is at top of stack // Get step function lua_getfield(L, -1, "on_step"); if(lua_isnil(L, -1)) return; luaL_checktype(L, -1, LUA_TFUNCTION); lua_pushvalue(L, object); // self lua_pushnumber(L, dtime); // dtime // Call with 2 arguments, 0 results if(lua_pcall(L, 2, 0, errorhandler)) scriptError(); lua_remove(L, object); // Remove object lua_remove(L, errorhandler); // Remove error handler } // Calls entity:on_punch(ObjectRef puncher, time_from_last_punch, // tool_capabilities, direction) void ScriptApiEntity::luaentity_Punch(u16 id, ServerActiveObject *puncher, float time_from_last_punch, const ToolCapabilities *toolcap, v3f dir) { SCRIPTAPI_PRECHECKHEADER lua_pushcfunction(L, script_error_handler); int errorhandler = lua_gettop(L); //infostream<<"scriptapi_luaentity_step: id="<<id<<std::endl; // Get minetest.luaentities[id] luaentity_get(L,id); int object = lua_gettop(L); // State: object is at top of stack // Get function lua_getfield(L, -1, "on_punch"); if(lua_isnil(L, -1)) return; luaL_checktype(L, -1, LUA_TFUNCTION); lua_pushvalue(L, object); // self objectrefGetOrCreate(puncher); // Clicker reference lua_pushnumber(L, time_from_last_punch); push_tool_capabilities(L, *toolcap); push_v3f(L, dir); // Call with 5 arguments, 0 results if(lua_pcall(L, 5, 0, errorhandler)) scriptError(); lua_remove(L, object); // Remove object lua_remove(L, errorhandler); // Remove error handler } // Calls entity:on_rightclick(ObjectRef clicker) void ScriptApiEntity::luaentity_Rightclick(u16 id, ServerActiveObject *clicker) { SCRIPTAPI_PRECHECKHEADER lua_pushcfunction(L, script_error_handler); int errorhandler = lua_gettop(L); //infostream<<"scriptapi_luaentity_step: id="<<id<<std::endl; // Get minetest.luaentities[id] luaentity_get(L,id); int object = lua_gettop(L); // State: object is at top of stack // Get function lua_getfield(L, -1, "on_rightclick"); if(lua_isnil(L, -1)) return; luaL_checktype(L, -1, LUA_TFUNCTION); lua_pushvalue(L, object); // self objectrefGetOrCreate(clicker); // Clicker reference // Call with 2 arguments, 0 results if(lua_pcall(L, 2, 0, errorhandler)) scriptError(); lua_remove(L, object); // Remove object lua_remove(L, errorhandler); // Remove error handler }