Skip to content

Commit

Permalink
Update staff_dialog.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Matroftt authored Nov 28, 2024
1 parent b35a2d4 commit 50a3c72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CorsixTH/Lua/dialogs/staff_dialog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,11 @@ function UIStaff:onMouseUp(button, x, y)
for i, staff in ipairs(ui.hospital.staff) do
if staff_index and staff.profile.humanoid_class == self.staff.profile.humanoid_class then
ui:addWindow(UIStaff(ui, staff))
if hit_namebox then
if hit_namebox then
local sx, sy = ui.app.map:WorldToScreen(staff.tile_x, staff.tile_y)
local dx, dy = staff.th:getPosition()
ui:scrollMapTo(sx + dx, sy + dy)
end
end
return false
end
if staff == self.staff then
Expand All @@ -285,11 +285,11 @@ function UIStaff:onMouseUp(button, x, y)
local staff = ui.hospital.staff[i]
if staff.profile.humanoid_class == self.staff.profile.humanoid_class then
ui:addWindow(UIStaff(ui, staff))
if hit_namebox then
if hit_namebox then
local sx, sy = ui.app.map:WorldToScreen(staff.tile_x, staff.tile_y)
local dx, dy = staff.th:getPosition()
ui:scrollMapTo(sx + dx, sy + dy)
end
end
return false
end
end
Expand Down

0 comments on commit 50a3c72

Please sign in to comment.