Merge pull request #52435 from AnturK/notsosecret

Fixes secret sauce resetting too often and adds some logging.
This commit is contained in:
skoglol
2020-07-25 19:22:32 +02:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -348,10 +348,14 @@ SUBSYSTEM_DEF(persistence)
if(R.LoadOldRecipe(recipe_data) && (daysSince(R.created) <= R.persistence_period))
loaded = TRUE
if(!loaded) //We do not have information for whatever reason, just generate new one
if(R.persistent)
log_game("Resetting persistent [randomized_type] random recipe.")
R.GenerateRecipe()
if(!R.HasConflicts()) //Might want to try again if conflicts happened in the future.
add_chemical_reaction(R)
else
log_game("Randomized recipe [randomized_type] resulted in conflicting recipes.")
/datum/controller/subsystem/persistence/proc/SaveRandomizedRecipes()
var/json_file = file("data/RandomizedChemRecipes.json")

View File

@@ -54,7 +54,7 @@ GLOBAL_LIST_INIT(food_reagents, build_reagents_to_food()) //reagentid = related
var/list/possible_results = list()
/datum/chemical_reaction/randomized/proc/GenerateRecipe()
created = world.time
created = world.realtime
if(randomize_container)
required_container = pick(possible_containers)
if(randomize_req_temperature)