Skip to content

Commit

Permalink
Kobsa Code Review
Browse files Browse the repository at this point in the history
Co-authored-by: Ben10Omintrix <[email protected]>
  • Loading branch information
san7890 and Ben10Omintrix authored Nov 15, 2023
1 parent 9925690 commit c64b7bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 6 additions & 0 deletions code/__DEFINES/ai/pets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,16 @@
#define BB_EXPORTABLE_STRING_BUFFER_LIST "BB_parrot_repeat_string_buffer"
/// The types of perches we desire to use
#define BB_PARROT_PERCH_TYPES "BB_parrot_perch_types"
/// key that holds our perch target
#define BB_PERCH_TARGET "perch_target"
/// key that holds our theft item target
#define BB_HOARD_ITEM_TARGET "hoard_item_target"
/// key that holds the mob we will steal from
#define BB_THEFT_VICTIM "theft_victim"
/// key that holds the turf we will be hauling stolen items to
#define BB_HOARD_LOCATION "hoard_location"
/// key that holds the minimum range we must be from the hoard spot
#define BB_HOARD_LOCATION_RANGE "hoard_location_range"
/// key that holds items we arent interested in hoarding
#define BB_IGNORE_ITEMS "ignore_items"

5 changes: 2 additions & 3 deletions code/modules/mob/living/basic/pets/parrot/parrot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ GLOBAL_LIST_INIT(strippable_parrot_items, create_strippable_list(list(
if(ishuman(target))
return perch_on_human(target)

if(!is_type_in_list(target, desired_perches))
if(!is_type_in_typecache(target, desired_perches))
return FALSE

forceMove(get_turf(target))
Expand Down Expand Up @@ -265,8 +265,7 @@ GLOBAL_LIST_INIT(strippable_parrot_items, create_strippable_list(list(
balloon_alert(src, "too big to pick up!")
return FALSE

target.forceMove(src)
held_item = target
pick_up_item(target)
visible_message(
span_notice("[src] grabs [held_item]!"),
span_notice("You grab [held_item]!"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
///subtree to possess humans
/datum/ai_planning_subtree/possess_humans
///chance we go possess humans
var/possess_chance = 80
var/possess_chance = 2

/datum/ai_planning_subtree/possess_humans/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
var/mob/living/living_pawn = controller.pawn
Expand All @@ -34,6 +34,4 @@
/datum/ai_behavior/perch_on_target/haunt

/datum/ai_behavior/perch_on_target/haunt/check_human_conditions(mob/living/living_human)
if(living_human.stat == DEAD)
return FALSE
return TRUE
return (living_human.stat != DEAD)

0 comments on commit c64b7bc

Please sign in to comment.