Add player as an event argument

This commit is contained in:
Cooldude2606
2025-01-29 23:47:32 +00:00
parent 1a88592a8a
commit 6850cfa968
17 changed files with 91 additions and 141 deletions

View File

@@ -174,8 +174,7 @@ Gui.toolbar.create_button{
visible = function(player, element)
return Roles.player_allowed(player, "gui/landfill")
end
}:on_click(function(def, event, element)
local player = Gui.get_player(event)
}:on_click(function(def, player, element)
if player.cursor_stack and player.cursor_stack.valid_for_read then
if player.cursor_stack.type == "blueprint" and player.cursor_stack.is_blueprint_setup() then
local modified = landfill_gui_add_landfill(player.cursor_stack)