Skip to content

Commit 9015d86

Browse files
authored
Merge pull request #2 from vector988/master
Adding functionality
2 parents c688471 + 093529f commit 9015d86

6 files changed

Lines changed: 263 additions & 30 deletions

File tree

MapSelector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void LauncherManager_Start(On.SpielmannSpiel_Launcher.LauncherManager.orig_Start
2222
mapSelect.name = "MapSelect";
2323
mapSelectDropdown = mapSelect.GetComponent<Dropdown>();
2424
mapSelectDropdown.ClearOptions();
25-
mapSelectDropdown.AddOptions(new List<string> { "Irohazaka", "Akina", "USUI", "Akagi" });
25+
mapSelectDropdown.AddOptions(new List<string> { "Irohazaka", "Akina", "USUI", "Akagi", "DriftSekai" });
2626
mapSelectDropdown.onValueChanged = new Dropdown.DropdownEvent();
2727
initialMap = PlayerPrefs.GetString("InitialMap", "Irohazaka");
2828
mapSelectDropdown.value = mapSelectDropdown.options.FindIndex(option => option.text == initialMap);

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
Это мод на Initial Drift Online. Исправлено большое кол-во багов и добавлены новые возможности
66

77
# Список изменений
8+
- Увеличены значения настроек ​​регулировки развала колес и ​​регулировки высоты подвески в гараже с тюнингом
89
- Добавлена настройка жёсткости пружины и демпфера подвески в гараже с тюнингом
9-
- Вместо кнопки Лобби теперь кнопка Teleport. Позволяет моментально переместиться для заезда на спуск или подъём. На Ирохазаке также можно попасть на спуск с другой стороны горы. На Харуне - на подъём возле нового магазина тофу
10+
- Вместо кнопки Лобби теперь кнопка Teleport. Позволяет моментально переместиться для заезда на спуск или подъём. На Ирохазаке также можно попасть в автосалон, в магазин тюнинга и на спуск с другой стороны горы. На Харуне - на подъём возле нового магазина тофу. На Усуи - в мастерскую по настройке освещения.
11+
- Добавлены поля для ввода цветов в шестнадцатеричном представлении (пример: ```#FEE5AC```) во всех цветовых палитрах.
1012
- Сильно оптимизирован игровой код. В скриншотах ниже есть сравнение
1113
- Добавлен таймер доставки тофу
1214
- Добавлена возможность вызывать противника на гонку и на спуск и на подъём на любой трассе (кроме Driftsekai)
@@ -58,12 +60,19 @@
5860
</details>
5961
<details>
6062
<summary>Ещё скриншоты с нововведениями</summary>
61-
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/82434723-7ca5-400f-af51-5c220b583cc8">
63+
Menu in Irohazaka
64+
<img src="https://github.com/user-attachments/assets/451a7fe4-fd83-454f-98a4-8ffe9addb087" height="100%" width="100%">
65+
Menu in USUI
66+
<img src="https://github.com/user-attachments/assets/58b261b4-beb7-4da6-8ed0-890183267081" height="100%" width="100%">
67+
Parameters in the garage
68+
69+
<img src="https://github.com/user-attachments/assets/8da4b6a0-7b99-4c84-9703-032e2f5e1c04" height="50%" width="49.5%">&nbsp;&nbsp;<img src="https://github.com/user-attachments/assets/924454d8-bccc-41c5-91d3-97657bcca9ad" height="50%" width="49.5%" margin-left=10px>
6270
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/4f8555b6-f5cf-4df9-a432-51342c7dc907">
6371
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/9f8f3da9-d24d-4d72-ac25-2496f5e8710d">
6472
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/b39ee05a-3e64-4211-b6c9-b9494cf3e965">
6573
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/cfa45063-5f92-4c9a-b3e5-a9105e0f492e">
6674
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/a08cb924-0757-486d-b76a-dfe66a02c722">
75+
<img src="https://github.com/user-attachments/assets/2707741d-42b4-4e06-ae9f-30060569ce4f" height="100%" width="100%">
6776
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/da36db87-a013-44ab-aa1d-bc564ea43921">
6877
</details>
6978

@@ -102,8 +111,10 @@ Type = MonoBehaviour
102111
This is a mod for Initial Drift Online. The goal is to fix various issues and add some quality of life improvements and even new features
103112

104113
# List of changes
105-
- Added suspension spring force and damper customization. Check garage for options
106-
- Replaced Lobby button with Teleport button that can take you Downhill or Uphill. And also Dowhnill 2 on Irohazaka and Uphill 2 on Haruna
114+
- The values for the wheel camber adjustment and suspension height adjustment settings in the tuning garage have been increased
115+
- Added adjustment of the stiffness of the spring and suspension damper in the garage with tuning
116+
- The Lobby button has been replaced with a Teleport button. It allows for instant teleportation to either a descent or an ascent. On Irohazaka, you can also teleport to the car dealership, the tuning shop, or the descent on the other side of the mountain. On Haruna, you can teleport to the ascent near the new tofu shop. On Usui, you can teleport to the lighting adjustment workshop
117+
- Fields for entering colors in hexadecimal format (e.g., #FEE5AC) have been added to all color palettes
107118
- Huge performance optimizations
108119
- Added realtime tofu delivery timer
109120
- Added a feature to invite players to battle race on every map (except Driftsekai) in both Uphill and Downhill
@@ -154,12 +165,19 @@ Check feature screenshots to see the locations
154165
</details>
155166
<details>
156167
<summary>More feature screenshots</summary>
157-
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/82434723-7ca5-400f-af51-5c220b583cc8">
168+
Menu in Irohazaka
169+
<img src="https://github.com/user-attachments/assets/451a7fe4-fd83-454f-98a4-8ffe9addb087" height="100%" width="100%">
170+
Menu in USUI
171+
<img src="https://github.com/user-attachments/assets/58b261b4-beb7-4da6-8ed0-890183267081" height="100%" width="100%">
172+
Parameters in the garage
173+
174+
<img src="https://github.com/user-attachments/assets/8da4b6a0-7b99-4c84-9703-032e2f5e1c04" height="50%" width="49.5%">&nbsp;&nbsp;<img src="https://github.com/user-attachments/assets/924454d8-bccc-41c5-91d3-97657bcca9ad" height="50%" width="49.5%" margin-left=10px>
158175
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/4f8555b6-f5cf-4df9-a432-51342c7dc907">
159176
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/9f8f3da9-d24d-4d72-ac25-2496f5e8710d">
160177
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/b39ee05a-3e64-4211-b6c9-b9494cf3e965">
161178
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/cfa45063-5f92-4c9a-b3e5-a9105e0f492e">
162179
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/a08cb924-0757-486d-b76a-dfe66a02c722">
180+
<img src="https://github.com/user-attachments/assets/2707741d-42b4-4e06-ae9f-30060569ce4f" height="100%" width="100%">
163181
<img src="https://github.com/Kert/WarmTofuMod/assets/5028587/da36db87-a013-44ab-aa1d-bc564ea43921">
164182
</details>
165183

Racing.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ public partial class CustomRaceManager : MonoBehaviour
2121
private static RCC_CarControllerV3 rival = null;
2222
public struct RaceSettings
2323
{
24-
public string direction = "Downhill";
25-
public string order = "Parallel";
26-
public bool nitro = false;
27-
public bool collision = true;
28-
RaceSettings(string direction, string order, bool nitro, bool collision)
24+
public string direction;
25+
public string order;
26+
public bool nitro;
27+
public bool collision;
28+
public RaceSettings(string direction = "Downhill", string order = "Parallel", bool nitro = false, bool collision = true)
2929
{
3030
this.direction = direction;
3131
this.order = order;

TeleportMenu.cs

Lines changed: 124 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ enum TeleportPoints
1313
TP_Downhill,
1414
TP_Uphill,
1515
TP_Downhill2,
16-
TP_Uphill2
16+
TP_Uphill2,
17+
TP_CarDealer,
18+
TP_Tuning
1719
}
1820

1921
void TeleportPlayer(TeleportPoints tp)
@@ -38,6 +40,14 @@ void TeleportPlayer(TeleportPoints tp)
3840
pos = new Vector3(-295.3f, 204.5f, 534.2f);
3941
rot = new Quaternion(0, 1, 0, 0);
4042
break;
43+
case TeleportPoints.TP_CarDealer:
44+
pos = new Vector3(1502.4f, 258.6f, 160.6f);
45+
rot = new Quaternion(0.0f, -1.0f, 0.0f, -0.1f);
46+
break;
47+
case TeleportPoints.TP_Tuning:
48+
pos = new Vector3(1898.8f, 256.6f, 317.8f);
49+
rot = new Quaternion(0.0026f, 0.699f, -0.0014f, 0.7151f);
50+
break;
4151
}
4252
break;
4353
case "Akagi":
@@ -64,6 +74,11 @@ void TeleportPlayer(TeleportPoints tp)
6474
pos = new Vector3(-1593.9f, -212.8f, -532.2f);
6575
rot = new Quaternion(0.0f, -0.3f, 0.0f, 0.9f);
6676
break;
77+
//Point for Toshi Light
78+
case TeleportPoints.TP_Uphill2:
79+
pos = new Vector3(1277.7f, 66.68f, 709.82f);
80+
rot = new Quaternion(0.003f, 0.064f, 0.0f, 1.0f);
81+
break;
6782
}
6883
break;
6984
case "Akina":
@@ -119,7 +134,7 @@ void CreateTeleportMenu(SRUIManager uiMgr)
119134
tpButtons[0].onClick.AddListener(() => TeleportPlayer(TeleportPoints.TP_Downhill));
120135
tpButtons[1].onClick.AddListener(() => TeleportPlayer(TeleportPoints.TP_Uphill));
121136

122-
if (currentScene == "Irohazaka" || currentScene == "Akina")
137+
if (currentScene == "Irohazaka" || currentScene == "Akina" || currentScene == "USUI")
123138
{
124139
Button additionalTP = Instantiate(tpButtons[0]);
125140
additionalTP.transform.SetParent(tpButtons[0].transform.GetParent().transform);
@@ -129,30 +144,127 @@ void CreateTeleportMenu(SRUIManager uiMgr)
129144
tpButtons[0].GetComponent<RectTransform>().localPosition = new Vector3(-200, 0, 0);
130145
tpButtons[1].GetComponent<RectTransform>().localPosition = new Vector3(0, 0, 0);
131146
GameObject whiteBG = additionalTP.transform.GetParent().gameObject;
132-
whiteBG.GetComponent<RectTransform>().sizeDelta = new Vector2(670.4f, 151.4f);
147+
whiteBG.GetComponent<RectTransform>().sizeDelta = new Vector2(670.4f, 150.4f);
133148
GameObject menuOverlay = whiteBG.transform.GetParent().gameObject;
134149
menuOverlay.GetComponent<RectTransform>().sizeDelta = new Vector2(668.9f, 190.6f);
135150

136151
additionalTP.onClick = new Button.ButtonClickedEvent();
152+
153+
Navigation newNav = new Navigation();
154+
137155
if (currentScene == "Irohazaka")
138156
{
157+
Button additionalTP_CarDealer = Instantiate(tpButtons[0]);
158+
Button additionalTP_Tuning = Instantiate(tpButtons[0]);
159+
additionalTP_CarDealer.transform.SetParent(tpButtons[0].transform.GetParent().transform);
160+
additionalTP_Tuning.transform.SetParent(tpButtons[0].transform.GetParent().transform);
161+
RectTransform t_2 = additionalTP_CarDealer.GetComponent<RectTransform>();
162+
RectTransform t_3 = additionalTP_Tuning.GetComponent<RectTransform>();
163+
164+
t.localPosition = new Vector3(200, 50, 0);
165+
tpButtons[0].GetComponent<RectTransform>().localPosition = new Vector3(-200, 50, 0);
166+
tpButtons[1].GetComponent<RectTransform>().localPosition = new Vector3(0, 50, 0);
167+
168+
t_2.localScale = new Vector3(1, 1, 1);
169+
t_2.localPosition = new Vector3(-100, -45, 0);
170+
171+
t_3.localScale = new Vector3(1, 1, 1);
172+
t_3.localPosition = new Vector3(100, -45, 0);
173+
174+
whiteBG.GetComponent<RectTransform>().anchoredPosition = new Vector2(0.0f, -55.0f);
175+
whiteBG.GetComponent<RectTransform>().sizeDelta = new Vector2(670.4f, 210.0f);
176+
177+
additionalTP_CarDealer.onClick = new Button.ButtonClickedEvent();
178+
additionalTP_Tuning.onClick = new Button.ButtonClickedEvent();
179+
139180
additionalTP.GetComponentInChildren<Text>().text = "Downhill 2";
140181
additionalTP.onClick.AddListener(() => TeleportPlayer(TeleportPoints.TP_Downhill2));
182+
additionalTP_CarDealer.GetComponentInChildren<Text>().text = "Car\nDealer";
183+
additionalTP_CarDealer.onClick.AddListener(() => TeleportPlayer(TeleportPoints.TP_CarDealer));
184+
additionalTP_Tuning.GetComponentInChildren<Text>().text = "Tuning\nShop";
185+
additionalTP_Tuning.onClick.AddListener(() => TeleportPlayer(TeleportPoints.TP_Tuning));
186+
187+
// Navigation for teleport buttons
188+
newNav.mode = Navigation.Mode.Explicit;
189+
newNav.selectOnRight = tpButtons[1];
190+
newNav.selectOnLeft = additionalTP;
191+
newNav.selectOnDown = additionalTP_CarDealer;
192+
tpButtons[0].navigation = newNav;
193+
194+
newNav = new Navigation();
195+
newNav.mode = Navigation.Mode.Explicit;
196+
newNav.selectOnLeft = tpButtons[0];
197+
newNav.selectOnRight = additionalTP;
198+
newNav.selectOnDown = additionalTP_CarDealer;
199+
tpButtons[1].navigation = newNav;
200+
201+
newNav = new Navigation();
202+
newNav.mode = Navigation.Mode.Explicit;
203+
newNav.selectOnRight = tpButtons[0];
204+
newNav.selectOnLeft = tpButtons[1];
205+
newNav.selectOnDown = additionalTP_Tuning;
206+
additionalTP.navigation = newNav;
207+
208+
newNav = new Navigation();
209+
newNav.mode = Navigation.Mode.Explicit;
210+
newNav.selectOnUp = tpButtons[0];
211+
newNav.selectOnRight = additionalTP_Tuning;
212+
newNav.selectOnLeft = additionalTP_Tuning;
213+
additionalTP_CarDealer.navigation = newNav;
214+
215+
newNav = new Navigation();
216+
newNav.mode = Navigation.Mode.Explicit;
217+
newNav.selectOnUp = additionalTP;
218+
newNav.selectOnRight = additionalTP_CarDealer;
219+
newNav.selectOnLeft = additionalTP_CarDealer;
220+
additionalTP_Tuning.navigation = newNav;
141221
}
222+
223+
else if (currentScene == "USUI")
224+
{
225+
additionalTP.GetComponentInChildren<Text>().text = "Toshi\nLight";
226+
additionalTP.onClick.AddListener(() => TeleportPlayer(TeleportPoints.TP_Uphill2));
227+
228+
newNav.mode = Navigation.Mode.Explicit;
229+
newNav.selectOnLeft = additionalTP;
230+
newNav.selectOnRight = tpButtons[1];
231+
tpButtons[0].navigation = newNav;
232+
233+
newNav = new Navigation();
234+
newNav.mode = Navigation.Mode.Explicit;
235+
newNav.selectOnLeft = tpButtons[0];
236+
newNav.selectOnRight = additionalTP;
237+
tpButtons[1].navigation = newNav;
238+
239+
newNav.mode = Navigation.Mode.Explicit;
240+
newNav.selectOnLeft = tpButtons[1];
241+
newNav.selectOnRight = tpButtons[0];
242+
additionalTP.navigation = newNav;
243+
244+
}
245+
142246
else if (currentScene == "Akina")
143247
{
144248
additionalTP.GetComponentInChildren<Text>().text = "Uphill 2";
145249
additionalTP.onClick.AddListener(() => TeleportPlayer(TeleportPoints.TP_Uphill2));
250+
251+
newNav.mode = Navigation.Mode.Explicit;
252+
newNav.selectOnLeft = additionalTP;
253+
newNav.selectOnRight = tpButtons[1];
254+
tpButtons[0].navigation = newNav;
255+
256+
newNav = new Navigation();
257+
newNav.mode = Navigation.Mode.Explicit;
258+
newNav.selectOnLeft = tpButtons[0];
259+
newNav.selectOnRight = additionalTP;
260+
tpButtons[1].navigation = newNav;
261+
262+
newNav.mode = Navigation.Mode.Explicit;
263+
newNav.selectOnLeft = tpButtons[1];
264+
newNav.selectOnRight = tpButtons[0];
265+
additionalTP.navigation = newNav;
146266
}
147-
Navigation newNav = new Navigation();
148-
newNav.mode = Navigation.Mode.Explicit;
149-
newNav.selectOnLeft = tpButtons[1];
150-
additionalTP.navigation = newNav;
151-
newNav = new Navigation();
152-
newNav.mode = Navigation.Mode.Explicit;
153-
newNav.selectOnLeft = tpButtons[0];
154-
newNav.selectOnRight = additionalTP;
155-
tpButtons[1].navigation = newNav;
267+
156268
}
157269

158270
lobby.onClick.AddListener(TeleportMenu);

0 commit comments

Comments
 (0)