- Version
- Date
is a framework that provides an to build in pure . It also comes with some common utility functions that can be used in other mods and defines some common useful screens.
(setq dsf/show-screen (lambda (screen-id pane-id) | |
(block nil | |
(dsf/debug 1 "show-screen") | |
;; 'self eq nil | |
(if (eq screen-id 'self) (setq screen-id nil)) | |
(if (eq pane-id 'self) (setq pane-id nil)) | |
(block nil | |
(dsf/new-screen 'abandoned-station) | |
(dsf/name '(objGetName gSource)) | |
(dsf/description "You are docked with an abandoned cargo crate.") | |
(dsf/add-action 'loot "Loot" 'L '(dsf/show-screen 'loot)) | |
(dsf/add-action 'jettison "Jettison" 'J '(dsf/show-screen 'jettison)) | |
(dsf/add-action 'undock "Undock" 'U '(dsf/exit)) | |
(dsf/default-action 'loot) | |
(dsf/cancel-action 'undock) | |
(dsf/show-screen) |
NEW IN 1.02 | |
=========== | |
(plyGetStat player stat) | |
"resurrectCount" | |
"bestEnemyShipsDestroyed" | |
"enemyShipsDestroyed" | |
"systemData" | |
"systemsvisited" | |
(plyGetItemStat player stat criteria) |
(setq debugShip (lambda (shp) | |
(block (devCnt tItem) | |
(dbgLog "####################################################") | |
(dbgLog " ") | |
(dbgLog " ------ (shpGetDataField) -----") | |
(dbgLog "| Name | " (shpGetDataField shp "name") " |") | |
(dbgLog "| Manufacturer | " (shpGetDataField shp "manufacturer") " |") | |
(dbgLog "| Level | " (shpGetDataField shp "level") " |") | |
(dbgLog "| Score | " (shpGetDataField shp "score") " |") |
(block nil | |
(scrSetDesc gScreen | |
(cat "Total cargo space: " | |
(objGetData gPlayerShip "cargoSpace") | |
" (" | |
(objGetStaticData gPlayerShip "cargoSpace") | |
")\n" | |
) | |
) | |
) |
(scrSetDesc gScreen | |
(cat "Total cargo space:" | |
(objGetData gPlayerShip "cargoSpace") | |
" (" | |
(objGetStaticData gPlayerShip "cargoSpace") ")\n")) |
(block nil | |
;; a very simple example | |
(setq screens (lambda nil | |
(block nil | |
;; start a new screen | |
(dsf/new-screen 'screen-one 'standard "Screen One") | |
(dsf/add-action 'goto-two "Go to Screen 2" 'G '(dsf/show-screen 'screen-two)) | |
(dsf/default-action 'goto-two) | |
;; http://www.gnu.org/software/emacs/manual/html_node/elisp/index.html#Top | |
;; http://www.chemie.fu-berlin.de/chemnet/use/info/elisp/elisp_toc.html | |
;; turn off menu bar as the first thing, | |
;; so we don't get an annoying flash | |
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1)) | |
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) | |
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) | |
;; add local dir to load path |
<?xml version="1.0" ?> | |
<!DOCTYPE TranscendenceExtension | |
[ | |
<!ENTITY modAutonomousAutons "0xDCBA00A0"> | |
<!ENTITY itAAutonAdvertiser "0xDCBA00A1"> | |
]> | |
<TranscendenceExtension UNID="&modAutonomousAutons;" version="0.99c"> |