It doesn't support transitions, but other than that, I think I got all the bugs ironed out.
Basic code:
Code: Select all
label show_room_screen:
call screen room_screen
pause
jump show_room_screen
screen room_screen:
add places[current_room]["background"]:
xalign 0.5
yalign 0.5
add "player normal":
xalign 0.5
yalign 1.0
frame:
xpadding 10
ypadding 10
xalign 0.0
yalign 1.0
vbox:
text "Locations:"
for this_place in sorted(places[current_room]["connections"]):
if eval(places[current_room]["connections"][this_place]["requirements"]):
textbutton places[current_room]["connections"][this_place]["name"] action [
SetVariable("previous_room", current_room),
Jump(places[current_room]["connections"][this_place]["label"]),
]
frame:
xpadding 10
ypadding 10
xalign 0.0
yalign 0.0
vbox:
text "Location:"
text places[current_room]["name"]
text ""
text "Actions:"
for this_action in sorted(places[current_room]["actions"]):
if eval(places[current_room]["actions"][this_action]["requirements"]):
textbutton places[current_room]["actions"][this_action]["name"] action Jump(places[current_room]["actions"][this_action]["label"])
frame:
xpadding 10
ypadding 10
xalign 1.0
yalign 1.0
vbox:
text "People:"
for this_person in sorted(people):
if people[this_person]["location"] == current_room :
textbutton people[this_person]["name"] action Jump(people[this_person]["label"])