Fix invalid logic in clonepod beaker function

This commit is contained in:
Arokha Sieyes
2018-06-24 15:17:19 -04:00
parent 94013e81bc
commit e6a7b744f0

View File

@@ -244,20 +244,14 @@
locked = 0 locked = 0
to_chat(user, "System unlocked.") to_chat(user, "System unlocked.")
else if(istype(W,/obj/item/weapon/reagent_containers/glass)) else if(istype(W,/obj/item/weapon/reagent_containers/glass))
var/obj/item/weapon/reagent_containers/glass/G = W if(LAZYLEN(containers) >= container_limit)
if(LAZYLEN(containers)) to_chat(user, "<span class='warning'>\The [src] has too many containers loaded!</span>")
if(containers.len >= container_limit) else if(do_after(user, 1 SECOND))
to_chat(user, "<span class='warning'>\The [src] has too many containers loaded!</span>") user.visible_message("[user] has loaded \the [W] into \the [src].", "You load \the [W] into \the [src].")
return containers += W
else if(do_after(user, 1 SECOND)) user.drop_item()
user.visible_message("[user] has loaded \the [G] into \the [src].", "You load \the [G] into \the [src].") W.forceMove(src)
containers += G return
user.drop_item()
G.forceMove(src)
return
else
to_chat(user, "<span class='warning'>\The [src] doesn't have room for \the [G.name].</span>")
return
else if(istype(W, /obj/item/weapon/wrench)) else if(istype(W, /obj/item/weapon/wrench))
if(locked && (anchored || occupant)) if(locked && (anchored || occupant))
to_chat(user, "<span class='warning'>Can not do that while [src] is in use.</span>") to_chat(user, "<span class='warning'>Can not do that while [src] is in use.</span>")