Skip to content

Commit

Permalink
Fix objective runtime
Browse files Browse the repository at this point in the history
When reading fromg gases you must assert_gas

The following runtime has occured 59 time(s).
runtime error: cannot read from list
proc name: check special completion (/datum/objective_item/steal/plasma/check_special_completion)
  source file: objective_items.dm,97
  usr: null
  src: 28 moles of plasma (full tank) (/datum/objective_item/steal/plasma)
  • Loading branch information
neersighted committed Feb 10, 2016
1 parent 66dac6d commit 481bc67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/game/gamemodes/objective_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@
/datum/objective_item/steal/plasma/check_special_completion(obj/item/weapon/tank/T)
var/target_amount = text2num(name)
var/found_amount = 0
T.air_contents.assert_gas("plasma")
found_amount += T.air_contents.gases["plasma"][MOLES]
T.air_contents.garbage_collect()
return found_amount>=target_amount


Expand Down

0 comments on commit 481bc67

Please sign in to comment.