Conveyor movement refactor/fix (#26408)

* Refactors conveyor movement

* Fixes effects being affected by conveyors

* Fixes jetpacks not stopping conveyors

* Fixes /mob/dead being affected by conveyors

* Fixes butterflys being affected by conveyors
This commit is contained in:
Cyberboss
2017-04-21 19:27:37 -03:00
committed by Leo
parent 9cec30a086
commit 44898a9b9e
7 changed files with 26 additions and 6 deletions
+3
View File
@@ -10,3 +10,6 @@
/mob/dead/gib() //ghosts can't be gibbed.
return
/mob/dead/ConveyorMove() //lol
return
+5
View File
@@ -923,3 +923,8 @@
if(riding_datum)
riding_datum.handle_vehicle_offsets()
riding_datum.handle_vehicle_layer()
/mob/living/ConveyorMove()
if((movement_type & FLYING) && !stat)
return
..()
@@ -27,4 +27,4 @@
/mob/living/simple_animal/butterfly/Initialize()
..()
var/newcolor = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
+2 -4
View File
@@ -108,10 +108,8 @@
affecting = loc.contents - src // moved items will be all in loc
sleep(1)
for(var/atom/movable/A in affecting)
if(!A.anchored)
if(A.loc == src.loc) // prevents the object from being affected if it's not currently here.
step(A,movedir)
CHECK_TICK
if(A.loc == loc)
A.ConveyorMove(movedir)
// attack with item, place item on conveyor
/obj/machinery/conveyor/attackby(obj/item/I, mob/user, params)