Re: Cabins
Posted: Tue Jul 26, 2011 3:05 pm
I wrote a script similar to that about a week after I discovered Oolite, but with my very limited knowledge it was very fragile. One problem I had is once those equipment items are defined with their interacting incompatibilities, if it gets shot up in combat and some equipment is lost I could be locked out of changing anything (I didn't know how to automagically manage combat damage back then). It was a real balancing act.Eldon wrote:An additional thought, if you used two bits of dummy equipment, one incompatible with cabins, the other incompatible with the ability to sell cabins, you could use a script which triggered on buying your ship and buying and selling cabins, giving you control over how many cabins the ship can have.
That doesn't work - if you define two pieces of equipment that are incompatible with each other in the shipyard file. (I know because I tried that.) You'll get a ship with either your dummy equipment or the passenger berths, but not both.Eldon wrote:Can you give the ship some dummy equipment by default, with:That should leave you with a ship that only has the passenger berths specified in shipdata, with no way to add or remove others. I think.Code: Select all
"incompatible_with_equipment" = "EQ_PASSENGER_BERTH"; "incompatible_with_equipment" = "EQ_PASSENGER_BERTH_REMOVAL";