Refactors threat assessment for security bots

They don't share a common ancestor type so they were relying on the
secbot having identical vars to the ed209, this is brittle and ugly, so
instead a bitflag of criteria is passed through the mob assess_threat
proc so it can choose how to react to each criteria

As well as that, the weaponscheck proc used by the bots is now passed
through as a callback, more things can now implement their own
weapons checking for threat assessment if they need

This means more things can now utilise the assess_threat proc if they so
wanted to, as they no longer need to map 1 -> 1 to the ed209's vars

Also fixed a runtime where the secbot didn't pass through itself to the
assess_threat proc (what I originally wanted to fix)
This commit is contained in:
oranges
2017-06-22 21:05:22 +00:00
parent 48c8e06086
commit d6b323bcfa
10 changed files with 69 additions and 26 deletions
@@ -101,7 +101,7 @@
return 0
return 1
/mob/living/carbon/true_devil/assess_threat()
/mob/living/carbon/true_devil/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null)
return 666
/mob/living/carbon/true_devil/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0)