[Code] Repair Kit
Re: [Code] Repair Kit
perrinoia wrote:Crow, quit being a douche and FIX IT!!!
Re: [Code] Repair Kit
When I spawn rush a good titan player I use my kit at spawn at full health so they can't take it off my corpse, so there's one reason I don't like this idea
However, most anni players are simple-minded turds so this is a moot point
However, most anni players are simple-minded turds so this is a moot point
Re: [Code] Repair Kit
You are a scumbag for not dropping your healthkits while you dump your ammo...justR wrote:When I spawn rush a good titan player I use my kit at spawn at full health so they can't take it off my corpse, so there's one reason I don't like this idea
However, most anni players are simple-minded turds so this is a moot point
Re: [Code] Repair Kit
no hes just a scumbag for ammo dropping lol
<--Click here to subscribe to S_hift's youtube
Click here for full access to all my tribes downloads
Click here for full access to all my tribes downloads
Re: [Code] Repair Kit
Looked into using this awhile back. It made it so if you were at full health you were unable to drop a repair kit on damaged stations, deployables etc. There's probably a way to code around that..
Re: [Code] Repair Kit
Not just full health... Using that code would prevent tossing kits regardless of your damage level.
Holy shit, this topic's got my OCD tingling like a testicle after sitting with legs crossed for too long.
Each armor has it's own repair kit function? But why... Do any of them behave differently?
Nope, they all do the same fucking thing... And what is the thing that they all do? Waste a fucking health kit if you have full health and aren't looking at something that is damaged.
My solution? Fuck all that useless ass code and simplify the god damned thing.
It doesn't have to be so complicated, guys.
Holy shit, this topic's got my OCD tingling like a testicle after sitting with legs crossed for too long.
Code: Select all
function RepairKit::onUse(%player,%item)
{
// handling this in function Armor::onRepairKit(%player)
// if(!$build)
// Player::decItemCount(%player,%item);
// GameBase::repairDamage(%player,0.2);
%c = Player::getClient(%player);
// Alliance armor support
%armor = Player::getArmor(%player);
eval(%armor @ "::onRepairKit(" @ %player @ ");");
}
Code: Select all
function armormAngel::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfAngel::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormDM::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfDM::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormBuilder::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfBuilder::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function lghost::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function fghost::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormLightArmor::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfLightArmor::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormMercenary::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfMercenary::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormNecro::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfNecro::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormSpy::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfSpy::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorTank::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorTitan::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorTroll::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armormWarrior::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function armorfWarrior::onRepairKit(%player)
{
Armor::onRepairKit(%player);
}
Code: Select all
function Armor::onRepairKit(%player)
{
// Heal poison with repair kit
%client = Player::getClient(%player);
$poisonTime[%client] = 0;
GameBase::repairDamage(%player,0.2); // moved here from RepairKit::onUse(%player,%item) -Plasmatic 3.x
if(GameBase::getLOSInfo(%player,5))
{
// Ok, it looks like the origional (Annihilation) Health kit code
// was intended to use a healthKit to partially fix a station
// It's now working.. Plasmatic 1/31/2005 6:55AM
// I also added in throwing repair damage.. Toss one at some items to repair..
%object = $los::object;
if(GameBase::getDamageLevel(%object))
{
%name = GameBase::getDataName(%object);
%class = %name.className;
%data = %name.description;
if(%name == PulseSensor || %class == Generator || %class == Station || %class == Turret || %class == MobileStation)
{
%team = GameBase::getTeam(%player); //fix enemy team healing -DaJ4ck3L
%objteam = GameBase::getTeam(%object);
if(%team == %objteam)
{
remoteDropItem(%client,RepairKit);
}
if($build)
Annihilation::incItemCount(%player,RepairKit);
//throw removes it..
//handling this in RepairKit::onCollision(%this,%object)
// GameBase::repairDamage(%object,0.27);
// GameBase::playSound(%object, ForceFieldOpen,0);
}
}
}
if(!$build)
Annihilation::decItemCount(%player,RepairKit);
}
Code: Select all
// No more wasted kits. Checks if LOS Object is friendly and damaged, or if self is damaged before using. -perrinoia
function RepairKit::onUse(%player, %item)
{
%client = Player::getClient(%player);
GameBase::getLOSInfo(%player, 5);
if(GameBase::getDamageLevel($los::object) && GameBase::getTeam(%player) == GameBase::getTeam($los::object))
remoteDropItem(%client, %item);
else if(GameBase::getDamageLevel(%player) || $poisonTime[%client])
{
$poisonTime[%client] = 0;
GameBase::repairDamage(%player, 0.2);
if(!$build)
Annihilation::decItemCount(%player, %item);
}
}