diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 6dabdcf49d6..e34174f2beb 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -384,8 +384,17 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) \ return steal_target /datum/objective/steal/check_completion() - if(!steal_target) return 1 // Free Objective - return steal_target.check_completion(owner) + if(!steal_target) + return 1 // Free Objective + + var/list/all_items = owner.current.GetAllContents() + + for(var/obj/I in all_items) + if(istype(I, steal_target.typepath)) + return steal_target.check_special_completion(I) + if(I.type in steal_target.altitems) + return steal_target.check_special_completion(I) + /datum/objective/steal/exchange martyr_compatible = 0 diff --git a/code/game/gamemodes/steal_items.dm b/code/game/gamemodes/steal_items.dm index fd3ad379fe0..92573fcc17e 100644 --- a/code/game/gamemodes/steal_items.dm +++ b/code/game/gamemodes/steal_items.dm @@ -6,10 +6,11 @@ #define THEFT_FLAG_UNIQUE 2 /datum/theft_objective - var/name="" + var/name = "" var/typepath=/atom - var/list/protected_jobs=list() - var/flags=0 + var/list/protected_jobs = list() + var/list/altitems = list() + var/flags = 0 /datum/theft_objective/proc/check_completion(var/datum/mind/owner) if(!owner.current) @@ -70,6 +71,16 @@ datum/theft_objective/ai/check_special_completion(var/obj/item/device/aicard/C) name = "the station blueprints" typepath = /obj/item/areaeditor/blueprints protected_jobs = list("Chief Engineer") + altitems = list(/obj/item/weapon/photo) + +/datum/objective_item/steal/blueprints/check_special_completion(obj/item/I) + if(istype(I, /obj/item/areaeditor/blueprints)) + return 1 + if(istype(I, /obj/item/weapon/photo)) + var/obj/item/weapon/photo/P = I + if(P.blueprints) + return 1 + return 0 /datum/theft_objective/voidsuit name = "a nasa voidsuit" diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index afca7fcd953..beef706d70a 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -30,6 +30,7 @@ w_class = 2 burn_state = FLAMMABLE burntime = 5 + var/blueprints = 0 // Does this have the blueprints? var/icon/img //Big photo image var/scribble //Scribble on the back. var/icon/tiny @@ -151,6 +152,7 @@ var/pictures_max = 10 var/pictures_left = 10 var/on = 1 + var/blueprints = 0 var/icon_on = "camera" var/icon_off = "camera_off" var/size = 3 @@ -253,6 +255,8 @@ var/list/SpookyGhosts = list("ghost","shade","shade2","ghost-narsie","horror","s var/atom/A = sorted[i] if(A) var/icon/img = getFlatIcon(A)//build_composite_icon(A) + if(istype(A, /obj/item/areaeditor/blueprints)) + blueprints = 1 // If what we got back is actually a picture, draw it. if(istype(img, /icon)) @@ -351,7 +355,7 @@ var/list/SpookyGhosts = list("ghost","shade","shade2","ghost-narsie","horror","s y_c-- x_c = x_c - size - var/datum/picture/P = createpicture(target, user, turfs, mobs, flag) + var/datum/picture/P = createpicture(target, user, turfs, mobs, flag, blueprints) printpicture(user, P) /obj/item/device/camera/proc/createpicture(atom/target, mob/user, list/turfs, mobs, flag) @@ -388,6 +392,10 @@ var/list/SpookyGhosts = list("ghost","shade","shade2","ghost-narsie","horror","s Photo.loc = user.loc if(!user.get_inactive_hand()) user.put_in_inactive_hand(Photo) + + if(blueprints) + Photo.blueprints = 1 + blueprints = 0 Photo.construct(P) /obj/item/weapon/photo/proc/construct(var/datum/picture/P) @@ -409,6 +417,7 @@ var/list/SpookyGhosts = list("ghost","shade","shade2","ghost-narsie","horror","s p.name = name p.desc = desc p.scribble = scribble + p.blueprints = blueprints return p