popravki
This commit is contained in:
@@ -368,28 +368,10 @@ class Player {
|
||||
const key = `${targetX},${targetY}`;
|
||||
if (terrainSystem.decorationsMap.has(key)) {
|
||||
const decor = terrainSystem.decorationsMap.get(key);
|
||||
// Vsi trdni objekti - igralec ne more hoditi skozi njih
|
||||
const solidTypes = [
|
||||
'tree', 'stone', 'bush', 'wall', 'ruin', 'fence', 'house', 'gravestone',
|
||||
'rock_asset', 'rock_1', 'rock_2', 'rock_small', // Kamni
|
||||
'tree_green_final', 'tree_blue_final', 'tree_dead_final', // Drevesa
|
||||
'chest', 'spawner', // City struktury
|
||||
'signpost_city', 'signpost_farm', 'signpost_both', // Signposti
|
||||
'arena' // Arena
|
||||
];
|
||||
|
||||
// Check ali je tip solid - case-insensitive
|
||||
const typeLower = (decor.type || '').toLowerCase();
|
||||
const isSolid = solidTypes.includes(decor.type) ||
|
||||
typeLower.includes('tree') ||
|
||||
typeLower.includes('sapling') ||
|
||||
typeLower.includes('rock') ||
|
||||
typeLower.includes('stone') ||
|
||||
typeLower.includes('signpost') ||
|
||||
typeLower.includes('hill');
|
||||
|
||||
if (isSolid) {
|
||||
console.log('⛔ BLOCKED:', decor.type);
|
||||
// Preverimo decor.solid property (set by TerrainSystem.addDecoration)
|
||||
if (decor.solid === true) {
|
||||
console.log('⛔ BLOCKED by solid decoration:', decor.type);
|
||||
isPassable = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user