Reset spawn position on bed destruction
This commit is contained in:
parent
eac4795326
commit
176ddba176
2 changed files with 11 additions and 0 deletions
|
@ -61,3 +61,12 @@ function beds.set_spawns()
|
|||
end
|
||||
beds.save_spawns()
|
||||
end
|
||||
|
||||
function beds.remove_spawns_at(pos)
|
||||
for name, p in pairs(beds.spawn) do
|
||||
if vector.equals(vector.round(p), pos) then
|
||||
beds.spawn[name] = nil
|
||||
end
|
||||
end
|
||||
beds.save_spawns()
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue