Merge pull request #3984 from Citadel-Station-13/upstream-merge-32188

[MIRROR] JSON feedback
This commit is contained in:
LetterJay
2017-11-22 18:42:34 -06:00
committed by GitHub
107 changed files with 1337 additions and 875 deletions
+4 -4
View File
@@ -114,19 +114,19 @@
for(var/datum/objective/objective in team.objectives)
if(objective.check_completion())
text += "<br><B>Objective #[objective_count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.add_details("traitor_objective","[objective.type]|SUCCESS")
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "SUCCESS"))
else
text += "<br><B>Objective #[objective_count]</B>: [objective.explanation_text] <font color='red'>Fail.</font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.add_details("traitor_objective","[objective.type]|FAIL")
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "FAIL"))
if(!(istype(objective, /datum/objective/crew)))
win = FALSE
objective_count++
if(win)
text += "<br><font color='green'><B>The blood brothers were successful!</B></font>"
SSblackbox.add_details("brother_success","SUCCESS")
SSblackbox.record_feedback("tally", "brother_success", 1, "SUCCESS")
else
text += "<br><font color='red'><B>The blood brothers have failed!</B></font>"
SSblackbox.add_details("brother_success","FAIL")
SSblackbox.record_feedback("tally", "brother_success", 1, "FAIL")
text += "<br>"
to_chat(world, text)
+5 -5
View File
@@ -115,20 +115,20 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th
for(var/datum/objective/objective in changeling.objectives)
if(objective.check_completion())
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <font color='green'><b>Success!</b></font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.add_details("changeling_objective","[objective.type]|SUCCESS")
SSblackbox.record_feedback("nested tally", "changeling_objective", 1, list("[objective.type]", "SUCCESS"))
else
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <span class='danger'>Fail.</span> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.add_details("changeling_objective","[objective.type]|FAIL")
SSblackbox.record_feedback("nested tally", "changeling_objective", 1, list("[objective.type]", "FAIL"))
if(!(istype(objective, /datum/objective/crew)))
changelingwin = 0
count++
if(changelingwin)
text += "<br><font color='green'><b>The changeling was successful!</b></font>"
SSblackbox.add_details("changeling_success","SUCCESS")
SSblackbox.record_feedback("tally", "changeling_success", 1, "SUCCESS")
else
text += "<br><span class='boldannounce'>The changeling has failed.</span>"
SSblackbox.add_details("changeling_success","FAIL")
SSblackbox.record_feedback("tally", "changeling_success", 1, "FAIL")
text += "<br>"
to_chat(world, text)
@@ -174,4 +174,4 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th
if(equip)
user.equip_to_slot_or_del(C, GLOB.slot2slot[slot])
user.regenerate_icons()
user.regenerate_icons()
@@ -19,7 +19,7 @@
/obj/effect/proc_holder/changeling/proc/on_purchase(mob/user, is_respec)
if(!is_respec)
SSblackbox.add_details("changeling_power_purchase",name)
SSblackbox.record_feedback("tally", "changeling_power_purchase", 1, name)
/obj/effect/proc_holder/changeling/proc/on_refund(mob/user)
return
@@ -35,7 +35,7 @@
return
var/datum/antagonist/changeling/c = user.mind.has_antag_datum(/datum/antagonist/changeling)
if(sting_action(user, target))
SSblackbox.add_details("changeling_powers",name)
SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]"))
sting_feedback(user, target)
c.chem_charges -= chemical_cost
@@ -41,13 +41,13 @@
to_chat(target, "<span class='userdanger'>You feel a sharp stabbing pain!</span>")
target.take_overall_damage(40)
SSblackbox.add_details("changeling_powers","Absorb DNA|[i]")
SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("Absorb DNA", "[i]"))
if(!do_mob(user, target, 150))
to_chat(user, "<span class='warning'>Our absorption of [target] has been interrupted!</span>")
changeling.isabsorbing = 0
return
SSblackbox.add_details("changeling_powers","Absorb DNA|4")
SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("Absorb DNA", "4"))
user.visible_message("<span class='danger'>[user] sucks the fluids from [target]!</span>", "<span class='notice'>We have absorbed [target].</span>")
to_chat(target, "<span class='userdanger'>You are absorbed by the changeling!</span>")
@@ -57,7 +57,7 @@
to_chat(target, "<font color=#800040><span class='boldannounce'>You can now communicate in the changeling hivemind, say \":g message\" to communicate!</span>")
target.reagents.add_reagent("salbutamol", 40) // So they don't choke to death while you interrogate them
sleep(1800)
SSblackbox.add_details("changeling_powers","Hivemind Link|[i]")
SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]", "[i]"))
if(!do_mob(user, target, 20))
to_chat(user, "<span class='warning'>Our link with [target] has ended!</span>")
changeling.islinking = 0
@@ -66,7 +66,7 @@ Applications: 8 servants, 3 caches, and 100 CV
else
successful = TRUE
if(slab && !slab.no_cost && !GLOB.ratvar_awakens) //if the slab exists and isn't debug and ratvar isn't up, log the scripture as being used
SSblackbox.add_details("clockcult_scripture_recited", name)
SSblackbox.record_feedback("tally", "clockcult_scripture_recited", 1, name)
if(slab)
slab.busy = null
post_recital()
+10 -10
View File
@@ -237,27 +237,27 @@
if("survive")
if(!check_survive())
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. ([acolytes_survived] escaped) <span class='greenannounce'>Success!</span>"
SSblackbox.add_details("cult_objective","cult_survive|SUCCESS|[acolytes_needed]")
SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_survive", "SUCCESS"))
SSticker.news_report = CULT_ESCAPE
else
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. ([acolytes_survived] escaped) <span class='boldannounce'>Fail.</span>"
SSblackbox.add_details("cult_objective","cult_survive|FAIL|[acolytes_needed]")
SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_survive", "FAIL"))
SSticker.news_report = CULT_FAILURE
if("sacrifice")
if(GLOB.sac_complete)
explanation = "Sacrifice [GLOB.sac_mind], the [GLOB.sac_mind.assigned_role]. <span class='greenannounce'>Success!</span>"
SSblackbox.add_details("cult_objective","cult_sacrifice|SUCCESS")
SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_sacrifice", "SUCCESS"))
else
explanation = "Sacrifice [GLOB.sac_mind], the [GLOB.sac_mind.assigned_role]. <span class='boldannounce'>Fail.</span>"
SSblackbox.add_details("cult_objective","cult_sacrifice|FAIL")
SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_sacrifice", "FAIL"))
if("eldergod")
if(!eldergod)
explanation = "Summon Nar-Sie. The summoning can only be accomplished in [english_list(GLOB.summon_spots)].<span class='greenannounce'>Success!</span>"
SSblackbox.add_details("cult_objective","cult_narsie|SUCCESS")
SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_narsie", "SUCCESS"))
SSticker.news_report = CULT_SUMMON
else
explanation = "Summon Nar-Sie. The summoning can only be accomplished in [english_list(GLOB.summon_spots)]<span class='boldannounce'>Fail.</span>"
SSblackbox.add_details("cult_objective","cult_narsie|FAIL")
SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_narsie", "FAIL"))
SSticker.news_report = CULT_FAILURE
text += "<br><B>Objective #[obj_count]</B>: [explanation]"
@@ -297,18 +297,18 @@
if(GLOB.sac_mind)
if(GLOB.sac_complete)
explanation = "Sacrifice [GLOB.sac_mind], the [GLOB.sac_mind.assigned_role]. <span class='greenannounce'>Success!</span>"
SSblackbox.add_details("cult_objective","cult_sacrifice|SUCCESS")
SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_sacrifice", "SUCCESS"))
else
explanation = "Sacrifice [GLOB.sac_mind], the [GLOB.sac_mind.assigned_role]. <span class='boldannounce'>Fail.</span>"
SSblackbox.add_details("cult_objective","cult_sacrifice|FAIL")
SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_sacrifice", "FAIL"))
if("eldergod")
if(!eldergod)
explanation = "Summon Nar-Sie. <span class='greenannounce'>Success!</span>"
SSblackbox.add_details("cult_objective","cult_narsie|SUCCESS")
SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_narsie", "SUCCESS"))
SSticker.news_report = CULT_SUMMON
else
explanation = "Summon Nar-Sie. <span class='boldannounce'>Fail.</span>"
SSblackbox.add_details("cult_objective","cult_narsie|FAIL")
SSblackbox.record_feedback("nested tally", "cult_objective", 1, list("cult_narsie", "FAIL"))
SSticker.news_report = CULT_FAILURE
text += "<br><B>Objective #[obj_count]</B>: [explanation]"
to_chat(world, text)
+1 -1
View File
@@ -246,7 +246,7 @@ This file contains the arcane tome files.
var/obj/effect/rune/R = new rune_to_scribe(Turf, chosen_keyword)
R.add_mob_blood(user)
to_chat(user, "<span class='cult'>The [lowertext(R.cultist_name)] rune [R.cultist_desc]</span>")
SSblackbox.add_details("cult_runes_scribed", R.cultist_name)
SSblackbox.record_feedback("tally", "cult_runes_scribed", 1, R.cultist_name)
/obj/item/tome/proc/check_rune_turf(turf/T, mob/user)
if(isspaceturf(T))
+13 -12
View File
@@ -266,18 +266,19 @@
if(isobserver(M))
ghosts++
if(clients > 0)
SSblackbox.set_val("round_end_clients",clients)
if(ghosts > 0)
SSblackbox.set_val("round_end_ghosts",ghosts)
if(surviving_humans > 0)
SSblackbox.set_val("survived_human",surviving_humans)
if(surviving_total > 0)
SSblackbox.set_val("survived_total",surviving_total)
if(escaped_humans > 0)
SSblackbox.set_val("escaped_human",escaped_humans)
if(escaped_total > 0)
SSblackbox.set_val("escaped_total",escaped_total)
if(clients)
SSblackbox.record_feedback("nested tally", "round_end_stats", clients, list("clients"))
if(ghosts)
SSblackbox.record_feedback("nested tally", "round_end_stats", ghosts, list("ghosts"))
if(surviving_humans)
SSblackbox.record_feedback("nested tally", "round_end_stats", surviving_humans, list("survivors", "human"))
if(surviving_total)
SSblackbox.record_feedback("nested tally", "round_end_stats", surviving_total, list("survivors", "total"))
if(escaped_humans)
SSblackbox.record_feedback("nested tally", "round_end_stats", escaped_humans, list("escapees", "human"))
if(escaped_total)
SSblackbox.record_feedback("nested tally", "round_end_stats", escaped_total, list("escapees", "total"))
send2irc("Server", "Round just ended.")
if(cult.len && !istype(SSticker.mode, /datum/game_mode/cult))
datum_cult_completion()
@@ -59,7 +59,8 @@
U.hidden_uplink.telecrystals = CHALLENGE_TELECRYSTALS
U.hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
CONFIG_SET(number/shuttle_refuel_delay, max(CONFIG_GET(number/shuttle_refuel_delay), CHALLENGE_SHUTTLE_DELAY))
SSblackbox.set_val("nuclear_challenge_mode",1)
SSblackbox.record_feedback("amount", "nuclear_challenge_mode", 1)
qdel(src)
/obj/item/device/nuclear_challenge/proc/check_allowed(mob/living/user)
+4 -4
View File
@@ -115,10 +115,10 @@
for(var/datum/objective/objective in traitor.objectives)
if(objective.check_completion())
objectives += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.add_details("traitor_objective","[objective.type]|SUCCESS")
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "SUCCESS"))
else
objectives += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.add_details("traitor_objective","[objective.type]|FAIL")
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "FAIL"))
if(!(istype(objective, /datum/objective/crew)))
traitorwin = FALSE
count++
@@ -140,10 +140,10 @@
if(traitorwin)
text += "<br><font color='green'><B>The [special_role_text] was successful!</B></font>"
SSblackbox.add_details("traitor_success","SUCCESS")
SSblackbox.record_feedback("tally", "traitor_success", 1, "SUCCESS")
else
text += "<br><font color='red'><B>The [special_role_text] has failed!</B></font>"
SSblackbox.add_details("traitor_success","FAIL")
SSblackbox.record_feedback("tally", "traitor_success", 1, "FAIL")
SEND_SOUND(traitor.current, 'sound/ambience/ambifailure.ogg')
text += "<br>"
+7 -7
View File
@@ -57,10 +57,10 @@
aspell.name = "Instant [aspell.name]"
if(aspell.spell_level >= aspell.level_max)
to_chat(user, "<span class='notice'>This spell cannot be strengthened any further.</span>")
SSblackbox.add_details("wizard_spell_improved", "[name]|[aspell.level]")
SSblackbox.record_feedback("nested tally", "wizard_spell_improved", 1, list("[name]", "[aspell.level]"))
return 1
//No same spell found - just learn it
SSblackbox.add_details("wizard_spell_learned", name)
SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name)
user.mind.AddSpell(S)
to_chat(user, "<span class='notice'>You have learned [S.name].</span>")
return 1
@@ -265,7 +265,7 @@
/datum/spellbook_entry/item/Buy(mob/living/carbon/human/user,obj/item/spellbook/book)
new item_path(get_turf(user))
SSblackbox.add_details("wizard_spell_learned", name)
SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name)
return 1
/datum/spellbook_entry/item/GetInfo()
@@ -464,7 +464,7 @@
return TRUE
/datum/spellbook_entry/summon/ghosts/Buy(mob/living/carbon/human/user, obj/item/spellbook/book)
SSblackbox.add_details("wizard_spell_learned", name)
SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name)
new /datum/round_event/wizard/ghost()
active = TRUE
to_chat(user, "<span class='notice'>You have cast summon ghosts!</span>")
@@ -481,7 +481,7 @@
return !CONFIG_GET(flag/no_summon_guns)
/datum/spellbook_entry/summon/guns/Buy(mob/living/carbon/human/user,obj/item/spellbook/book)
SSblackbox.add_details("wizard_spell_learned", name)
SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name)
rightandwrong(0, user, 25)
active = 1
playsound(get_turf(user), 'sound/magic/castsummon.ogg', 50, 1)
@@ -498,7 +498,7 @@
return !CONFIG_GET(flag/no_summon_magic)
/datum/spellbook_entry/summon/magic/Buy(mob/living/carbon/human/user,obj/item/spellbook/book)
SSblackbox.add_details("wizard_spell_learned", name)
SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name)
rightandwrong(1, user, 25)
active = 1
playsound(get_turf(user), 'sound/magic/castsummon.ogg', 50, 1)
@@ -516,7 +516,7 @@
return !CONFIG_GET(flag/no_summon_events)
/datum/spellbook_entry/summon/events/Buy(mob/living/carbon/human/user,obj/item/spellbook/book)
SSblackbox.add_details("wizard_spell_learned", name)
SSblackbox.record_feedback("tally", "wizard_spell_learned", 1, name)
summonevents()
times++
playsound(get_turf(user), 'sound/magic/castsummon.ogg', 50, 1)
+4 -4
View File
@@ -91,20 +91,20 @@
for(var/datum/objective/objective in wizard.objectives)
if(objective.check_completion())
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.add_details("wizard_objective","[objective.type]|SUCCESS")
SSblackbox.record_feedback("nested tally", "wizard_objective", 1, list("[objective.type]", "SUCCESS"))
else
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.add_details("wizard_objective","[objective.type]|FAIL")
SSblackbox.record_feedback("nested tally", "wizard_objective", 1, list("[objective.type]", "FAIL"))
if(!(istype(objective, /datum/objective/crew)))
wizardwin = 0
count++
if(wizard.current && wizard.current.stat!=2 && wizardwin)
text += "<br><font color='green'><B>The wizard was successful!</B></font>"
SSblackbox.add_details("wizard_success","SUCCESS")
SSblackbox.record_feedback("tally", "wizard_success", 1, "SUCCESS")
else
text += "<br><font color='red'><B>The wizard has failed!</B></font>"
SSblackbox.add_details("wizard_success","FAIL")
SSblackbox.record_feedback("tally", "wizard_success", 1, "FAIL")
if(wizard.spell_list.len>0)
text += "<br><B>[wizard.name] used the following spells: </B>"
var/i = 1