/
steal_items.dm
201 lines (169 loc) · 7.2 KB
/
steal_items.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
// Theft objectives.
//
// Separated into datums so we can prevent roles from getting certain objectives.
#define THEFT_FLAG_SPECIAL 1//unused, maybe someone will use it some day, I'll leave it here for the children
#define THEFT_FLAG_UNIQUE 2
/datum/theft_objective
var/name = "this objective is impossible, yell at a coder"
var/typepath=/obj/effect/debugging
var/list/protected_jobs = list()
var/list/altitems = list()
var/flags = 0
var/location_override
/// Do we have a special item we give to somewhen when they get this objective?
var/special_equipment = null
/// If a steal objective has forbidden jobs, and the forbidden jobs would not be in the possession of this item, set this to false
var/job_possession = TRUE
/datum/theft_objective/proc/check_completion(datum/mind/owner)
if(!owner.current)
return 0
if(!isliving(owner.current))
return 0
var/list/all_items = owner.current.get_contents()
for(var/obj/I in all_items) //Check for items
if(istype(I, typepath) && check_special_completion(I))
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/gun/energy/laser/captain
protected_jobs = list("Captain")
location_override = "the Captain's Office"
/datum/theft_objective/captains_jetpack
name = "the captain's deluxe jetpack"
typepath = /obj/item/tank/jetpack/oxygen/captain
protected_jobs = list("Captain")
location_override = "the Captain's Office"
/datum/theft_objective/captains_rapier
name = "the captain's rapier"
typepath = /obj/item/melee/rapier
protected_jobs = list("Captain")
location_override = "the Captain's Office"
/datum/theft_objective/hoslaser
name = "the head of security's X-01 multiphase energy gun"
typepath = /obj/item/gun/energy/gun/hos
protected_jobs = list("Head Of Security")
location_override = "the Head of Security's Office"
/datum/theft_objective/hand_tele
name = "a hand teleporter"
typepath = /obj/item/hand_tele
protected_jobs = list("Captain", "Research Director", "Chief Engineer")
location_override = "Teleporter"
/datum/theft_objective/ai
name = "a functional AI"
typepath = /obj/item/aicard
location_override = "AI Satellite. An intellicard for transportation can be found in Tech Storage, Science Department or manufactured"
/datum/theft_objective/ai/check_special_completion(obj/item/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 = "the chief medical officer's advanced compact defibrillator"
typepath = /obj/item/defibrillator/compact/advanced
protected_jobs = list("Chief Medical Officer", "Paramedic")
location_override = "the Chief Medical Officer's Office"
/datum/theft_objective/magboots
name = "the chief engineer's advanced magnetic boots"
typepath = /obj/item/clothing/shoes/magboots/advance
protected_jobs = list("Chief Engineer")
location_override = "the Chief Engineer's Office"
/datum/theft_objective/blueprints
name = "the station blueprints"
typepath = /obj/item/areaeditor/blueprints/ce
protected_jobs = list("Chief Engineer")
altitems = list(/obj/item/photo)
location_override = "the Chief Engineer's Office"
/datum/objective_item/steal/blueprints/check_special_completion(obj/item/I)
if(istype(I, /obj/item/areaeditor/blueprints/ce))
return 1
if(istype(I, /obj/item/photo))
var/obj/item/photo/P = I
if(P.blueprints)
return 1
return 0
/datum/theft_objective/capmedal
name = "the medal of captaincy"
typepath = /obj/item/clothing/accessory/medal/gold/captain
protected_jobs = list("Captain")
location_override = "the Captain's Office"
/datum/theft_objective/nukedisc
name = "the nuclear authentication disk"
typepath = /obj/item/disk/nuclear
protected_jobs = list("Captain")
location_override = "the Captain's Office"
/datum/theft_objective/reactive
name = "any type of reactive armor"
typepath = /obj/item/clothing/suit/armor/reactive
protected_jobs = list("Research Director", "Scientist", "Roboticist") //no one with protolathe access, who will often be handed a core
location_override = "the Research Director's Office"
/datum/theft_objective/steal/documents
name = "any set of secret documents of any organization"
typepath = /obj/item/documents //Any set of secret documents. Doesn't have to be NT's
location_override = "the Vault"
/datum/theft_objective/hypospray
name = "the Chief Medical Officer's hypospray"
typepath = /obj/item/reagent_containers/hypospray/CMO
protected_jobs = list("Chief Medical Officer")
location_override = "the Chief Medical Officer's Office"
/datum/theft_objective/ablative
name = "an ablative armor vest"
typepath = /obj/item/clothing/suit/armor/laserproof
protected_jobs = list("Head of Security", "Warden")
location_override = "the Armory"
/datum/theft_objective/krav
name = "the warden's krav maga martial arts gloves"
typepath = /obj/item/clothing/gloves/color/black/krav_maga/sec
protected_jobs = list("Head Of Security", "Warden")
location_override = "the Warden's Office"
/datum/theft_objective/supermatter_sliver
name = "a supermatter sliver"
typepath = /obj/item/nuke_core/supermatter_sliver
protected_jobs = list("Chief Engineer", "Station Engineer", "Life Support Specialist") //Unlike other steal objectives, all jobs in the department have easy access, and would not be noticed at all stealing this
location_override = "Engineering. You can use the box and instructions provided to harvest the sliver"
special_equipment = /obj/item/storage/box/syndie_kit/supermatter
job_possession = FALSE //The CE / engineers / atmos techs do not carry around supermater slivers.
/datum/theft_objective/plutonium_core
name = "the plutonium core from the stations nuclear device"
typepath = /obj/item/nuke_core/plutonium
location_override = "the Vault. You can use the box and instructions provided to remove the core, with some extra tools"
special_equipment = /obj/item/storage/box/syndie_kit/nuke
/datum/theft_objective/number
var/min=0
var/max=0
var/step=1
var/required_amount=0
/datum/theft_objective/number/New()
if(min==max)
required_amount=min
else
var/lower=min/step
var/upper=min/step
required_amount=rand(lower,upper)*step
name = "[required_amount] [name]"
/datum/theft_objective/number/check_completion(datum/mind/owner)
if(!owner.current)
return 0
if(!isliving(owner.current))
return 0
var/list/all_items = owner.current.get_contents()
var/found_amount=0.0
for(var/obj/item/I in all_items)
if(istype(I, typepath))
found_amount += getAmountStolen(I)
return found_amount >= required_amount
/datum/theft_objective/number/proc/getAmountStolen(obj/item/I)
return I:amount
/datum/theft_objective/unique
flags = THEFT_FLAG_UNIQUE
/datum/theft_objective/unique/docs_red
name = "the \"Red\" secret documents"
typepath = /obj/item/documents/syndicate/red
location_override = "a Syndicate agent's possession"
/datum/theft_objective/unique/docs_blue
name = "the \"Blue\" secret documents"
typepath = /obj/item/documents/syndicate/blue
location_override = "a Syndicate agent's possession"