support for tgs4 noconfigs needed***

This commit is contained in:
Letter N
2021-03-03 17:33:14 +08:00
parent 754c24748e
commit a87e4533e5
20 changed files with 239 additions and 157 deletions
@@ -32,8 +32,9 @@
set waitfor = FALSE
var/list/kv = list()
var/datum/DBQuery/Query = SSdbcore.NewQuery(
"SELECT achievement_key,value FROM [format_table_name("achievements")] WHERE ckey = [owner_ckey]",
var/datum/db_query/Query = SSdbcore.NewQuery(
"SELECT achievement_key,value FROM [format_table_name("achievements")] WHERE ckey = :ckey",
list("ckey" = owner_ckey)
)
if(!Query.Execute())
qdel(Query)
+6 -4
View File
@@ -44,8 +44,9 @@
///Get raw numerical achievement value from the database
/datum/award/proc/get_raw_value(key)
var/datum/DBQuery/Q = SSdbcore.NewQuery(
"SELECT value FROM [format_table_name("achievements")] WHERE ckey = [key] AND achievement_key = [database_id]"
var/datum/db_query/Q = SSdbcore.NewQuery(
"SELECT value FROM [format_table_name("achievements")] WHERE ckey = :ckey AND achievement_key = :achievement_key",
list("ckey" = key, "achievement_key" = database_id)
)
if(!Q.Execute(async = TRUE))
qdel(Q)
@@ -98,8 +99,9 @@
.["achievement_type"] = "score"
/datum/award/score/proc/LoadHighScores()
var/datum/DBQuery/Q = SSdbcore.NewQuery(
"SELECT ckey,value FROM [format_table_name("achievements")] WHERE achievement_key = [database_id] ORDER BY value DESC LIMIT 50"
var/datum/db_query/Q = SSdbcore.NewQuery(
"SELECT ckey,value FROM [format_table_name("achievements")] WHERE achievement_key = :achievement_key ORDER BY value DESC LIMIT 50",
list("achievement_key" = database_id)
)
if(!Q.Execute(async = TRUE))
qdel(Q)
@@ -1,4 +0,0 @@
/datum/award/score/hardcore_random
name = "Hardcore random points"
desc = "Well, I might be a blind, deaf, crippled guy, but hey, at least I'm alive."
database_id = HARDCORE_RANDOM_SCORE
+32 -14
View File
@@ -8,85 +8,103 @@
name = "Assistant Victory"
desc = "If you got killed instead of someone more important, you just flexed the true strength of your \"\"\"\"role\"\"\"\"."
database_id = MAFIA_MEDAL_ASSISTANT
icon = "assistant"
icon = "town"
/datum/award/achievement/mafia/detective
name = "Detective Victory"
desc = "If you did this with a Medical Doctor in the game, i'm not really that impressed."
database_id = MAFIA_MEDAL_DETECTIVE
icon = "detective"
icon = "town"
/datum/award/achievement/mafia/psychologist
name = "Psychologist Victory"
desc = "You learned how to not reveal someone random night one! Or... maybe you're just a lucky bastard."
database_id = MAFIA_MEDAL_PSYCHOLOGIST
icon = "psychologist"
icon = "town"
/datum/award/achievement/mafia/chaplain
name = "Chaplain Victory"
desc = "Useless... until the one night the thoughtfeeder confidently claims themselves as detective. Mafia's true bullshit detector."
database_id = MAFIA_MEDAL_CHAPLAIN
icon = "chaplain"
icon = "town"
/datum/award/achievement/mafia/md
name = "Medical Doctor Victory"
desc = "Congratulations on learning how to not talk!"
database_id = MAFIA_MEDAL_MD
icon = "md"
icon = "town"
/datum/award/achievement/mafia/officer
name = "Security Officer Victory"
desc = "Don't worry, you can win this if you're dead! You... did use your ability to become dead, right?"
database_id = MAFIA_MEDAL_OFFICER
icon = "town"
/datum/award/achievement/mafia/lawyer
name = "Lawyer Victory"
desc = "Oh don't mind me, i'm just the worst rol- Oops, I just instantly ended the game."
database_id = MAFIA_MEDAL_LAWYER
icon = "lawyer"
icon = "town"
/datum/award/achievement/mafia/hop
name = "Head of Personnel Victory"
desc = "King of Assistants, waster of a single mafia's night, thrower of games."
database_id = MAFIA_MEDAL_HOP
icon = "hop"
icon = "town"
/datum/award/achievement/mafia/warden
name = "Warden Victory"
desc = "Make changelings think you're detective, go on lockdown, actual detective investigates you and dies. Cha cha real smooth!"
database_id = MAFIA_MEDAL_WARDEN
icon = "town"
/datum/award/achievement/mafia/hos
name = "Head of Security Victory"
desc = "Certified not shitcurity."
database_id = MAFIA_MEDAL_HOS
icon = "town"
/datum/award/achievement/mafia/changeling
name = "Changeling Victory"
desc = "I think the changelings are metacomming."
database_id = MAFIA_MEDAL_CHANGELING
icon = "changeling"
icon = "mafia"
/datum/award/achievement/mafia/thoughtfeeder
name = "Thoughtfeeder Victory"
desc = "Clown's best friend. And Obsessed. And fugitive? Whose side are you on?!"
database_id = MAFIA_MEDAL_THOUGHTFEEDER
icon = "thoughtfeeder"
icon = "mafia"
/datum/award/achievement/mafia/traitor
name = "Traitor Victory"
desc = "Guys, we still have two more changelings to ki-!! TRAITOR VICTORY !!"
database_id = MAFIA_MEDAL_TRAITOR
icon = "traitor"
icon = "neutral"
/datum/award/achievement/mafia/nightmare
name = "Nightmare Victory"
desc = "DID YOUR LIGHT FLICKER?!"
database_id = MAFIA_MEDAL_NIGHTMARE
icon = "nightmare"
icon = "neutral"
/datum/award/achievement/mafia/fugitive
name = "Fugitive Victory"
desc = "I'm just the description on an achievement, but if you end up having to choose between town and changelings, go changelings."
database_id = MAFIA_MEDAL_FUGITIVE
icon = "fugitive"
icon = "neutral"
/datum/award/achievement/mafia/obsessed
name = "Obsessed Victory"
desc = "You got your target lynched, so instead of being spiteful and annoying, you're just smug and annoying."
database_id = MAFIA_MEDAL_OBSESSED
icon = "obsessed"
icon = "neutral"
/datum/award/achievement/mafia/clown
name = "Clown Victory"
desc = "Did you know this works on traitors, despite their immunity? If you hit the jackpot and manage to kill one, they'll salt into the next dimension. Clown tips!"
database_id = MAFIA_MEDAL_CLOWN
icon = "clown"
icon = "neutral"
///ALL THE ACHIEVEMENTS FOR MISC MAFIA ODDITIES///
@@ -144,7 +144,7 @@
/datum/award/achievement/misc/void_ascension
name = "All that perish"
desc = "Place of a diffrent being, diffrent time. Everything ends there... but maybe it is just the beginning?"
desc = "Place of a different being, different time. Everything ends there... but maybe it is just the beginning?"
database_id = MEDAL_VOID_ASCENSION
icon = "voidascend"
@@ -153,3 +153,9 @@
desc = "My eternal soul was destroyed to make a toolbox look funny and all I got was this achievement..."
database_id = MEDAL_TOOLBOX_SOUL
icon = "toolbox_soul"
/datum/award/achievement/misc/chemistry_tut
name = "Perfect chemistry blossom"
desc = "Passed the chemistry tutorial with perfect purity!"
database_id = MEDAL_CHEM_TUT
icon = "chem_tut"
+11
View File
@@ -0,0 +1,11 @@
///How many times did we survive being a cripple?
/datum/award/score/hardcore_random
name = "Hardcore random points"
desc = "Well, I might be a blind, deaf, crippled guy, but hey, at least I'm alive."
database_id = HARDCORE_RANDOM_SCORE
///How many maintenance pills did you eat?
/datum/award/score/maintenance_pill
name = "Maintenance Pills Consumed"
desc = "Wait why?"
database_id = MAINTENANCE_PILL_SCORE