X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2Fmain%2Fmain.lisp;h=eee8e48f48b6e7930f5cff269f6b378a7825b058;hb=008caa3;hp=b6cce463cf762402adfa246bbdad7c6959a67ef0;hpb=81d51af6e0ac022d1e96b2bcd45909b75d855675;p=clnl diff --git a/src/main/main.lisp b/src/main/main.lisp index b6cce46..eee8e48 100644 --- a/src/main/main.lisp +++ b/src/main/main.lisp @@ -47,7 +47,7 @@ DESCRIPTION: ((netlogoed-lisp (model->lisp (if file (with-open-file (str file) (clnl-model:read-from-nlogo str)) (clnl-model:default-model)))) - (*package* (find-package :cl))) + (*package* *model-package*)) (eval netlogoed-lisp))) (defun run-commands (cmds) @@ -82,7 +82,8 @@ DESCRIPTION: ; The intention of this method is to generate the common lisp equivalent of a model file, ; such that if you decided to no longer use nlogo, you could use the engine without it. (defun model->lisp (model) - `(progn + `(let + ,(clnl-model:globals model) (clnl-random:set-seed 15) ; should the seed always be 15? (clnl-nvm:create-world :dims ',(clnl-model:world-dimensions model)) (clnl-interface:initialize :dims ',(clnl-model:world-dimensions model))))