Exemple #1
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))
 { }
Exemple #2
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);
 }