Compare commits
2 Commits
da6670956d
...
74dfb16dff
Author | SHA1 | Date | |
---|---|---|---|
74dfb16dff | |||
fe249bb6eb |
7
source_data/HDSnekTechExampleSpray/decaldef.txt
Normal file
7
source_data/HDSnekTechExampleSpray/decaldef.txt
Normal file
@ -0,0 +1,7 @@
|
||||
decal SnekSpray_Example
|
||||
{
|
||||
pic KSPEA0
|
||||
animator KiriInstantFade
|
||||
translucent 0.8
|
||||
randomflipx
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
7
source_data/HDSnekTechExampleSpray/textures.txt
Normal file
7
source_data/HDSnekTechExampleSpray/textures.txt
Normal file
@ -0,0 +1,7 @@
|
||||
Sprite "KSPEA0", 250, 150
|
||||
{
|
||||
XScale 2
|
||||
YScale 2
|
||||
Offset 125, 75
|
||||
Patch "sprites/sprays/example_spray.png", 0, 0
|
||||
}
|
9
source_data/HDSnekTechExampleSpray/zscript.zs
Normal file
9
source_data/HDSnekTechExampleSpray/zscript.zs
Normal file
@ -0,0 +1,9 @@
|
||||
class SnekSpray_Example : SnekTechSprayerPattern
|
||||
{
|
||||
default
|
||||
{
|
||||
SnekTechSprayerPattern.decalName "SnekSpray_Example";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ class GretchenCounter : HDWeapon
|
||||
weaponstatus[KGC_BATTERY] > 0)
|
||||
{
|
||||
// Discharge rate: 1/1000 chance per tick.
|
||||
int r = random(0, 4000);
|
||||
int r = random(0, 16000);
|
||||
if(r < 2) {
|
||||
weaponstatus[KGC_BATTERY] -= 1;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ class SnekTechEventHandler : EventHandler
|
||||
DoSnekTechBackpackSpawnCheck(
|
||||
e.Thing,
|
||||
SNEKTECH_SPRAYCAN,
|
||||
"Sprayer");
|
||||
"SnekTechSprayer");
|
||||
}
|
||||
|
||||
override void CheckReplacement(ReplaceEvent e)
|
||||
|
@ -21,7 +21,7 @@ enum KiriSprayerStatus
|
||||
KIRI_SPRAY_WS_PRESSURE = 2
|
||||
}
|
||||
|
||||
class Sprayer : HDWeapon
|
||||
class SnekTechSprayer : HDWeapon
|
||||
{
|
||||
default
|
||||
{
|
||||
@ -109,7 +109,7 @@ class Sprayer : HDWeapon
|
||||
|
||||
if(invoker.GetPressure() < KIRI_SPRAY_PRESSURE_PER_USE) {
|
||||
|
||||
invoker.owner.A_Log("Not enough pressure to spray.");
|
||||
invoker.owner.A_Log("Not enough pressure to spray.", true);
|
||||
|
||||
} else {
|
||||
|
||||
@ -118,7 +118,7 @@ class Sprayer : HDWeapon
|
||||
float zOffset = GunHeight() * 0.8;
|
||||
FLineTraceData lineTraceData;
|
||||
|
||||
class<SprayerPattern> sprayerPatternClass = "SprayerPattern";
|
||||
class<SnekTechSprayerPattern> sprayerPatternClass = "SnekTechSprayerPattern";
|
||||
|
||||
// Find the spray pattern class that matches the
|
||||
// player's CVar for selected pattern.
|
||||
@ -126,10 +126,10 @@ class Sprayer : HDWeapon
|
||||
"snektech_spraypattern",
|
||||
invoker.owner.player).GetString();
|
||||
for(int i = 0; i < AllActorClasses.size(); i++) {
|
||||
class<SprayerPattern> thisPatternClass = (class<SprayerPattern>)(AllActorClasses[i]);
|
||||
class<SnekTechSprayerPattern> thisPatternClass = (class<SnekTechSprayerPattern>)(AllActorClasses[i]);
|
||||
if(thisPatternClass) {
|
||||
if(thisPatternClass.GetClassName() == currentSprayCVar) {
|
||||
sprayerPatternClass = (class<SprayerPattern>)(AllActorClasses[i]);
|
||||
sprayerPatternClass = (class<SnekTechSprayerPattern>)(AllActorClasses[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -155,10 +155,10 @@ class Sprayer : HDWeapon
|
||||
CHAN_WEAPON);
|
||||
|
||||
[success, spawnedThing] = A_SpawnItemEx(
|
||||
"SprayerDecalSpawner",
|
||||
"SnekTechSprayerDecalSpawner",
|
||||
xofs : 0, yofs : 0, zofs : zOffset);
|
||||
|
||||
SprayerDecalSpawner spawner = SprayerDecalSpawner(spawnedThing);
|
||||
SnekTechSprayerDecalSpawner spawner = SnekTechSprayerDecalSpawner(spawnedThing);
|
||||
|
||||
if(success && spawner) {
|
||||
spawner.A_SetPitch(pitch);
|
||||
@ -172,7 +172,7 @@ class Sprayer : HDWeapon
|
||||
|
||||
} else {
|
||||
|
||||
invoker.owner.A_Log("Not close enough to a wall to spray.");
|
||||
invoker.owner.A_Log("Not close enough to a wall to spray.", true);
|
||||
|
||||
}
|
||||
}
|
||||
@ -298,7 +298,7 @@ class Sprayer : HDWeapon
|
||||
ret.clear();
|
||||
for(int i = 0; i < AllActorClasses.Size(); i++) {
|
||||
class<Actor> c = AllActorClasses[i];
|
||||
if(c is "SprayerPattern" && c != "SprayerPattern") {
|
||||
if(c is "SnekTechSprayerPattern" && c != "SnekTechSprayerPattern") {
|
||||
ret.push(c.GetClassName());
|
||||
}
|
||||
}
|
||||
@ -324,7 +324,7 @@ class Sprayer : HDWeapon
|
||||
// Set the new CVar.
|
||||
CVar.GetCVar("snektech_spraypattern", owner.player).SetString(patternList[newIndex]);
|
||||
currentPattern = CVar.GetCVar("snektech_spraypattern", owner.player).GetString();
|
||||
owner.A_Log("Selected spray pattern: "..currentPattern);
|
||||
owner.A_Log("Selected spray pattern: "..currentPattern, true);
|
||||
|
||||
// Current pattern is referenced in the help text, so reset
|
||||
// it.
|
||||
@ -358,7 +358,7 @@ class Sprayer : HDWeapon
|
||||
}
|
||||
}
|
||||
|
||||
class SprayerDecalSpawner : Actor
|
||||
class SnekTechSprayerDecalSpawner : Actor
|
||||
{
|
||||
default
|
||||
{
|
||||
@ -382,10 +382,10 @@ class SprayerDecalSpawner : Actor
|
||||
A_SprayDecal(actualDecalName, KIRI_SPRAY_DISTANCE);
|
||||
|
||||
// Figure out a new ID number.
|
||||
ThinkerIterator iter = ThinkerIterator.Create("SprayerDecalSpawner");
|
||||
SprayerDecalSpawner otherSpawner;
|
||||
ThinkerIterator iter = ThinkerIterator.Create("SnekTechSprayerDecalSpawner");
|
||||
SnekTechSprayerDecalSpawner otherSpawner;
|
||||
int maxId = 0;
|
||||
while(otherSpawner = SprayerDecalSpawner(iter.Next())) {
|
||||
while(otherSpawner = SnekTechSprayerDecalSpawner(iter.Next())) {
|
||||
|
||||
if(otherSpawner == self) {
|
||||
continue;
|
||||
@ -401,14 +401,14 @@ class SprayerDecalSpawner : Actor
|
||||
thisSprayerId = maxId + 1;
|
||||
|
||||
// Clear old sprayers.
|
||||
iter = ThinkerIterator.Create("SprayerDecalSpawner");
|
||||
while(otherSpawner = SprayerDecalSpawner(iter.Next())) {
|
||||
iter = ThinkerIterator.Create("SnekTechSprayerDecalSpawner");
|
||||
while(otherSpawner = SnekTechSprayerDecalSpawner(iter.Next())) {
|
||||
|
||||
if(otherSpawner == self) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(otherSpawner.thisSprayerId < (thisSprayerId - 5)) {
|
||||
if(otherSpawner.thisSprayerId < (thisSprayerId - 10)) {
|
||||
if(otherSpawner.master == master) {
|
||||
otherSpawner.Destroy();
|
||||
}
|
||||
@ -429,93 +429,93 @@ class SprayerDecalSpawner : Actor
|
||||
}
|
||||
}
|
||||
|
||||
class SprayerPattern : Actor
|
||||
class SnekTechSprayerPattern : Actor
|
||||
{
|
||||
string decalName;
|
||||
property decalName:decalName;
|
||||
|
||||
default {
|
||||
SprayerPattern.decalName "KiriTestDecal";
|
||||
SnekTechSprayerPattern.decalName "KiriTestDecal";
|
||||
}
|
||||
}
|
||||
|
||||
class SnekSpray_TransPride : SprayerPattern
|
||||
class SnekSpray_TransPride : SnekTechSprayerPattern
|
||||
{
|
||||
default
|
||||
{
|
||||
SprayerPattern.decalName "SnekSpray_TransPride";
|
||||
SnekTechSprayerPattern.decalName "SnekSpray_TransPride";
|
||||
}
|
||||
}
|
||||
|
||||
class SnekSpray_LesbianPride : SprayerPattern
|
||||
class SnekSpray_LesbianPride : SnekTechSprayerPattern
|
||||
{
|
||||
default
|
||||
{
|
||||
SprayerPattern.decalName "SnekSpray_LesbianPride";
|
||||
SnekTechSprayerPattern.decalName "SnekSpray_LesbianPride";
|
||||
}
|
||||
}
|
||||
|
||||
class SnekSpray_NBPride : SprayerPattern
|
||||
class SnekSpray_NBPride : SnekTechSprayerPattern
|
||||
{
|
||||
default
|
||||
{
|
||||
SprayerPattern.decalName "SnekSpray_NBPride";
|
||||
SnekTechSprayerPattern.decalName "SnekSpray_NBPride";
|
||||
}
|
||||
}
|
||||
|
||||
class SnekSpray_AcePride : SprayerPattern
|
||||
class SnekSpray_AcePride : SnekTechSprayerPattern
|
||||
{
|
||||
default
|
||||
{
|
||||
SprayerPattern.decalName "SnekSpray_AcePride";
|
||||
SnekTechSprayerPattern.decalName "SnekSpray_AcePride";
|
||||
}
|
||||
}
|
||||
|
||||
class SnekSpray_ProgressPride : SprayerPattern
|
||||
class SnekSpray_ProgressPride : SnekTechSprayerPattern
|
||||
{
|
||||
default
|
||||
{
|
||||
SprayerPattern.decalName "SnekSpray_ProgressPride";
|
||||
SnekTechSprayerPattern.decalName "SnekSpray_ProgressPride";
|
||||
}
|
||||
}
|
||||
|
||||
class SnekSpray_DemiPride : SprayerPattern
|
||||
class SnekSpray_DemiPride : SnekTechSprayerPattern
|
||||
{
|
||||
default
|
||||
{
|
||||
SprayerPattern.decalName "SnekSpray_DemiPride";
|
||||
SnekTechSprayerPattern.decalName "SnekSpray_DemiPride";
|
||||
}
|
||||
}
|
||||
|
||||
class SnekSpray_PanPride : SprayerPattern
|
||||
class SnekSpray_PanPride : SnekTechSprayerPattern
|
||||
{
|
||||
default
|
||||
{
|
||||
SprayerPattern.decalName "SnekSpray_PanPride";
|
||||
SnekTechSprayerPattern.decalName "SnekSpray_PanPride";
|
||||
}
|
||||
}
|
||||
|
||||
class SnekSpray_SwitchPride : SprayerPattern
|
||||
class SnekSpray_SwitchPride : SnekTechSprayerPattern
|
||||
{
|
||||
default
|
||||
{
|
||||
SprayerPattern.decalName "SnekSpray_SwitchPride";
|
||||
SnekTechSprayerPattern.decalName "SnekSpray_SwitchPride";
|
||||
}
|
||||
}
|
||||
|
||||
class SnekSpray_BiPride : SprayerPattern
|
||||
class SnekSpray_BiPride : SnekTechSprayerPattern
|
||||
{
|
||||
default
|
||||
{
|
||||
SprayerPattern.decalName "SnekSpray_BiPride";
|
||||
SnekTechSprayerPattern.decalName "SnekSpray_BiPride";
|
||||
}
|
||||
}
|
||||
|
||||
class SnekSpray_GayPride : SprayerPattern
|
||||
class SnekSpray_GayPride : SnekTechSprayerPattern
|
||||
{
|
||||
default
|
||||
{
|
||||
SprayerPattern.decalName "SnekSpray_GayPride";
|
||||
SnekTechSprayerPattern.decalName "SnekSpray_GayPride";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user