Use mod namespace naming for actions (ie: classroom:bring)
parent
ee41ccc889
commit
cbf8ac2f77
|
@ -60,7 +60,7 @@ A selector is a string which represents a selection of students.
|
||||||
### Actions
|
### Actions
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
classroom.register_action("bring", {
|
classroom.register_action("mymod:bring", {
|
||||||
-- Button text
|
-- Button text
|
||||||
title = "Bring",
|
title = "Bring",
|
||||||
|
|
||||||
|
|
20
actions.lua
20
actions.lua
|
@ -1,6 +1,6 @@
|
||||||
local S = classroom.S
|
local S = classroom.S
|
||||||
|
|
||||||
classroom.register_action("bring", {
|
classroom.register_action("classroom:bring", {
|
||||||
title = S"Bring",
|
title = S"Bring",
|
||||||
description = S"Teleport players to your location",
|
description = S"Teleport players to your location",
|
||||||
online_required = true,
|
online_required = true,
|
||||||
|
@ -20,7 +20,7 @@ local function look_at(player, target)
|
||||||
player:set_look_horizontal(math.atan2(delta.z, delta.x) - math.pi / 2)
|
player:set_look_horizontal(math.atan2(delta.z, delta.x) - math.pi / 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
classroom.register_action("look", {
|
classroom.register_action("classroom:look", {
|
||||||
title = S"Look",
|
title = S"Look",
|
||||||
description = S"Make players look at you",
|
description = S"Make players look at you",
|
||||||
online_required = true,
|
online_required = true,
|
||||||
|
@ -34,7 +34,7 @@ classroom.register_action("look", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
classroom.register_action("mute", {
|
classroom.register_action("classroom:mute", {
|
||||||
title = S"Mute",
|
title = S"Mute",
|
||||||
description = S"Revoke shout from players",
|
description = S"Revoke shout from players",
|
||||||
online_required = false,
|
online_required = false,
|
||||||
|
@ -48,7 +48,7 @@ classroom.register_action("mute", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
classroom.register_action("unmute", {
|
classroom.register_action("classroom:unmute", {
|
||||||
title = S"Unmute",
|
title = S"Unmute",
|
||||||
description = S"Grant shout to players",
|
description = S"Grant shout to players",
|
||||||
online_required = false,
|
online_required = false,
|
||||||
|
@ -61,7 +61,7 @@ classroom.register_action("unmute", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
classroom.register_action("fly", {
|
classroom.register_action("classroom:fly", {
|
||||||
title = S"Fly",
|
title = S"Fly",
|
||||||
description = S"Grant fly to players",
|
description = S"Grant fly to players",
|
||||||
online_required = false,
|
online_required = false,
|
||||||
|
@ -74,7 +74,7 @@ classroom.register_action("fly", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
classroom.register_action("nofly", {
|
classroom.register_action("classroom:nofly", {
|
||||||
title = S"NoFly",
|
title = S"NoFly",
|
||||||
description = S"Revoke fly from players",
|
description = S"Revoke fly from players",
|
||||||
online_required = false,
|
online_required = false,
|
||||||
|
@ -87,7 +87,7 @@ classroom.register_action("nofly", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
classroom.register_action("kick", {
|
classroom.register_action("classroom:kick", {
|
||||||
title = S"Kick",
|
title = S"Kick",
|
||||||
description = S"Remove from the server",
|
description = S"Remove from the server",
|
||||||
online_required = false,
|
online_required = false,
|
||||||
|
@ -102,7 +102,7 @@ classroom.register_action("kick", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
classroom.register_action("ban", {
|
classroom.register_action("classroom:ban", {
|
||||||
title = S"Ban",
|
title = S"Ban",
|
||||||
description = S"Permanently from the server",
|
description = S"Permanently from the server",
|
||||||
online_required = false,
|
online_required = false,
|
||||||
|
@ -172,10 +172,10 @@ local function place_all_players(players, teacher_pos, direction)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
classroom.register_action("Audience", {
|
classroom.register_action("classroom:audience", {
|
||||||
title = S"Audience",
|
title = S"Audience",
|
||||||
description = S"Move to the crosshair location, spread out and facing you",
|
description = S"Move to the crosshair location, spread out and facing you",
|
||||||
online_required = false,
|
online_required = true,
|
||||||
params = {
|
params = {
|
||||||
message = "Ban Message",
|
message = "Ban Message",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue