From 3d4d2d702426e36b973aac417deb3cd27598a3f3 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Mon, 4 Sep 2017 22:04:52 -0400 Subject: [PATCH] Adjustments, adds a basic objective for roboticists --- code/citadel/cit_crewobjectives.dm | 56 ++++++++++++++++++++++++++-- code/citadel/cit_miscreants.dm | 2 +- code/controllers/subsystem/ticker.dm | 4 +- 3 files changed, 55 insertions(+), 7 deletions(-) diff --git a/code/citadel/cit_crewobjectives.dm b/code/citadel/cit_crewobjectives.dm index 7ca624f683..76ab337891 100644 --- a/code/citadel/cit_crewobjectives.dm +++ b/code/citadel/cit_crewobjectives.dm @@ -65,7 +65,7 @@ /datum/objective/crew/headofsecurity/justicecrew/check_completion() if(owner.current) for(var/datum/mind/M in SSticker.minds) - if(M.current && isliving(owner)) + if(M.current && isliving(M.current)) if(!M.special_role && !M.assigned_role == "Security Officer" && !M.assigned_role == "Detective" && !M.assigned_role == "Head of Security" && !M.assigned_role == "Lawyer" && get_area(M.current) != typesof(/area/security)) return 0 return 1 @@ -78,7 +78,7 @@ /datum/objective/crew/securityofficer/justicecrew/check_completion() if(owner.current) for(var/datum/mind/M in SSticker.minds) - if(M.current && isliving(owner)) + if(M.current && isliving(M.current)) if(!M.special_role && !M.assigned_role == "Security Officer" && !M.assigned_role == "Detective" && !M.assigned_role == "Head of Security" && !M.assigned_role == "Lawyer" && get_area(M.current) != typesof(/area/security)) return 0 return 1 @@ -91,7 +91,7 @@ /datum/objective/crew/detective/justicecrew/check_completion() if(owner.current) for(var/datum/mind/M in SSticker.minds) - if(M.current && isliving(owner)) + if(M.current && isliving(M.current)) if(!M.special_role && !M.assigned_role == "Security Officer" && !M.assigned_role == "Detective" && !M.assigned_role == "Head of Security" && !M.assigned_role == "Lawyer" && get_area(M.current) != typesof(/area/security)) return 0 return 1 @@ -104,7 +104,55 @@ /datum/objective/crew/lawyer/justicecrew/check_completion() if(owner.current) for(var/datum/mind/M in SSticker.minds) - if(M.current && isliving(owner)) + if(M.current && isliving(M.current)) if(!M.special_role && !M.assigned_role == "Security Officer" && !M.assigned_role == "Detective" && !M.assigned_role == "Head of Security" && !M.assigned_role == "Lawyer" && get_area(M.current) != typesof(/area/security)) return 0 return 1 + +/* SCIENCE OBJECTIVES */ + +/datum/objective/crew/researchdirector/ + +/datum/objective/crew/researchdirector/cyborgs + explanation_text = "Ensure there are at least (Yo something broke here, yell on citadel's codebus discussion channel about this) functioning cyborgs when the shift ends." + +/datum/objective/crew/researchdirector/cyborgs/New() + target_amount = rand(3,20) + update_explanation_text() + +/datum/objective/crew/researchdirector/cyborgs/update_explanation_text() + . = ..() + explanation_text = "Ensure there are at least [target_amount] functioning cyborgs when the shift ends." + +/datum/objective/crew/researchdirector/cyborgs/check_completion() + var/borgcount = target_amount + for(var/mob/living/silicon/robot/R in GLOB.living_mob_list) + if(!R.stat == DEAD) + borgcount-- + if(borgcount <= 0) + return 1 + else + return 0 + +/datum/objective/crew/roboticist/ + +/datum/objective/crew/roboticist/cyborgs + explanation_text = "Ensure there are at least (Yo something broke here, yell on citadel's codebus discussion channel about this) functioning cyborgs when the shift ends." + +/datum/objective/crew/roboticist/cyborgs/New() + target_amount = rand(3,20) + update_explanation_text() + +/datum/objective/crew/roboticist/cyborgs/update_explanation_text() + . = ..() + explanation_text = "Ensure there are at least [target_amount] functioning cyborgs when the shift ends." + +/datum/objective/crew/roboticist/cyborgs/check_completion() + var/borgcount = target_amount + for(var/mob/living/silicon/robot/R in GLOB.living_mob_list) + if(!R.stat == DEAD) + borgcount-- + if(borgcount <= 0) + return 1 + else + return 0 diff --git a/code/citadel/cit_miscreants.dm b/code/citadel/cit_miscreants.dm index 621b7701dc..d362f74251 100644 --- a/code/citadel/cit_miscreants.dm +++ b/code/citadel/cit_miscreants.dm @@ -18,7 +18,7 @@ crewMind.objectives += newObjective crewMind.special_role = "miscreant" to_chat(crewMind, "You are a Miscreant.") - to_chat(crewMind, "Pursuing your objective is purely optional, but it is not tracked. You may not commit any traitorous acts not directly related to them.") + to_chat(crewMind, "Pursuing your objective is entirely optional, but it isn't tracked. Performing traitorous acts not directly related to your objective may result in permanent termination of your employment.") crewMind.announce_objectives() /datum/objective/miscreant diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index d288a7fe58..dfe55379f1 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -595,10 +595,10 @@ SUBSYSTEM_DEF(ticker) miscreants += "[crewMind.current.real_name] (Played by: [crewMind.key]). Objective: [MO.explanation_text]" for(var/datum/objective/crew/CO in crewMind.objectives) if(CO.check_completion()) - to_chat(crewMind.current, "
Objective: [CO.explanation_text] Success!") + to_chat(crewMind.current, "
Your objective: [CO.explanation_text] Success!") successfulCrew += "[crewMind.current.real_name] (Played by: [crewMind.key]). Objective: [CO.explanation_text]" else - to_chat(crewMind.current, "
Objective: [CO.explanation_text] Failed.") + to_chat(crewMind.current, "
Your objective: [CO.explanation_text] Failed.") if (successfulCrew.len) to_chat(world, "The following crew members completed their Crew Objectives:")