mirror of
https://github.com/solcloud/Counter-Strike.git
synced 2025-02-24 11:52:23 +01:00
Formatting
This commit is contained in:
parent
2008b28fff
commit
e81bcf5d60
@ -150,7 +150,7 @@ class Score
|
||||
*/
|
||||
public function toArray(): array
|
||||
{
|
||||
$scoreboard = [[],[]];
|
||||
$scoreboard = [[], []];
|
||||
foreach ($this->playerStats as $playerId => $playerStat) {
|
||||
$key = sprintf('%d-%d-%d', $playerStat->getKills(), $playerStat->getDamage(), $playerId);
|
||||
$scoreboard[(int)$playerStat->isAttacker()][$key] = $playerStat->toArray();
|
||||
|
@ -31,7 +31,7 @@ class ItemId
|
||||
Equipment\Molotov::class => 35,
|
||||
Equipment\Smoke::class => 36,
|
||||
|
||||
Equipment\Bomb::class => 50,
|
||||
Equipment\Bomb::class => 50,
|
||||
Equipment\DefuseKit::class => 51,
|
||||
];
|
||||
|
||||
|
@ -61,7 +61,7 @@ final class SoundEvent extends TickEvent
|
||||
'player' => $this->player?->getId(),
|
||||
'surface' => $this->surface?->serialize($this->position),
|
||||
'type' => $this->type->value,
|
||||
'extra' => $this->extra,
|
||||
'extra' => $this->extra,
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,6 @@ namespace Test\Shooting;
|
||||
use cs\Core\HitBox;
|
||||
use cs\Core\Player;
|
||||
use cs\Enum\Color;
|
||||
use cs\Enum\HitBoxType;
|
||||
use cs\Event\AttackResult;
|
||||
use cs\Weapon\Knife;
|
||||
use Test\BaseTestCase;
|
||||
|
@ -74,7 +74,7 @@ class BoxTest extends BaseTest
|
||||
{
|
||||
$this->expectException(GameException::class);
|
||||
$this->expectExceptionMessage('Choose at least one box side');
|
||||
new Box(new Point(), 1,1,1, 0);
|
||||
new Box(new Point(), 1, 1, 1, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class HitBoxTest extends BaseTest
|
||||
}
|
||||
|
||||
// Just grinding code coverage...
|
||||
$point = new Point2D(1,1);
|
||||
$point = new Point2D(1, 1);
|
||||
$hit = new SphereHitBox(new Point($point->clone()->setY(-1)->addY(1)->setX(0)->x, 0), 2);
|
||||
$point->setFrom(new Point2D());
|
||||
$this->assertTrue($hit->getRelativeCenter()->to2D('xz')->equals($point));
|
||||
@ -86,7 +86,7 @@ class HitBoxTest extends BaseTest
|
||||
|
||||
foreach ($data as $angle => $xz) {
|
||||
$player->getSight()->lookHorizontal($angle);
|
||||
$this->assertPositionSame(new Point($xz[0], $y, $xz[1]), $sphere->calculateWorldCoordinate($player,new Point(15, -20, 8)), " Angle: {$angle}");
|
||||
$this->assertPositionSame(new Point($xz[0], $y, $xz[1]), $sphere->calculateWorldCoordinate($player, new Point(15, -20, 8)), " Angle: {$angle}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,6 +97,7 @@ class UtilTest extends BaseTest
|
||||
$this->expectException(GameException::class);
|
||||
$this->assertSame(123, $prop->not_exists); // @phpstan-ignore-line
|
||||
}
|
||||
|
||||
public function testGamePropertyUnknownFieldSet(): void
|
||||
{
|
||||
$prop = new GameProperty();
|
||||
|
Loading…
x
Reference in New Issue
Block a user