Spidertron Weapon Switcher Modified

by Hireama

Adds an option to the original mod to disable the switching between weapons if each weapon configuration requires its own recipe. So there is a spidertron version for each weapon but no more than one weapon type per spidertron.

Content
2 years ago
1.1
907
Combat

Changelog

Version: 1.2.9
Date: 21 Jan 2022
  Changes:
    - Simplified changes applied to collision masks to hopefully reduce chances of compatibility issues
Version: 1.2.8
Date: 5 November 2021
  Bugfixes:
    - Fixed trains being unselectable
Version: 1.2.7
Date: 26 October 2021
  Features:
    - Added optional setting to add items and recipes for each spidertron+weapon combination
  Changes:
    - Cannon shell range overrides now only apply to vanilla shells
Version: 1.2.6
Date: 14 October 2021
  Features:
    - Added switching support for spiderling from Spidertron Patrols
  Bugfixes:
    - Fixed spidertrons being unable to walk on shallow water
Version: 1.2.5
Date: 30 September 2021
  Bugfixes:
    - Fixed player being unable to walk on railway tracks
Version: 1.2.4
Date: 29 September 2021
  Features:
    - Added MK2 and MK3 cannons with increased range when playing with Spidertron Extended
    - Plays sound when switching weapons
  Bugfixes:
    - Fixed cannon shells sometimes colliding with spidertron legs
    - Fixed rare crash when mining a spidertron that was not directly placed by the player or was placed before adding this mod
Version: 1.2.3
Date: 1 April 2021
  Features:
    - Spidertron name, walking state, and modded spidertron fuel (e.g. Krastorio2) are now saved when switching weapons
  Changes:
    - Spidertron item is now called "Spidertron" instead of "Rocket Launcher Spidertron"
Version: 1.2.2
Date: 7 January 2021
  Features:
    - Waypoints, gun selection and body direction are now saved when switching weapons
  Compatibility:
    - Fixed occasional crash when playing with Spidertron Enhancements
Version: 1.2.1
Date: 12 December 2020
  Bugfixes:
    - Fixed crash when switching spidertron whilst a nearby entity contains a remote pointing to it
Version: 1.2.0
Date: 7 December 2020
  Features:
    - Updated to Factorio 1.1
    - Spidertrons now keep their target and following entities, logistic request slots, and logistic settings when switched
  Changes:
    - Remote interface value `previous_spidertron_unit_number` :: int changed to `old_spidertron` :: LuaEntity
  Bugfixes:
    - Fixed alternate weapon switcher key being invalid
Version: 1.1.4
Date: 25 September 2020
  Changes:
    - Spidertron and weapon variations no longer show up in filter selections and logistic requests
Version: 1.1.3
Date: 23 September 2020
  Features:
    - Spidertron GUI now stays open after switching weapons
    - Added remote interface `on_spidertron_switched`
Version: 1.1.2
Date: 23 September 2020
  Features:
    - Support for Spidertron Extended: MK2 and MK3 can now have their weapons switched, and all their weapons have increased range
  Changes:
    - Trunk, ammo and equipment grid are now kept perfectly when a spidertron is switched
    - In particular, burner equipment grid items no longer lose their fuel, filtered slots are not lost and items such as spidertron remotes and modular armor do not lose their associated data    
  Bugfixes:
    - Fixed crash when the player has no character (e.g. editor/sandbox)
Version: 1.1.1
Date: 27 August 2020
  Changes:
    - New thumbnail
    - Autopilot destination (from a remote) is now kept during weapon switching
  Bugfixes:
    - Fixed that remote in hand would be disconnected after weapon switch
Version: 1.1.0
Date: 25 August 2020
  Features:
    - Ammo from inactive weapon slots are now added to the player's inventory or spilled on the ground when a spidertron is picked up
    - Remotes in players' inventories or in a 30-tile radius around a player are kept connected to a spidertron when its weapon is switched
    - Added spidertron description
  Bugfixes:
    - Fixed crash when trying to switch weapons on other mods' spidertrons
Version: 1.0.0
Date: 22 August 2020
  Features:
    - Spidertron can be rotated through 5 different weapon loadouts