vlggms / lobotomy-corp13

GNU Affero General Public License v3.0
31 stars 155 forks source link

Fort insanity update #2280

Closed Halonexus closed 1 month ago

Halonexus commented 2 months ago

About The Pull Request

Makes fort insanity ai a bit more like hostile ai. It can now switch targets when taking damage, running out of patience or losing sight of previous target. It can now use weapons with >1 reach from a distance, gets immobilised when using spears, can reload guns, can melee attack non main target when not in range, prioritises closer enemies for target acquisition. Split FindEnemies proc into CanTarget, PossibleEnemies, FindEnemies where CanTarget contains all the checks for being able to attack a thing. PossibleEnemies collects a list of these enemies, and FindEnemies selects and sets the target from that list. Made a GiveTarget proc that sets up all the relevant variables to properly switch targets. Separated mecha, and pick up item movement logic from normal movement. Added a COMSIG_LIVING_BULLET_ACT signal to mob/living/bullet_act since it doesnt send the atom bullet act signal. Fixed an issue with mecha pilot armor.

Why It's Good For The Game

Should make it easier to customise targetting for murder insanity subtypes, movement logic is easier to maintain. Fort ai can use guns and spears properly, and can switch targets.

Changelog

:cl: fix: Fort insane ai can reload guns, and use spears properly, and a runtime with mecha pilot armor. code: Separated fort ai movement code for normal, mecha or item movement. Added COMSIG_LIVING_BULLET_ACT signal to mob/living/bullet_act. refactor: Split up fort ai controller FindEnemies into CanTarget, PossibleEnemies, and FindEnemies; added GiveTarget for setting attack target properly. /:cl:

Halonexus commented 1 month ago

should be good