Customizable Weaponry for ZDoom.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DECORATE.dec 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. const int GV_PSTF1 = 1;
  2. const int GV_PSTF2 = 2;
  3. const int GV_PSTF3 = 3;
  4. const int GV_SHTF1 = 4;
  5. const int GV_SHTP1 = 5;
  6. const int GV_SSGF1 = 6;
  7. const int GV_SSGM1 = 7;
  8. DamageType NoDam {Factor 0}
  9. actor CWeapon : Weapon
  10. {
  11. +WEAPON.NOALERT
  12. Weapon.KickBack 40
  13. Weapon.AmmoUse1 1
  14. Weapon.AmmoUse2 1
  15. Weapon.AmmoGive1 4
  16. }
  17. #include "actors/CPlayer.dec" // Player
  18. #include "actors/CPistol.dec" // Beretta
  19. #include "actors/CShotgun.dec" // Shotgun
  20. #include "actors/CSuperShotgun.dec" // Super Shotgun
  21. //DEBUG
  22. /*actor vddbgx : dummy {Inventory.MaxAmount 320}
  23. actor vddbgy : dummy {Inventory.MaxAmount 200}*/
  24. /* TO - DO:
  25. * Bayonet
  26. * Explosive ammo
  27. * "ACOG" scope
  28. * Make the laser sight alert monsters and make it toggle
  29. * Sawed off shotgun
  30. */
  31. // Attachments
  32. actor Attachment : CustomInventory replaces BlurSphere
  33. {
  34. Inventory.PickupMessage "$CW_ATTACH_PKUP"
  35. States
  36. {
  37. Spawn:
  38. BOXX A -1
  39. wait
  40. Pickup:
  41. TNT1 A 0 A_JumpIf(CallACS("CW_CHECKATTACHMENT") == 0,"Failure")
  42. TNT1 A 0 ACS_NamedExecuteAlways("CW_GETATTACHMENT", 0)
  43. stop
  44. Failure:
  45. TNT1 A 0
  46. fail
  47. }
  48. }
  49. actor BackpackWithAttachment : CustomInventory replaces Backpack
  50. {
  51. Inventory.PickupMessage "$CW_BACKPK_PKUP"
  52. States
  53. {
  54. Spawn:
  55. BPAK A -1
  56. wait
  57. Pickup:
  58. TNT1 A 0 A_GiveInventory("Backpack")
  59. TNT1 A 0 A_GiveInventory("Attachment")
  60. stop
  61. }
  62. }
  63. actor dummy : Inventory {Inventory.MaxAmount 1}
  64. actor SSGLoaded : dummy {Inventory.MaxAmount 2}
  65. actor PistolSil : dummy {}
  66. actor ShotgunSil : dummy {}
  67. // Action items
  68. actor CMenu : dummy {}
  69. actor DNS : dummy {}
  70. actor CMenuNext : dummy {Inventory.MaxAmount 2}
  71. actor LaserPointer : BulletPuff
  72. {
  73. -ALLOWPARTICLES
  74. +NOTIMEFREEZE
  75. +PUFFONACTORS
  76. +NOTRIGGER
  77. +BLOODLESSIMPACT
  78. VSpeed 0
  79. States
  80. {
  81. Spawn:
  82. LAZR A 1 NoDelay BRIGHT A_SetScale(ScaleX-0.2)
  83. LAZR A 1 BRIGHT A_FadeOut(0.1)
  84. Loop
  85. }
  86. }