Skip to content

Commit

Permalink
No NPC Fun Facts (#4179)
Browse files Browse the repository at this point in the history
# About the pull request

This PR adds a check for random facts so they only apply to players, not
NPCs.

# Explain why it's good for the game

Should fix dumb things like this: 

![image](https://github.com/cmss13-devs/cmss13/assets/76988376/2dd2e803-7acd-4755-b375-5b2f3e146f72)

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>


https://github.com/cmss13-devs/cmss13/assets/76988376/b671b7c5-bd41-4c30-9e81-d69b19689d2e

</details>


# Changelog
:cl: Drathek
fix: Random facts now only check players.
/:cl:
  • Loading branch information
Drulikar authored Aug 14, 2023
1 parent 9752ff4 commit aaf8ec4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/datums/statistics/random_facts/random_fact.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
list_to_check += GLOB.living_xeno_list

for(var/mob/checked_mob as anything in list_to_check)
if(!checked_mob?.persistent_ckey)
continue // We don't care about NPCs
if(living_stat_gotten < life_grab_stat(checked_mob))
mob_to_report = checked_mob
living_stat_gotten = life_grab_stat(checked_mob)
Expand Down

0 comments on commit aaf8ec4

Please sign in to comment.