[READY] Creates Datumized AI and applies it to monkeys (#55238)

New AI system, implemented for monkeys.
This commit is contained in:
Qustinnus
2020-12-13 13:19:54 +01:00
committed by GitHub
parent e06a1035ac
commit 12c1464bc3
39 changed files with 855 additions and 502 deletions
+8 -2
View File
@@ -1,6 +1,6 @@
#define TRANSFORMATION_DURATION 22
/mob/living/carbon/proc/monkeyize(tr_flags = (TR_KEEPITEMS | TR_KEEPVIRUS | TR_KEEPSTUNS | TR_KEEPREAGENTS | TR_DEFAULTMSG | TR_KEEPSTAMINADAMAGE))
/mob/living/carbon/proc/monkeyize(tr_flags = (TR_KEEPITEMS | TR_KEEPVIRUS | TR_KEEPSTUNS | TR_KEEPREAGENTS | TR_DEFAULTMSG | TR_KEEPSTAMINADAMAGE | TR_KEEPAI))
if (notransform || transformation_timer)
return
@@ -151,6 +151,9 @@
if(tr_flags & TR_KEEPSTAMINADAMAGE)
O.adjustStaminaLoss(getStaminaLoss())
if(tr_flags & TR_KEEPAI)
ai_controller.PossessPawn(O)
if (tr_flags & TR_DEFAULTMSG)
to_chat(O, "<B>You are now a monkey.</B>")
@@ -167,7 +170,7 @@
////////////////////////// Humanize //////////////////////////////
//Could probably be merged with monkeyize but other transformations got their own procs, too
/mob/living/carbon/proc/humanize(tr_flags = (TR_KEEPITEMS | TR_KEEPVIRUS | TR_KEEPSTUNS | TR_KEEPREAGENTS | TR_DEFAULTMSG))
/mob/living/carbon/proc/humanize(tr_flags = (TR_KEEPITEMS | TR_KEEPVIRUS | TR_KEEPSTUNS | TR_KEEPREAGENTS | TR_DEFAULTMSG | TR_KEEPAI))
if (notransform || transformation_timer)
return
@@ -324,6 +327,9 @@
changeling.purchasedpowers -= HF
changeling.regain_powers()
if(tr_flags & TR_KEEPAI)
ai_controller.PossessPawn(O)
O.a_intent = INTENT_HELP
if (tr_flags & TR_DEFAULTMSG)
to_chat(O, "<B>You are now a human.</B>")