[MIRROR] Disentangles Command Reports from Metagame (#5294)
* Disentangles Command Reports from Metagame (#35192) * False report fix * Less Accurate Command Report * Disentangles Command Reports from Metagame
This commit is contained in:
committed by
Poojawa
parent
2d9f549af3
commit
60292af57f
@@ -187,7 +187,7 @@
|
||||
mode_names[M.config_tag] = M.name
|
||||
probabilities[M.config_tag] = M.probability
|
||||
mode_reports[M.config_tag] = M.generate_report()
|
||||
if(M.probability)
|
||||
if(probabilities[M.config_tag]>0)
|
||||
mode_false_report_weight[M.config_tag] = M.false_report_weight
|
||||
else
|
||||
mode_false_report_weight[M.config_tag] = 1
|
||||
|
||||
@@ -256,11 +256,15 @@
|
||||
var/list/report_weights = config.mode_false_report_weight.Copy()
|
||||
report_weights[config_tag] = 0 //Prevent the current mode from being falsely selected.
|
||||
var/list/reports = list()
|
||||
for(var/i in 1 to rand(3,5)) //Between three and five wrong entries on the list.
|
||||
var/Count = 0 //To compensate for missing correct report
|
||||
if(prob(65)) // 65% chance the actual mode will appear on the list
|
||||
reports += config.mode_reports[config_tag]
|
||||
Count++
|
||||
for(var/i in Count to rand(3,5)) //Between three and five wrong entries on the list.
|
||||
var/false_report_type = pickweightAllowZero(report_weights)
|
||||
report_weights[false_report_type] = 0 //Make it so the same false report won't be selected twice
|
||||
reports += config.mode_reports[false_report_type]
|
||||
reports += config.mode_reports[config_tag]
|
||||
|
||||
reports = shuffle(reports) //Randomize the order, so the real one is at a random position.
|
||||
|
||||
for(var/report in reports)
|
||||
|
||||
Reference in New Issue
Block a user