Skip to content

Commit

Permalink
Allow player with access to pass on locked doors
Browse files Browse the repository at this point in the history
  • Loading branch information
ramon-bernardo committed Sep 25, 2024
1 parent 2f45dc3 commit c12b047
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/scripts/actions/others/doors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ function door.onUse(player, item, fromPosition, target, toPosition, isHotkey)
target:transform(transformTo)
return true
elseif table.contains(lockedDoors, itemId) then
if player:getGroup():getAccess() then
player:teleportTo(toPosition, true)
end
player:sendTextMessage(MESSAGE_INFO_DESCR, "It is locked.")
return true
elseif table.contains(openDoors, itemId) or table.contains(openExtraDoors, itemId) or table.contains(openHouseDoors, itemId) then
Expand Down

0 comments on commit c12b047

Please sign in to comment.