Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
> 4. Add MyCustomRelic to relic array.
This would trigger the doRecieveRelic method via the RelicGetSubscriber in the main mod file. That method would change the -1 to its actual location.
int size = __instance.relics.size();
if (size != RelicOptimizationPatches.relicsSize) {
RelicOptimizationPatches.relicsSize = size;
RelicOptimizationPatches.relicLocs.values().removeIf(val -> (val.intValue() == -1));
}
The issue can occur like so:
1. Start with empty relics array
2. Call getRelic("MyCustomRelic")
3. Hashmap entry added for "MyCustomRelic" -> Integer(-1)
4. Add MyCustomRelic to relic array.
5. Call getRelic("MyCustomRelic")
6. Hashmap returns Integer(-1), so it enters into i != null logic.
7. relicSize check sees that relics.size() != 0, so it removes all -1
8. However since it has already found i = Interger(-1), it skips to the rIterSkipped case and returns null.
that will help with that for those struggling with missing letters in their text or RAM related crashes.