Jump to content

Container-Information for Lua


PhashX

Recommended Posts

21 hours ago, PhashX said:

The Containers should provide more information for scripting:

  • List of items, that are in the container
    • weight of each item
    • volume of each item
    • ID of each item
  • storage capacity of the container
  • storage capacity left of the container

Is it not possible to read it out?

Are there no functions for it?

 

 

I haven't looked at the variables and functions available so far, because I assumed that the containers definitely have something like that...

 

Link to comment
Share on other sites

1 hour ago, PhashX said:

hmm... I don't think so. Container Unit only provides getItemsMass() and getSelfMass()

Well, thats i alittle bit boring.. Maybe they will add some things when the priority comes to features like that.

ATM i thing they have enough other hard problems....

 

 

BTW. Thank you for all your work =).

 

Are your GitHub files updated?

I love to sniff through serving code and keep tinkering with it.

Link to comment
Share on other sites

  • 2 weeks later...

It does mean that if you have a container which only stores one type of item in it, that you can determine the count of the item by dividing mass by unit weight.

 

but yes, having a few extra bits on containers would be nice, such as contents, and some hooks for items deposited and items removed. 

Link to comment
Share on other sites

  • 4 weeks later...

For our scripting it would be nice to have the maximum volume of a container and items inside.

Currently we have to define a variable which is inaccurate after pushing talents up ;)

 

So would be great to get at least getMaxVolume() for the container.

 

 

Super cool would also to have a function to get volume for all items inside the container with  getItemsVolume().

At the moment we have to read the mass and define localy the densety of the item to calculate the filling level of the container.

In addition this only works, this solution works only if you have one item in one container...

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...