feat: add zombie cure syringe mod & add audio effects for template mod
@@ -28,7 +28,7 @@ namespace Mod
|
||||
NameOverride = "Enhanced SledgeHammer",
|
||||
DescriptionOverride = "A massive demolition sledgehammer with devastating impact force and realistic physics.",
|
||||
CategoryOverride = ModAPI.FindCategory("Melee"),
|
||||
ThumbnailOverride = ModAPI.LoadSprite("sledgeHammerView.png"),
|
||||
ThumbnailOverride = ModAPI.LoadSprite("sprites/sledgeHammerView.png"),
|
||||
AfterSpawn = (Instance) =>
|
||||
{
|
||||
try
|
||||
@@ -55,7 +55,7 @@ namespace Mod
|
||||
var spriteRenderer = Instance.GetComponent<SpriteRenderer>();
|
||||
if (spriteRenderer != null)
|
||||
{
|
||||
var customSprite = ModAPI.LoadSprite("sledgeHammer.png");
|
||||
var customSprite = ModAPI.LoadSprite("sprites/sledgeHammer.png");
|
||||
if (customSprite != null)
|
||||
{
|
||||
spriteRenderer.sprite = customSprite;
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
28
mods/ZombieCureSyringe/README.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
Zombie Cure Syringe Mod
|
||||
=======================
|
||||
A revolutionary medical breakthrough that can reverse zombie infections and restore humanity to the undead!
|
||||
|
||||
How to use:
|
||||
- Spawn the Zombie Cure Syringe from the Medical category
|
||||
- Inject it into any zombie or infected person
|
||||
- Watch as the infection is cured and humanity is restored
|
||||
- The cure also provides healing effects to damaged limbs
|
||||
|
||||
Features:
|
||||
- Cures zombie infection completely
|
||||
- Restores normal human appearance and behavior
|
||||
- Provides continuous healing while active
|
||||
- Prevents re-infection
|
||||
- Creates a healing aura effect
|
||||
- Custom green healing liquid with glowing effects
|
||||
|
||||
The cure works by:
|
||||
- Removing zombie poison from the bloodstream
|
||||
- Restoring normal skin color and physical properties
|
||||
- Healing zombie-related damage
|
||||
- Preventing future infections
|
||||
- Providing regenerative effects to all limbs
|
||||
|
||||
Perfect for medical scenarios, zombie apocalypse survival, or bringing your undead friends back to life!
|
||||
|
||||
Note: Works best when injected into the head or torso for maximum effect.
|
||||
11
mods/ZombieCureSyringe/mod.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"Name": "Zombie Cure Syringe",
|
||||
"Author": "ppg-modkit",
|
||||
"Description": "A special syringe that cures zombie infections and restores humanity to the undead.",
|
||||
"ModVersion": "1.0",
|
||||
"GameVersion": "1.27.5",
|
||||
"ThumbnailPath": "thumb.png",
|
||||
"EntryPoint": "Mod.Mod",
|
||||
"Tags": ["Medical", "Biohazard", "Utility"],
|
||||
"Scripts": ["script.cs"]
|
||||
}
|
||||
154
mods/ZombieCureSyringe/script.cs
Normal file
@@ -0,0 +1,154 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Mod
|
||||
{
|
||||
public class Mod
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
// Register the cure liquid first
|
||||
ModAPI.RegisterLiquid(ZombieCureSyringe.CureSerum.ID, new ZombieCureSyringe.CureSerum());
|
||||
|
||||
// Register the zombie cure syringe
|
||||
ModAPI.Register(
|
||||
new Modification()
|
||||
{
|
||||
OriginalItem = ModAPI.FindSpawnable("Zombie Syringe"), // Base it on zombie syringe
|
||||
NameOverride = "Zombie Cure Syringe",
|
||||
DescriptionOverride = "A revolutionary antidote that reverses zombie infection and restores humanity.",
|
||||
CategoryOverride = ModAPI.FindCategory("Medical"),
|
||||
ThumbnailOverride = ModAPI.LoadSprite("sprites/cure_syringe_view.png"),
|
||||
AfterSpawn = (Instance) =>
|
||||
{
|
||||
// Remove the original zombie syringe behavior
|
||||
UnityEngine.Object.Destroy(Instance.GetComponent<SyringeBehaviour>());
|
||||
|
||||
// Add our custom cure behavior
|
||||
Instance.GetOrAddComponent<ZombieCureSyringe>();
|
||||
|
||||
// Customize the appearance
|
||||
Instance.GetComponent<SpriteRenderer>().sprite = ModAPI.LoadSprite("sprites/cure_syringe.png");
|
||||
|
||||
// Add a healing glow effect
|
||||
var glow = Instance.GetComponent<SpriteRenderer>();
|
||||
if (glow != null)
|
||||
{
|
||||
glow.color = new Color(0.3f, 1f, 0.3f, 0.8f); // Green healing glow
|
||||
}
|
||||
|
||||
// Add spawn sound effect
|
||||
var audioSource = Instance.GetComponent<AudioSource>();
|
||||
if (audioSource == null)
|
||||
{
|
||||
audioSource = Instance.AddComponent<AudioSource>();
|
||||
}
|
||||
|
||||
var spawnSound = ModAPI.LoadSound("sfx/cure_spawn.wav");
|
||||
if (spawnSound != null && audioSource != null)
|
||||
{
|
||||
audioSource.PlayOneShot(spawnSound);
|
||||
}
|
||||
|
||||
Instance.FixColliders();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public class ZombieCureSyringe : SyringeBehaviour
|
||||
{
|
||||
public override string GetLiquidID() => CureSerum.ID;
|
||||
|
||||
public class CureSerum : Liquid
|
||||
{
|
||||
public const string ID = "ZOMBIE CURE SERUM";
|
||||
|
||||
public CureSerum()
|
||||
{
|
||||
// Bright green color for the cure liquid
|
||||
Color = new Color(0.2f, 1f, 0.2f, 0.9f);
|
||||
}
|
||||
|
||||
public override void OnEnterLimb(LimbBehaviour limb)
|
||||
{
|
||||
// Cure zombie infection by removing zombie-related effects
|
||||
var person = limb.Person;
|
||||
if (person != null)
|
||||
{
|
||||
// Remove zombie poison if present
|
||||
var zombiePoison = person.GetComponent<CirculationBehaviour>()?.GetLiquid("REANIMATION AGENT");
|
||||
if (zombiePoison != null)
|
||||
{
|
||||
person.GetComponent<CirculationBehaviour>().RemoveLiquid(zombiePoison);
|
||||
}
|
||||
|
||||
// Restore human appearance and behavior
|
||||
if (limb.gameObject.name.Contains("Head"))
|
||||
{
|
||||
// Restore normal skin color
|
||||
var spriteRenderer = limb.GetComponent<SpriteRenderer>();
|
||||
if (spriteRenderer != null)
|
||||
{
|
||||
spriteRenderer.color = new Color(1f, 0.85f, 0.7f); // Normal skin tone
|
||||
}
|
||||
}
|
||||
|
||||
// Heal any zombie-related damage
|
||||
limb.WoundIntensity = 0f;
|
||||
limb.BruiseIntensity = 0f;
|
||||
limb.BurnIntensity = 0f;
|
||||
|
||||
// Restore normal physical properties
|
||||
limb.BreakingThreshold = limb.OriginalBreakingThreshold;
|
||||
limb.RegenerationSpeed = limb.OriginalRegenerationSpeed;
|
||||
}
|
||||
|
||||
// Apply healing effect
|
||||
limb.HealDamage(5f);
|
||||
}
|
||||
|
||||
public override void OnUpdate(BloodContainer container)
|
||||
{
|
||||
// Continuous healing effect while cure is in bloodstream
|
||||
if (container is LimbBehaviour limb)
|
||||
{
|
||||
limb.HealDamage(0.1f);
|
||||
|
||||
// Prevent re-infection
|
||||
var zombiePoison = container.GetLiquid("REANIMATION AGENT");
|
||||
if (zombiePoison != null)
|
||||
{
|
||||
container.RemoveLiquid(zombiePoison);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEnterContainer(BloodContainer container)
|
||||
{
|
||||
// Healing aura effect
|
||||
if (container is LimbBehaviour limb)
|
||||
{
|
||||
var person = limb.Person;
|
||||
if (person != null)
|
||||
{
|
||||
// Apply gentle healing to all limbs
|
||||
foreach (var personLimb in person.Limbs)
|
||||
{
|
||||
personLimb.HealDamage(0.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnExitContainer(BloodContainer container)
|
||||
{
|
||||
// Final healing burst when cure leaves the system
|
||||
if (container is LimbBehaviour limb)
|
||||
{
|
||||
limb.HealDamage(2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
mods/ZombieCureSyringe/sprites/cure_syringe.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
mods/ZombieCureSyringe/sprites/cure_syringe_view.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
mods/ZombieCureSyringe/thumb.png
Normal file
|
After Width: | Height: | Size: 263 KiB |