2024-03-11 20:13:27 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Kevin Blast Sources
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Easter Egg
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
datablock AudioProfile(GotEggSfx)
|
|
|
|
{
|
2024-03-13 17:28:04 -04:00
|
|
|
filename = "~/data/sound/easter.wav";
|
2024-03-11 20:13:27 -04:00
|
|
|
description = AudioDefault3d;
|
|
|
|
preload = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
datablock AudioProfile(GotThatEggAlready)
|
|
|
|
{
|
2024-03-13 17:28:04 -04:00
|
|
|
filename = "~/data/sound/easterfound.wav";
|
2024-03-11 20:13:27 -04:00
|
|
|
description = AudioDefault3d;
|
|
|
|
preload = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
function EasterEgg::onPickup(%this,%obj,%user,%amount)
|
|
|
|
{
|
|
|
|
Parent::onPickup(%this,%obj,%user,%amount);
|
|
|
|
%user.client.onFoundEasterEgg(%amount);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
function EasterEgg::saveState(%this,%obj,%state)
|
|
|
|
{
|
|
|
|
%state.object[%obj.getId()] = %obj.isHidden();
|
|
|
|
}
|
|
|
|
|
|
|
|
function EasterEgg::restoreState(%this,%obj,%state)
|
|
|
|
{
|
|
|
|
%obj.hide(%state.object[%obj.getId()]);
|
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
datablock ItemData(EasterEgg)
|
|
|
|
{
|
|
|
|
// Mission editor category
|
|
|
|
category = "Misc";
|
|
|
|
// it's dumb but there isn't a GenericInventoryItem class;
|
|
|
|
// and we want onPickup to fire.
|
|
|
|
className = "PowerUp";
|
|
|
|
|
|
|
|
// Basic Item properties
|
|
|
|
shapeFile = "~/data/shapes/items/easteregg.dts";
|
|
|
|
mass = 1;
|
|
|
|
friction = 1;
|
|
|
|
elasticity = 0.3;
|
|
|
|
|
|
|
|
// Dynamic properties defined by the scripts
|
|
|
|
pickupName = "the Easter Egg!";
|
|
|
|
maxInventory = 1;
|
|
|
|
noRespawn = true;
|
|
|
|
noPickupMessage = true;
|
|
|
|
};
|