Skip to content
Snippets Groups Projects
Commit ba7d74b9 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

ajout des textures

parent a1dcbb1c
Branches
No related tags found
No related merge requests found
Showing
with 32 additions and 1 deletion
......@@ -39,4 +39,22 @@ public function getType(){
public function getId(){
return $this->id;
}
public function getTexture(){
$texture = array();
if(file_exists("data/images/textures/block/".$this->id.".png")){
$texture[0] "data/images/textures/block/".$this->id.".png";
if(file_exists("data/images/textures/block/".$this->id."_top.png")){
$texture[1] "data/images/textures/block/".$this->id."_top.png";
}
}elseif(file_exists("data/images/textures/item/".$this->id.".png")){
$texture[0] "data/images/textures/item/".$this->id.".png";
}else{
$texture[0] "data/images/textures/missing.png";
}
if(!isset($texture[1])){
$texture[1] = $texture[0];
}
return $texture;
}
}
\ No newline at end of file
......@@ -16,7 +16,7 @@ public static function getAllProducts(){
$itemAleadyEntered = false;
foreach($return as $checkItem){
if($item['item']['type'] == $checkItem->getId()){
if(strtolower($item['item']['type']) == $checkItem->getId()){
$itemAleadyEntered = true;
}
}
......@@ -26,4 +26,17 @@ public static function getAllProducts(){
}
return $return;
}
public static function getShops($search=null){
if(is_array($search)){
}else{
// On récupère les shops
$shops = Connexion::pdo()->query("SELECT * FROM qs_external_cache NATURAL JOIN qs_shops")->fetchAll(PDO::FETCH_ASSOC);
for($i=0;$i<count($shops);$i++){
$item = yaml_parse($shops[$i]['itemConfig']);
$shops[$i]['item'] = new Item($item['item']['type'])
}
return $shops;
}
}
}
\ No newline at end of file
data/images/textures/block/acacia_door_bottom.png

4.05 KiB

data/images/textures/block/acacia_door_top.png

4.2 KiB

data/images/textures/block/acacia_leaves.png

971 B

data/images/textures/block/acacia_log.png

527 B

data/images/textures/block/acacia_log_top.png

576 B

data/images/textures/block/acacia_planks.png

854 B

data/images/textures/block/acacia_sapling.png

795 B

data/images/textures/block/acacia_trapdoor.png

785 B

data/images/textures/block/activator_rail.png

1.47 KiB

data/images/textures/block/activator_rail_on.png

1.47 KiB

data/images/textures/block/allium.png

483 B

data/images/textures/block/amethyst_block.png

1.09 KiB

data/images/textures/block/amethyst_cluster.png

1.51 KiB

data/images/textures/block/ancient_debris_side.png

519 B

data/images/textures/block/ancient_debris_top.png

566 B

data/images/textures/block/andesite.png

1.25 KiB

data/images/textures/block/anvil.png

890 B

data/images/textures/block/anvil_top.png

2.27 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment