equal
deleted
inserted
replaced
610 return true |
610 return true |
611 end |
611 end |
612 return false |
612 return false |
613 end |
613 end |
614 |
614 |
615 -- splits number by delimiter |
|
616 function split(s, delimiter) |
|
617 local res = {} |
|
618 local first = "" |
|
619 for i=1,s:len() do |
|
620 if s:sub(1,1) == delimiter then |
|
621 table.insert(res, tonumber(first)) |
|
622 first = "" |
|
623 else |
|
624 first = first..s:sub(1,1) |
|
625 end |
|
626 s = s:sub(2) |
|
627 end |
|
628 if first:len() > 0 then |
|
629 table.insert(res, tonumber(first)) |
|
630 end |
|
631 return res |
|
632 end |
|
633 |
|
634 function saveCheckPointLocal(cpoint) |
615 function saveCheckPointLocal(cpoint) |
635 AnimCaption(hero.gear, loc("Checkpoint reached!"), 3000) |
616 AnimCaption(hero.gear, loc("Checkpoint reached!"), 3000) |
636 saveCheckpoint(cpoint) |
617 saveCheckpoint(cpoint) |
637 SaveCampaignVar("HeroHealth", GetHealth(hero.gear)) |
618 SaveCampaignVar("HeroHealth", GetHealth(hero.gear)) |
638 saveHogsPositions() |
619 saveHogsPositions() |