drag & drop with inventory slots
This commit is contained in:
@@ -13,6 +13,6 @@ func unlock_achievement(achivement_name : String):
|
|||||||
if Steam.isSteamRunning():
|
if Steam.isSteamRunning():
|
||||||
var status = Steam.getAchievement(achivement_name)
|
var status = Steam.getAchievement(achivement_name)
|
||||||
print("Steam Achievement %s" %achivement_name)
|
print("Steam Achievement %s" %achivement_name)
|
||||||
if status.ret and not status.achieved:
|
if status.has("ret") and status.ret and not status.achieved:
|
||||||
Steam.setAchievement(achivement_name)
|
Steam.setAchievement(achivement_name)
|
||||||
Steam.storeStats()
|
Steam.storeStats()
|
||||||
@@ -14,8 +14,6 @@ const SPRITE_SCENE: PackedScene = preload("res://entities/interactables/item_obj
|
|||||||
|
|
||||||
@onready var object_sprite: ItemObjectSprite = generate_sprite()
|
@onready var object_sprite: ItemObjectSprite = generate_sprite()
|
||||||
|
|
||||||
var dragging := false
|
|
||||||
|
|
||||||
func _init(_item = null):
|
func _init(_item = null):
|
||||||
if _item:
|
if _item:
|
||||||
item = _item
|
item = _item
|
||||||
@@ -26,15 +24,6 @@ func _ready():
|
|||||||
object_sprite.apply_texture_to_sprite(item.icon, ITEM_SPRITE_SIZE)
|
object_sprite.apply_texture_to_sprite(item.icon, ITEM_SPRITE_SIZE)
|
||||||
object_sprite.generate_particles(item.get_particles())
|
object_sprite.generate_particles(item.get_particles())
|
||||||
|
|
||||||
func _process(_delta):
|
|
||||||
if dragging:
|
|
||||||
global_position = get_global_mouse_position()
|
|
||||||
|
|
||||||
func _on_mouse_entered():
|
|
||||||
mouse_over = true
|
|
||||||
if not dragging:
|
|
||||||
Pointer.inspect(self)
|
|
||||||
|
|
||||||
func pointer_text() -> String:
|
func pointer_text() -> String:
|
||||||
var name_suffix = ""
|
var name_suffix = ""
|
||||||
|
|
||||||
@@ -60,12 +49,6 @@ func interact(player : Player) -> bool:
|
|||||||
|
|
||||||
return false
|
return false
|
||||||
|
|
||||||
func start_dragging():
|
|
||||||
dragging = true
|
|
||||||
|
|
||||||
func stop_dragging():
|
|
||||||
dragging = false
|
|
||||||
|
|
||||||
func pickup_animation(target_position: Vector2):
|
func pickup_animation(target_position: Vector2):
|
||||||
available = false
|
available = false
|
||||||
var tween: Tween = get_tree().create_tween()
|
var tween: Tween = get_tree().create_tween()
|
||||||
|
|||||||
@@ -73,16 +73,34 @@ func update_seeds_size(size = seeds_size):
|
|||||||
while len(seeds) > size and seeds.find(null) != -1:
|
while len(seeds) > size and seeds.find(null) != -1:
|
||||||
seeds.pop_at(seeds.find(null))
|
seeds.pop_at(seeds.find(null))
|
||||||
|
|
||||||
|
func add_item_at(item: Item, item_ind: int) -> bool:
|
||||||
|
if item.type == Item.ItemType.CONSUMABLE_ITEM:
|
||||||
|
return add_seed_at(item, item_ind - tools.size())
|
||||||
|
else:
|
||||||
|
return false
|
||||||
|
|
||||||
|
func add_seed_at(s: Item, seed_ind: int) -> bool:
|
||||||
|
update_seeds_size()
|
||||||
|
if seeds[seed_ind]:
|
||||||
|
return false
|
||||||
|
else:
|
||||||
|
seeds[seed_ind] = s
|
||||||
|
updated.emit(self)
|
||||||
|
return true
|
||||||
|
|
||||||
|
func get_all_items_size() -> int:
|
||||||
|
return tools.size() + seeds.size()
|
||||||
|
|
||||||
func get_all_items() -> Array[Item]:
|
func get_all_items() -> Array[Item]:
|
||||||
return tools + seeds
|
return tools + seeds
|
||||||
|
|
||||||
func get_item(ind: int = current_item_ind) -> Item:
|
func get_item(ind: int = current_item_ind) -> Item:
|
||||||
if ind < 0 || ind > len(get_all_items()):
|
if ind < 0 || ind > get_all_items_size():
|
||||||
return null
|
return null
|
||||||
return get_all_items()[ind]
|
return get_all_items()[ind]
|
||||||
|
|
||||||
func has_item(item: Item) -> bool:
|
func has_item(item: Item) -> bool:
|
||||||
return get_all_items().has(item)
|
return tools.has(item) || seeds.has(item)
|
||||||
|
|
||||||
func has_item_with_name(name: String) -> bool:
|
func has_item_with_name(name: String) -> bool:
|
||||||
var id = get_all_items().find_custom(
|
var id = get_all_items().find_custom(
|
||||||
|
|||||||
@@ -137,7 +137,11 @@ func take_surrounding_seeds():
|
|||||||
|
|
||||||
if not data.inventory.is_full():
|
if not data.inventory.is_full():
|
||||||
for area in overlapping_areas:
|
for area in overlapping_areas:
|
||||||
if area is ItemObject and not area in just_dropped_item_objects:
|
if (
|
||||||
|
area is ItemObject
|
||||||
|
and not area in just_dropped_item_objects
|
||||||
|
and not Pointer.dragging_inspected
|
||||||
|
):
|
||||||
area.interact(self)
|
area.interact(self)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ func _ready():
|
|||||||
update(GameInfo.game_data.player_data.inventory)
|
update(GameInfo.game_data.player_data.inventory)
|
||||||
|
|
||||||
func update(inventory: Inventory):
|
func update(inventory: Inventory):
|
||||||
if last_inventory_size != len(inventory.get_all_items()) or last_n_tools != inventory.tools.size():
|
if last_inventory_size != inventory.get_all_items_size() or last_n_tools != inventory.tools.size():
|
||||||
last_inventory_size = len(inventory.get_all_items())
|
last_inventory_size = inventory.get_all_items_size()
|
||||||
last_n_tools = inventory.tools.size()
|
last_n_tools = inventory.tools.size()
|
||||||
generate_inventory_mouse_detectors(last_inventory_size, last_n_tools)
|
generate_inventory_mouse_detectors(last_inventory_size, last_n_tools)
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ func _ready():
|
|||||||
|
|
||||||
func card_info() -> CardInfo:
|
func card_info() -> CardInfo:
|
||||||
var inventory := GameInfo.game_data.player_data.inventory
|
var inventory := GameInfo.game_data.player_data.inventory
|
||||||
if inventory and index < len(inventory.get_all_items()):
|
if inventory and index < inventory.get_all_items_size():
|
||||||
var item = GameInfo.game_data.player_data.inventory.get_all_items()[index]
|
var item = GameInfo.game_data.player_data.inventory.get_all_items()[index]
|
||||||
if item:
|
if item:
|
||||||
return item.card_info()
|
return item.card_info()
|
||||||
|
|||||||
@@ -10,39 +10,43 @@ const ZONE_DEACTIVATED_COLOR = Color("#FF006E")
|
|||||||
const CARD_VISUALISATION_TIME = 0.3
|
const CARD_VISUALISATION_TIME = 0.3
|
||||||
const CARD_UP_PADDING = 50
|
const CARD_UP_PADDING = 50
|
||||||
|
|
||||||
@export var default_cursor : Texture2D
|
const PRESS_TIME_DRAG := 0.15
|
||||||
@export var hover_cursor : Texture2D
|
|
||||||
|
|
||||||
var all_inspected : Array[Node]
|
@export var default_cursor: Texture2D
|
||||||
var inspected : Node = null
|
@export var hover_cursor: Texture2D
|
||||||
var inspected_card_info : CardInfo = null
|
|
||||||
var player : Player # renseigné par Player
|
var all_inspected: Array[Node]
|
||||||
var can_interact : bool = false
|
var inspected: Node = null
|
||||||
var current_selected_item : Item = null
|
var inspected_card_info: CardInfo = null
|
||||||
var have_energy_to_use_item : bool = false
|
var inspected_inventory_slot: InventoryGuiItemMouseDetector = null
|
||||||
var could_use_item : bool = false
|
var player: Player # renseigné par Player
|
||||||
var can_use_item : bool = false
|
var can_interact: bool = false
|
||||||
|
var current_selected_item: Item = null
|
||||||
|
var have_energy_to_use_item: bool = false
|
||||||
|
var could_use_item: bool = false
|
||||||
|
var can_use_item: bool = false
|
||||||
var press_time := 0.
|
var press_time := 0.
|
||||||
var press_action_done := false
|
var press_action_done := false
|
||||||
|
var dragging_inspected := false
|
||||||
|
|
||||||
var action_disabled := false
|
var action_disabled := false
|
||||||
|
|
||||||
func get_current_inspected() -> Node:
|
func get_current_inspected() -> Node:
|
||||||
if all_inspected.size() > 0:
|
if all_inspected.size() > 0:
|
||||||
var mouse_pos := player.get_global_mouse_position()
|
|
||||||
var closest_dist := INF
|
|
||||||
var closest_ind := -1
|
var closest_ind := -1
|
||||||
for i in all_inspected.size():
|
if player:
|
||||||
var node := all_inspected[i]
|
var mouse_pos := player.get_global_mouse_position()
|
||||||
if not is_instance_valid(node):
|
var closest_dist := INF
|
||||||
all_inspected.remove_at(i)
|
all_inspected = all_inspected.filter(func(node): return is_instance_valid(node))
|
||||||
elif node is Node2D:
|
for i in all_inspected.size():
|
||||||
var dist = node.global_position.distance_squared_to(mouse_pos)
|
var node := all_inspected[i]
|
||||||
if dist < closest_dist:
|
if node is Node2D:
|
||||||
closest_dist = dist
|
var dist = node.global_position.distance_squared_to(mouse_pos)
|
||||||
|
if dist < closest_dist:
|
||||||
|
closest_dist = dist
|
||||||
|
closest_ind = i
|
||||||
|
elif closest_ind < 0:
|
||||||
closest_ind = i
|
closest_ind = i
|
||||||
elif closest_ind < 0:
|
|
||||||
closest_ind = i
|
|
||||||
if all_inspected.size() > 0:
|
if all_inspected.size() > 0:
|
||||||
return all_inspected[closest_ind]
|
return all_inspected[closest_ind]
|
||||||
|
|
||||||
@@ -51,17 +55,18 @@ func get_current_inspected() -> Node:
|
|||||||
func _ready():
|
func _ready():
|
||||||
Input.set_custom_mouse_cursor(default_cursor)
|
Input.set_custom_mouse_cursor(default_cursor)
|
||||||
Input.set_custom_mouse_cursor(hover_cursor, Input.CURSOR_POINTING_HAND)
|
Input.set_custom_mouse_cursor(hover_cursor, Input.CURSOR_POINTING_HAND)
|
||||||
%Action.visible = false
|
%Action.visible = false
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if player and not action_disabled:
|
if player and not action_disabled:
|
||||||
process_player_actions(delta)
|
process_player_actions(delta)
|
||||||
else :
|
else:
|
||||||
%ActionProgressBar.value = 0.
|
%ActionProgressBar.value = 0.
|
||||||
|
dragging_inspected = false
|
||||||
|
|
||||||
%Inspector.position = get_viewport().get_mouse_position()
|
%Inspector.position = get_viewport().get_mouse_position()
|
||||||
|
|
||||||
if not action_disabled and current_selected_item and SceneManager.actual_scene.scene_id == "REGION":
|
if not action_disabled and not dragging_inspected and current_selected_item and SceneManager.actual_scene.scene_id == "REGION":
|
||||||
%ActionZone.radius = current_selected_item.usage_zone_radius * GameInfo.settings_data.zoom
|
%ActionZone.radius = current_selected_item.usage_zone_radius * GameInfo.settings_data.zoom
|
||||||
%ActionZone.color = ZONE_ACTIVATED_COLOR if can_use_item else ZONE_DEACTIVATED_COLOR
|
%ActionZone.color = ZONE_ACTIVATED_COLOR if can_use_item else ZONE_DEACTIVATED_COLOR
|
||||||
else:
|
else:
|
||||||
@@ -73,14 +78,17 @@ func _process(delta):
|
|||||||
|
|
||||||
update_inspector(get_current_inspected())
|
update_inspector(get_current_inspected())
|
||||||
|
|
||||||
func process_player_actions(delta : float):
|
if player and dragging_inspected:
|
||||||
|
inspected.global_position = player.get_global_mouse_position()
|
||||||
|
|
||||||
|
func process_player_actions(delta: float):
|
||||||
can_interact = (
|
can_interact = (
|
||||||
inspected
|
inspected
|
||||||
and inspected is Interactable
|
and inspected is Interactable
|
||||||
and player.can_interact(inspected)
|
and player.can_interact(inspected)
|
||||||
)
|
)
|
||||||
|
|
||||||
current_selected_item = player.data.inventory.get_item()
|
current_selected_item = player.data.inventory.get_item()
|
||||||
|
|
||||||
could_use_item = (
|
could_use_item = (
|
||||||
current_selected_item
|
current_selected_item
|
||||||
@@ -101,6 +109,9 @@ func process_player_actions(delta : float):
|
|||||||
if Input.is_action_just_pressed("drop"):
|
if Input.is_action_just_pressed("drop"):
|
||||||
player.drop_item()
|
player.drop_item()
|
||||||
|
|
||||||
|
if Input.is_action_just_pressed("action"):
|
||||||
|
press_time = 0
|
||||||
|
press_time += delta
|
||||||
|
|
||||||
if (
|
if (
|
||||||
Input.is_action_pressed("action")
|
Input.is_action_pressed("action")
|
||||||
@@ -112,8 +123,7 @@ func process_player_actions(delta : float):
|
|||||||
and not can_interact
|
and not can_interact
|
||||||
and not inspected is InventoryGuiItemMouseDetector
|
and not inspected is InventoryGuiItemMouseDetector
|
||||||
):
|
):
|
||||||
press_time += delta
|
%ActionProgressBar.value = press_time / current_selected_item.get_action_press_time() * 100
|
||||||
%ActionProgressBar.value = press_time/current_selected_item.get_action_press_time() * 100
|
|
||||||
if not %ActionProgressPlayer.playing:
|
if not %ActionProgressPlayer.playing:
|
||||||
%ActionProgressPlayer.play()
|
%ActionProgressPlayer.play()
|
||||||
%ActionProgressPlayer.pitch_scale = 1. / (current_selected_item.get_action_press_time() / %ActionProgressPlayer.stream.get_length())
|
%ActionProgressPlayer.pitch_scale = 1. / (current_selected_item.get_action_press_time() / %ActionProgressPlayer.stream.get_length())
|
||||||
@@ -127,11 +137,43 @@ func process_player_actions(delta : float):
|
|||||||
press_action_done = true
|
press_action_done = true
|
||||||
else:
|
else:
|
||||||
press_action_done = false
|
press_action_done = false
|
||||||
press_time = 0
|
|
||||||
%ActionProgressPlayer.playing = false
|
%ActionProgressPlayer.playing = false
|
||||||
%ActionProgressBar.value = 0.
|
%ActionProgressBar.value = 0.
|
||||||
|
|
||||||
if Input.is_action_just_pressed("action"):
|
if (
|
||||||
|
inspected and
|
||||||
|
(inspected is ItemObject
|
||||||
|
or (inspected is InventoryGuiItemMouseDetector
|
||||||
|
and GameInfo.game_data.player_data.inventory.get_item(inspected.index)
|
||||||
|
and press_time > PRESS_TIME_DRAG))
|
||||||
|
):
|
||||||
|
if Input.is_action_pressed("action"):
|
||||||
|
all_inspected.clear()
|
||||||
|
all_inspected.append(inspected)
|
||||||
|
dragging_inspected = true
|
||||||
|
can_interact = false
|
||||||
|
if inspected is ItemObject:
|
||||||
|
inspected.mouse_over = false
|
||||||
|
elif inspected is InventoryGuiItemMouseDetector:
|
||||||
|
var item_to_drop: Item = GameInfo.game_data.player_data.inventory.pop_item(inspected.index)
|
||||||
|
if item_to_drop and item_to_drop.type != Item.ItemType.TOOL_ITEM:
|
||||||
|
var dropped_item_object := player.terrain.drop_item(item_to_drop, player.get_global_mouse_position())
|
||||||
|
inspected = dropped_item_object
|
||||||
|
all_inspected.clear()
|
||||||
|
all_inspected.append(inspected)
|
||||||
|
player.region.save()
|
||||||
|
else:
|
||||||
|
dragging_inspected = false
|
||||||
|
else:
|
||||||
|
dragging_inspected = false
|
||||||
|
if inspected is ItemObject and inspected_inventory_slot is InventoryGuiItemMouseDetector:
|
||||||
|
# GameInfo.game_data.player_data.inventory.add_seed(inspected.item)
|
||||||
|
if GameInfo.game_data.player_data.inventory.add_item_at(inspected.item, inspected_inventory_slot.index):
|
||||||
|
all_inspected.clear()
|
||||||
|
inspected.queue_free()
|
||||||
|
inspected = null
|
||||||
|
|
||||||
|
if Input.is_action_just_released("action") and press_time < PRESS_TIME_DRAG:
|
||||||
if inspected is InventoryGuiItemMouseDetector:
|
if inspected is InventoryGuiItemMouseDetector:
|
||||||
GameInfo.game_data.player_data.inventory.set_current_item(inspected.index)
|
GameInfo.game_data.player_data.inventory.set_current_item(inspected.index)
|
||||||
elif can_interact:
|
elif can_interact:
|
||||||
@@ -144,21 +186,25 @@ func process_player_actions(delta : float):
|
|||||||
)
|
)
|
||||||
|
|
||||||
func inspect(node: Node):
|
func inspect(node: Node):
|
||||||
if not node in all_inspected:
|
if (
|
||||||
|
not node in all_inspected
|
||||||
|
and not dragging_inspected
|
||||||
|
):
|
||||||
all_inspected.append(node)
|
all_inspected.append(node)
|
||||||
|
if node is InventoryGuiItemMouseDetector:
|
||||||
|
inspected_inventory_slot = node
|
||||||
|
|
||||||
func update_card():
|
func update_card():
|
||||||
if (
|
if (
|
||||||
not inspected or inspected_card_info == null
|
not inspected or inspected_card_info == null
|
||||||
or get_tree().paused
|
or get_tree().paused
|
||||||
or action_disabled
|
or action_disabled
|
||||||
|
or dragging_inspected
|
||||||
):
|
):
|
||||||
%CardVisualiser.hide()
|
%CardVisualiser.hide()
|
||||||
elif inspected != null :
|
elif inspected != null:
|
||||||
|
|
||||||
if inspected_card_info != %CardVisualiser.card_info:
|
if inspected_card_info != %CardVisualiser.card_info:
|
||||||
%CardVisualiser.card_info = inspected_card_info
|
%CardVisualiser.card_info = inspected_card_info
|
||||||
%CardVisualiser.show()
|
|
||||||
|
|
||||||
var camera = get_viewport().get_camera_2d()
|
var camera = get_viewport().get_camera_2d()
|
||||||
var screen_size = get_viewport().get_visible_rect().size # * get_viewport().get_camera_2d().zoom
|
var screen_size = get_viewport().get_visible_rect().size # * get_viewport().get_camera_2d().zoom
|
||||||
@@ -168,24 +214,23 @@ func update_card():
|
|||||||
(inspected.global_position - camera.global_position) * get_viewport().get_camera_2d().zoom
|
(inspected.global_position - camera.global_position) * get_viewport().get_camera_2d().zoom
|
||||||
+ ((screen_size) / 2)
|
+ ((screen_size) / 2)
|
||||||
+ inspected.get_card_up_padding() * Vector2.UP
|
+ inspected.get_card_up_padding() * Vector2.UP
|
||||||
)
|
)
|
||||||
elif inspected is Control:
|
elif inspected is Control:
|
||||||
%CardPosition.position = inspected.global_position + inspected.size / 2 + CARD_UP_PADDING * Vector2.UP
|
%CardPosition.position = inspected.global_position + inspected.size / 2 + CARD_UP_PADDING * Vector2.UP
|
||||||
elif inspected is Node3D:
|
elif inspected is Node3D:
|
||||||
|
|
||||||
%CardPosition.position = (
|
%CardPosition.position = (
|
||||||
get_viewport().get_camera_3d().unproject_position(inspected.global_position)
|
get_viewport().get_camera_3d().unproject_position(inspected.global_position)
|
||||||
+ CARD_UP_PADDING * Vector2.UP
|
+ CARD_UP_PADDING * Vector2.UP
|
||||||
)
|
)
|
||||||
# if %CardVisualiser.is_mouse_over():
|
|
||||||
# time_last_inspected = 0.
|
%CardVisualiser.show()
|
||||||
|
|
||||||
|
|
||||||
func update_inspector(current_inspected:Node):
|
func update_inspector(current_inspected: Node):
|
||||||
|
|
||||||
if current_inspected:
|
if current_inspected:
|
||||||
if inspected != current_inspected:
|
if inspected != current_inspected:
|
||||||
if inspected and inspected.has_method("inspect"):
|
if inspected and inspected.has_method("inspect"):
|
||||||
|
print("Stop inspect")
|
||||||
inspected.inspect(false)
|
inspected.inspect(false)
|
||||||
inspected = current_inspected
|
inspected = current_inspected
|
||||||
if inspected.has_method("card_info"):
|
if inspected.has_method("card_info"):
|
||||||
@@ -195,6 +240,8 @@ func update_inspector(current_inspected:Node):
|
|||||||
if inspected.has_method("inspect"):
|
if inspected.has_method("inspect"):
|
||||||
inspected.inspect(true)
|
inspected.inspect(true)
|
||||||
else:
|
else:
|
||||||
|
if inspected and inspected.has_method("inspect"):
|
||||||
|
inspected.inspect(false)
|
||||||
inspected = null
|
inspected = null
|
||||||
|
|
||||||
if player and not action_disabled and (get_tree() and not get_tree().paused):
|
if player and not action_disabled and (get_tree() and not get_tree().paused):
|
||||||
@@ -203,6 +250,16 @@ func update_inspector(current_inspected:Node):
|
|||||||
%ActionText.text = inspected.interact_text()
|
%ActionText.text = inspected.interact_text()
|
||||||
%Action.modulate = DEFAULT_ACTION_COLOR if inspected.interaction_cost(player) == 0 else ENERGY_ACTION_COLOR
|
%Action.modulate = DEFAULT_ACTION_COLOR if inspected.interaction_cost(player) == 0 else ENERGY_ACTION_COLOR
|
||||||
%ActionEnergyImage.visible = inspected.interaction_cost(player) != 0
|
%ActionEnergyImage.visible = inspected.interaction_cost(player) != 0
|
||||||
|
elif dragging_inspected:
|
||||||
|
%Action.visible = true
|
||||||
|
if inspected is ItemObject:
|
||||||
|
%ActionText.text = inspected.item.name
|
||||||
|
elif inspected is InventoryGuiItemMouseDetector:
|
||||||
|
var item = GameInfo.game_data.player_data.inventory.get_item(inspected.index)
|
||||||
|
if item:
|
||||||
|
%ActionText.text = item.name
|
||||||
|
else:
|
||||||
|
%Action.visible = false
|
||||||
elif current_selected_item and current_selected_item.use_text() != "":
|
elif current_selected_item and current_selected_item.use_text() != "":
|
||||||
%Action.visible = true
|
%Action.visible = true
|
||||||
%ActionText.text = current_selected_item.use_text() + (tr("NO_ENERGY_LEFT") if not have_energy_to_use_item else "")
|
%ActionText.text = current_selected_item.use_text() + (tr("NO_ENERGY_LEFT") if not have_energy_to_use_item else "")
|
||||||
@@ -216,5 +273,8 @@ func update_inspector(current_inspected:Node):
|
|||||||
else:
|
else:
|
||||||
%Action.visible = false
|
%Action.visible = false
|
||||||
|
|
||||||
func stop_inspect(node : Node = get_current_inspected()):
|
func stop_inspect(node: Node = get_current_inspected()):
|
||||||
all_inspected.erase(node)
|
if not dragging_inspected:
|
||||||
|
all_inspected.erase(node)
|
||||||
|
if node is InventoryGuiItemMouseDetector:
|
||||||
|
inspected_inventory_slot = null
|
||||||
|
|||||||
Reference in New Issue
Block a user