803 end |
803 end |
804 end |
804 end |
805 |
805 |
806 function HandleStructures() |
806 function HandleStructures() |
807 |
807 |
808 for i = 1, #sProx do |
808 if GameTime % 100 == 0 then |
809 sProx[i][2] = false |
809 for i = 1, #sProx do |
810 |
810 sProx[i][2] = false |
811 if sProx[i][1] == loc("Structure Placement Mode") then |
811 |
812 sProx[i][2] = true |
812 if sProx[i][1] == loc("Structure Placement Mode") then |
813 end |
813 sProx[i][2] = true |
814 |
814 end |
|
815 |
|
816 end |
815 end |
817 end |
816 |
818 |
817 for i = 1, #strucID do |
819 for i = 1, #strucID do |
818 |
820 |
819 SetVisualGearValues(strucCirc[i], GetX(strucGear[i]), GetY(strucGear[i]), nil, nil, nil, nil, nil, strucCircRadius[i], nil, strucCircCol[i]) |
821 SetVisualGearValues(strucCirc[i], GetX(strucGear[i]), GetY(strucGear[i]), nil, nil, nil, nil, nil, strucCircRadius[i], nil, strucCircCol[i]) |
856 |
858 |
857 |
859 |
858 -- this is kinda messy and gross (even more than usual), fix it up at some point |
860 -- this is kinda messy and gross (even more than usual), fix it up at some point |
859 -- it just assumes that if you have access to girders, it works for rubbers |
861 -- it just assumes that if you have access to girders, it works for rubbers |
860 -- as that is what the struc implemenation means due to construction station |
862 -- as that is what the struc implemenation means due to construction station |
861 anyUIProx = false |
863 if GameTime % 100 == 0 then |
862 for i = 1, #sProx do |
864 anyUIProx = false |
863 |
865 for i = 1, #sProx do |
864 if sProx[i][1] == loc("Girder Placement Mode") then |
866 |
865 if sProx[i][2] == true then |
867 if sProx[i][1] == loc("Girder Placement Mode") then |
866 AddAmmo(CurrentHedgehog, amGirder, 100) |
868 if sProx[i][2] == true then |
867 AddAmmo(CurrentHedgehog, amRubber, 100) |
869 AddAmmo(CurrentHedgehog, amGirder, 100) |
868 AddAmmo(CurrentHedgehog, amDrillStrike, 100) |
870 AddAmmo(CurrentHedgehog, amRubber, 100) |
869 else |
871 AddAmmo(CurrentHedgehog, amDrillStrike, 100) |
870 AddAmmo(CurrentHedgehog, amGirder, 0) |
872 else |
871 AddAmmo(CurrentHedgehog, amRubber, 0) |
873 AddAmmo(CurrentHedgehog, amGirder, 0) |
872 AddAmmo(CurrentHedgehog, amDrillStrike, 0) -- new |
874 AddAmmo(CurrentHedgehog, amRubber, 0) |
873 end |
875 AddAmmo(CurrentHedgehog, amDrillStrike, 0) -- new |
874 elseif sProx[i][1] == loc("Teleportation Mode") then |
876 end |
875 if sProx[i][2] == true then |
877 elseif sProx[i][1] == loc("Teleportation Mode") then |
876 AddAmmo(CurrentHedgehog, amTeleport, 100) |
878 if sProx[i][2] == true then |
877 else |
879 AddAmmo(CurrentHedgehog, amTeleport, 100) |
878 AddAmmo(CurrentHedgehog, amTeleport, 0) |
880 else |
879 end |
881 AddAmmo(CurrentHedgehog, amTeleport, 0) |
880 elseif sProx[i][1] == loc("Weapon Crate Placement Mode") then |
882 end |
881 -- this is new stuff |
883 elseif sProx[i][1] == loc("Weapon Crate Placement Mode") then |
882 if sProx[i][2] == true then |
884 -- this is new stuff |
883 AddAmmo(CurrentHedgehog, amNapalm, 100) |
885 if sProx[i][2] == true then |
884 else |
886 AddAmmo(CurrentHedgehog, amNapalm, 100) |
885 AddAmmo(CurrentHedgehog, amNapalm, 0) |
887 else |
886 end |
888 AddAmmo(CurrentHedgehog, amNapalm, 0) |
887 end |
889 end |
888 |
890 end |
889 if (sProx[i][2] == true) then |
891 |
890 anyUIProx = true |
892 if (sProx[i][2] == true) then |
891 end |
893 anyUIProx = true |
892 |
894 end |
|
895 |
|
896 end |
893 end |
897 end |
894 |
898 |
895 end |
899 end |
896 |
900 |
897 |
901 |