Makes all greentext achievements implicitly reward the generic one

This commit is contained in:
Gary Lafortune
2020-01-16 16:52:06 -06:00
parent e831e7a549
commit cf754f3b14

View File

@@ -52,6 +52,8 @@ SUBSYSTEM_DEF(achievements)
if(!achievement)
log_sql("Achievement [achievementPath] not found in list of achievements when trying to unlock for [C.ckey]")
return FALSE
if(istype(achievement,/datum/achievement/greentext) && achievementPath != /datum/achievement/greentext)
unlock_achievement(/datum/achievement/greentext,C) // Oooh, a little bit recursive!
if(!has_achievement(achievementPath, C))
var/datum/DBQuery/medalQuery = SSdbcore.NewQuery("INSERT INTO [format_table_name("earned_achievements")] (ckey, id) VALUES ('[C.ckey]', '[achievement.id]')")
medalQuery.Execute()