Page MenuHome1F616EMO Bugtracker

No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None
diff --git a/teacher_tutorial_protection_violation/init.lua b/teacher_tutorial_protection_violation/init.lua
new file mode 100644
index 0000000..fbd9601
--- /dev/null
+++ b/teacher_tutorial_protection_violation/init.lua
@@ -0,0 +1,41 @@
+-- twi_mods/teacher_tutorial_protection_violation/init.lua
+-- Tutorial on protection violation
+-- Copyright (C) 2024 1F616EMO
+-- SPDX-License-Identifier: LGPL-3.0-or-later
+
+local S = minetest.get_translator("teacher_tutorial_protection_violation")
+
+teacher.register_turorial("teacher_tutorial_protection_violation:on_violation", {
+ title = S("Position is protected..."),
+ show_on_unlock = true,
+ show_disallow_close = true,
+ {
+ texture = "teacher_tutorial_protection_violation_1.png",
+ text =
+ S("You can't dig or build here in a protected area. " ..
+ "Area protections keep unauthorized players from modifying blocks within the area.")
+ },
+ {
+ texture = "teacher_tutorial_protection_violation_2.png",
+ text =
+ S("Follow the \"Are you new?\" signs from the spawn point to go to a place where you can build. " ..
+ "Type /spawn to go back to the spawn point.")
+ },
+ {
+ texture = "teacher_tutorial_protection_violation_3.png",
+ text =
+ S("To check whether you can build or place, check the bottom-left corner. " ..
+ "If the bracket of all lines say a player name that is not you, " ..
+ "where you are is protected.") .. "\n\n" ..
+ S("However, if you see \"@1\" after the player's name, you can build or place blocks here, " ..
+ "but you can't claim the area as yours. This usually happens in public farms and public tree farms.",
+ minetest.translate("areas", ":open"))
+ },
+})
+
+minetest.register_on_protection_violation(function(_, name)
+ local player = minetest.get_player_by_name(name)
+ if player then
+ teacher.unlock_entry_for_player(player, "teacher_tutorial_protection_violation:on_violation")
+ end
+end)
diff --git a/teacher_tutorial_protection_violation/mod.conf b/teacher_tutorial_protection_violation/mod.conf
new file mode 100644
index 0000000..ab66f03
--- /dev/null
+++ b/teacher_tutorial_protection_violation/mod.conf
@@ -0,0 +1,3 @@
+name = teacher_tutorial_protection_violation
+depends = teacher_core, areas
+
diff --git a/teacher_tutorial_protection_violation/textures/teacher_tutorial_protection_violation_1.png b/teacher_tutorial_protection_violation/textures/teacher_tutorial_protection_violation_1.png
new file mode 100644
index 0000000..5fc6ede
Binary files /dev/null and b/teacher_tutorial_protection_violation/textures/teacher_tutorial_protection_violation_1.png differ
diff --git a/teacher_tutorial_protection_violation/textures/teacher_tutorial_protection_violation_2.png b/teacher_tutorial_protection_violation/textures/teacher_tutorial_protection_violation_2.png
new file mode 100644
index 0000000..d5cc878
Binary files /dev/null and b/teacher_tutorial_protection_violation/textures/teacher_tutorial_protection_violation_2.png differ
diff --git a/teacher_tutorial_protection_violation/textures/teacher_tutorial_protection_violation_3.png b/teacher_tutorial_protection_violation/textures/teacher_tutorial_protection_violation_3.png
new file mode 100644
index 0000000..b197449
Binary files /dev/null and b/teacher_tutorial_protection_violation/textures/teacher_tutorial_protection_violation_3.png differ

File Metadata

Mime Type
text/x-diff
Expires
Sun, Apr 12, 12:45 PM (1 w, 5 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
39/dc/3c84174759dd459053a2aa4dcded
Default Alt Text
(3 KB)

Event Timeline