Skip to content

Commit

Permalink
Steal objectives now check holoparasite inventories (#9973)
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy authored Oct 9, 2023
1 parent e57c811 commit 3d44432
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions code/game/gamemodes/objectives/basic/steal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ GLOBAL_LIST_EMPTY(possible_items)
if(!isliving(M.current))
continue

var/list/all_items = M.current.GetAllContents() //this should get things in cheesewheels, books, etc.
var/list/all_items = M.current.GetAllContents(/obj/item) //this should get things in cheesewheels, books, etc.

for(var/obj/I in all_items) //Check for items
for(var/mob/living/simple_animal/hostile/holoparasite/holopara as() in M.holoparasite_holder?.holoparasites)
all_items |= holopara.GetAllContents(/obj/item)

for(var/obj/I as() in all_items) //Check for items
if(istype(I, steal_target))
if(!targetinfo) //If there's no targetinfo, then that means it was a custom objective. At this point, we know you have the item, so return 1.
return TRUE
Expand Down

0 comments on commit 3d44432

Please sign in to comment.