Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[FEATURE] Larger Bottle Option in Chemmaster
#6
I'm adding this but have made it work differently.  This lives under the normal "make bottle" option, if your bottle has <=30u it'll be a normal small bottle, if it's >30u it'll be a large bottle.  Unrelated but adding this also pointed out to me that it was perfectly possible to select to make a pill/bottle/patch/etc, leave the name window up, then remove the beaker from the machine and wander away or destroy it, then enter a name and still have the machine try to produce a pill/bottle/patch/etc.  If you just wandered away from the machine with the beaker, that meant you could make things from it at a distance, which isn't a huge deal, but if it was destroyed that would make things runtime as it tried to pull reagents from a holder that no longer existed.  RIP.

So, not a big change, but you did help me fix potential silliness and runtimes.

Also, of note in your code:
Code:
/obj/item/reagent_containers/glass/bottle/chemstore
    name = "chemical storage bottle"
    desc = "A chemical storage bottle."
    icon_state = "reagent_bottle"
    initial_volume = 50
    amount_per_transfer_from_this = 5

    New()
        ..()

That "New() ..()" doesn't actually accomplish anything and isn't needed.  The game already calls the parent version of a proc if the child doesn't have it overridden, same as the child of something inherits its vars if it doesn't override those.  Not a huge deal, but it takes up two lines just to say "hey, game, do what you were already gunna do!"
spider
Reply


Messages In This Thread
RE: [FEATURE] Larger Bottle Option in Chemmaster - by Haine - 10-06-2016, 09:21 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)