From 3d5805c8a9bb15b65f014b31e8d7385a12a4b277 Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS Date: Fri, 29 Nov 2024 09:51:03 +0100 Subject: [PATCH] remove set_banner_texture() only used once and is easy enough to have inline --- init.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index c1006af..6bf19d5 100644 --- a/init.lua +++ b/init.lua @@ -241,10 +241,6 @@ function banners.banner_after_place(pos, _, itemstack, pointed_thing) end -- banner entity -local set_banner_texture = function(obj, texture) - obj:set_properties({ textures = { "banner_uv_text.png^" .. texture } }) -end - function banners:banner_on_activate() local pos = self.object:get_pos() @@ -261,7 +257,9 @@ function banners:banner_on_activate() yaw = 4.71238898038469 -- 3 * pi / 2 end self.object:set_yaw(yaw) - set_banner_texture(self.object, banner) + self.object:set_properties({ + textures = { "banner_uv_text.png^" .. banner } + }) end core.register_entity("banners:banner_ent", {