Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enables Syndicate Paparazzi #6966

Merged
merged 2 commits into from
Apr 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions code/game/gamemodes/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 14 additions & 3 deletions code/game/gamemodes/steal_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is even used anymore. Should look into this more, but if it's not, then the safety checks from this should probably be moved to /datum/objective/steal/check_completion and this proc removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment still remains @SamHPurp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Fox-McCloud will review in the morning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Fox-McCloud this is still used, for checking credits for a 'money theft' objective... which I've never seen actually utilised.

Want me to leave it? Or rip out the whole money-theft thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this is also used to determine the fullness of a Plasma tank for the Plasma objective.

Might be worth leaving it, unless you have a better suggestion?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, you can steal money? Why is that not an objective? That would be great to steal credits from other peoples accounts

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REEEeeeeeEEEeeEEEEe.

Objective code. This can just be refactored later, I guess.

if(!owner.current)
Expand Down Expand Up @@ -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"
Expand Down
11 changes: 10 additions & 1 deletion code/modules/paperwork/photography.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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

Expand Down