Page Menu
Home
1F616EMO Bugtracker
Search
Configure Global Search
Log In
Files
F162446
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1021 B
Referenced Files
None
Subscribers
None
View Options
diff --git a/smartshop_mod/init.lua b/smartshop_mod/init.lua
new file mode 100644
index 0000000..60ded4f
--- /dev/null
+++ b/smartshop_mod/init.lua
@@ -0,0 +1,21 @@
+-- twi_mods/smartshop_mod/init.lua
+-- Modify smartshop
+-- Copyright (C) 2024 1F616EMO
+-- SPDX-License-Identifier: LGPL-3.0-or-later
+
+-- Do not use unlimited inventory unless in creative mode
+local old_initialize_metadata = smartshop.shop_class.initialize_metadata
+function smartshop.shop_class:initialize_metadata(player)
+ old_initialize_metadata(self, player)
+
+ local player_name
+ if type(player) == "string" then
+ player_name = player
+ else
+ player_name = player:get_player_name()
+ end
+
+ if not minetest.is_creative_enabled(player_name) then
+ self:set_unlimited(false)
+ end
+end
diff --git a/smartshop_mod/mod.conf b/smartshop_mod/mod.conf
new file mode 100644
index 0000000..b87b175
--- /dev/null
+++ b/smartshop_mod/mod.conf
@@ -0,0 +1,3 @@
+name = smartshop_mod
+depends = smartshop
+optional_depends = creative
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mar 18 2026, 4:14 AM (5 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cd/15/396bc4b4234b802ad5b29fd8c2d3
Default Alt Text
(1021 B)
Attached To
Mode
rTWIMODS Survival Server Custom Modifications
Attached
Detach File
Event Timeline
Log In to Comment