Recoil knockdown code for micros

Code to make anyone under 50% take recoil damage (5 brute - your size * 2; so at 50% thats 5-1)
Also makes tinies fall down from firing guns.
This commit is contained in:
Sharkmare
2019-04-09 15:13:51 +02:00
committed by GitHub
parent b681f4de43
commit 2194256b47
+11 -2
View File
@@ -340,7 +340,7 @@
if(target.z != user.z) return
add_fingerprint(user)
user.break_cloak()
if(!special_check(user))
@@ -350,7 +350,7 @@
if (world.time % 3) //to prevent spam
user << "<span class='warning'>[src] is not ready to fire again!</span>"
return
var/shoot_time = (burst - 1)* burst_delay
//These should apparently be disabled to allow for the automatic system to function without causing near-permanant paralysis. Re-enabling them while we sort that out.
@@ -438,6 +438,15 @@
set_light(0)
//VOREStation Edit End
//CHOMPEDIT: Recoil knockdown for micros
if(iscarbon(user))
var/mob/living/carbon/nerd = user
var/mysize = nerd.size_multiplier
if(mysize <= 0.5)
nerd.Weaken(1)
nerd.adjustBruteLoss(5-mysize*4)
//CHOMPEDIT: Knockdown code end
// Similar to the above proc, but does not require a user, which is ideal for things like turrets.
/obj/item/weapon/gun/proc/Fire_userless(atom/target)
if(!target)