diff options
| author | cheapie <cheapiephp@gmail.com> | 2026-09-15 03:48:32 -0500 |
|---|---|---|
| committer | cheapie <cheapiephp@gmail.com> | 2026-09-15 03:48:32 -0500 |
| commit | 928fd0a444ebe5a1ec6d03ece8b2aa047543d86e (patch) | |
| tree | bba5711c4bdbd47e334316fa90cd76ce538e8ec0 | |
| parent | f7930d9ab7e0116e0b57fba1367bb1820d1d66cd (diff) | |
| download | cars_despawn-main.tar cars_despawn-main.tar.gz cars_despawn-main.tar.bz2 cars_despawn-main.tar.xz cars_despawn-main.zip | |
| -rw-r--r-- | .luacheckrc | 1 | ||||
| -rw-r--r-- | init.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/.luacheckrc b/.luacheckrc index d57e796..a9d7661 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -6,5 +6,4 @@ globals = { read_globals = { "vector", - "carts", } @@ -122,6 +122,8 @@ for _,mod in ipairs({"vehicle_mash","motorbike","bike","ufos"}) do local obj = self.object local pos = vector.round(obj:get_pos()) local maxradius = tonumber(core.settings:get("cars_despawn.search_radius") or 8) or 8 + local radiusv = vector.new(maxradius,maxradius,maxradius) + core.load_area(pos-radiusv,pos+radiusv) local parked = core.find_node_near(pos,maxradius,"group:parking",true) if not parked then obj:remove() end end |
