;;;; Ru*** roLeplay Playground virtual tabletop ;;;; Copyright (C) 2022 Zull ;;;; ;;;; This program is free software: you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by ;;;; the Free Software Foundation, either version 3 of the License, or ;;;; (at your option) any later version. ;;;; ;;;; This program is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;;; GNU General Public License for more details. ;;;; ;;;; You should have received a copy of the GNU General Public License ;;;; along with this program. If not, see . (defpackage :rulp.script (:use :cl :rulp.graphics :rulp.layers)) (in-package :rulp.script) (defun active-plane () *plane*) (defun (setf active-plane) (value) (setf *plane* value)) (defun entities () *entities-list*) (defun (setf entities) (value) (if (listp value) (setf *entities-list* value) (warn "(setf entities) error: symbol ~A is not of type list, operation stopped" value))) (defun add-entity (entity) "add an entity into the active plane" (push entity *entities-list*)) (defun remove-entity (number) "remove the nth entity from the active plane" (screen-purge (nth number *entities-list*)) (setf (nth number *entities-list*) nil) (remove nil *entities-list*))