Пример #1
0
 // Create & Destroy.
 PetPM (const BlockModel& al)
   : Pet (al),
     net_radiation (Librarian::build_stock<NetRadiation> (al.metalib (),
                                                          al.msg (),
                                                          "brunt", objid)),
     rb (al.number ("rb"))
   { }
Пример #2
0
 ActionSow (const BlockModel& al)
   : Action (al),
     metalib (al.metalib ()),
     crop (&al.model ("crop").clone ()),
     // Use 'plant_distance' if set, otherwise use 'row_width'.
     row_width (al.number ("plant_distance", al.number ("row_width"))),
     // Use 'plant_distance' if set, otherwise use 'row_width'.
     row_pos (al.number ("plant_position", al.number ("row_position"))),
     seed (al.number ("seed", -42.42e42))
 { }
Пример #3
0
 ActionRepeat (const BlockModel& al)
   : Action (al),
     metalib (al.metalib ()),
     modified_frame (Action::frame (), FrameModel::parent_link),
     repeat (&al.model ("repeat").clone ()),
     action (al.check ("do") 
             ? Librarian::build_item<Action> (al, "do")
             : Librarian::build_item<Action> (al, "repeat"))
 { 
   if (!modified_frame.check ("do"))
     modified_frame.set ("do", *repeat);
 }
Пример #4
0
 ProgramGP2D (const BlockModel& al)
   : Program (al),
     metalib (al.metalib ()),
     geo (submodel<GeometryRect> (al, "Geometry")),
     row_width (al.number ("row_width")),
     row_position (al.number ("row_position")),
     soil_depth (al.number ("soil_depth")),
     crop_depth (al.number ("crop_depth")),
     crop_width (al.number ("crop_width")),
     WRoot (al.number ("WRoot")),
     DS (al.number ("DS"))
 { }