equal
deleted
inserted
replaced
24 |
24 |
25 procedure initModule; |
25 procedure initModule; |
26 procedure freeModule; |
26 procedure freeModule; |
27 |
27 |
28 procedure AddAmmoStore; |
28 procedure AddAmmoStore; |
29 procedure SetAmmoLoadout(s: shortstring); |
29 procedure SetAmmoLoadout(var s: shortstring); |
30 procedure SetAmmoProbability(s: shortstring); |
30 procedure SetAmmoProbability(var s: shortstring); |
31 procedure SetAmmoDelay(s: shortstring); |
31 procedure SetAmmoDelay(var s: shortstring); |
32 procedure SetAmmoReinforcement(s: shortstring); |
32 procedure SetAmmoReinforcement(var s: shortstring); |
33 procedure AssignStores; |
33 procedure AssignStores; |
34 procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType); |
34 procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType); |
35 procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType; cnt: LongWord); |
35 procedure AddAmmo(var Hedgehog: THedgehog; ammo: TAmmoType; cnt: LongWord); |
36 function HHHasAmmo(var Hedgehog: THedgehog; Ammo: TAmmoType): LongWord; |
36 function HHHasAmmo(var Hedgehog: THedgehog; Ammo: TAmmoType): LongWord; |
37 procedure PackAmmo(Ammo: PHHAmmo; Slot: LongInt); |
37 procedure PackAmmo(Ammo: PHHAmmo; Slot: LongInt); |
419 for t:= Low(TAmmoType) to High(TAmmoType) do |
419 for t:= Low(TAmmoType) to High(TAmmoType) do |
420 if (Ammoz[t].Ammo.Propz and ammoprop_NotBorder) <> 0 then |
420 if (Ammoz[t].Ammo.Propz and ammoprop_NotBorder) <> 0 then |
421 Ammoz[t].Probability:= 0 |
421 Ammoz[t].Probability:= 0 |
422 end; |
422 end; |
423 |
423 |
424 procedure SetAmmoLoadout(s: shortstring); |
424 procedure SetAmmoLoadout(var s: shortstring); |
425 begin |
425 begin |
426 ammoLoadout:= s; |
426 ammoLoadout:= s; |
427 end; |
427 end; |
428 |
428 |
429 procedure SetAmmoProbability(s: shortstring); |
429 procedure SetAmmoProbability(var s: shortstring); |
430 begin |
430 begin |
431 ammoProbability:= s; |
431 ammoProbability:= s; |
432 end; |
432 end; |
433 |
433 |
434 procedure SetAmmoDelay(s: shortstring); |
434 procedure SetAmmoDelay(var s: shortstring); |
435 begin |
435 begin |
436 ammoDelay:= s; |
436 ammoDelay:= s; |
437 end; |
437 end; |
438 |
438 |
439 procedure SetAmmoReinforcement(s: shortstring); |
439 procedure SetAmmoReinforcement(var s: shortstring); |
440 begin |
440 begin |
441 ammoReinforcement:= s; |
441 ammoReinforcement:= s; |
442 end; |
442 end; |
443 |
443 |
444 // Restore indefinitely disabled weapons and initial weapon counts. Only used for hog placement right now |
444 // Restore indefinitely disabled weapons and initial weapon counts. Only used for hog placement right now |
468 end; |
468 end; |
469 |
469 |
470 procedure initModule; |
470 procedure initModule; |
471 var i: Longword; |
471 var i: Longword; |
472 begin |
472 begin |
473 RegisterVariable('ammloadt', vtCommand, @SetAmmoLoadout, false); |
473 RegisterVariable('ammloadt', @SetAmmoLoadout, false); |
474 RegisterVariable('ammdelay', vtCommand, @SetAmmoDelay, false); |
474 RegisterVariable('ammdelay', @SetAmmoDelay, false); |
475 RegisterVariable('ammprob', vtCommand, @SetAmmoProbability, false); |
475 RegisterVariable('ammprob', @SetAmmoProbability, false); |
476 RegisterVariable('ammreinf', vtCommand, @SetAmmoReinforcement, false); |
476 RegisterVariable('ammreinf', @SetAmmoReinforcement, false); |
477 RegisterVariable('ammstore', vtCommand, @chAddAmmoStore , false); |
477 RegisterVariable('ammstore', @chAddAmmoStore , false); |
478 |
478 |
479 StoreCnt:= 0; |
479 StoreCnt:= 0; |
480 ammoLoadout:= ''; |
480 ammoLoadout:= ''; |
481 ammoProbability:= ''; |
481 ammoProbability:= ''; |
482 ammoDelay:= ''; |
482 ammoDelay:= ''; |