1 ;;;; Ru*** roLeplay Playground virtual tabletop
2 ;;;; Copyright (C) 2022 Zull
4 ;;;; This program is free software: you can redistribute it and/or modify
5 ;;;; it under the terms of the GNU General Public License as published by
6 ;;;; the Free Software Foundation, either version 3 of the License, or
7 ;;;; (at your option) any later version.
9 ;;;; This program is distributed in the hope that it will be useful,
10 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ;;;; GNU General Public License for more details.
14 ;;;; You should have received a copy of the GNU General Public License
15 ;;;; along with this program. If not, see <https://www.gnu.org/licenses/>.
17 (defpackage :rulp.script
18 (:use :cl :rulp.graphics :rulp.layers))
20 (in-package :rulp.script)
22 (defun active-plane ()
25 (defun (setf active-plane) (value)
31 (defun (setf entities) (value)
33 (setf *entities-list* value)
34 (warn "(setf entities) error: symbol ~A is not of type list, operation stopped" value)))
36 (defun add-entity (entity)
37 "add an entity into the active plane"
38 (push entity *entities-list*))
40 (defun remove-entity (number)
41 "remove the nth entity from the active plane"
42 (screen-purge (nth number *entities-list*))
43 (setf (nth number *entities-list*) nil)
44 (remove nil *entities-list*))