Skip to content

Commit

Permalink
[MIRROR] Fix bug where MMI's cannot open doors [MDB IGNORE] (#25367) (#…
Browse files Browse the repository at this point in the history
…905)

* Fix bug where MMI's cannot open doors (#79896)

## About The Pull Request

While #69556 did fix it for posi brains. it did not account for MMI's
meaning only posi brains got fixed

as a bonus, im throwing in a shitty debug command because MMI's put all
there logic in attackby

## Why It's Good For The Game

bugs bad

## Changelog
:cl:
admin: A new debug verb to turn yourself into an MMI(almost the funniest
thing)
fix: MMI's inside mechs can now properly open doors like there posibrain
counterparts
/:cl:

---------



* Fix bug where MMI's cannot open doors

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: Autisem <[email protected]>
Co-authored-by: san7890 <the@ san7890.com>
  • Loading branch information
4 people authored Dec 2, 2023
1 parent 0b9ab7a commit 441d0ef
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
16 changes: 16 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ GLOBAL_PROTECT(admin_verbs_debug)
/client/proc/run_empty_query,
/client/proc/SDQL2_query,
/client/proc/set_dynex_scale,
/client/proc/spawn_as_mmi,
/client/proc/spawn_debug_full_crew,
/client/proc/test_cardpack_distribution,
/client/proc/test_movable_UI,
Expand Down Expand Up @@ -1228,3 +1229,18 @@ GLOBAL_PROTECT(admin_verbs_poll)
QDEL_NULL(segment.ai_controller)
segment.AddComponent(/datum/component/mob_chain, front = previous)
previous = segment

/client/proc/spawn_as_mmi(mob/living/carbon/human/target in GLOB.human_list)
set category = "Debug"
set name = "Turn target into MMI"
set desc = "Turns something into an MMI, must be used on humans"
if(!check_rights(R_DEBUG))
return
if(!ishuman(target))
return

var/obj/item/mmi/new_mmi = new(target.loc)
var/obj/item/organ/internal/brain/target_brain = target.get_organ_slot(ORGAN_SLOT_BRAIN)
target_brain.Remove(target)
new_mmi.attackby(target_brain,target)
qdel(target)
6 changes: 3 additions & 3 deletions code/modules/jobs/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
var/mob/living/simple_animal/animal = accessor
if(check_access(animal.access_card))
return TRUE
else if(isbrain(accessor) && istype(accessor.loc, /obj/item/mmi))
var/obj/item/mmi/brain_mmi = accessor.loc
if(ismecha(brain_mmi.loc))
else if(isbrain(accessor))
var/obj/item/mmi/brain_mmi = get(accessor.loc, /obj/item/mmi)
if(brain_mmi && ismecha(brain_mmi.loc))
var/obj/vehicle/sealed/mecha/big_stompy_robot = brain_mmi.loc
return check_access_list(big_stompy_robot.accesses)
return FALSE
Expand Down

0 comments on commit 441d0ef

Please sign in to comment.