OpenXcom Forum

OpenXcom Forks => OXCE Bugs => OpenXcom Extended (OXCE) => OXCE Bugs FIXED => Topic started by: Alex_D on November 16, 2023, 08:01:23 am

Title: [FIXED] craft built-in weapon ammo count bug
Post by: Alex_D on November 16, 2023, 08:01:23 am
To further my thread here (https://openxcom.org/forum/index.php/topic,11578.0.html).

I did some testing, and I'm inclined to believe there is a bug somewhere, hence I put this thread for further documentation. This feature (https://openxcom.org/forum/index.php/topic,9047.0.html) is very convenient for craft built-in weapons, but there is a problem if the craft is manufactured versus purchased. If there is a craft weapon with no clip usage built into a craft that can be purchased, upon delivery the ammo starts loading. However if the craft is manufactured, the weapon doesn't being to re-load ever, until manually deactivated and reactivated. Refueling is unaffected.

To test simply add this code to a craft that can be bought and to another craft that can be purchased:
Code: [Select]
    weapons: 2
    fixedWeapons: [STR_LASER_CANNON_UC, STR_LASER_CANNON_UC]

I have no idea when the weapon reloading check is done in the code, but I there must be a difference between buy vs made.

EDIT: Mods. Please move this thread to "Bugs".
Title: Re: [FIXED] craft built-in weapon ammo count bug
Post by: Meridian on December 02, 2023, 12:24:25 pm
Fixed here: https://github.com/MeridianOXC/OpenXcom/commit/c557bf05ac515fbedd485317c3ab10776cfe6df0