ywwg / packingdb

A thing that helps me figure out what to pack.
GNU General Public License v3.0
0 stars 1 forks source link

Support one-time items #5

Closed ywwg closed 7 years ago

ywwg commented 7 years ago

Sometimes you only need to bring things once. So items may depend on, say, a specific trip? Or a date range hack? Or add a special Prerequisite that only gets fulfilled by a single context? Not sure.

Trips could be able to add their own context values, like: t.AddProperty("firefly2017"), and then the items could have that as a prereq. However, when the items go to register themselves we'll get a panic. Hm ....

ywwg commented 7 years ago

ok I was close! Both items and contexts can do plib.RegisterProperty, and then the items can depend on that new property. fixed in 6fdd8cdf403720c392454713f6994b18657f506b