From 1430eb11f125391e6fed48fc686cea6e4e7c9802 Mon Sep 17 00:00:00 2001 From: DZD Date: Fri, 30 Jan 2015 21:26:15 -0500 Subject: [PATCH 1/7] Theft Objective Tweaking - AI stealing objective actually requires an AI inside the intellicard now. - RD and xenobiologists no longer get the slime extract objective. - HoS and Warden can no longer get ablative vest objective. - HoP can no longer get corgi meat objective. - CE, RD, Scientists, Engineers, and Life Support Specialists can no longer get plasma objective. - Slime extract objective requires that slime extract be unused. - Renames "nuclear gun" objective to "advanced energy gun" to clear up some confusion. --- code/game/gamemodes/objective.dm | 2 +- code/game/gamemodes/steal_items.dm | 26 +++++++++++++++++++++++--- nano/debug.html | 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index abdb1832d6f..ddaf95b8ffb 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -743,7 +743,7 @@ datum/objective/minimize_casualties check_completion() if(owner.kills.len>5) return 0 return 1 - + //Vox heist objectives. datum/objective/heist diff --git a/code/game/gamemodes/steal_items.dm b/code/game/gamemodes/steal_items.dm index 5a92a88c673..dccaabeff59 100644 --- a/code/game/gamemodes/steal_items.dm +++ b/code/game/gamemodes/steal_items.dm @@ -17,13 +17,16 @@ return 0 var/list/all_items = owner.current.get_contents() for(var/obj/I in all_items) //Check for items - if(istype(I, typepath)) + if(istype(I, typepath) && check_special_completion(I)) //Stealing the cheap autoinjector doesn't count if(istype(I, /obj/item/weapon/reagent_containers/hypospray/autoinjector)) continue return 1 return 0 +/datum/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 + /datum/theft_objective/antique_laser_gun name = "the captain's antique laser gun" typepath = /obj/item/weapon/gun/energy/laser/captain @@ -52,6 +55,13 @@ name = "a functional AI" typepath = /obj/item/device/aicard +datum/theft_objective/ai/check_special_completion(var/obj/item/device/aicard/C) + if(..()) + for(var/mob/living/silicon/ai/A in C) + if(istype(A, /mob/living/silicon/ai) && A.stat != 2) //See if any AI's are alive inside that card. + return 1 + return 0 + /datum/theft_objective/defib name = "a defibrillator" typepath = /obj/item/weapon/defibrillator @@ -73,12 +83,20 @@ protected_jobs = list("Research Director") /datum/theft_objective/slime_extract - name = "a sample of slime extract" + name = "a sample of unused slime extract" typepath = /obj/item/slime_extract + protected_jobs = list("Research Director","Xenobiologist") + +/datum/theft_objective/slime_extract/check_special_completion(var/obj/item/slime_extract/E) + if(..()) + if(E.Uses > 0) + return 1 + return 0 /datum/theft_objective/corgi name = "a piece of corgi meat" typepath = /obj/item/weapon/reagent_containers/food/snacks/meat/corgi + protected_jobs = list("Head of Personnel") /datum/theft_objective/capmedal name = "the medal of captaincy" @@ -133,6 +151,7 @@ /datum/theft_objective name = "an ablative armor vest" typepath = /obj/item/clothing/suit/armor/laserproof + protected_jobs = list("Head of Security", "Warden") /datum/theft_objective/number var/min=0 @@ -170,6 +189,7 @@ typepath = /obj/item/weapon/tank min=28 max=28 + protected_jobs = list("Chief Engineer", "Engineer", "Scientist", "Research Director", "Life Support Specialist") /datum/theft_objective/number/plasma_gas/getAmountStolen(var/obj/item/I) return I:air_contents:toxins @@ -201,7 +221,7 @@ flags = THEFT_FLAG_SPECIAL /datum/theft_objective/special/nuke_gun - name = "nuclear gun" + name = "advanced energy gun" typepath = /obj/item/weapon/gun/energy/gun/nuclear /datum/theft_objective/special/diamond_drill diff --git a/nano/debug.html b/nano/debug.html index 969956bacb2..b0938554f34 100644 --- a/nano/debug.html +++ b/nano/debug.html @@ -16,7 +16,7 @@ - +