Skip to content

Commit

Permalink
qol: pAI with empty name field no longer can be saved (ss220-space#3985)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladisvell authored and Etrnlmelancholy committed Jan 3, 2024
1 parent 83e4558 commit 1f3346c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions code/modules/mob/living/silicon/pai/personality.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@

/datum/paiCandidate/proc/savefile_save(mob/user)
if(IsGuestKey(user.key))
return 0
return FALSE

if(!src.name) //Preventing false savings
return FALSE

var/savefile/F = new /savefile(src.savefile_path(user))

Expand All @@ -24,7 +27,7 @@

F["version"] << 1

return 1
return TRUE

// loads the savefile corresponding to the mob's ckey
// if silent=true, report incompatible savefiles
Expand Down

0 comments on commit 1f3346c

Please sign in to comment.