NPCs/DetailPage

* display difficulty versions of the creature in the infobox
This commit is contained in:
Sarjuuk
2020-12-19 00:18:46 +01:00
parent 467a31fa3b
commit 15fb7b8711

View File

@@ -174,17 +174,14 @@ class NpcPage extends GenericPage
if ($this->subject->getField('vehicleId')) if ($this->subject->getField('vehicleId'))
$infobox[] = Lang::npc('vehicle'); $infobox[] = Lang::npc('vehicle');
// AI
if (User::isInGroup(U_GROUP_EMPLOYEE)) if (User::isInGroup(U_GROUP_EMPLOYEE))
{ {
// AI
if ($_ = $this->subject->getField('scriptName')) if ($_ = $this->subject->getField('scriptName'))
$infobox[] = 'Script'.Lang::main('colon').$_; $infobox[] = 'Script'.Lang::main('colon').$_;
else if ($_ = $this->subject->getField('aiName')) else if ($_ = $this->subject->getField('aiName'))
$infobox[] = 'AI'.Lang::main('colon').$_; $infobox[] = 'AI'.Lang::main('colon').$_;
}
if (User::isInGroup(U_GROUP_STAFF))
{
// Mechanic immune // Mechanic immune
if ($immuneMask = $this->subject->getField('mechanicImmuneMask')) if ($immuneMask = $this->subject->getField('mechanicImmuneMask'))
{ {
@@ -232,6 +229,16 @@ class NpcPage extends GenericPage
if ($buff) if ($buff)
$infobox[] = 'Extra Flags'.Lang::main('colon').'[ul][li]'.implode('[/li][li]', $buff).'[/li][/ul]'; $infobox[] = 'Extra Flags'.Lang::main('colon').'[ul][li]'.implode('[/li][li]', $buff).'[/li][/ul]';
} }
// Mode dummy references
if ($_altNPCs)
{
$this->extendGlobalData($_altNPCs->getJSGlobals());
$buff = 'Difficulty Versions'.Lang::main('colon').'[ul]';
foreach ($_altNPCs->iterate() as $id => $__)
$buff .= '[li][npc='.$id.'][/li]';
$infobox[] = $buff.'[/ul]';
}
} }
// > Stats // > Stats