equal
deleted
inserted
replaced
1260 RedefineSubset() |
1260 RedefineSubset() |
1261 |
1261 |
1262 end |
1262 end |
1263 |
1263 |
1264 -- update display selection criteria |
1264 -- update display selection criteria |
1265 if (curWep == amGirder) or (curWep == amAirAttack) or (curWep == amNapalm) or (curWep == amDrillStrike) or (curWep == amRubber) then |
1265 if ((curWep == amGirder) or (curWep == amAirAttack) or (curWep == amNapalm) or (curWep == amDrillStrike) or (curWep == amRubber)) |
|
1266 and (CurrentHedgehog ~= nil or band(GetState(CurrentHedgehog), gstHHDriven) ~= 0) then |
1266 |
1267 |
1267 ---------------hooolllllyyyy fucking shit this |
1268 ---------------hooolllllyyyy fucking shit this |
1268 -- code is a broken mess now |
1269 -- code is a broken mess now |
1269 -- it was redesigned and compromised three times |
1270 -- it was redesigned and compromised three times |
1270 -- so now it is a mess trying to do what it was |
1271 -- so now it is a mess trying to do what it was |
1343 -- contents of crates |
1344 -- contents of crates |
1344 -- gears to reposition etc. |
1345 -- gears to reposition etc. |
1345 --------------------------------------------------------------- |
1346 --------------------------------------------------------------- |
1346 |
1347 |
1347 function updateCost() |
1348 function updateCost() |
|
1349 |
|
1350 if CurrentHedgehog == nil or band(GetState(CurrentHedgehog), gstHHDriven) == 0 then return end |
1348 |
1351 |
1349 if pMode[pIndex] == loc("Healing Station") then |
1352 if pMode[pIndex] == loc("Healing Station") then |
1350 placedExpense = 50 |
1353 placedExpense = 50 |
1351 elseif pMode[pIndex] == loc("Weapon Filter") then |
1354 elseif pMode[pIndex] == loc("Weapon Filter") then |
1352 placedExpense = 50 |
1355 placedExpense = 50 |
1408 end |
1411 end |
1409 |
1412 |
1410 end |
1413 end |
1411 |
1414 |
1412 function showModeMessage() |
1415 function showModeMessage() |
1413 if CurrentHedgehog == nil then return end |
1416 if CurrentHedgehog == nil or band(GetState(CurrentHedgehog), gstHHDriven) == 0 then return end |
1414 local val = pMode[pIndex] |
1417 local val = pMode[pIndex] |
1415 local str |
1418 local str |
1416 if cat[cIndex] == "Mine Placement Mode" then |
1419 if cat[cIndex] == "Mine Placement Mode" then |
1417 -- timer in seconds |
1420 -- timer in seconds |
1418 str = string.format(loc("%d sec"), div(val, 1000)) |
1421 str = string.format(loc("%d sec"), div(val, 1000)) |
1476 -- health/weapon/utility crate, placement of gears |
1479 -- health/weapon/utility crate, placement of gears |
1477 --------------------------------------------------------- |
1480 --------------------------------------------------------- |
1478 function onUp() |
1481 function onUp() |
1479 |
1482 |
1480 if ( (curWep == amNapalm) or (curWep == amDrillStrike) ) then |
1483 if ( (curWep == amNapalm) or (curWep == amDrillStrike) ) then |
1481 updatePlacementDisplay(-1) |
1484 if CurrentHedgehog ~= nil or band(GetState(CurrentHedgehog), gstHHDriven) ~= 0 then |
|
1485 updatePlacementDisplay(-1) |
|
1486 end |
1482 end |
1487 end |
1483 |
1488 |
1484 end |
1489 end |
1485 |
1490 |
1486 function onDown() |
1491 function onDown() |
1487 |
1492 |
1488 if ( (curWep == amNapalm) or (curWep == amDrillStrike) ) then |
1493 if ( (curWep == amNapalm) or (curWep == amDrillStrike) ) then |
1489 updatePlacementDisplay(1) |
1494 if CurrentHedgehog ~= nil or band(GetState(CurrentHedgehog), gstHHDriven) ~= 0 then |
|
1495 updatePlacementDisplay(1) |
|
1496 end |
1490 end |
1497 end |
1491 |
1498 |
1492 end |
1499 end |
1493 |
1500 |
1494 ---------------------------- |
1501 ---------------------------- |