Merge pull request #6451 from Citadel-Station-13/upstream-merge-37218

[MIRROR] Couple of fixes for situations involving mechas and the clock cult gamemode
This commit is contained in:
LetterJay
2018-04-22 02:34:53 -05:00
committed by GitHub
7 changed files with 23 additions and 9 deletions
+4 -1
View File
@@ -383,7 +383,7 @@
if(throwing)
return 1
if(!isturf(loc))
return 1
@@ -415,6 +415,9 @@
step(src, AM.dir)
..()
/atom/movable/proc/safe_throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback)
return throw_at(target, range, speed, thrower, spin, diagonals_first, callback)
/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback) //If this returns FALSE then callback will not be called.
. = FALSE
if (!target || (flags_1 & NODROP_1) || speed <= 0)
+2 -3
View File
@@ -50,7 +50,7 @@
playsound(chassis, fire_sound, 50, 1)
sleep(max(0, projectile_delay))
if(kickback)
chassis.newtonian_move(turn(chassis.dir,180))
chassis.log_message("Fired from [src.name], targeting [target].")
@@ -428,6 +428,5 @@
if(!..())
if(ismovableatom(hit_atom))
var/atom/movable/AM = hit_atom
AM.throw_at(get_edge_target_turf(AM,get_dir(src, AM)), 7, 2)
AM.safe_throw_at(get_edge_target_turf(AM,get_dir(src, AM)), 7, 2)
qdel(src)