mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
[MIRROR] fixes bots having all access (#27337)
* fixes bots having all access (#82678) ## About The Pull Request a recent change to silicon access meant all bots, simple and basic had all access from roundstart ## Why It's Good For The Game fixes bots having all access Fixes https://github.com/tgstation/tgstation/issues/82671 ## Changelog 🆑 fix: basic bots no longer start with all access /🆑 * fixes bots having all access --------- Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,8 @@ GLOBAL_LIST_INIT(command_strings, list(
|
||||
"home" = "RETURN HOME",
|
||||
))
|
||||
|
||||
#define SENTIENT_BOT_RESET_TIMER 45 SECONDS
|
||||
|
||||
/mob/living/basic/bot
|
||||
icon = 'icons/mob/silicon/aibots.dmi'
|
||||
layer = MOB_LAYER
|
||||
@@ -101,7 +103,7 @@ GLOBAL_LIST_INIT(command_strings, list(
|
||||
AddElement(/datum/element/relay_attackers)
|
||||
RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(handle_loop_movement))
|
||||
RegisterSignal(src, COMSIG_ATOM_WAS_ATTACKED, PROC_REF(after_attacked))
|
||||
RegisterSignal(src, COMSIG_MOB_TRIED_ACCESS, PROC_REF(attempt_access))
|
||||
RegisterSignal(src, COMSIG_OBJ_ALLOWED, PROC_REF(attempt_access))
|
||||
ADD_TRAIT(src, TRAIT_NO_GLIDE, INNATE_TRAIT)
|
||||
GLOB.bots_list += src
|
||||
|
||||
@@ -758,9 +760,7 @@ GLOBAL_LIST_INIT(command_strings, list(
|
||||
/mob/living/basic/bot/proc/attempt_access(mob/bot, obj/door_attempt)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(door_attempt.check_access(access_card))
|
||||
return ACCESS_ALLOWED
|
||||
return ACCESS_DISALLOWED
|
||||
return (door_attempt.check_access(access_card) ? COMPONENT_OBJ_ALLOW : COMPONENT_OBJ_DISALLOW)
|
||||
|
||||
/mob/living/basic/bot/proc/generate_speak_list()
|
||||
return null
|
||||
@@ -783,6 +783,8 @@ GLOBAL_LIST_INIT(command_strings, list(
|
||||
access_card.set_access(access_to_grant)
|
||||
speak("Responding.", radio_channel)
|
||||
update_bot_mode(new_mode = BOT_SUMMON)
|
||||
if(client) //if we're sentient, we reset ourselves after a short period
|
||||
addtimer(CALLBACK(src, PROC_REF(bot_reset)), SENTIENT_BOT_RESET_TIMER)
|
||||
return TRUE
|
||||
|
||||
/mob/living/basic/bot/proc/set_ai_caller(mob/living/caller)
|
||||
@@ -809,3 +811,5 @@ GLOBAL_LIST_INIT(command_strings, list(
|
||||
|
||||
/mob/living/basic/bot/proc/on_bot_movement(atom/movable/source, atom/oldloc, dir, forced)
|
||||
return
|
||||
|
||||
#undef SENTIENT_BOT_RESET_TIMER
|
||||
|
||||
@@ -34,6 +34,13 @@
|
||||
if(. & AI_CONTROLLER_INCOMPATIBLE)
|
||||
return
|
||||
RegisterSignal(new_pawn, COMSIG_BOT_RESET, PROC_REF(reset_bot))
|
||||
RegisterSignal(new_pawn, COMSIG_AI_BLACKBOARD_KEY_CLEARED(BB_BOT_SUMMON_TARGET), PROC_REF(clear_summon))
|
||||
|
||||
/datum/ai_controller/basic_controller/bot/proc/clear_summon()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/mob/living/basic/bot/bot_pawn = pawn
|
||||
bot_pawn.bot_reset()
|
||||
|
||||
/datum/ai_controller/basic_controller/bot/able_to_run()
|
||||
var/mob/living/basic/bot/bot_pawn = pawn
|
||||
|
||||
@@ -7,14 +7,13 @@
|
||||
icon_state = "medibot0"
|
||||
base_icon_state = "medibot"
|
||||
density = FALSE
|
||||
anchored = FALSE
|
||||
health = 20
|
||||
maxHealth = 20
|
||||
speed = 2
|
||||
light_power = 0.8
|
||||
light_color = "#99ccff"
|
||||
pass_flags = PASSMOB | PASSFLAPS
|
||||
status_flags = CANSTUN
|
||||
status_flags = (CANPUSH | CANSTUN)
|
||||
ai_controller = /datum/ai_controller/basic_controller/bot/medbot
|
||||
|
||||
req_one_access = list(ACCESS_ROBOTICS, ACCESS_MEDICAL)
|
||||
|
||||
Reference in New Issue
Block a user