Adds pAI Insertion Into Objects
Created by: Shadowmech88
This doesn't actually affect the game, this is purely the addition of a framework. I figure maybe now that it exists people might be inspired to do their own things with it.
This allows a pAI to be inserted into any /obj
with its can_take_pai
var set to TRUE
. While inside an object, various hotkeys as well as mouse clicking can be used to trigger individual procs on the object corresponding to which hotkey was pressed. Altogether a pAI could manage 12 different functions of the object without even needing to use a menu.
Whenever an integrated pAI clicks an object that isn't its host object, on_integrated_pai_click()
is called on the host object. By default, this simply calls attack_pai()
, but if the proc has been overridden pAIs can still manually call attack_pai()
on machinery by using Ctrl+click.