Made thaler bundle merging code more sane

Both bundles are dropped, then the merged one is put in the users hands
This commit is contained in:
Loganbacca
2015-01-11 21:44:12 +13:00
parent 146fb2f6ad
commit bc57c8b55d
+4 -23
View File
@@ -31,30 +31,11 @@
bundle = W
bundle.worth += src.worth
bundle.update_icon()
if (!istype(src.loc, /turf) && istype(user, /mob/living/carbon/human))
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/h_user = user
if(h_user.r_hand == src)
h_user.drop_from_inventory(src)
h_user.put_in_r_hand(bundle)
else if(h_user.l_hand == src)
h_user.drop_from_inventory(src)
h_user.put_in_l_hand(bundle)
else if (h_user.l_store == src)
h_user.drop_from_inventory(src)
bundle.loc = h_user
bundle.layer = 20
h_user.l_store = bundle
h_user.update_inv_pockets()
else if (h_user.r_store == src)
h_user.drop_from_inventory(src)
bundle.loc = h_user
bundle.layer = 20
h_user.r_store = bundle
h_user.update_inv_pockets()
else
src.loc = get_turf(h_user)
if(h_user.client) h_user.client.screen -= src
h_user.put_in_hands(bundle)
h_user.drop_from_inventory(src)
h_user.drop_from_inventory(bundle)
h_user.put_in_hands(bundle)
user << "<span class='notice'>You add [src.worth] Thalers worth of money to the bundles.<br>It holds [bundle.worth] Thalers now.</span>"
del(src)