Merge pull request #10185 from Mitchs98/moveresist

Ports Move Force from TG
This commit is contained in:
variableundefined
2018-12-28 20:53:07 +08:00
committed by GitHub
33 changed files with 256 additions and 119 deletions
+4
View File
@@ -16,6 +16,7 @@ GLOBAL_LIST_INIT(conveyor_switches, list())
desc = "It's a conveyor belt, commonly used to transport large numbers of items elsewhere quite quickly."
layer = CONVEYOR_LAYER // so they appear under stuff but not below stuff like vents
anchored = TRUE
move_force = MOVE_FORCE_DEFAULT
var/operating = FALSE //NB: this can be TRUE while the belt doesn't go
var/forwards // The direction the conveyor sends you in
var/backwards // hopefully self-explanatory
@@ -183,9 +184,12 @@ GLOBAL_LIST_INIT(conveyor_switches, list())
..()
/obj/machinery/conveyor/proc/move_thing(atom/movable/AM)
if(move_force < (AM.move_resist))
return FALSE
if(!AM.anchored && AM.loc == loc)
step(AM, forwards)
/obj/machinery/conveyor/proc/can_conveyor_run()
if(stat & BROKEN)
return FALSE