From e81d692b8c88286f0cbe304e8db6af40653faaf1 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Thu, 28 Sep 2017 20:30:53 -0400 Subject: [PATCH] adds research objective for scientists --- .../cit_crewobjectives_science.dm | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/code/citadel/crew_objectives/cit_crewobjectives_science.dm b/code/citadel/crew_objectives/cit_crewobjectives_science.dm index 552414746f..d028a453bc 100644 --- a/code/citadel/crew_objectives/cit_crewobjectives_science.dm +++ b/code/citadel/crew_objectives/cit_crewobjectives_science.dm @@ -24,6 +24,48 @@ else return FALSE +/datum/objective/crew/researchdirector/research //inspired by old hippie's research level objective. should hopefully be compatible with techwebs when that gets finished. hopefully. should be easy to update in the event that it is incompatible with techwebs. + var/datum/design/targetdesign + explanation_text = "Make sure the research required to produce a (something broke, yell on citadel's development discussion channel about this) is available on the R&D server by the end of the shift." + +/datum/objective/crew/researchdirector/research/New() + . = ..() + targetdesign = pick(subtypesof(/datum/design)) + update_explanation_text() + +/datum/objective/crew/researchdirector/research/update_explanation_text() + . = ..() + explanation_text = "Make sure the research required to produce a [initial(targetdesign.name)] is available on the R&D server by the end of the shift." + +/datum/objective/crew/researchdirector/research/check_completion() + for(var/obj/machinery/r_n_d/server/S in GLOB.machines) + if(S && S.files && S.files.known_designs) + if(targetdesign in S.files.known_designs) + return TRUE + return FALSE + +/datum/objective/crew/scientist/ + +/datum/objective/crew/scientist/research //inspired by old hippie's research level objective. should hopefully be compatible with techwebs when that gets finished. hopefully. should be easy to update in the event that it is incompatible with techwebs. + var/datum/design/targetdesign + explanation_text = "Make sure the research required to produce a (something broke, yell on citadel's development discussion channel about this) is available on the R&D server by the end of the shift." + +/datum/objective/crew/scientist/research/New() + . = ..() + targetdesign = pick(subtypesof(/datum/design)) + update_explanation_text() + +/datum/objective/crew/scientist/research/update_explanation_text() + . = ..() + explanation_text = "Make sure the research required to produce a [initial(targetdesign.name)] is available on the R&D server by the end of the shift." + +/datum/objective/crew/scientist/research/check_completion() + for(var/obj/machinery/r_n_d/server/S in GLOB.machines) + if(S && S.files && S.files.known_designs) + if(targetdesign in S.files.known_designs) + return TRUE + return FALSE + /datum/objective/crew/roboticist/ /datum/objective/crew/roboticist/cyborgs //Ported from old Hippie