Skip to content

Commit

Permalink
Fix tubetool info function crash if pipeworks not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
SX committed Feb 25, 2021
1 parent 51db2d4 commit 5d9c09b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tubetool/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ local tool = metatool:register_tool('tubetool', {
-- Create namespace containing tubetool common functions
tool:ns({
pipeworks_tptube_api_check = function(player)
if type(pipeworks) ~= "table" then
minetest.chat_send_player(player:get_player_name(), 'Pipeworks mod not installed.')
return false
end
if not pipeworks.tptube or not pipeworks.tptube.get_db then
minetest.chat_send_player(
player:get_player_name(),
Expand Down

0 comments on commit 5d9c09b

Please sign in to comment.