Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yutio888
Tales of MajEyal
Commits
8d667925
Commit
8d667925
authored
9 years ago
by
Grayswandir
Browse files
Options
Downloads
Patches
Plain Diff
Fix variable names.
parent
f2517090
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/modules/tome/class/Game.lua
+20
-20
20 additions, 20 deletions
game/modules/tome/class/Game.lua
game/modules/tome/dialogs/Birther.lua
+4
-4
4 additions, 4 deletions
game/modules/tome/dialogs/Birther.lua
with
24 additions
and
24 deletions
game/modules/tome/class/Game.lua
+
20
−
20
View file @
8d667925
...
...
@@ -236,8 +236,8 @@ function _M:newGame()
end
local
nb_unlocks
,
max_unlocks
=
self
:
countBirthUnlocks
()
self
.
creating_player
=
true
self
.
extra
B
irth
O
ption
D
efs
=
{}
class
:
triggerHook
{
"ToME:extraBirthOptions"
,
options
=
self
.
extra
B
irth
O
ption
D
efs
}
self
.
extra
_b
irth
_o
ption
_d
efs
=
{}
class
:
triggerHook
{
"ToME:extraBirthOptions"
,
options
=
self
.
extra
_b
irth
_o
ption
_d
efs
}
local
birth
;
birth
=
Birther
.
new
(
"Character Creation ("
..
nb_unlocks
..
"/"
..
max_unlocks
..
" unlocked birth options)"
,
self
.
player
,
{
"base"
,
"world"
,
"difficulty"
,
"permadeath"
,
"race"
,
"subrace"
,
"sex"
,
"class"
,
"subclass"
},
function
(
loaded
)
if
not
loaded
then
self
.
calendar
=
Calendar
.
new
(
"/data/calendar_"
..
(
self
.
player
.
calendar
or
"allied"
)
..
".lua"
,
"Today is the %s %s of the %s year of the Age of Ascendancy of Maj'Eyal.\nThe time is %02d:%02d."
,
122
,
167
,
11
)
...
...
@@ -247,10 +247,10 @@ function _M:newGame()
self
.
player
:
check
(
"class_start_check"
)
-- Save current state of extra birth options.
self
.
player
.
extra
B
irth
O
ptions
=
{}
for
_
,
option
in
ipairs
(
self
.
extra
B
irth
O
ption
D
efs
)
do
self
.
player
.
extra
_b
irth
_o
ptions
=
{}
for
_
,
option
in
ipairs
(
self
.
extra
_b
irth
_o
ption
_d
efs
)
do
if
option
.
id
then
self
.
player
.
extra
B
irth
O
ptions
[
option
.
id
]
=
config
.
settings
.
tome
[
option
.
id
]
self
.
player
.
extra
_b
irth
_o
ptions
[
option
.
id
]
=
config
.
settings
.
tome
[
option
.
id
]
end
end
...
...
@@ -269,7 +269,7 @@ function _M:newGame()
self
:
setupPermadeath
(
self
.
player
)
--self:changeLevel(1, "test")
self
:
changeLevel
(
self
.
player
.
starting_level
or
1
,
self
.
player
.
starting_zone
,
{
force_down
=
self
.
player
.
starting_level_force_down
})
print
(
"[PLAYER BIRTH] resolve..."
)
self
.
player
:
resolve
()
self
.
player
:
resolve
(
nil
,
true
)
...
...
@@ -439,7 +439,7 @@ function _M:computeAttachementSpots()
setfenv
(
f
,
t
)
local
ok
,
err
=
pcall
(
f
)
if
not
ok
then
print
(
"Loading tileset attachements error"
,
err
)
end
end
end
end
for
_
,
file
in
ipairs
(
fs
.
list
(
Tiles
.
prefix
))
do
if
file
:
find
(
"^attachements%-.+.lua$"
)
then
print
(
"Loading tileset attachements from "
,
Tiles
.
prefix
..
file
)
...
...
@@ -449,7 +449,7 @@ function _M:computeAttachementSpots()
setfenv
(
f
,
t
)
local
ok
,
err
=
pcall
(
f
)
if
not
ok
then
print
(
"Loading tileset attachements error"
,
err
)
end
end
end
end
end
self
:
computeAttachementSpotsFromTable
(
t
)
end
...
...
@@ -483,7 +483,7 @@ function _M:computeFacings()
setfenv
(
f
,
t
)
local
ok
,
err
=
pcall
(
f
)
if
not
ok
then
print
(
"Loading tileset facings error"
,
err
)
end
end
end
end
for
_
,
file
in
ipairs
(
fs
.
list
(
Tiles
.
prefix
))
do
if
file
:
find
(
"^facings%-.+.lua$"
)
then
print
(
"Loading tileset facings from "
,
Tiles
.
prefix
..
file
)
...
...
@@ -493,7 +493,7 @@ function _M:computeFacings()
setfenv
(
f
,
t
)
local
ok
,
err
=
pcall
(
f
)
if
not
ok
then
print
(
"Loading tileset facings error"
,
err
)
end
end
end
end
end
self
:
computeFacingsFromTable
(
t
)
end
...
...
@@ -606,12 +606,12 @@ function _M:createFBOs()
gestures
=
Shader
.
new
(
"main_fbo/gestures"
),
}
self
.
posteffects_use
=
{
self
.
fbo_shader
.
shad
}
if
not
self
.
fbo_shader
.
shad
then
self
.
fbo
=
nil
self
.
fbo_shader
=
nil
end
if
not
self
.
fbo_shader
.
shad
then
self
.
fbo
=
nil
self
.
fbo_shader
=
nil
end
self
.
fbo2
=
core
.
display
.
newFBO
(
Map
.
viewport
.
width
,
Map
.
viewport
.
height
)
if
self
.
gestures
and
self
.
posteffects
and
self
.
posteffects
.
gestures
and
self
.
posteffects
.
gestures
.
shad
then
self
.
gestures
.
shader
=
self
.
posteffects
.
gestures
.
shad
end
end
if
self
.
player
then
self
.
player
:
updateMainShader
()
end
self
.
full_fbo
=
core
.
display
.
newFBO
(
self
.
w
,
self
.
h
)
...
...
@@ -1091,7 +1091,7 @@ function _M:changeLevelReal(lev, zone, params)
end
end
if
self
.
level
.
data
.
effects
then
for
uid
,
act
in
pairs
(
self
.
level
.
entities
)
do
for
uid
,
act
in
pairs
(
self
.
level
.
entities
)
do
if
act
.
setEffect
then
for
_
,
effid
in
ipairs
(
self
.
level
.
data
.
effects
)
do
act
:
setEffect
(
effid
,
1
,
{})
end
end
...
...
@@ -1295,8 +1295,8 @@ end
-- displayDelayedLogDamage to display the queued combat messages
-- output a message to the log based on the visibility of an actor to the player
function
_M
.
logSeen
(
e
,
style
,
...
)
if
e
and
e
.
player
or
(
not
e
.
dead
and
e
.
x
and
e
.
y
and
game
.
level
and
game
.
level
.
map
.
seens
(
e
.
x
,
e
.
y
)
and
game
.
player
:
canSee
(
e
))
then
game
.
log
(
style
,
...
)
end
function
_M
.
logSeen
(
e
,
style
,
...
)
if
e
and
e
.
player
or
(
not
e
.
dead
and
e
.
x
and
e
.
y
and
game
.
level
and
game
.
level
.
map
.
seens
(
e
.
x
,
e
.
y
)
and
game
.
player
:
canSee
(
e
))
then
game
.
log
(
style
,
...
)
end
end
-- determine whether an action between 2 actors should produce a message in the log and if the player
...
...
@@ -1319,8 +1319,8 @@ function _M:logVisible(source, target)
else
-- source should display if it's the player or an actor (or projectile) in a seen tile, or same as target for non-actors
src
=
source
.
player
or
((
source
.
__is_actor
or
source
.
__is_projectile
)
and
game
.
level
.
map
.
seens
(
source
.
x
,
source
.
y
))
or
(
not
source
.
__is_actor
and
tgt
)
srcSeen
=
src
and
game
.
player
:
canSee
(
source
)
or
false
end
end
return
src
or
tgt
or
false
,
srcSeen
,
tgtSeen
end
...
...
@@ -1923,7 +1923,7 @@ do return end
local
a
=
self
.
level
.
map
(
tmx
,
tmy
,
Map
.
ACTOR
)
self
:
registerDialog
(
require
(
"mod.dialogs.CharacterSheet"
).
new
((
config
.
settings
.
cheat
or
self
.
player
:
canSee
(
a
))
and
a
or
self
.
player
))
end
,
SHOW_MESSAGE_LOG
=
function
()
self
:
registerDialog
(
require
(
"mod.dialogs.ShowChatLog"
).
new
(
"Message Log"
,
0
.
6
,
self
.
uiset
.
logdisplay
,
profile
.
chat
))
end
,
...
...
@@ -2458,7 +2458,7 @@ unlocks_list = {
birth_zigur_sacrifice
=
"Birth option: Zigur sacrifice"
,
cosmetic_race_human_redhead
=
"Cosmetic: Redheads"
,
cosmetic_race_dwarf_female_beard
=
"Cosmetic: Female dwarves facial pilosity"
,
difficulty_insane
=
"Difficulty: Insane"
,
difficulty_madness
=
"Difficulty: Madness"
,
...
...
@@ -2523,7 +2523,7 @@ function _M:getGenericTextTiles(en)
if
not
disp
then
return
""
end
if
not
en
.
getDisplayString
then
if
en
.
display_entity
and
en
.
display_entity
.
getDisplayString
then
disp
=
en
.
display_entity
disp
=
en
.
display_entity
else
return
""
end
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/dialogs/Birther.lua
+
4
−
4
View file @
8d667925
...
...
@@ -70,7 +70,7 @@ function _M:init(title, actor, order, at_end, quickbirth, w, h)
self
.
c_options
=
Button
.
new
{
text
=
"Customize"
,
fct
=
function
()
self
:
customizeOptions
()
end
}
self
.
c_options
.
hide
=
true
self
.
c_extra_options
=
Button
.
new
{
text
=
"Extra Options"
,
fct
=
function
()
self
:
extraOptions
()
end
}
self
.
c_extra_options
.
hide
=
#
game
.
extra
B
irth
O
ption
D
efs
==
0
self
.
c_extra_options
.
hide
=
#
game
.
extra
_b
irth
_o
ption
_d
efs
==
0
self
.
c_name
=
Textbox
.
new
{
title
=
"Name: "
,
text
=
(
not
config
.
settings
.
cheat
and
game
.
player_name
==
"player"
)
and
""
or
game
.
player_name
,
chars
=
30
,
max_len
=
50
,
fct
=
function
()
if
config
.
settings
.
cheat
then
self
:
makeDefault
()
end
...
...
@@ -1042,7 +1042,7 @@ end
function
_M
:
resetAttachementSpots
()
self
.
actor
.
attachement_spots
=
nil
if
self
.
has_custom_tile
then
if
self
.
has_custom_tile
then
self
.
actor
.
attachement_spots
=
self
.
has_custom_tile
.
f
return
end
...
...
@@ -1410,7 +1410,7 @@ function _M:selectTile()
fs
.
mkdir
(
"/data/gfx/custom-tiles/"
)
for
file
in
fs
.
iterate
(
"/data/gfx/custom-tiles/"
,
function
(
file
)
return
file
:
find
(
"%.png"
)
end
)
do
list
[
#
list
+
1
]
=
"custom-tiles/"
..
file
end
end
self
:
triggerHook
{
"Birther:donatorTiles"
,
list
=
list
}
local
remove
=
Button
.
new
{
text
=
"Use default tile"
,
width
=
240
,
fct
=
function
()
...
...
@@ -1475,7 +1475,7 @@ function _M:customizeOptions()
end
function
_M
:
extraOptions
()
local
options
=
OptionTree
.
new
(
game
.
extra
B
irth
O
ption
D
efs
,
'Birth Options'
,
600
,
550
)
local
options
=
OptionTree
.
new
(
game
.
extra
_b
irth
_o
ption
_d
efs
,
'Birth Options'
,
600
,
550
)
options
:
initialize
()
game
:
registerDialog
(
options
)
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment