mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
[MIRROR] basic honkbots (#28007)
* basic honkbots (#81920) ## About The Pull Request this refactors honkbots into basic mobs. its mostly a faithful 1:1 refactor but i couldnt keep my hands to myselves so i gave them some new behaviors. honkbots now love playing with clowns, they will go seek out for clowns and celebrate around them. also, if the honkbot finds a banana peel or a slippery item near it, it will actively drag people onto them honkbots will now go out of theirway to mess with secbots and annoy them ## Why It's Good For The Game refactors hinkbots into basic bots and also undoes some of the silliness i did in the previous basic bot prs. i also added lazylist support to remove_thing_from_list. ## Changelog 🆑 refactor: honkbots are now basic mobs, please report any bugs add: honkbots will try to slip people on banana peels /🆑 * basic honkbots --------- Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
This commit is contained in:
co-authored by
Ben10Omintrix
parent
b86cde0521
commit
0f2aad9e2f
@@ -6,7 +6,6 @@
|
||||
icon = 'icons/mob/silicon/aibots.dmi'
|
||||
icon_state = "medibot0"
|
||||
base_icon_state = "medibot"
|
||||
density = FALSE
|
||||
health = 20
|
||||
maxHealth = 20
|
||||
speed = 2
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
search_range = (mode_flags & MEDBOT_STATIONARY_MODE) ? 1 : initial(search_range)
|
||||
var/list/ignore_keys = controller.blackboard[BB_TEMPORARY_IGNORE_LIST]
|
||||
for(var/mob/living/carbon/human/treatable_target in oview(search_range, controller.pawn))
|
||||
if(LAZYACCESS(ignore_keys, REF(treatable_target)) || treatable_target.stat == DEAD)
|
||||
if(LAZYACCESS(ignore_keys, treatable_target) || treatable_target.stat == DEAD)
|
||||
continue
|
||||
if((access_flags & BOT_COVER_EMAGGED) && treatable_target.stat == CONSCIOUS)
|
||||
controller.set_if_can_reach(BB_PATIENT_TARGET, treatable_target, distance =BOT_PATIENT_PATH_LIMIT, bypass_add_to_blacklist = (search_range == 1))
|
||||
@@ -107,18 +107,18 @@
|
||||
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_SUCCEEDED
|
||||
|
||||
// only clear the target if they get healed
|
||||
/datum/ai_behavior/tend_to_patient/finish_action(datum/ai_controller/controller, succeeded, target_key, is_stationary, healed_target = FALSE)
|
||||
/datum/ai_behavior/tend_to_patient/finish_action(datum/ai_controller/controller, succeeded, target_key, threshold, damage_type_healer, access_flags, is_stationary)
|
||||
. = ..()
|
||||
var/atom/target = controller.blackboard[target_key]
|
||||
if(!succeeded)
|
||||
|
||||
if(!isnull(target) && !is_stationary)
|
||||
controller.set_blackboard_key_assoc_lazylist(BB_TEMPORARY_IGNORE_LIST, REF(target), TRUE)
|
||||
controller.set_blackboard_key_assoc_lazylist(BB_TEMPORARY_IGNORE_LIST, target, TRUE)
|
||||
|
||||
controller.clear_blackboard_key(target_key)
|
||||
return
|
||||
|
||||
if(QDELETED(target) || !healed_target)
|
||||
if(QDELETED(target) || !check_if_healed(target, threshold, damage_type_healer, access_flags))
|
||||
return
|
||||
|
||||
var/datum/action/cooldown/bot_announcement/announcement = controller.blackboard[BB_ANNOUNCE_ABILITY]
|
||||
|
||||
Reference in New Issue
Block a user