Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
character_creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Minetest
character_creator
Commits
46e51936
Commit
46e51936
authored
3 years ago
by
Peter Nerlich
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'upstream/master'
parents
8cfd0f8f
e026a1f3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
init.lua
+19
-0
19 additions, 0 deletions
init.lua
with
19 additions
and
0 deletions
init.lua
+
19
−
0
View file @
46e51936
...
...
@@ -142,6 +142,10 @@ end
local
function
save_skin
(
player
)
local
player_meta
=
player
:
get_meta
()
if
player_meta
==
nil
then
-- The player disconnected before this function was dispatched
return
end
local
function
save_data
(
data_name
)
local
indexes
=
skin_indexes
[
player
]
...
...
@@ -162,6 +166,11 @@ end
local
function
get_texture
(
player
)
local
player_meta
=
player
:
get_meta
()
if
player_meta
==
nil
then
-- The player disconnected before this function was dispatched
return
""
end
local
indexes
=
skin_indexes
[
player
]
local
texture
=
""
local
gender
=
player_meta
:
get_string
(
"character_creator:gender"
)
...
...
@@ -199,6 +208,11 @@ end
local
function
change_skin
(
player
)
local
player_meta
=
player
:
get_meta
()
if
player_meta
==
nil
then
-- The player disconnected before this function was dispatched
return
end
local
texture
=
get_texture
(
player
)
local
width
=
player_meta
:
get_float
(
"character_creator:width"
)
...
...
@@ -243,6 +257,11 @@ if skinsdb then
--change skin redefinition for skinsdb
function
change_skin
(
player
)
local
player_meta
=
player
:
get_meta
()
if
player_meta
==
nil
then
-- The player disconnected before this function was dispatched
return
end
local
playername
=
player
:
get_player_name
()
local
skinname
=
"character_creator:"
..
playername
local
skin_obj
=
skinsdb
.
get
(
skinname
)
or
skinsdb
.
new
(
skinname
)
...
...
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