mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Re-added the limit of 10 items moved per tick, for conveyor belts
This commit is contained in:
@@ -116,9 +116,15 @@
|
|||||||
|
|
||||||
affecting = loc.contents - src // moved items will be all in loc
|
affecting = loc.contents - src // moved items will be all in loc
|
||||||
spawn(1) // slight delay to prevent infinite propagation due to map order
|
spawn(1) // slight delay to prevent infinite propagation due to map order
|
||||||
|
|
||||||
|
var/items_moved = 0
|
||||||
for(var/atom/movable/A in affecting)
|
for(var/atom/movable/A in affecting)
|
||||||
|
if(items_moved >= 10)
|
||||||
|
break
|
||||||
|
|
||||||
if(!A.anchored)
|
if(!A.anchored)
|
||||||
if(isturf(A.loc)) // this is to prevent an ugly bug that forces a player to drop what they're holding if they recently pick it up from the conveyer belt
|
if(isturf(A.loc)) // this is to prevent an ugly bug that forces a player to drop what they're holding if they recently pick it up from the conveyer belt
|
||||||
|
items_moved++
|
||||||
if(!step(A,movedir))
|
if(!step(A,movedir))
|
||||||
//if it's a crate, move the item into the crate
|
//if it's a crate, move the item into the crate
|
||||||
var/turf/T = get_step(A,movedir)
|
var/turf/T = get_step(A,movedir)
|
||||||
|
|||||||
Reference in New Issue
Block a user