Skip to content

Commit 68758f4

Browse files
sandrade-dclkuruk-mmRominaMarchetti
authored
feat: host events in worlds (part 1) (#5621)
* Merge the [live] tag with the users in event cards * Add new fields in EventFromAPIModel * Update EventsSubSectionComponentController.cs * fix * Clean up unnecessary code * Show world address in the JumpIn button * Polish event card * Polish event pop up * Polish pop up. Update textures. * Show world icon in world’s events * Fix the number of users for world’s cards * Add place name into the hover area of the cards --------- Co-authored-by: Mateo Kuruk Miccino <mateomiccino@gmail.com> Co-authored-by: Romina Marchetti <rma.marchetti@gmail.com>
1 parent d54f0c4 commit 68758f4

33 files changed

+2368
-689
lines changed

browser-interface/packages/shared/world/TeleportController.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export class TeleportController {
4343
return TeleportController.goTo(
4444
target[0],
4545
target[1],
46+
true,
4647
`Found a parcel with ${closeUsers} user(s) nearby: ${target[0]},${target[1]}. Teleporting...`
4748
)
4849
} else {
@@ -64,7 +65,7 @@ export class TeleportController {
6465
const x = Math.floor(Math.random() * 301) - 150
6566
const y = Math.floor(Math.random() * 301) - 150
6667
const tpMessage = `Teleporting to random location (${x}, ${y})...`
67-
return TeleportController.goTo(x, y, tpMessage)
68+
return TeleportController.goTo(x, y, true, tpMessage)
6869
}
6970

7071
public static async goToHome(): Promise<{ message: string; success: boolean }> {
@@ -74,6 +75,7 @@ export class TeleportController {
7475
return TeleportController.goTo(
7576
homeCoordinates.x,
7677
homeCoordinates.y,
78+
true,
7779
`Teleporting to Home (${homeCoordinates.x},${homeCoordinates.y})...`
7880
)
7981
} catch (e) {
@@ -88,12 +90,14 @@ export class TeleportController {
8890
public static async goTo(
8991
x: number,
9092
y: number,
93+
goToMostPopulatedRealm: boolean = true,
9194
teleportMessage?: string
9295
): Promise<{ message: string; success: boolean }> {
9396
const tpMessage: string = teleportMessage ? teleportMessage : `Teleporting to ${x}, ${y}...`
9497
if (isInsideWorldLimits(x, y)) {
9598
try {
96-
await changeToMostPopulatedRealm()
99+
if (goToMostPopulatedRealm)
100+
await changeToMostPopulatedRealm()
97101

98102
store.dispatch(trackTeleportTriggered(tpMessage))
99103
store.dispatch(teleportToAction({ position: gridToWorld(x, y) }))

browser-interface/packages/unity-interface/BrowserInterface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ export class BrowserInterface {
10351035
const successMessage = `Welcome to realm ${serverName}!`
10361036
notifyStatusThroughChat(successMessage)
10371037
getUnityInstance().ConnectionToRealmSuccess(data)
1038-
TeleportController.goTo(x, y, successMessage).then(
1038+
TeleportController.goTo(x, y, false, successMessage).then(
10391039
() => {},
10401040
() => {}
10411041
)

unity-renderer/Assets/DCLServices/MapRendererV2/TestScene/MapRendererTestSceneHotScenesController.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ namespace DCLServices.MapRendererV2.TestScene
99
public class MapRendererTestSceneHotScenesController : MonoBehaviour, IHotScenesFetcher
1010
{
1111
[SerializeField] private IHotScenesController.HotSceneInfo[] sceneInfos = Array.Empty<IHotScenesController.HotSceneInfo>();
12+
[SerializeField] private IHotScenesController.HotWorldInfo.WorldInfo[] worldInfos = Array.Empty<IHotScenesController.HotWorldInfo.WorldInfo>();
1213

1314
private AsyncReactiveProperty<IReadOnlyList<IHotScenesController.HotSceneInfo>> property;
15+
private AsyncReactiveProperty<IReadOnlyList<IHotScenesController.HotWorldInfo.WorldInfo>> worldsProperty;
1416

1517
public void Dispose() { }
1618

@@ -20,10 +22,12 @@ public void Initialize()
2022
}
2123

2224
public IReadOnlyAsyncReactiveProperty<IReadOnlyList<IHotScenesController.HotSceneInfo>> ScenesInfo => property;
25+
public IReadOnlyAsyncReactiveProperty<IReadOnlyList<IHotScenesController.HotWorldInfo.WorldInfo>> WorldsInfo => worldsProperty;
2326

2427
public void EmitScenesInfo()
2528
{
2629
property.Value = sceneInfos;
30+
worldsProperty.Value = worldInfos;
2731
}
2832

2933
public void SetUpdateMode(IHotScenesFetcher.UpdateMode mode) { }

unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/ExploreV2/Resources/Sections/PlacesAndEventsSection/EventsSubSection/Button_SubscribeEvent.prefab

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ PrefabInstance:
151151
- target: {fileID: 3725923502685340037, guid: fb037d81b9c10ad439a13e356a17bab6,
152152
type: 3}
153153
propertyPath: m_PixelsPerUnitMultiplier
154-
value: 2.5
154+
value: 2
155155
objectReference: {fileID: 0}
156156
- target: {fileID: 4469143239268576428, guid: fb037d81b9c10ad439a13e356a17bab6,
157157
type: 3}
@@ -204,35 +204,50 @@ PrefabInstance:
204204
propertyPath: m_fontColor32.rgba
205205
value: 4283772415
206206
objectReference: {fileID: 0}
207+
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
208+
type: 3}
209+
propertyPath: m_Colors.m_NormalColor.b
210+
value: 0.9882353
211+
objectReference: {fileID: 0}
212+
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
213+
type: 3}
214+
propertyPath: m_Colors.m_NormalColor.g
215+
value: 0.9882353
216+
objectReference: {fileID: 0}
217+
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
218+
type: 3}
219+
propertyPath: m_Colors.m_NormalColor.r
220+
value: 0.9882353
221+
objectReference: {fileID: 0}
207222
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
208223
type: 3}
209224
propertyPath: m_Colors.m_PressedColor.b
210-
value: 0.77164656
225+
value: 0.8606742
211226
objectReference: {fileID: 0}
212227
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
213228
type: 3}
214229
propertyPath: m_Colors.m_PressedColor.g
215-
value: 0.71488965
230+
value: 0.8284087
216231
objectReference: {fileID: 0}
217232
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
218233
type: 3}
219234
propertyPath: m_Colors.m_PressedColor.r
220-
value: 0.990566
235+
value: 0.9811321
221236
objectReference: {fileID: 0}
222237
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
223238
type: 3}
224239
propertyPath: m_Colors.m_HighlightedColor.b
225-
value: 0.8851078
240+
value: 0.9106263
226241
objectReference: {fileID: 0}
227242
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
228243
type: 3}
229244
propertyPath: m_Colors.m_HighlightedColor.g
230-
value: 0.8537736
245+
value: 0.8937789
231246
objectReference: {fileID: 0}
232247
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
233248
type: 3}
234249
propertyPath: m_Colors.m_HighlightedColor.r
235-
value: 1
250+
value: 0.9716981
236251
objectReference: {fileID: 0}
237252
- target: {fileID: 5170059318450306070, guid: fb037d81b9c10ad439a13e356a17bab6,
238253
type: 3}

unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/ExploreV2/Resources/Sections/PlacesAndEventsSection/EventsSubSection/Button_UnsubscribeEvent.prefab

Lines changed: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ PrefabInstance:
4545
- target: {fileID: 54622623229548845, guid: fb037d81b9c10ad439a13e356a17bab6,
4646
type: 3}
4747
propertyPath: m_SizeDelta.x
48-
value: 140
48+
value: 0
4949
objectReference: {fileID: 0}
5050
- target: {fileID: 54622623229548845, guid: fb037d81b9c10ad439a13e356a17bab6,
5151
type: 3}
@@ -146,7 +146,7 @@ PrefabInstance:
146146
- target: {fileID: 3725923502685340037, guid: fb037d81b9c10ad439a13e356a17bab6,
147147
type: 3}
148148
propertyPath: m_PixelsPerUnitMultiplier
149-
value: 2.5
149+
value: 2
150150
objectReference: {fileID: 0}
151151
- target: {fileID: 4469143239268576428, guid: fb037d81b9c10ad439a13e356a17bab6,
152152
type: 3}
@@ -194,35 +194,70 @@ PrefabInstance:
194194
propertyPath: m_fontColor32.rgba
195195
value: 4279768342
196196
objectReference: {fileID: 0}
197+
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
198+
type: 3}
199+
propertyPath: m_TargetGraphic
200+
value:
201+
objectReference: {fileID: 3579113947851614117}
202+
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
203+
type: 3}
204+
propertyPath: m_Colors.m_NormalColor.b
205+
value: 1
206+
objectReference: {fileID: 0}
207+
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
208+
type: 3}
209+
propertyPath: m_Colors.m_NormalColor.g
210+
value: 1
211+
objectReference: {fileID: 0}
212+
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
213+
type: 3}
214+
propertyPath: m_Colors.m_NormalColor.r
215+
value: 1
216+
objectReference: {fileID: 0}
197217
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
198218
type: 3}
199219
propertyPath: m_Colors.m_PressedColor.b
200-
value: 0.85882354
220+
value: 0.9056604
201221
objectReference: {fileID: 0}
202222
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
203223
type: 3}
204224
propertyPath: m_Colors.m_PressedColor.g
205-
value: 0.85882354
225+
value: 0.9056604
206226
objectReference: {fileID: 0}
207227
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
208228
type: 3}
209229
propertyPath: m_Colors.m_PressedColor.r
210-
value: 0.85882354
230+
value: 0.9056604
231+
objectReference: {fileID: 0}
232+
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
233+
type: 3}
234+
propertyPath: m_Colors.m_SelectedColor.b
235+
value: 1
236+
objectReference: {fileID: 0}
237+
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
238+
type: 3}
239+
propertyPath: m_Colors.m_SelectedColor.g
240+
value: 1
241+
objectReference: {fileID: 0}
242+
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
243+
type: 3}
244+
propertyPath: m_Colors.m_SelectedColor.r
245+
value: 1
211246
objectReference: {fileID: 0}
212247
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
213248
type: 3}
214249
propertyPath: m_Colors.m_HighlightedColor.b
215-
value: 0.9339623
250+
value: 0.9622642
216251
objectReference: {fileID: 0}
217252
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
218253
type: 3}
219254
propertyPath: m_Colors.m_HighlightedColor.g
220-
value: 0.9339623
255+
value: 0.9622642
221256
objectReference: {fileID: 0}
222257
- target: {fileID: 5109399184885072362, guid: fb037d81b9c10ad439a13e356a17bab6,
223258
type: 3}
224259
propertyPath: m_Colors.m_HighlightedColor.r
225-
value: 0.9339623
260+
value: 0.9622642
226261
objectReference: {fileID: 0}
227262
- target: {fileID: 5170059318450306070, guid: fb037d81b9c10ad439a13e356a17bab6,
228263
type: 3}
@@ -301,3 +336,15 @@ PrefabInstance:
301336
objectReference: {fileID: 0}
302337
m_RemovedComponents: []
303338
m_SourcePrefab: {fileID: 100100000, guid: fb037d81b9c10ad439a13e356a17bab6, type: 3}
339+
--- !u!114 &3579113947851614117 stripped
340+
MonoBehaviour:
341+
m_CorrespondingSourceObject: {fileID: 3725923502685340037, guid: fb037d81b9c10ad439a13e356a17bab6,
342+
type: 3}
343+
m_PrefabInstance: {fileID: 152755714790630944}
344+
m_PrefabAsset: {fileID: 0}
345+
m_GameObject: {fileID: 0}
346+
m_Enabled: 1
347+
m_EditorHideFlags: 0
348+
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
349+
m_Name:
350+
m_EditorClassIdentifier:

0 commit comments

Comments
 (0)