-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Malf AI overload blacklists #83226
Malf AI overload blacklists #83226
Conversation
Shouldn't it just automatically return if the machine is indestructible? |
well apparently it didn't |
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it just automatically return if the machine is indestructible?
well apparently it didn't
it didn't because the abilities DON'T check for indestructible.
tgstation/code/modules/antagonists/malf_ai/malf_ai_modules.dm
Lines 533 to 555 in e12e3df
/datum/action/innate/ai/ranged/overload_machine/do_ability(mob/living/caller, atom/clicked_on) | |
if(caller.incapacitated()) | |
unset_ranged_ability(caller) | |
return FALSE | |
if(!ismachinery(clicked_on)) | |
to_chat(caller, span_warning("You can only overload machines!")) | |
return FALSE | |
var/obj/machinery/clicked_machine = clicked_on | |
if(is_type_in_typecache(clicked_machine, GLOB.blacklisted_malf_machines)) | |
to_chat(caller, span_warning("You cannot overload that device!")) | |
return FALSE | |
caller.playsound_local(caller, SFX_SPARKS, 50, 0) | |
adjust_uses(-1) | |
if(uses) | |
desc = "[initial(desc)] It has [uses] use\s remaining." | |
build_all_button_icons() | |
clicked_machine.audible_message(span_userdanger("You hear a loud electrical buzzing sound coming from [clicked_machine]!")) | |
addtimer(CALLBACK(src, PROC_REF(detonate_machine), caller, clicked_machine), 5 SECONDS) //kaboom! | |
unset_ranged_ability(caller, span_danger("Overcharging machine...")) | |
return TRUE | |
tgstation/code/modules/antagonists/malf_ai/malf_ai_modules.dm
Lines 445 to 467 in e12e3df
/datum/action/innate/ai/ranged/override_machine/do_ability(mob/living/caller, atom/clicked_on) | |
if(caller.incapacitated()) | |
unset_ranged_ability(caller) | |
return FALSE | |
if(!ismachinery(clicked_on)) | |
to_chat(caller, span_warning("You can only animate machines!")) | |
return FALSE | |
var/obj/machinery/clicked_machine = clicked_on | |
if(!clicked_machine.can_be_overridden() || is_type_in_typecache(clicked_machine, GLOB.blacklisted_malf_machines)) | |
to_chat(caller, span_warning("That machine can't be overridden!")) | |
return FALSE | |
caller.playsound_local(caller, 'sound/misc/interference.ogg', 50, FALSE, use_reverb = FALSE) | |
clicked_machine.audible_message(span_userdanger("You hear a loud electrical buzzing sound coming from [clicked_machine]!")) | |
addtimer(CALLBACK(src, PROC_REF(animate_machine), caller, clicked_machine), 5 SECONDS) //kabeep! | |
unset_ranged_ability(caller, span_danger("Sending override signal...")) | |
adjust_uses(-1) //adjust after we unset the active ability since we may run out of charges, thus deleting the ability | |
if(uses) | |
desc = "[initial(desc)] It has [uses] use\s remaining." | |
build_all_button_icons() | |
return TRUE |
just need to change the typecache check in those two procs to check for the flag
if((clicked_machine.resistance_flags & INDESTRUCTIBLE) || is_type_in_typecache(clicked_machine, GLOB.blacklisted_malf_machines))
About The Pull Request
adds more machines to the malf AI overload ability blacklist: shuttle consoles and gateway console
closes #83223
Why It's Good For The Game
bug fix
Changelog
馃啈
fix: fixed malf AI being able to overload shuttle consoles and the gateway control console
/:cl: