This commit is contained in:
Edward Lemon
2018-03-31 22:43:33 +03:00
committed by Erki
parent 2585982b67
commit 833be9ff02
2 changed files with 46 additions and 1 deletions
@@ -160,10 +160,18 @@
if(!istype(W))
user <<"<span class ='notice'>The [W] is blocking the cigarettes.</span>"
return
//Checking contents of packet so lighters won't be cigarettes.
for (var/i = contents.len; i > 0; i--)
W = contents[i]
if (istype(W))
break
else
W = null
if (!W)
return
reagents.trans_to_obj(W, (reagents.total_volume/contents.len))
user.equip_to_slot_if_possible(W, slot_wear_mask)
reagents.maximum_volume = 15 * contents.len
contents.len--
user << "<span class='notice'>You take a cigarette out of the pack.</span>"
update_icon()
else