|
| 1 | +version "4.14.1" |
| 2 | + |
| 3 | +// Copyright 2020 - 2025 Nash Muhandes |
| 4 | +// All rights reserved. |
| 5 | +// |
| 6 | +// Redistribution and use in source and binary forms, with or without |
| 7 | +// modification, are permitted provided that the following conditions |
| 8 | +// are met: |
| 9 | +// |
| 10 | +// 1. Redistributions of source code must retain the above copyright |
| 11 | +// notice, this list of conditions and the following disclaimer. |
| 12 | +// 2. Redistributions in binary form must reproduce the above copyright |
| 13 | +// notice, this list of conditions and the following disclaimer in the |
| 14 | +// documentation and/or other materials provided with the distribution. |
| 15 | +// 3. The name of the author may not be used to endorse or promote products |
| 16 | +// derived from this software without specific prior written permission. |
| 17 | +// |
| 18 | +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 19 | +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 20 | +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 21 | +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 22 | +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 23 | +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 24 | +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 25 | +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 | +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 27 | +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | + |
| 29 | +//=========================================================================== |
| 30 | +// |
| 31 | +// CBlood |
| 32 | +// Written by Nash Muhandes |
| 33 | +// |
| 34 | +// License: MIT |
| 35 | +// |
| 36 | +//=========================================================================== |
| 37 | + |
| 38 | +class CBloodHandler : EventHandler |
| 39 | +{ |
| 40 | + override void WorldThingSpawned(WorldEvent e) |
| 41 | + { |
| 42 | + if (!e.Thing) |
| 43 | + return; |
| 44 | + |
| 45 | + Actor mo = e.Thing; |
| 46 | + |
| 47 | + if (!mo.bShootable) |
| 48 | + return; |
| 49 | + |
| 50 | + CBlood.Process(mo); |
| 51 | + } |
| 52 | +} |
| 53 | + |
| 54 | +//=========================================================================== |
| 55 | +// |
| 56 | +// |
| 57 | +// |
| 58 | +//=========================================================================== |
| 59 | + |
| 60 | +class CBlood play |
| 61 | +{ |
| 62 | + static void Process(Actor mo) |
| 63 | + { |
| 64 | + String className = "CBlood" .. mo.GetClassName(); |
| 65 | + class<Actor> cls = className; |
| 66 | + if (cls) |
| 67 | + { |
| 68 | + let cblood = GetDefaultByType(cls); |
| 69 | + if (cblood) |
| 70 | + { |
| 71 | + mo.bNoBlood = cblood.bNoBlood; |
| 72 | + mo.CopyBloodColor(cblood); |
| 73 | + } |
| 74 | + } |
| 75 | + } |
| 76 | +} |
| 77 | + |
| 78 | +//=========================================================================== |
| 79 | +// |
| 80 | +// Doom monsters |
| 81 | +// |
| 82 | +//=========================================================================== |
| 83 | + |
| 84 | +class CBloodBaronOfHell : Actor abstract |
| 85 | +{ |
| 86 | + Default |
| 87 | + { |
| 88 | + BloodColor "30 67 23"; |
| 89 | + } |
| 90 | +} |
| 91 | + |
| 92 | +class CBloodHellKnight : CBloodBaronOfHell abstract {} |
| 93 | + |
| 94 | +class CBloodCacodemon : Actor abstract |
| 95 | +{ |
| 96 | + Default |
| 97 | + { |
| 98 | + BloodColor "00 00 F9"; |
| 99 | + } |
| 100 | +} |
| 101 | + |
| 102 | +class CBloodLostSoul : Actor abstract |
| 103 | +{ |
| 104 | + Default |
| 105 | + { |
| 106 | + +NOBLOOD |
| 107 | + } |
| 108 | +} |
| 109 | + |
| 110 | +//=========================================================================== |
| 111 | +// |
| 112 | +// Chex Quest monsters |
| 113 | +// Yes, while GZDoom does define the default blood color inside the MAPINFO, |
| 114 | +// it doesn't seem to work correctly with Nash's Gore Mod. So now, we force |
| 115 | +// the blood color on the actor level. |
| 116 | +// |
| 117 | +//=========================================================================== |
| 118 | + |
| 119 | +class CBloodChexBlood : Actor abstract |
| 120 | +{ |
| 121 | + Default |
| 122 | + { |
| 123 | + BloodColor "3F 7D 39"; |
| 124 | + -NOBLOOD |
| 125 | + } |
| 126 | +} |
| 127 | + |
| 128 | +class CBloodChexPlayer : CBloodChexBlood abstract {} |
| 129 | +class CBloodFlemoidusCommonus : CBloodChexBlood abstract {} |
| 130 | +class CBloodFlemoidusBipedicus : CBloodChexBlood abstract {} |
| 131 | +class CBloodArmoredFlemoidusBipedicus : CBloodChexBlood abstract {} |
| 132 | +class CBloodFlemoidusCycloptisCommonus : CBloodChexBlood abstract {} |
| 133 | +class CBloodFlembrane : CBloodChexBlood abstract {} |
| 134 | +class CBloodChexSoul : CBloodChexBlood abstract {} |
| 135 | + |
| 136 | +class CBloodFlemoidusCommonusV3 : CBloodChexBlood abstract {} |
| 137 | +class CBloodFlemoidusBipedicusV3 : CBloodChexBlood abstract {} |
| 138 | +class CBloodArmoredFlemoidusBipedicusV3 : CBloodChexBlood abstract {} |
| 139 | +class CBloodFlemoidusStridicus : CBloodChexBlood abstract {} |
| 140 | +class CBloodFlemoidusCycloptisCommonusV3 : CBloodChexBlood abstract {} |
| 141 | +class CBloodFlemMine : CBloodChexBlood abstract {} |
| 142 | +class CBloodSuperCycloptis : CBloodChexBlood abstract {} |
| 143 | +class CBloodFlemoidusMaximus : CBloodChexBlood abstract {} |
| 144 | +class CBloodFlembraneV3 : CBloodChexBlood abstract {} |
| 145 | +class CBloodLarva : CBloodChexBlood abstract {} |
| 146 | +class CBloodQuadrumpus : CBloodChexBlood abstract {} |
| 147 | +class CBloodSnotfolus : CBloodChexBlood abstract {} |
| 148 | +class CBloodFlembomination : CBloodChexBlood abstract {} |
| 149 | + |
| 150 | +//=========================================================================== |
| 151 | +// |
| 152 | +// Eviternity monsters |
| 153 | +// (Submitted by MischiefNight) |
| 154 | +// |
| 155 | +//=========================================================================== |
| 156 | + |
| 157 | +class CBloodAstralCaco : Actor abstract |
| 158 | +{ |
| 159 | + Default |
| 160 | + { |
| 161 | + BloodColor "75 75 75"; |
| 162 | + } |
| 163 | +} |
| 164 | + |
| 165 | +class CBloodNightmareDemon : Actor abstract |
| 166 | +{ |
| 167 | + Default |
| 168 | + { |
| 169 | + BloodColor "31 80 65"; |
| 170 | + } |
| 171 | +} |
0 commit comments