Page Menu
Home
1F616EMO Bugtracker
Search
Configure Global Search
Log In
Files
F261827
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/func_areas/init.lua b/func_areas/init.lua
index 4d5f3e1..2d2055a 100644
--- a/func_areas/init.lua
+++ b/func_areas/init.lua
@@ -1,39 +1,44 @@
-- twi_mods/func_areas/init.lua
-- 1F616EMO_func owned areas
--[[
Copyright © 2024 1F616EMO
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
]]
func_areas = {}
local func_account = "1F616EMO_func"
function func_areas.is_in_func_area(pos, id)
local area = areas.areas[id]
if not area then return false end
if area.owner ~= func_account then return end
- return vector.in_area(pos, area.pos1, area.pos2)
+ return pos.x >= area.pos1.x
+ and pos.y >= area.pos1.y
+ and pos.z >= area.pos1.z
+ and pos.x <= area.pos2.x
+ and pos.y <= area.pos2.y
+ and pos.z <= area.pos2.z
end
minetest.register_on_prejoinplayer(function(name)
if name == func_account then
return "This username is reserved."
end
end)
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, Jun 10, 5:03 AM (3 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ad/db/61772c391ba5facd058387cb2c4c
Default Alt Text
(1 KB)
Attached To
Mode
rTWIMODS Survival Server Custom Modifications
Attached
Detach File
Event Timeline
Log In to Comment