Hallucination debugs (#8787)

This commit is contained in:
Doxxmedearly
2020-05-01 16:13:20 +02:00
committed by GitHub
parent 7a17616494
commit fedd4d7fea
3 changed files with 10 additions and 3 deletions
@@ -19,7 +19,7 @@
/datum/controller/subsystem/hallucinations/Initialize()
. = ..()
for(var/T in subtypesof(/datum/hallucination/))
for(var/T in subtypesof(/datum/hallucination))
all_hallucinations += T
hallucinated_phrases = file2list("code/modules/hallucinations/text_lists/hallucinated_phrases.txt")
hallucinated_actions = file2list("code/modules/hallucinations/text_lists/hallucinated_actions.txt") //important note when adding to this file: "you" will always be replaced by the hallucinator's name
+3 -2
View File
@@ -23,11 +23,12 @@
//Good/bad chems affecting duration
if(chem_effects[CE_HALLUCINATE] < 0)
hallucination -= abs(chem_effects[CE_HALLUCINATE])
hallucination = max(0, hallucination - abs(chem_effects[CE_HALLUCINATE]))
if(chem_effects[CE_HALLUCINATE] > 0 && prob(chem_effects[CE_HALLUCINATE]*20))
hallucination += chem_effects[CE_HALLUCINATE]
if(!hallucination) //We're done
if(hallucination <= 0) //We're done
hallucination = 0
return
if(!client || stat || world.time < next_hallucination)
return
@@ -0,0 +1,6 @@
author: Doxxmedearly
delete-after: True
changes:
- bugfix: "Fixed hallucination values going negative and causing massive debug logs."