mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
V8 Engine fixes (#71033)
The V8 engine now allows you to learn the recipe and will no longer runtime when it checks if you already know it.
This commit is contained in:
@@ -504,7 +504,7 @@
|
||||
/datum/mind/proc/has_crafting_recipe(mob/user, potential_recipe)
|
||||
if(!learned_recipes)
|
||||
return FALSE
|
||||
if(!istype(potential_recipe, /datum/crafting_recipe))
|
||||
if(!ispath(potential_recipe, /datum/crafting_recipe))
|
||||
CRASH("Non-crafting recipe passed to has_crafting_recipe")
|
||||
for(var/recipe in user.mind.learned_recipes)
|
||||
if(recipe == potential_recipe)
|
||||
|
||||
@@ -33,14 +33,13 @@
|
||||
INVOKE_ASYNC(src, .proc/start_learning_recipe, user)
|
||||
|
||||
/obj/item/v8_engine/proc/start_learning_recipe(mob/user)
|
||||
var/datum/crafting_recipe/house_edge/edge
|
||||
if(!user.mind)
|
||||
return
|
||||
if(user.mind.has_crafting_recipe(user = user, potential_recipe = edge))
|
||||
if(user.mind.has_crafting_recipe(user = user, potential_recipe = /datum/crafting_recipe/house_edge))
|
||||
return
|
||||
to_chat(user, span_notice("You peer at the label on the side, reading about some unique modifications that could be made to the engine..."))
|
||||
if(do_after(user, 15 SECONDS, src))
|
||||
user.mind.teach_crafting_recipe(edge)
|
||||
user.mind.teach_crafting_recipe(/datum/crafting_recipe/house_edge)
|
||||
to_chat(user, span_notice("You learned how to make the House Edge."))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user