Allow vehicle colour with vehicle.color

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Allow vehicle colour with vehicle.color

Post by Earendel »

I would like to be able to set the color on a vehicle (car), so with "vehicle" as a LuaEntity: vehicle.color = {r=255, g=0, b=0, a=1}
I would like this color to persist until something else changes it, such as a player entering or leaving a vehicle.
If a player is in a vehicle and the color is changed it should override the currently displayed color.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14913
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow vehicle colour with vehicle.color

Post by Rseding91 »

Vehicles don't have a color property that they save which means there's no property to modify through the API. They simply render with the color of the current player in them.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: Allow vehicle colour with vehicle.color

Post by Earendel »

Ok, in that case are there any entity types that have more than 16 possible directions, are not locked to rails, and do support the color property?
Post Reply

Return to “Implemented mod requests”