Hi! Looking at "Cars keep their color regardless of the player's color" on your info page, it seems your mod doesn't work well with GCKI and Autodrive.
GCKI allows players to "claim" and "lock" vehicles (cars + spider-vehicle prototypes). Locked vehicles can't be used by anybody (vehicle.active
, vehicle.minable
, and vehicle.operable
are set to false), claimed vehicles can be summoned and will then be teleported to a place near the owner. In order to mark the owned/reserved state, I make sure to always set vehicle color to the color of the player who has claimed/locked it.
Autodrive is a poor man's version of "AAI Programmable Vehicles" that allows you to let vehicles (car + spider-vehicle prototypes) path automatically to a destination, either with or without a player inside. The vehicle color will be set to the color of the player who remote-controls it in Autodrive, unless it also has been claimed in GCKI (GCKI color will win over Autodrive color).
As our mods have opposite premises (vehicle should/should not have the same color as the player), they constantly try to undo the changes made by the other mods. Obviously, this is bad and confusing! So how should we cope with it?
- Add conflicts with each other's mods. That's the easiest way out, but I'm more a friend of peaceful coexistence.
- You don't allow setting the color for vehicles that are managed by my mods.
- You tell my mods whenever you change the color of a vehicle, I store the color with my vehicle data and use it instead of player.color.
A quick grep for "remote" running over you files didn't find anything, but my mods already provide remote functions you could use. Therefore, option 2 would be easier to implement:
local v_data
if remote.interfaces.GCKI and remote.interfaces.GCKI.get_vehicle_data then
v_data = remote.call("GCKI", "get_vehicle_data", vehicle)
elseif remote.interfaces.autodrive and remote.interfaces.autodrive.get_vehicle_data then
v_data = remote.call("autodrive", "get_vehicle_data", vehicle)
end
if v_data and (v_data.owner or v_data.locker) then
-- Don't set color
else
-- Set color
end
However, I'd also be willing to either add new functions to my interface that you could call, or to listen to custom events you'd raise.
If you're interested in cooperating on this, we could discuss this per PM on the forums (I didn't find your name there, otherwise I'd have sent you a PM). If that's not an option, let's stay here (I'm not on Discord and don't intend to ever register there).