OpenXcom Forum
OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Suggestions DONE => Topic started by: Meridian on August 01, 2017, 04:58:03 pm
-
Request 1 (Dioxine): flag to hide mines on the minimap
items:
- type: STR_TRAP_KNOCKOUT_GAS
hiddenOnMinimap: true
Request 2 (Nepnep): primed grenades in red color on the minimap
...no ruleset changes needed
Of course, there can be a million grenades on a single tile and I can't check all of them... so the algorithm is as follows:
1. if the first item on the tile is a primed item (grenade, proxy, flare, ...) and is not flagged as hidden... render a red icon
2. otherwise, if the first item is hidden and there are no more items on the tile... don't render anything
3. otherwise, render normal icon
New algorithm:
1. if all items on a tile are hidden, don't show anything
2. otherwise, if at least one item is primed, show red icon
3. otherwise, show normal icon
See attached example.
-
A typical scenario where this optimization is harmful is when a soldier gets killed/stunned by reaction fire, an entire inventory (+a fresh body) will be dropped in place, and the player will never be lucky enough to have the pre-primed explosive end up as the "first" item.
-
Fully aware. I warned you.
If anyone has a better idea (other than to check potentially a million items on the ground), I'm open to suggestions.
-
Like to see something like this in the nightlies, occasionally throw a proximity grenade and its easy to loose track of it
-
OK, so after a few more discussions, I did it brute force anyway.
Let's just hope modders and players will be sane enough not to bring a million credit chip items into a base defense.
New algorithm:
1. if all items on a tile are hidden, don't show anything
2. otherwise, if at least one item is primed, show red icon
3. otherwise, show normal icon
-
Let's just hope modders and players will be sane enough
::)
-
The geoscape itself will start having performance issues before the minimap does.
-
If anyone has a better idea (other than to check potentially a million items on the ground), I'm open to suggestions.
Check up to 64 items. Nobody is going to put more than 64 items on one soldier except maybe Dioxine.
-
A mine covered with 500 kg of weapons is probably non-functional anyway. :P
Also, next stop: mine detection. B)