Browse Source

Removing unnecessary .bind()s

pull/14/head
Ryan Reed 1 month ago
parent
commit
8422c6a3e5
4 changed files with 10 additions and 10 deletions
  1. +1
    -1
      autoloads/inventory_manager.gd
  2. +2
    -2
      scenes/ui/inventory/inventory.gd
  3. +3
    -3
      scenes/ui/quick_slots.gd
  4. +4
    -4
      scenes/world/world.gd

+ 1
- 1
autoloads/inventory_manager.gd View File

@ -13,7 +13,7 @@ var quick_slot_item_id: String = "001"
func _ready() -> void: func _ready() -> void:
self.quick_slot_item_changed.connect(_on_quick_slot_item_changed.bind())
self.quick_slot_item_changed.connect(_on_quick_slot_item_changed)
func _on_quick_slot_item_changed(item_id: String) -> void: func _on_quick_slot_item_changed(item_id: String) -> void:


+ 2
- 2
scenes/ui/inventory/inventory.gd View File

@ -12,8 +12,8 @@ func _input(event: InputEvent) -> void:
toggle_inventory() toggle_inventory()
func _ready() -> void: func _ready() -> void:
InventoryManager.item_picked_up.connect(add_item.bind())
InventoryManager.item_dropped.connect(subtract_item.bind())
InventoryManager.item_picked_up.connect(add_item)
InventoryManager.item_dropped.connect(subtract_item)
for item_resource: DBItemResource in inventory_resource.inventory: for item_resource: DBItemResource in inventory_resource.inventory:
add_item(item_resource) add_item(item_resource)


+ 3
- 3
scenes/ui/quick_slots.gd View File

@ -18,9 +18,9 @@ var _selected_item: int = 0 :
_selected_item = new_item_index _selected_item = new_item_index
func _init() -> void: func _init() -> void:
InventoryManager.next_quick_slot.connect(select_next_item.bind())
InventoryManager.previous_quick_slot.connect(select_previous_item.bind())
InventoryManager.select_quick_slot.connect(select_quick_slot.bind())
InventoryManager.next_quick_slot.connect(select_next_item)
InventoryManager.previous_quick_slot.connect(select_previous_item)
InventoryManager.select_quick_slot.connect(select_quick_slot)
func _ready() -> void: func _ready() -> void:
var current_slot: Panel = slots_container.get_child(_selected_item) var current_slot: Panel = slots_container.get_child(_selected_item)


+ 4
- 4
scenes/world/world.gd View File

@ -12,10 +12,10 @@ extends Node3D
func _ready() -> void: func _ready() -> void:
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
EntityManager.create_block.connect(_create_block.bind())
EntityManager.drop_block.connect(_create_dropped_block.bind())
EntityManager.reset_world.connect(_on_reset_world.bind())
EntityManager.spawn_player.connect(_spawn_player.bind())
EntityManager.create_block.connect(_create_block)
EntityManager.drop_block.connect(_create_dropped_block)
EntityManager.reset_world.connect(_on_reset_world)
EntityManager.spawn_player.connect(_spawn_player)
_initialize_ground() _initialize_ground()
_create_test_blocks() _create_test_blocks()


Loading…
Cancel
Save