[MIRROR] Fix skill related runtimes in mindless mobs. (#965)

* Fix skill related runtimes in mindless mobs. (#53691)

Fixes related to mindless mobs using skills

* Fix skill related runtimes in mindless mobs.

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
SkyratBot
2020-09-24 20:33:19 +02:00
committed by GitHub
co-authored by Timberpoes
parent bb7f23fa99
commit 18f4fb5029
10 changed files with 103 additions and 67 deletions
@@ -218,8 +218,11 @@
var/turf/closed/mineral/M = target_turf
M.gets_drilled(firer, TRUE)
if(iscarbon(firer))
var/mob/living/carbon/C = firer
var/skill_modifier = C?.mind.get_skill_modifier(/datum/skill/mining, SKILL_SPEED_MODIFIER)
var/mob/living/carbon/carbon_firer = firer
var/skill_modifier = 1
// If there is a mind, check for skill modifier to allow them to reload faster.
if(carbon_firer.mind)
skill_modifier = carbon_firer.mind.get_skill_modifier(/datum/skill/mining, SKILL_SPEED_MODIFIER)
kinetic_gun.attempt_reload(kinetic_gun.overheat_time * skill_modifier) //If you hit a mineral, you might get a quicker reload. epic gamer style.
var/obj/effect/temp_visual/kinetic_blast/K = new /obj/effect/temp_visual/kinetic_blast(target_turf)
K.color = color