ID:1643541
 
Code:
BaseMods
B1
icon='Base.dmi'
Click()
usr.icon='Base.dmi'
usr.icon += rgb(254,230,197)


Problem description:

Let me explain what I'm trying to do. The original base icon is completely black, which allows me to customize skin color by adding RGB to it. Instead of going through and creating icons for each Base Model, I was wondering if there was a way to add RGB to the specific turf icons I've already set.

For example, For B1, I want to add RGB(254,230,197) to it, but I can't figure out how to do it.

I created a code that I thought would work, but it didn't. Here's the code I used. It said No Left-Hand Arguement to "in"

world
New()
for(/turf/System_Turf/BaseMods/B1/b) in world
b.icon+=rgb(254,230,197)


Any help is appreciated. xD

Your issue is that you're not using for correctly. You'd want:

for (var/turf/System_Turf/BaseMods/B1/b in world)
// ...

Additionally, the old method of adding rgb() directly to an icon has been superseded by the addition of the color variable, which will essentially do the same thing (without the overhead of an icon operation):

mob/verb/Green()
src.color = rgb(0, 255, 0)
In response to LordAndrew
However, the color variable is multiplicative, not additive, so the base icons have to be white instead of black.
Whoops. Seems I made a pretty basic error. I appreciate your help! It's working fine now.