mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 03:59:59 +01:00
This tracks the seconds per tick of a subsystem, however note that it is not completely accurate, as subsystems can be delayed, however it's useful to have this number as a multiplier or ratio, so that if in future someone changes the subsystem wait time code correctly adjusts how fast it applies effects regexes used git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i 's/DT_PROB/SPT_PROB/g' git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i 's/delta_time/seconds_per_tick/g'
23 lines
1000 B
Plaintext
23 lines
1000 B
Plaintext
/datum/ai_planning_subtree/punpun_shenanigans/SelectBehaviors(datum/ai_controller/monkey/controller, seconds_per_tick)
|
|
|
|
controller.set_trip_mode(mode = FALSE) // pun pun doesn't fuck around
|
|
|
|
if(prob(5))
|
|
controller.queue_behavior(/datum/ai_behavior/use_in_hand)
|
|
|
|
if(!SPT_PROB(MONKEY_SHENANIGAN_PROB, seconds_per_tick))
|
|
return
|
|
|
|
if(!controller.blackboard[BB_MONKEY_CURRENT_PRESS_TARGET])
|
|
controller.queue_behavior(/datum/ai_behavior/find_and_set, BB_MONKEY_CURRENT_PRESS_TARGET, /obj/structure/desk_bell, 2)
|
|
else if(prob(50))
|
|
controller.queue_behavior(/datum/ai_behavior/use_on_object, BB_MONKEY_CURRENT_PRESS_TARGET)
|
|
return SUBTREE_RETURN_FINISH_PLANNING
|
|
|
|
if(!controller.blackboard[BB_MONKEY_CURRENT_GIVE_TARGET])
|
|
controller.queue_behavior(/datum/ai_behavior/find_and_set/pawn_must_hold_item, BB_MONKEY_CURRENT_GIVE_TARGET, /mob/living, 2)
|
|
else if(prob(30))
|
|
controller.queue_behavior(/datum/ai_behavior/give, BB_MONKEY_CURRENT_GIVE_TARGET)
|
|
return SUBTREE_RETURN_FINISH_PLANNING
|
|
|