Methods for dealing with cargo

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Galileo
Dangerous
Dangerous
Posts: 103
Joined: Tue Nov 15, 2005 1:55 am
Location: Tasmania, Australia

Methods for dealing with cargo

Post by Galileo »

Just some requests to improve the handling of cargo in scripts:

Changes to existing methods:

Code: Select all

awardSpecialCargo: <amount> <description of cargo>
Awards the specified amount of the specified cargo if it exists in descriptions.plist. This method would require some way to specify the weight of the special cargo.


New methods:

Code: Select all

removeSpecialCargo: <amount> <description of cargo>
Removes the specified amount of the specified special cargo from the players hold. <amount> can include all.

Code: Select all

removeCargo: <amount> <Commodity name>
Removes a quantity of the cargo named the cargo name must match the name in commodities.plist exactly. <amount> can include all.

Code: Select all

testForCargo: <Commodity name>
Returns a value indicating the amount of the named cargo in the player's cargo hold.

Code: Select all

testForSpecialCargo: <description of cargo>
Returns a value indicating the amount of the named cargo in the player's cargo hold.
Eat talking tree, food blenders!
User avatar
Galileo
Dangerous
Dangerous
Posts: 103
Joined: Tue Nov 15, 2005 1:55 am
Location: Tasmania, Australia

Post by Galileo »

Not even worth a single reply?
Eat talking tree, food blenders!
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1161
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Post by aegidian »

FHS, give me a moment to breathe!

Some of those look eminently sensible - but I don't have the time to make them a *todo* at the moment.
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

As Master and Commander, I thought you didn't actually need to breathe? Or was that some other overlord :-)
Post Reply