From 1e6761b23b6a0af201e69fcd60e6f09c3703e581 Mon Sep 17 00:00:00 2001 From: Nichlas Pihl Date: Thu, 7 Nov 2019 13:46:31 +0000 Subject: [PATCH 1/4] Plasma tank objective now checks for 28 moles across all tanks, not 28 moles in one tank --- code/game/gamemodes/objective_items.dm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index cb38156f02be..62fc11eb68d2 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -121,11 +121,21 @@ difficulty = 3 excludefromjob = list("Chief Engineer","Research Director","Station Engineer","Scientist","Atmospheric Technician") -/datum/objective_item/steal/plasma/check_special_completion(obj/item/tank/T) +/datum/objective_item/steal/plasma/check_completion() //So special that not even check_special_completion is good enough for it var/target_amount = text2num(name) var/found_amount = 0 - found_amount += T.air_contents.gases[/datum/gas/plasma] ? T.air_contents.gases[/datum/gas/plasma][MOLES] : 0 - return found_amount>=target_amount + for(var/datum/mind/M in owners) + if(!isliving(M.current)) + continue + + var/list/all_items = M.current.GetAllContents() + for(var/o in all_items) + if(!istype(o, /obj/item/tank)) + continue + var/obj/item/tank/T = o + found_amount += T.air_contents.gases[/datum/gas/plasma] ? T.air_contents.gases[/datum/gas/plasma][MOLES] : 0 + + return found_amount >= target_amount /datum/objective_item/steal/functionalai From c54b3a7e400ce47aedff181b4105ae69c6d4612c Mon Sep 17 00:00:00 2001 From: alexkar598 <25136265+alexkar598@users.noreply.github.com> Date: Sat, 9 Nov 2019 17:45:41 -0500 Subject: [PATCH 2/4] Update code/game/gamemodes/objective_items.dm --- code/game/gamemodes/objective_items.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index 62fc11eb68d2..ee42762ae9bc 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -124,7 +124,7 @@ /datum/objective_item/steal/plasma/check_completion() //So special that not even check_special_completion is good enough for it var/target_amount = text2num(name) var/found_amount = 0 - for(var/datum/mind/M in owners) + for(var/datum/mind/M in get_owners()) if(!isliving(M.current)) continue From 7aedcac4856404d74b0f37d621dd8602f6d41ff3 Mon Sep 17 00:00:00 2001 From: Ashleigh Carr Date: Mon, 11 Nov 2019 10:09:17 +0000 Subject: [PATCH 3/4] maybe make sure it works before you push next time, moron --- code/game/gamemodes/objective.dm | 1 + code/game/gamemodes/objective_items.dm | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 1580ffa81939..28c11b7f1016 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -504,6 +504,7 @@ GLOBAL_LIST_EMPTY(possible_items) /datum/objective/steal/proc/set_target(datum/objective_item/item) if(item) targetinfo = item + targetinfo.objective = src steal_target = targetinfo.targetitem explanation_text = "Steal [targetinfo.name]" give_special_equipment(targetinfo.special_equipment) diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index ee42762ae9bc..63841a65c899 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -7,6 +7,7 @@ var/list/excludefromjob = list() //If you don't want a job to get a certain objective (no captain stealing his own medal, etcetc) var/list/altitems = list() //Items which can serve as an alternative to the objective (darn you blueprints) var/list/special_equipment = list() + var/datum/objective/steal/objective //The objective datum for our objective /datum/objective_item/proc/check_special_completion() //for objectives with special checks (is that slime extract unused? does that intellicard have an ai in it? etcetc) return 1 @@ -121,10 +122,10 @@ difficulty = 3 excludefromjob = list("Chief Engineer","Research Director","Station Engineer","Scientist","Atmospheric Technician") -/datum/objective_item/steal/plasma/check_completion() //So special that not even check_special_completion is good enough for it +/datum/objective_item/steal/plasma/check_special_completion() //So special that not even check_special_completion is good enough for it var/target_amount = text2num(name) var/found_amount = 0 - for(var/datum/mind/M in get_owners()) + for(var/datum/mind/M in objective.get_owners()) if(!isliving(M.current)) continue From 620164b7b88ff81125ef89c2b1ef6aa018dcbac7 Mon Sep 17 00:00:00 2001 From: Nichlas Pihl Date: Mon, 11 Nov 2019 10:13:34 +0000 Subject: [PATCH 4/4] Update objective_items.dm --- code/game/gamemodes/objective_items.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index 63841a65c899..1add8d84538e 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -122,7 +122,7 @@ difficulty = 3 excludefromjob = list("Chief Engineer","Research Director","Station Engineer","Scientist","Atmospheric Technician") -/datum/objective_item/steal/plasma/check_special_completion() //So special that not even check_special_completion is good enough for it +/datum/objective_item/steal/plasma/check_special_completion() var/target_amount = text2num(name) var/found_amount = 0 for(var/datum/mind/M in objective.get_owners())