mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
converts cows to basic mobs and ADDS MOONICORNS (#61446)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
|
||||
///type of tipped reaction that is akin to puppy dog eyes
|
||||
/datum/ai_behavior/tipped_reaction
|
||||
|
||||
/datum/ai_behavior/tipped_reaction/perform(delta_time, datum/ai_controller/controller, tipper_key, reacting_key)
|
||||
. = ..()
|
||||
|
||||
var/mob/living/carbon/tipper = controller.blackboard[tipper_key]
|
||||
|
||||
// visible part of the visible message
|
||||
var/seen_message = ""
|
||||
// self part of the visible message
|
||||
var/self_message = ""
|
||||
// the mob we're looking to for aid
|
||||
var/mob/living/carbon/savior
|
||||
// look for someone in a radius around us for help. If our original tipper is in range, prioritize them
|
||||
for(var/mob/living/carbon/potential_aid in oview(3, get_turf(controller.pawn)))
|
||||
if(potential_aid == tipper)
|
||||
savior = tipper
|
||||
break
|
||||
savior = potential_aid
|
||||
|
||||
if(prob(75) && savior)
|
||||
var/text = pick("imploringly", "pleadingly", "with a resigned expression")
|
||||
seen_message = "[controller.pawn] looks at [savior] [text]."
|
||||
self_message = "You look at [savior] [text]."
|
||||
else
|
||||
seen_message = "[controller.pawn] seems resigned to its fate."
|
||||
self_message = "You resign yourself to your fate."
|
||||
controller.pawn.visible_message(span_notice("[seen_message]"), span_notice("[self_message]"))
|
||||
finish_action(controller, TRUE, tipper_key, reacting_key)
|
||||
|
||||
/datum/ai_behavior/tipped_reaction/finish_action(datum/ai_controller/controller, succeeded, tipper_key, reacting_key)
|
||||
. = ..()
|
||||
//I'VE SAID MY PEACE...
|
||||
controller.blackboard[reacting_key] = FALSE
|
||||
controller.blackboard[tipper_key] = null
|
||||
@@ -37,3 +37,17 @@
|
||||
/datum/ai_planning_subtree/random_speech/cockroach
|
||||
speech_chance = 5
|
||||
emote_hear = list("chitters")
|
||||
|
||||
/datum/ai_planning_subtree/random_speech/cow
|
||||
speech_chance = 1
|
||||
speak = list("moo?","moo","MOOOOOO")
|
||||
emote_hear = list("brays.")
|
||||
emote_see = list("shakes her head.")
|
||||
|
||||
///unlike normal cows, wisdom cows speak of wisdom and won't shut the fuck up
|
||||
/datum/ai_planning_subtree/random_speech/cow/wisdom
|
||||
speech_chance = 15
|
||||
|
||||
/datum/ai_planning_subtree/random_speech/cow/wisdom/New()
|
||||
. = ..()
|
||||
speak = GLOB.wisdoms //Done here so it's setup properly
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
///used by cows
|
||||
/datum/ai_planning_subtree/tip_reaction
|
||||
|
||||
/datum/ai_planning_subtree/tip_reaction/SelectBehaviors(datum/ai_controller/controller, delta_time)
|
||||
. = ..()
|
||||
var/tip_reacting = controller.blackboard[BB_BASIC_MOB_TIP_REACTING]
|
||||
if(!tip_reacting)
|
||||
return
|
||||
controller.queue_behavior(/datum/ai_behavior/tipped_reaction, BB_BASIC_MOB_TIPPER, BB_BASIC_MOB_TIP_REACTING)
|
||||
return SUBTREE_RETURN_FINISH_PLANNING //no point in trying, boy. you're TIPPED.
|
||||
Reference in New Issue
Block a user