Skip to content

Commit

Permalink
Fix: PHP7 compatibility for signature mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Salvoxia committed Oct 9, 2017
1 parent 5311333 commit 7e2776c
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 16 deletions.
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/apoc/apoc.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/default/default.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}


// corp // corp
$box = imagettfbbox(10, 0, MPATH.'GUNSHIP2.TTF', $corp->getName()); $box = imagettfbbox(10, 0, MPATH.'GUNSHIP2.TTF', $corp->getName());
Expand Down Expand Up @@ -58,7 +62,7 @@
{ {
$pid = 0; $pid = 0;
} }
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 320, 20, 0, 0, 70, 70, 256, 256); imagecopyresampled($im, $img, 320, 20, 0, 0, 70, 70, 256, 256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/deimos/deimos.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/funkyapoc/funkyapoc.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/funkyjag/funkyjag.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/gesc_blue/gesc_blue.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagefttext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagefttext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/harb/harb.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/hurricane/hurricane.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/ishtar/ishtar.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/jaguar/jaguar.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/myrmidon/myrmidon.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/pilgrim/pilgrim.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/rokh/rokh.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/wolf/wolf.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down
6 changes: 5 additions & 1 deletion mods/signature_generator/signatures/zealot/zealot.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
$list->setPodsNoobships(false); $list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot); $list->addInvolvedPilot($pilot);
$kill = $list->getKill(); $kill = $list->getKill();
if(!$kill)
{
errorPic('No kills!');
}
$list->getallKills(); $list->getallKills();


imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
Expand Down Expand Up @@ -70,7 +74,7 @@ function bevel($x, $y, $size)
bevel(354, 6, 40); bevel(354, 6, 40);


// player portrait // player portrait
$img = imagecreatefromjpeg(Pilot::getPortraitPath(256,$pid)); $img = imagecreatefromjpeg($pilot->getPortraitPath(256,$pid));
//imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256); imagecopyresampled($im, $img, 6, 6, 0, 0, 63, 63, 256,256);
imagedestroy($img); imagedestroy($img);
Expand Down

0 comments on commit 7e2776c

Please sign in to comment.