mirror of
https://github.com/APercy/airutils.git
synced 2025-03-21 18:41:21 +00:00
fix gsub to sub
This commit is contained in:
parent
48943f878d
commit
7fa37d98e9
2 changed files with 2 additions and 1 deletions
2
init.lua
2
init.lua
|
@ -648,7 +648,7 @@ if airutils._use_signs_api then
|
||||||
if entity then
|
if entity then
|
||||||
if entity.owner == name or minetest.check_player_privs(name, {protection_bypass=true}) then
|
if entity.owner == name or minetest.check_player_privs(name, {protection_bypass=true}) then
|
||||||
if param then
|
if param then
|
||||||
entity._ship_name = string.gsub(param, 1,20)
|
entity._ship_name = string.sub(param, 1,20)
|
||||||
else
|
else
|
||||||
entity._ship_name = ""
|
entity._ship_name = ""
|
||||||
end
|
end
|
||||||
|
|
1
text.lua
1
text.lua
|
@ -176,6 +176,7 @@ local function make_text_texture(text, default_color, line_width, line_height, c
|
||||||
end
|
end
|
||||||
|
|
||||||
function airutils.convert_text_to_texture(text, default_color, horizontal_aligment)
|
function airutils.convert_text_to_texture(text, default_color, horizontal_aligment)
|
||||||
|
text = text or ""
|
||||||
default_color = default_color or 0
|
default_color = default_color or 0
|
||||||
horizontal_aligment = horizontal_aligment or 3
|
horizontal_aligment = horizontal_aligment or 3
|
||||||
local font_size
|
local font_size
|
||||||
|
|
Loading…
Add table
Reference in a new issue