Skip to content

UI/raid/implament/online mode#1640

Open
Davetsa wants to merge 39 commits into
mainfrom
Ui/Raid/Implament/OnlineMode
Open

UI/raid/implament/online mode#1640
Davetsa wants to merge 39 commits into
mainfrom
Ui/Raid/Implament/OnlineMode

Conversation

@Davetsa

@Davetsa Davetsa commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the online Raid matchmaking flow and updates the Raid UI/prefab setup around it.

Changes

  • Added Photon-backed Raid matchmaking with room state handling, lobby countdown, participant list, surrender flow, and debug start support.
  • Added shared Raid room data helpers for player/clan metadata, trap slots, inventory seed/size, loot requests, and loot removal events.
  • Added live Raid inventory UI so collected loot can be reviewed and removed during gameplay.
  • Updated loot tracking to support per-player/per-owner loot state, synced removals, weight limits, and live UI refreshes.
  • Added Raid event log UI for loot and trap events, including player/avatar display support.
  • Reworked Raid timer visuals with fill progress, start countdown reset behavior, and loss-state red halo effects.
  • Updated end menu, heart panel, inventory, matchmaking, timer, and event popup prefabs.
  • Added new Raid UI graphics/assets and a solid alpha UI shader.
  • Removed unused/old prefab and script pieces such as EmptySlot, FurnitureSlot, and GraphicsChanger.

Davetsa added 30 commits June 8, 2026 16:46
Comment thread Assets/Raid/Scripts/Raid_LootTracking.cs Outdated
Comment thread Assets/Raid/Scripts/Raid_LootTracking.cs Outdated
Comment thread Assets/Raid/Scripts/Raid_LootTracking.cs Outdated
Comment thread Assets/Raid/Scripts/Raid_LootTracking.cs Outdated
Comment thread Assets/Raid/Scripts/HeartScript.cs Outdated
Comment thread Assets/Raid/Scripts/HeartScript.cs Outdated
Comment thread Assets/Raid/Scripts/HeartScript.cs Outdated
Comment thread Assets/Raid/Scripts/Raid_References.cs
Comment thread Assets/Raid/Scripts/HeartScript.cs
Comment thread Assets/Raid/Scripts/HeartScript.cs
Comment thread Assets/Raid/Scripts/HeartScript.cs
Comment thread Assets/Raid/Scripts/HeartScript.cs
Comment thread Assets/Raid/Scripts/HeartScript.cs
Comment thread Assets/Raid/Scripts/HeartScript.cs
Comment thread Assets/Raid/Scripts/HeartScript.cs
Comment thread Assets/Raid/Scripts/HeartScript.cs
public class Raid_EndMenu : MonoBehaviour
{
public static Raid_EndMenu Instance { get; private set; }

private static readonly Vector2 SpaceRemainingCloudMinimumSize = new Vector2(460f, 300f);

[SerializeField]
public RectTransform collectedFurniture;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tarvitseeko näiden olla julkisia?

[SerializeField]
public RectTransform collectedFurniture;
public RectTransform content;
public Raid_InventoryItem itemPrefab;
[SerializeField] private Raid_InventoryItem collectedLootItemPrefab;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miksi tässä on kaksi eri Raid_inventory kenttää? Varsinkin kun tuota ylempää käytetään vain, jos tätä alempaa ei löydy...

[SerializeField] private Vector2 collectedLootGridSpacing = new Vector2(180f, 310f);
[SerializeField] private int collectedLootGridPaddingTop = 80;
[SerializeField] private int collectedLootGridPaddingBottom = 40;
[SerializeField] private int collectedLootColumnCount = 3;

private CanvasGroup canvasGroup;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tarvitseeko tässä olla erillinen CanvasGroup?

{
Debug.LogError("Cannot show collected raid loot because content or itemPrefab is missing.");
return;
}

for (int i = 0; i < lootList.Count; i++)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oliko tässä helpompi käyttää foreach looppia perus for-loopin sijasta.

spaceRemainingText.text = $"{currentLootWeight:F0}kg\n/{maxLootWeight:F0}kg";
spaceRemainingText.text = $"{currentLootWeight:F0} kg\n/{maxLootWeight:F0} kg";

spaceRemainingHalo?.Sync();
}

public void ReturnToLobby()
{
SceneManager.LoadScene("10-MenuUI");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tämä pitäisi varmaankin korvata WindowNavigation skriptillä, jolloin meillä on enemmän hallintaa siitä mikä ikkuna avataan seuraavaksi. Nyt se vain avaa päävalikon oletusikkunan.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tässä voisi varmaan käyttää foreach-looppia.

return;
}

for (int i = 0; i < content.childCount; i++)

@BillTheBeast BillTheBeast Jun 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Foreach looppi antaisi tuon transformin tai jopa tuon Raid_InventoryItemin suoraan, jolloin sitä ei tarvitsisi hakea erikseen.

}
}
}

private void SetVisible(bool visible)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tarvitseeko meidän muokata Canvasgroupin arvoja tässä? Yhtä hyvin voisi vain pistää menu objektin päälle ja pois päältä tarvittaessa.

}

originalMaterial = sourceMaterial;
haloMaterial = new Material(sourceMaterial)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voisiko olla mitään järkeä antaa tälle ulkopuolelta haluttu haloMateriaali (esim. constructorissa.) Ja tämä jää tänne sitä varten jos sitä ei ole asetettuna.

new(0.21f, 0.78f, 1f, 1f),
new(0.46f, 0.82f, 0.37f, 1f)
};
private static readonly AvatarPiece[] AvatarPieces =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En oo täysin varma tarvitseeko tätä kova koodata. Tämänhän saisi vain hakemalla kyseisen enumin arvot ja asettamalla ne listaan. Sen listan sitten voi tallentaa jos sitä tarvitsee usein.

private Coroutine scrollRoutine;
private bool warnedMissingReferences;

public static Raid_EventLog FindForInventory(Transform inventoryRoot)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tämänhän voisi siirtää Raid_references skriptiin, jolloin todennäköisesti ei tarvitse suorittaa potentiaalisesti raskasta hakua, kun tämän referenssi pitäisi olla siellä jo tallessa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants