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 18:41:07 +00:00
committed by GitHub
co-authored by cybercapitalism
parent 25848b6988
commit 19c0b70171
18 changed files with 84 additions and 67 deletions
+2 -2
View File
@@ -368,7 +368,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
failure = 1
continue
success = 1
S.handle_item_insertion(IT, 1) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed.
S.handle_item_insertion(IT, user, TRUE) //The TRUE stops the "You put the [src] into [S]" insertion message from being displayed.
if(success && !failure)
to_chat(user, "<span class='notice'>You put everything in [S].</span>")
else if(success)
@@ -377,7 +377,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
to_chat(user, "<span class='notice'>You fail to pick anything up with [S].</span>")
else if(S.can_be_inserted(src))
S.handle_item_insertion(src)
S.handle_item_insertion(src, user)
else if(istype(I, /obj/item/stack/tape_roll))
if(isstorage(src)) //Don't tape the bag if we can put the duct tape inside it instead
var/obj/item/storage/bag = src