Slightly refactors storage item insertion (#24429)

* everything is on fire

* silent trait check

* how did it even become CRLF

* minor formatting

* fix icon updating and adds silent insertion to global trait list

* adds the new parameter to documentation - whoops!

* pain

* contra review

* contra review again, reduces amount of checks for user in the loops

---------

Co-authored-by: cybercapitalism <98280110+cybercapitalism@users.noreply.github.com>
This commit is contained in:
chuga-git
2024-03-24 13:41:07 -05:00
committed by GitHub
parent 25848b6988
commit 19c0b70171
18 changed files with 84 additions and 67 deletions
+2 -2
View File
@@ -296,7 +296,7 @@
if(egg != /obj/item/fish_eggs) // Don't harvest duds
egg = new egg(get_turf(user)) //Spawn the egg at the user's feet
if(fish_bag?.can_be_inserted(egg))
fish_bag.handle_item_insertion(egg)
fish_bag.handle_item_insertion(egg, user)
else
duds++
egg_list.Remove(egg) //Remove the egg from the egg_list
@@ -350,7 +350,7 @@
if(fish_item)
var/obj/item/I = new fish_item(get_turf(user))
if(fish_bag?.can_be_inserted(I))
fish_bag.handle_item_insertion(I)
fish_bag.handle_item_insertion(I, user)
user.visible_message("[user.name] scoops \a [fish_name] from [src].", "You scoop \a [fish_name] out of [src].")
kill_fish(fish_to_scoop) //Kill the caught fish from the tank