summaryrefslogtreecommitdiffstats
path: root/core/equipment.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/equipment.c')
-rw-r--r--core/equipment.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/equipment.c b/core/equipment.c
index 3d169a338..c3b9fa494 100644
--- a/core/equipment.c
+++ b/core/equipment.c
@@ -392,6 +392,16 @@ cylinder_t *get_or_create_cylinder(struct dive *d, int idx)
return &d->cylinders.cylinders[idx];
}
+cylinder_t create_new_cylinder(const struct dive *d)
+{
+ cylinder_t cyl = empty_cylinder;
+ fill_default_cylinder(d, &cyl);
+ cyl.start = cyl.type.workingpressure;
+ cyl.manually_added = true;
+ cyl.cylinder_use = OC_GAS;
+ return cyl;
+}
+
#ifdef DEBUG_CYL
void dump_cylinders(struct dive *dive, bool verbose)
{