Skip to content

Commit

Permalink
Fix simplemobs not properly disabling AI when using set_playable
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeow committed Oct 2, 2023
1 parent 8ca3195 commit 2d5aee4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 5 additions & 5 deletions code/modules/mob/living/living_sentience.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@

/mob/living/proc/give_mind(mob/user)
if(key || !playable || stat)
return 0
return FALSE
var/question = alert("Do you want to become [name]?", "[name]", "Yes", "No")
if(question != "Yes" || !src || QDELETED(src))
return TRUE
return FALSE
if(key)
to_chat(user, "<span class='notice'>Someone else already took [name].</span>")
return TRUE
return FALSE
if(!SSticker.HasRoundStarted())
return
return FALSE
if(!user?.client?.can_take_ghost_spawner(playable_bantype, TRUE, flags_1 & ADMIN_SPAWNED_1))
return
return FALSE
key = user.key
log_game("[key_name(src)] took control of [name].")
remove_from_spawner_menu()
Expand Down
5 changes: 5 additions & 0 deletions code/modules/mob/living/simple_animal/simple_animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -642,3 +642,8 @@
if (AIStatus == AI_Z_OFF)
SSidlenpcpool.idle_mobs_by_zlevel[old_z] -= src
toggle_ai(initial(AIStatus))

/mob/living/simple_animal/give_mind(mob/user)
. = ..()
if(.)
sentience_act(user)

0 comments on commit 2d5aee4

Please sign in to comment.