Skip to content

Commit

Permalink
feat(hospital): Allow multiple checkin locations per hospital
Browse files Browse the repository at this point in the history
  • Loading branch information
citRaTTV committed Oct 11, 2024
1 parent 0f43a42 commit 8ce5559
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
35 changes: 19 additions & 16 deletions client/hospital.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,26 @@ if config.useTarget then
CreateThread(function()
for hospitalName, hospital in pairs(sharedConfig.locations.hospitals) do
if hospital.checkIn then
exports.ox_target:addBoxZone({
name = hospitalName..'_checkin',
coords = hospital.checkIn,
size = vec3(2, 1, 2),
rotation = 18,
debug = config.debugPoly,
options = {
{
onSelect = function()
checkIn(hospitalName)
end,
icon = 'fas fa-clipboard',
label = locale('text.check'),
distance = 3.0,
if type(hospital.checkIn) ~= 'table' then hospital.checkIn = { hospital.checkIn } end
for i = 1, #hospital.checkIn do
exports.ox_target:addBoxZone({
name = hospitalName..'_checkin',
coords = hospital.checkIn[i],
size = vec3(2, 1, 2),
rotation = 18,
debug = config.debugPoly,
options = {
{
onSelect = function()
checkIn(hospitalName)
end,
icon = 'fas fa-clipboard',
label = locale('text.check'),
distance = 3.0,
}
}
}
})
})
end
end

for i = 1, #hospital.beds do
Expand Down
2 changes: 1 addition & 1 deletion config/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ return {
---@field coords vector4
---@field model number

---@type table<string, {coords: vector3, checkIn?: vector3, beds: Bed[]}>
---@type table<string, {coords: vector3, checkIn?: vector3|vector3[], beds: Bed[]}>
hospitals = {
pillbox = {
coords = vec3(350, -580, 43),
Expand Down

0 comments on commit 8ce5559

Please sign in to comment.