make characters and props in scenes fuzzymap

This commit is contained in:
2022-01-05 15:55:27 -07:00
parent c0878c8556
commit 56364b81b9
2 changed files with 7 additions and 5 deletions

View File

@@ -164,9 +164,9 @@
set
(dictGet sets setKey)
characters
(new Map)
(new FuzzyMap<Character<StagePosition,StageFacing,Actor>>)
propsOnScreen
(new Map)
(new FuzzyMap<Prop>)
]
time
perspective)))
@@ -291,7 +291,7 @@
(showDialog actorName (VoiceOver (dictGet actors actorName)) wryly text cc))
(hollywooMethod onPhoneSpeech true [actorName wryly text :Continuation cc]
(showDialog actorName (ifLet [charOnScreen (dictGet .characters (_currentScene) actorName)]
(showDialog actorName (ifLet [charOnScreen (try (dictGet .characters (_currentScene) actorName) (catch [e] null))]
(OnScreen charOnScreen)
(FromPhone (dictGet actors actorName))) wryly text cc))

View File

@@ -1,5 +1,7 @@
package hollywoo;
import kiss.FuzzyMap;
enum SceneTime {
Morning;
Day;
@@ -31,8 +33,8 @@ enum SpeechType<StagePosition, StageFacing, Actor> {
typedef Scene<Set, StagePosition, StageFacing, ScreenPosition, Actor, Prop> = {
set:Set,
characters:Map<String, Character<StagePosition, StageFacing, Actor>>,
propsOnScreen:Map<String, Prop>,
characters:FuzzyMap<Character<StagePosition, StageFacing, Actor>>,
propsOnScreen:FuzzyMap<Prop>,
// TODO props on stage
time:SceneTime,
perspective:ScenePerspective