mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 12:36:03 +00:00
Switch back to glob, array diff to ignore txt files like AiParms
This commit is contained in:
parent
9bc941faea
commit
3e50250ca9
105
src/D2Files.php
105
src/D2Files.php
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
session_start();
|
||||||
/*
|
/*
|
||||||
GPLv2 (C) <2021> <HashCasper>
|
GPLv2 (C) <2021> <HashCasper>
|
||||||
|
|
||||||
@ -21,102 +21,17 @@
|
|||||||
|
|
||||||
class D2Files {
|
class D2Files {
|
||||||
|
|
||||||
public $files = [
|
public $files = [];
|
||||||
"Arena.txt" => "Arena.txt",
|
|
||||||
"Armor.txt" => "Armor.txt",
|
|
||||||
"ArmType.txt" => "ArmType.txt",
|
|
||||||
"automagic.txt" => "automagic.txt",
|
|
||||||
"AutoMap.txt" => "AutoMap.txt",
|
|
||||||
"belts.txt" => "belts.txt",
|
|
||||||
"bodylocs.txt" => "bodylocs.txt",
|
|
||||||
"Books.txt" => "Books.txt",
|
|
||||||
"CharStats.txt" => "CharStats.txt",
|
|
||||||
"CharTemplate.txt" => "CharTemplate.txt",
|
|
||||||
"colors.txt" => "colors.txt",
|
|
||||||
"CompCode.txt" => "CompCode.txt",
|
|
||||||
"Composit.txt" => "Composit.txt",
|
|
||||||
"CubeMain.txt" => "CubeMain.txt",
|
|
||||||
"CubeMod.txt" => "CubeMod.txt",
|
|
||||||
"cubetype.txt" => "cubetype.txt",
|
|
||||||
"DifficultyLevels.txt" => "DifficultyLevels.txt",
|
|
||||||
"ElemTypes.txt" => "ElemTypes.txt",
|
|
||||||
"Events.txt" => "Events.txt",
|
|
||||||
"Experience.txt" => "Experience.txt",
|
|
||||||
"gamble.txt" => "gamble.txt",
|
|
||||||
"Gems.txt" => "Gems.txt",
|
|
||||||
"hiredesc.txt" => "hiredesc.txt",
|
|
||||||
"Hireling.txt" => "Hireling.txt",
|
|
||||||
"HitClass.txt" => "HitClass.txt",
|
|
||||||
"Inventory.txt" => "Inventory.txt",
|
|
||||||
"ItemRatio.txt" => "ItemRatio.txt",
|
|
||||||
"ItemStatCost.txt" => "ItemStatCost.txt",
|
|
||||||
"ItemTypes.txt" => "ItemTypes.txt",
|
|
||||||
"Levels.txt" => "Levels.txt",
|
|
||||||
"lowqualityitems.txt" => "lowqualityitems.txt",
|
|
||||||
"LvlMaze.txt" => "LvlMaze.txt",
|
|
||||||
"LvlPrest.txt" => "LvlPrest.txt",
|
|
||||||
"LvlSub.txt" => "LvlSub.txt",
|
|
||||||
"LvlTypes.txt" => "LvlTypes.txt",
|
|
||||||
"LvlWarp.txt" => "LvlWarp.txt",
|
|
||||||
"MagicPrefix.txt" => "MagicPrefix.txt",
|
|
||||||
"MagicSuffix.txt" => "MagicSuffix.txt",
|
|
||||||
"Misc.txt" => "Misc.txt",
|
|
||||||
"MissCalc.txt" => "MissCalc.txt",
|
|
||||||
"Missiles.txt" => "Missiles.txt",
|
|
||||||
"MonAi.txt" => "MonAi.txt",
|
|
||||||
"MonEquip.txt" => "MonEquip.txt",
|
|
||||||
"MonItemPercent.txt" => "MonItemPercent.txt",
|
|
||||||
"MonLvl.txt" => "MonLvl.txt",
|
|
||||||
"MonMode.txt" => "MonMode.txt",
|
|
||||||
"MonName.txt" => "MonName.txt",
|
|
||||||
"MonPlace.txt" => "MonPlace.txt",
|
|
||||||
"MonPreset.txt" => "MonPreset.txt",
|
|
||||||
"MonProp.txt" => "MonProp.txt",
|
|
||||||
"MonSeq.txt" => "MonSeq.txt",
|
|
||||||
"MonSounds.txt" => "MonSounds.txt",
|
|
||||||
"MonStats2.txt" => "MonStats2.txt",
|
|
||||||
"MonStats.txt" => "MonStats.txt",
|
|
||||||
"MonType.txt" => "MonType.txt",
|
|
||||||
"MonUMod.txt" => "MonUMod.txt",
|
|
||||||
"Npc.txt" => "Npc.txt",
|
|
||||||
"Objects.txt" => "Objects.txt",
|
|
||||||
"objgroup.txt" => "objgroup.txt",
|
|
||||||
"ObjMode.txt" => "ObjMode.txt",
|
|
||||||
"ObjType.txt" => "ObjType.txt",
|
|
||||||
"Overlay.txt" => "Overlay.txt",
|
|
||||||
"PetType.txt" => "PetType.txt",
|
|
||||||
"PlayerClass.txt" => "PlayerClass.txt",
|
|
||||||
"PlrMode.txt" => "PlrMode.txt",
|
|
||||||
"PlrType.txt" => "PlrType.txt",
|
|
||||||
"Properties.txt" => "Properties.txt",
|
|
||||||
"qualityitems.txt" => "qualityitems.txt",
|
|
||||||
"RarePrefix.txt" => "RarePrefix.txt",
|
|
||||||
"RareSuffix.txt" => "RareSuffix.txt",
|
|
||||||
"Runes.txt" => "Runes.txt",
|
|
||||||
"SetItems.txt" => "SetItems.txt",
|
|
||||||
"Sets.txt" => "Sets.txt",
|
|
||||||
"Shrines.txt" => "Shrines.txt",
|
|
||||||
"SkillCalc.txt" => "SkillCalc.txt",
|
|
||||||
"SkillDesc.txt" => "SkillDesc.txt",
|
|
||||||
"Skills.txt" => "Skills.txt",
|
|
||||||
"SoundEnviron.txt" => "SoundEnviron.txt",
|
|
||||||
"Sounds.txt" => "Sounds.txt",
|
|
||||||
"States.txt" => "States.txt",
|
|
||||||
"StorePage.txt" => "StorePage.txt",
|
|
||||||
"SuperUniques.txt" => "SuperUniques.txt",
|
|
||||||
"TreasureClassEx.txt" => "TreasureClassEx.txt",
|
|
||||||
"TreasureClass.txt" => "TreasureClass.txt",
|
|
||||||
"UniqueAppellation.txt" => "UniqueAppellation.txt",
|
|
||||||
"UniqueItems.txt" => "UniqueItems.txt",
|
|
||||||
"UniquePrefix.txt" => "UniquePrefix.txt",
|
|
||||||
"UniqueSuffix.txt" => "UniqueSuffix.txt",
|
|
||||||
"UniqueTitle.txt" => "UniqueTitle.txt",
|
|
||||||
"WeaponClass.txt" => "WeaponClass.txt",
|
|
||||||
"Weapons.txt" => "Weapons.txt",
|
|
||||||
];
|
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
|
$filesToIgnore = [
|
||||||
|
"AiParms.txt"
|
||||||
|
];
|
||||||
|
$glob = glob($_SESSION['path'].'*.txt');
|
||||||
|
foreach ($glob as $g){
|
||||||
|
$files[] = basename($g);
|
||||||
|
}
|
||||||
|
$this->files = array_diff($files, $filesToIgnore);
|
||||||
return $this->files;
|
return $this->files;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user