refactor buckling to be more generic

Buckling procs and vars have been moved down to /obj.
Behaviour is mostly the same, but you can buckle cuffed people to
 pipes and they will automatically unbuckle if the cuffs are removed.

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
Mloc-Argent
2015-01-12 21:13:24 +00:00
parent a539780086
commit 537b78fc80
24 changed files with 179 additions and 141 deletions

View File

@@ -8,7 +8,7 @@
if(prob(100 * weakness))
user << "\red You are suddenly zapped away elsewhere!"
if (user.buckled)
user.buckled.unbuckle()
user.buckled.unbuckle_mob()
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(3, 0, get_turf(user))
@@ -28,7 +28,7 @@
if(prob(100 * weakness))
M << "\red You are displaced by a strange force!"
if(M.buckled)
M.buckled.unbuckle()
M.buckled.unbuckle_mob()
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(3, 0, get_turf(M))
@@ -47,7 +47,7 @@
if(prob(100 * weakness))
M << "\red You are displaced by a strange force!"
if(M.buckled)
M.buckled.unbuckle()
M.buckled.unbuckle_mob()
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(3, 0, get_turf(M))