Fixed a CSS problem regarding <pre> elements. Made Zita look better.
This commit is contained in:
parent
873e5fc8d9
commit
50e7e08a1b
|
@ -169,7 +169,6 @@ tt, code, samp, pre, var {
|
|||
|
||||
pre {
|
||||
margin-top: 10px;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
|
@ -420,6 +419,10 @@ div.left-float, img.left-float, video.left-float, audio.left-float {
|
|||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.highlight span {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.highlighttable {
|
||||
margin: 5px 0 5px 0;
|
||||
}
|
||||
|
|
|
@ -106,3 +106,8 @@ ul#menulinks {
|
|||
.highlighttable .code {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
pre {
|
||||
max-width: 660px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
|
|
@ -83,8 +83,8 @@ Python code in the main file is executed before Zita starts a game. This means
|
|||
that the main file is suitable to use to print a welcome message, though this
|
||||
is of course also possible to do in the 'prerun' file.<br /> What should be
|
||||
done in the main file and not in the 'prerun' file is including files. The
|
||||
<span class='code'>include</span> function loads and executes both files and
|
||||
files in subdirectories. In the above example, only files are imported, as no
|
||||
=include= function loads and executes both files and files in
|
||||
subdirectories. In the above example, only files are imported, as no
|
||||
subdirectories exist. If, however, such directories did exist, the include
|
||||
command would look for those too.
|
||||
|
||||
|
@ -98,9 +98,9 @@ We have a game directory with a file named 'stuff' and a directory named
|
|||
This makes Zita load and execute both the 'stuff' file and the files in the
|
||||
'stuff' folder.
|
||||
|
||||
It is possible to make the <span class='code'>include</span> function accept
|
||||
only either one file, all files or files in subdirectories. Refer to the
|
||||
=include= and =getfilenames= functions found in defs.py.
|
||||
It is possible to make the =include= function accept only either one file, all
|
||||
files or files in subdirectories. Refer to the =include= and =getfilenames=
|
||||
functions found in defs.py.
|
||||
|
||||
When Zita has succesfully loaded all data that it needs to run a game
|
||||
succesfully, it is important to use the =goto= function to create a starting
|
||||
|
@ -287,7 +287,7 @@ among other stuff, this (commented version):
|
|||
|
||||
#+BEGIN_SRC python2
|
||||
var = {
|
||||
# 'imposs' does not have to exist, though Zeqy needs it in the <span class='code'>default</span>
|
||||
# 'imposs' does not have to exist, though Zeqy needs it in the default
|
||||
# variable.
|
||||
'imposs': ['That\'s not an option.', 'I am unable to accomplish that \
|
||||
particular feat.', 'That seems out of the question.', 'Are you stupid?', 'I \
|
||||
|
@ -301,12 +301,12 @@ could try, but I don\'t want to.', 'I\'m not doing that!', 'No way.'],
|
|||
|
||||
# > eat python
|
||||
# Which python?
|
||||
# <span class='b'>a</span>. dangerous python
|
||||
# <span class='b'>b</span>. Monty Python
|
||||
# a. dangerous python
|
||||
# b. Monty Python
|
||||
|
||||
# 'which' MUST exist. It holds what to output when multiple items are
|
||||
# available. The variable <span class='code'>what</span> holds the current
|
||||
# object specified by the user. In the above example, <span class='code'>what</span> would be python.
|
||||
# available. The variable what holds the current
|
||||
# object specified by the user. In the above example, what would be python.
|
||||
'which': "'Which ' + what + '?'",
|
||||
|
||||
# 'invalidwhich' MUST exist. The value of this variable is output when
|
||||
|
@ -326,7 +326,7 @@ could try, but I don\'t want to.', 'I\'m not doing that!', 'No way.'],
|
|||
'inventory': [],
|
||||
|
||||
# 'location' MUST exist, though it isn't completely necessary to have it
|
||||
# defined here. Mostly, writing a <span class='code'>goto</span> function in the main file is better
|
||||
# defined here. Mostly, writing a goto function in the main file is better
|
||||
# than defining the room here. Defining the room here means that the user
|
||||
# will not see a startup message describing the current location.
|
||||
'location': None,
|
||||
|
@ -368,7 +368,7 @@ else:
|
|||
if rname[0] == '!':
|
||||
exec(rname[1:]) # Only execute what's after the exclamation mark.
|
||||
else:
|
||||
goto(rname) # Use the <span class='code'>goto</span> function
|
||||
goto(rname) # Use the goto function
|
||||
elif '&rest' in room[var['location']]['dir']: # Default action
|
||||
rname = room[var['location']]['dir']['&rest']
|
||||
if rname[0] == '!':
|
||||
|
@ -415,7 +415,7 @@ default = {
|
|||
'item': { # Default values for items
|
||||
'cmd': { # Either 'a', 'an', 'some', etc.
|
||||
'look': "p('It\\'s ' + getprefix(citem) + ' ' + item[citem]['name'] +
|
||||
'.')", # The <span class='code'>exec_proper_command</span> function will find the correct place to look
|
||||
'.')", # The exec_proper_command function will find the correct place to look
|
||||
# for a command. A hierachy is defined in Zeqy's defs.py.
|
||||
'lookat': "exec_proper_command('look', i, i_or_o, citem)",
|
||||
|
||||
|
@ -437,8 +437,8 @@ inv(citem) # Adds item to inventory
|
|||
},
|
||||
|
||||
# 'item-substitutes' MUST exist. It is used as a reference to a previous item.
|
||||
# This specific property could just as well have been placed in the <span class='code'>var</span>
|
||||
# variable, but for now it must be in <span class='code'>default</span>.
|
||||
# This specific property could just as well have been placed in the var
|
||||
# variable, but for now it must be in default.
|
||||
'item-substitutes': ['it'],
|
||||
|
||||
# Zita will print a random messages of the list when there is no command match.
|
||||
|
|
Loading…
Reference in New Issue