From f8d149975ff0233209d2c7a72d15b7419d04b1ae Mon Sep 17 00:00:00 2001 From: deathride58 Date: Thu, 7 Sep 2017 15:43:17 -0400 Subject: [PATCH] engineering objectives, removes assistant petsplosion --- .../cit_crewobjectives_civilian.dm | 36 ++------------ .../cit_crewobjectives_engineering.dm | 47 +++++++++++++++++++ tgstation.dme | 1 + 3 files changed, 52 insertions(+), 32 deletions(-) create mode 100644 code/citadel/crew_objectives/cit_crewobjectives_engineering.dm diff --git a/code/citadel/crew_objectives/cit_crewobjectives_civilian.dm b/code/citadel/crew_objectives/cit_crewobjectives_civilian.dm index 188b825a3b..65bb949c37 100644 --- a/code/citadel/crew_objectives/cit_crewobjectives_civilian.dm +++ b/code/citadel/crew_objectives/cit_crewobjectives_civilian.dm @@ -87,14 +87,14 @@ /datum/objective/crew/janitor/clean/update_explanation_text() . = ..() - explanation_text = "Ensure that the " + explanation_text = "Ensure that the" for(var/i in 1 to areas.len) var/area/A = areas[i] - explanation_text += "[A]" + explanation_text += " [A]" if(i != areas.len && areas.len >= 3) - explanation_text += ", " + explanation_text += "," if(i == areas.len - 1) - explanation_text += "and " + explanation_text += "and" explanation_text += " [(areas.len ==1) ? "is completely" : "are [(areas.len == 2) ? "completely" : "all"]"] clean at the end of the shift." /datum/objective/crew/janitor/clean/check_completion() @@ -163,31 +163,3 @@ if(istype(H.w_uniform, targetuniform)) return 1 return 0 - -/datum/objective/crew/assistant/petsplosion - explanation_text = "Ensure there are at least (If you see this, yell on citadels discord in the development discussion channel) pets on the station by the end of the shift. Interpret this as you wish." - -/datum/objective/crew/assistant/petsplosion/New() - . = ..() - target_amount = rand(10,20) - update_explanation_text() - -/datum/objective/crew/assistant/petsplosion/update_explanation_text() - . = ..() - explanation_text = "Ensure there are at least [target_amount] pets on the station by the end of the shift. Interpret this as you wish." - -/datum/objective/crew/assistant/petsplosion/check_completion() - var/petcount = target_amount - for(var/mob/living/simple_animal/pet/P in GLOB.mob_list) - if(!P.stat == DEAD) - if(P.z == ZLEVEL_STATION || SSshuttle.emergency.shuttle_areas[get_area(P)]) - petcount-- - for(var/mob/living/carbon/human/H in GLOB.mob_list) - if(!H.stat == DEAD) - if(H.z == ZLEVEL_STATION || SSshuttle.emergency.shuttle_areas[get_area(H)]) - if(istype(H.wear_neck, /obj/item/clothing/neck/petcollar)) - petcount-- - if(petcount <= 0) - return 1 - else - return 0 diff --git a/code/citadel/crew_objectives/cit_crewobjectives_engineering.dm b/code/citadel/crew_objectives/cit_crewobjectives_engineering.dm new file mode 100644 index 0000000000..88eaa9e237 --- /dev/null +++ b/code/citadel/crew_objectives/cit_crewobjectives_engineering.dm @@ -0,0 +1,47 @@ +/* ENGINEERING OBJECTIVES */ + +/datum/objective/crew/chiefengineer + +/datum/objective/crew/chiefengineer/integrity //ported from old Hippie + explanation_text = "Ensure the station's integrity rating is at least (Yo something broke, yell on the development discussion channel of citadels discord about this)% when the shift ends." + +/datum/objective/crew/chiefengineer/integrity/New() + . = ..() + target_amount = rand(60,95) + update_explanation_text() + +/datum/objective/crew/chiefengineer/integrity/update_explanation_text() + . = ..() + explanation_text = "Ensure the station's integrity rating is at least [target_amount]% when the shift ends." + +/datum/objective/crew/chiefengineer/integrity/check_completion() + var/datum/station_state/end_state = new /datum/station_state() + end_state.count() + var/station_integrity = min(PERCENT(GLOB.start_state.score(end_state)), 100) + if(!SSticker.mode.station_was_nuked && station_integrity >= target_amount) + return 1 + else + return 0 + +/datum/objective/crew/stationengineer + +/datum/objective/crew/stationengineer/integrity + explanation_text = "Ensure the station's integrity rating is at least (Yo something broke, yell on the development discussion channel of citadels discord about this)% when the shift ends." + +/datum/objective/crew/stationengineer/integrity/New() + . = ..() + target_amount = rand(60,95) + update_explanation_text() + +/datum/objective/crew/stationengineer/integrity/update_explanation_text() + . = ..() + explanation_text = "Ensure the station's integrity rating is at least [target_amount]% when the shift ends." + +/datum/objective/crew/stationengineer/integrity/check_completion() + var/datum/station_state/end_state = new /datum/station_state() + end_state.count() + var/station_integrity = min(PERCENT(GLOB.start_state.score(end_state)), 100) + if(!SSticker.mode.station_was_nuked && station_integrity >= target_amount) + return 1 + else + return 0 diff --git a/tgstation.dme b/tgstation.dme index 3d44b7c398..da750b8b1d 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -178,6 +178,7 @@ #include "code\citadel\crew_objectives\cit_crewobjectives_cargo.dm" #include "code\citadel\crew_objectives\cit_crewobjectives_civilian.dm" #include "code\citadel\crew_objectives\cit_crewobjectives_command.dm" +#include "code\citadel\crew_objectives\cit_crewobjectives_engineering.dm" #include "code\citadel\crew_objectives\cit_crewobjectives_medical.dm" #include "code\citadel\crew_objectives\cit_crewobjectives_science.dm" #include "code\citadel\crew_objectives\cit_crewobjectives_security.dm"