fix failed merge bug

if you merged cards but they were incompatible decks it would delete the cards. this stops it from doing that
This commit is contained in:
sarcoph
2022-04-25 23:19:47 -08:00
parent f196c61606
commit 29e53d1cc3
@@ -58,12 +58,12 @@
* was actually attempted.
*/
/obj/item/toy/cards/proc/MergeInto(obj/item/toy/cards/target, mob/living/user)
if(!user.temporarilyRemoveItemFromInventory(src))
to_chat(user, "<span class='warning'>\The [src] is stuck to your hand, you can't add it to \the [target]!</span>")
return TRUE
if(target.parentdeck != src && src.parentdeck != target && src.parentdeck != target.parentdeck)
to_chat(user, "<span class='warning'>You can't mix cards from other decks!</span>")
return TRUE
if(!user.temporarilyRemoveItemFromInventory(src))
to_chat(user, "<span class='warning'>\The [src] is stuck to your hand, you can't add it to \the [target]!</span>")
return TRUE
return FALSE
// unimplemented