fix skill-change so it would use insert_sorted

This is needed because the skills vector is actually sorted. Adding skill with id<last one would mess things up very badly.
develop
warmist 2015-01-18 19:53:08 +02:00
parent 53a8032f8a
commit 686647af0e
1 changed files with 1 additions and 1 deletions

@ -73,7 +73,7 @@ end
if not skill then
skill = df.unit_skill:new()
skill.id = args.skill
args.unit.status.current_soul.skills:insert('#', skill)
utils.insert_sorted(args.unit.status.current_soul.skills,skill,'id')
end
print('old: ' .. skill.rating .. ': ' .. skill.experience)