Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/game/gamemodes/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
17 changes: 14 additions & 3 deletions code/game/gamemodes/objective_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -121,11 +122,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_special_completion()
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 objective.get_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
Expand Down