From 79ab6db28ac8b42985ff831f1e3cde3394b928b1 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 17 Apr 2025 04:59:12 +0900 Subject: [PATCH] Add character check to selection control (#386) --- exp_legacy/module/modules/control/selection.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exp_legacy/module/modules/control/selection.lua b/exp_legacy/module/modules/control/selection.lua index cb08e3a6..461f2cd4 100644 --- a/exp_legacy/module/modules/control/selection.lua +++ b/exp_legacy/module/modules/control/selection.lua @@ -76,7 +76,9 @@ function Selection.start(player, selection_name, single_use, ...) --player.cursor_stack_temporary = true -- Make a slot to place the selection tool even if inventory is full - player.character_inventory_slots_bonus = player.character_inventory_slots_bonus + 1 + if player.character then + player.character_inventory_slots_bonus = player.character_inventory_slots_bonus + 1 + end local inventory = player.get_main_inventory() if inventory then player.hand_location = { inventory = inventory.index, slot = #inventory }