716 cGear = nil |
718 cGear = nil |
717 end |
719 end |
718 |
720 |
719 end |
721 end |
720 |
722 |
|
723 function onAttack() |
|
724 at = GetCurAmmoType() |
|
725 |
|
726 usedWeapons[at] = 0 |
|
727 end |
721 |
728 |
722 function onAchievementsDeclaration() |
729 function onAchievementsDeclaration() |
|
730 usedWeapons[amSkip] = nil |
|
731 |
|
732 usedRope = usedWeapons[amRope] ~= nil |
|
733 usedPortal = usedWeapons[amPortalGun] ~= nil |
|
734 usedSaucer = usedWeapons[amJetpack] ~= nil |
|
735 |
|
736 usedWeapons[amRope] = nil |
|
737 usedWeapons[amPortalGun] = nil |
|
738 usedWeapons[amJetpack] = nil |
|
739 |
|
740 usedOther = next(usedWeapons) ~= nil |
|
741 |
|
742 if usedOther then -- smth besides skip, rope, portal or saucer used |
|
743 raceType = "unknown race" |
|
744 elseif usedRope and not usedPortal and not usedSaucer then |
|
745 raceType = "rope race" |
|
746 elseif not usedRope and usedPortal and not usedSaucer then |
|
747 raceType = "portal race" |
|
748 elseif not usedRope and not usedPortal and usedSaucer then |
|
749 raceType = "saucer race" |
|
750 elseif (usedRope or usedPortal or usedSaucer or usedOther) == false then -- no weapons used at all? |
|
751 raceType = "no tools race" |
|
752 else -- at least two of rope, portal and saucer used |
|
753 raceType = "mixed race" |
|
754 end |
|
755 |
723 map = detectMap() |
756 map = detectMap() |
724 |
757 |
725 for i = 0, (numTeams-1) do |
758 for i = 0, (numTeams-1) do |
726 if teamScore[i] < 100000 then |
759 if teamScore[i] < 100000 then |
727 DeclareAchievement("rope race", teamNameArr[i], map, teamScore[i]) |
760 DeclareAchievement(raceType, teamNameArr[i], map, teamScore[i]) |
728 end |
761 end |
729 end |
762 end |
730 end |
763 end |