Begin nethack-factory map
This commit is contained in:
parent
763fb6afc5
commit
30e564ee47
|
@ -18,6 +18,7 @@
|
||||||
(:file "res/clocks")
|
(:file "res/clocks")
|
||||||
(:file "res/maps/base.tmx")
|
(:file "res/maps/base.tmx")
|
||||||
(:file "res/maps/casino.tmx")
|
(:file "res/maps/casino.tmx")
|
||||||
|
(:file "res/maps/factory.tmx")
|
||||||
(:file "res/maps/flashback-base.tmx")
|
(:file "res/maps/flashback-base.tmx")
|
||||||
(:file "res/maps/flashback-casino.tmx")
|
(:file "res/maps/flashback-casino.tmx")
|
||||||
(:file "res/maps/flashback-school.tmx")
|
(:file "res/maps/flashback-school.tmx")
|
||||||
|
|
|
@ -134,6 +134,14 @@ Useful for making barriers the player character refuses to traverse."
|
||||||
map (symbol-value (read-from-string (getf trigger-plist :map)))))))
|
map (symbol-value (read-from-string (getf trigger-plist :map)))))))
|
||||||
|
|
||||||
|
|
||||||
|
(defun avatar-change-trigger (map &optional trigger-plist)
|
||||||
|
"A somewhat weird trigger that changes the player's face or avatar."
|
||||||
|
(setf (getf-entity-data map 'player :talking-face) (getf trigger-plist :talking-face))
|
||||||
|
(setf (getf-entity-data map 'player :face) (getf trigger-plist :face))
|
||||||
|
(setf (getf-entity-data map 'player :avatar) (getf trigger-plist :avatar))
|
||||||
|
(list :parameters (list :map map)))
|
||||||
|
|
||||||
|
|
||||||
(defun entrance-interact (map interactee)
|
(defun entrance-interact (map interactee)
|
||||||
"An interact function that can be used to move the user from one MAP to another,
|
"An interact function that can be used to move the user from one MAP to another,
|
||||||
via the :MAP property in the INTERACTEE’s Tiled entity."
|
via the :MAP property in the INTERACTEE’s Tiled entity."
|
||||||
|
@ -212,21 +220,6 @@ run the :USE function of the nearest entity, if it has any."
|
||||||
;;; ———————————————————————————————————
|
;;; ———————————————————————————————————
|
||||||
;;; The Outside World™
|
;;; The Outside World™
|
||||||
;;; ———————————————————————————————————
|
;;; ———————————————————————————————————
|
||||||
|
|
||||||
(defun factory-window-interact (&optional map interactee-id)
|
|
||||||
(make-dialogue-state
|
|
||||||
map
|
|
||||||
(start-dialogue
|
|
||||||
(💬:face 'player "` `" "`o`")
|
|
||||||
(💬:mumble 'player :eo "(Al ĉi tiu fenesto tute mankas vitro!)"
|
|
||||||
:en "(This window's got no pane at all!)")
|
|
||||||
(💬:mumble 'player :eo "(Mi kredeble povus grimpi tien, fakte...)"
|
|
||||||
:en "(I could probably fit my way in there, actually...)")
|
|
||||||
(💬:mumble 'player :eo "(... sed ĉu vere farindas?)"
|
|
||||||
:en "(... but should I?)"
|
|
||||||
:face "`o`"))))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; ———————————————————————————————————
|
;;; ———————————————————————————————————
|
||||||
;;; Random outdoors NPCs
|
;;; Random outdoors NPCs
|
||||||
|
@ -818,6 +811,24 @@ avoid triggering this."
|
||||||
:map *flashback-base-map*))
|
:map *flashback-base-map*))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;;; ———————————————————————————————————
|
||||||
|
;;; Factory!
|
||||||
|
;;; ———————————————————————————————————
|
||||||
|
(defun factory-window-interact (&optional map interactee-id)
|
||||||
|
(make-dialogue-state
|
||||||
|
map
|
||||||
|
(start-dialogue
|
||||||
|
(💬:face 'player "` `" "`o`")
|
||||||
|
(💬:mumble 'player :eo "(Al ĉi tiu fenesto tute mankas vitro!)"
|
||||||
|
:en "(This window's got no pane at all!)")
|
||||||
|
(💬:mumble 'player :eo "(Mi kredeble povus grimpi tien, fakte...)"
|
||||||
|
:en "(I could probably fit my way in there, actually...)")
|
||||||
|
(💬:mumble 'player :eo "(... sed ĉu vere farindas?)"
|
||||||
|
:en "(... but should I?)"
|
||||||
|
:face "`o`"))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; ———————————————————————————————————
|
;;; ———————————————————————————————————
|
||||||
;;; Casino!
|
;;; Casino!
|
||||||
|
@ -1204,6 +1215,7 @@ Initializes the current instance of the game, and such."
|
||||||
(lambda (matrix)
|
(lambda (matrix)
|
||||||
(defparameter *base-map* (🌍:plist->map (metacopy:copy-thing *base-map-plist*)))
|
(defparameter *base-map* (🌍:plist->map (metacopy:copy-thing *base-map-plist*)))
|
||||||
(defparameter *casino-map* (🌍:plist->map (metacopy:copy-thing *casino-map-plist*)))
|
(defparameter *casino-map* (🌍:plist->map (metacopy:copy-thing *casino-map-plist*)))
|
||||||
|
(defparameter *factory-map* (🌍:plist->map (metacopy:copy-thing *factory-map-plist*)))
|
||||||
(defparameter *flashback-base-map* (🌍:plist->map (metacopy:copy-thing *flashback-base-map-plist*)))
|
(defparameter *flashback-base-map* (🌍:plist->map (metacopy:copy-thing *flashback-base-map-plist*)))
|
||||||
(defparameter *flashback-casino-map* (🌍:plist->map (metacopy:copy-thing *flashback-casino-map-plist*)))
|
(defparameter *flashback-casino-map* (🌍:plist->map (metacopy:copy-thing *flashback-casino-map-plist*)))
|
||||||
(defparameter *flashback-school-map* (🌍:plist->map (metacopy:copy-thing *flashback-school-map-plist*)))
|
(defparameter *flashback-school-map* (🌍:plist->map (metacopy:copy-thing *flashback-school-map-plist*)))
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="left-down" width="72" height="20" tilewidth="17" tileheight="17" infinite="0" nextlayerid="4" nextobjectid="8">
|
||||||
|
<tileset firstgid="1" source="font.tsx"/>
|
||||||
|
<layer id="1" name="Foreground" width="72" height="20">
|
||||||
|
<properties>
|
||||||
|
<property name="colliding" type="bool" value="true"/>
|
||||||
|
</properties>
|
||||||
|
<data encoding="csv">
|
||||||
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
0,0,0,0,0,0,0,93,0,93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
0,0,0,0,0,0,0,93,0,93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
0,0,0,0,0,0,0,93,0,93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
0,0,0,0,0,0,0,93,0,93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
</data>
|
||||||
|
</layer>
|
||||||
|
<objectgroup id="3" name="Triggers">
|
||||||
|
<object id="4" name="Transform to nethack" x="129.125" y="242.854" width="33.3333" height="7.33333">
|
||||||
|
<properties>
|
||||||
|
<property name="avatar" value="@"/>
|
||||||
|
<property name="function" value="✿:avatar-change-trigger"/>
|
||||||
|
</properties>
|
||||||
|
</object>
|
||||||
|
<object id="5" name="No more nethack!" x="127.458" y="260.521" width="37" height="4.66667">
|
||||||
|
<properties>
|
||||||
|
<property name="face" value="@w@"/>
|
||||||
|
<property name="function" value="✿:avatar-change-trigger"/>
|
||||||
|
<property name="talking-face" value="@o@"/>
|
||||||
|
</properties>
|
||||||
|
</object>
|
||||||
|
<object id="6" name="Exit window" type="Trigger" x="145" y="333.667">
|
||||||
|
<properties>
|
||||||
|
<property name="desc-en">(Back through the window, alley-oop!)
|
||||||
|
</property>
|
||||||
|
<property name="desc-eo">(Ree tra la fenestro!)
|
||||||
|
</property>
|
||||||
|
<property name="id" value="✿:factory-exit-window"/>
|
||||||
|
<property name="interact" value="✿:entrance-interact"/>
|
||||||
|
<property name="map" value="✿::*outdoors-map*"/>
|
||||||
|
</properties>
|
||||||
|
<point/>
|
||||||
|
</object>
|
||||||
|
</objectgroup>
|
||||||
|
<objectgroup id="2" name="People">
|
||||||
|
<object id="1" name="Player" type="Person" x="143.773" y="317.318">
|
||||||
|
<properties>
|
||||||
|
<property name="facing-right" type="bool" value="false"/>
|
||||||
|
<property name="id" value="✿:player"/>
|
||||||
|
</properties>
|
||||||
|
<point/>
|
||||||
|
</object>
|
||||||
|
</objectgroup>
|
||||||
|
</map>
|
|
@ -1576,13 +1576,17 @@
|
||||||
</object>
|
</object>
|
||||||
<object id="19" name="Entrance window" x="2802.83" y="383.667">
|
<object id="19" name="Entrance window" x="2802.83" y="383.667">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="desc-en">(These doors are *really* locked.)
|
<property name="desc-en">(Al ĉi tiu fenesto tute mankas vitro!)
|
||||||
(Literally, I think they used pad-locks on padlocks...?)</property>
|
(Mi kredeble povus grimpi tien, fakte...)
|
||||||
<property name="desc-eo">(La apudmara ŝtono!)
|
(... sed ĉu vere farindas?)
|
||||||
(Mi memoras, ke la gepatroj rakontis al mi pri ĝi...)
|
</property>
|
||||||
(... ke antaŭ jarcentoj, ĝi estis akra glavo kontraŭ granda drako.)</property>
|
<property name="desc-eo">(This window's got no pane at all!)
|
||||||
|
(I could probably fit my way in there, actually...)
|
||||||
|
(... but should I?)
|
||||||
|
</property>
|
||||||
<property name="id" value="✿:factory-window"/>
|
<property name="id" value="✿:factory-window"/>
|
||||||
<property name="interact" value="✿:factory-window-interact"/>
|
<property name="interact" value="✿:entrance-interact"/>
|
||||||
|
<property name="map" value="✿::*factory-map*"/>
|
||||||
</properties>
|
</properties>
|
||||||
<point/>
|
<point/>
|
||||||
</object>
|
</object>
|
||||||
|
@ -1872,7 +1876,7 @@ DANĜERA LOKO - VENENA MATERIO
|
||||||
</object>
|
</object>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
<objectgroup id="7" name="People">
|
<objectgroup id="7" name="People">
|
||||||
<object id="2" name="Player" type="Person" x="3341.33" y="1677.34">
|
<object id="2" name="Player" type="Person" x="2806.33" y="491.34">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="facing-right" type="bool" value="true"/>
|
<property name="facing-right" type="bool" value="true"/>
|
||||||
<property name="id" value="✿:player"/>
|
<property name="id" value="✿:player"/>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
(overworld.tiled:load-map (local-path (format nil "res/maps/~A.tmx" map-name)))
|
(overworld.tiled:load-map (local-path (format nil "res/maps/~A.tmx" map-name)))
|
||||||
":FLORA-SEARCH-AURORA"
|
":FLORA-SEARCH-AURORA"
|
||||||
(format nil "*~A-map-plist*" map-name)))
|
(format nil "*~A-map-plist*" map-name)))
|
||||||
'("base" "casino" "flashback-base" "flashback-casino" "flashback-school" "outdoors"))
|
'("base" "casino" "factory" "flashback-base" "flashback-casino"
|
||||||
|
"flashback-school" "outdoors"))
|
||||||
|
|
||||||
(quit)
|
(quit)
|
||||||
|
|
Ŝarĝante…
Reference in New Issue