mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'laffytaffy' into 'next'
Warn in console instead of hard erroring when attempting to modify a vanilla skincolor (resolves #1046) Closes #1046 See merge request STJr/SRB2!2058
This commit is contained in:
commit
31e28bc5a1
1 changed files with 2 additions and 2 deletions
|
@ -1750,7 +1750,7 @@ static int lib_setSkinColor(lua_State *L)
|
|||
else if (i == 6 || (str && fastcmp(str,"accessible"))) {
|
||||
boolean v = lua_toboolean(L, 3);
|
||||
if (cnum < FIRSTSUPERCOLOR && v != skincolors[cnum].accessible)
|
||||
return luaL_error(L, "skincolors[] index %d is a standard color; accessibility changes are prohibited.", cnum);
|
||||
CONS_Alert(CONS_WARNING, "skincolors[] index %d is a standard color; accessibility changes are prohibited.", cnum);
|
||||
else
|
||||
info->accessible = v;
|
||||
}
|
||||
|
@ -1845,7 +1845,7 @@ static int skincolor_set(lua_State *L)
|
|||
else if (fastcmp(field,"accessible")) {
|
||||
boolean v = lua_toboolean(L, 3);
|
||||
if (cnum < FIRSTSUPERCOLOR && v != skincolors[cnum].accessible)
|
||||
return luaL_error(L, "skincolors[] index %d is a standard color; accessibility changes are prohibited.", cnum);
|
||||
CONS_Alert(CONS_WARNING, "skincolors[] index %d is a standard color; accessibility changes are prohibited.", cnum);
|
||||
else
|
||||
info->accessible = v;
|
||||
} else
|
||||
|
|
Loading…
Reference in a new issue