Update Character Select

This commit is contained in:
Agent X 2024-09-01 13:44:55 -04:00
parent af8dc6995d
commit a084e5c62e
3 changed files with 58 additions and 44 deletions

View File

@ -4,7 +4,7 @@ if VERSION_NUMBER < 37 then
return 0 return 0
end end
MOD_VERSION = "1.9.1" MOD_VERSION = "1.9.2"
ommActive = false ommActive = false
for i in pairs(gActiveMods) do for i in pairs(gActiveMods) do

View File

@ -511,6 +511,17 @@ local sCapBhvs = {
--- @param o Object --- @param o Object
--- @param model integer --- @param model integer
local BowserKey = false
local function on_star_or_key_grab(m, o, type)
if type == INTERACT_STAR_OR_KEY then
if get_id_from_behavior(o.behavior) == id_bhvBowserKey then
BowserKey = true
else
BowserKey = false
end
end
end
function set_model(o, model) function set_model(o, model)
if optionTable[optionTableRef.localModels].toggle == 0 then return end if optionTable[optionTableRef.localModels].toggle == 0 then return end
if obj_has_behavior_id(o, id_bhvMario) ~= 0 then if obj_has_behavior_id(o, id_bhvMario) ~= 0 then
@ -523,7 +534,7 @@ function set_model(o, model)
if obj_has_behavior_id(o, id_bhvCelebrationStar) ~= 0 and o.parentObj ~= nil then if obj_has_behavior_id(o, id_bhvCelebrationStar) ~= 0 and o.parentObj ~= nil then
local i = network_local_index_from_global(o.parentObj.globalPlayerIndex) local i = network_local_index_from_global(o.parentObj.globalPlayerIndex)
local starModel = characterCelebrationStar[gPlayerSyncTable[i].modelId] local starModel = characterCelebrationStar[gPlayerSyncTable[i].modelId]
if gPlayerSyncTable[i].modelId ~= nil and starModel ~= nil and obj_has_model_extended(o, starModel) == 0 then if gPlayerSyncTable[i].modelId ~= nil and starModel ~= nil and obj_has_model_extended(o, starModel) == 0 and not BowserKey then
obj_set_model_extended(o, starModel) obj_set_model_extended(o, starModel)
end end
return return
@ -559,6 +570,7 @@ function set_model(o, model)
end end
hook_event(HOOK_MARIO_UPDATE, mario_update) hook_event(HOOK_MARIO_UPDATE, mario_update)
hook_event(HOOK_ON_INTERACT, on_star_or_key_grab)
hook_event(HOOK_OBJECT_SET_MODEL, set_model) hook_event(HOOK_OBJECT_SET_MODEL, set_model)
------------------ ------------------

View File

@ -3,55 +3,57 @@ if incompatibleClient then return 0 end
characterColorPresets = { characterColorPresets = {
[E_MODEL_MARIO] = { [E_MODEL_MARIO] = {
[PANTS] = {r = 0x00, g = 0x00, b = 0xff}, [PANTS] = { r = 0x00, g = 0x00, b = 0xff },
[SHIRT] = {r = 0xff, g = 0x00, b = 0x00}, [SHIRT] = { r = 0xff, g = 0x00, b = 0x00 },
[GLOVES] = {r = 0xff, g = 0xff, b = 0xff}, [GLOVES] = { r = 0xff, g = 0xff, b = 0xff },
[SHOES] = {r = 0x72, g = 0x1c, b = 0x0e}, [SHOES] = { r = 0x72, g = 0x1c, b = 0x0e },
[HAIR] = {r = 0x73, g = 0x06, b = 0x00}, [HAIR] = { r = 0x73, g = 0x06, b = 0x00 },
[SKIN] = {r = 0xfe, g = 0xc1, b = 0x79}, [SKIN] = { r = 0xfe, g = 0xc1, b = 0x79 },
[CAP] = {r = 0xff, g = 0x00, b = 0x00}, [CAP] = { r = 0xff, g = 0x00, b = 0x00 },
[EMBLEM] = {r = 0xff, g = 0x00, b = 0x00}, [EMBLEM] = { r = 0xff, g = 0x00, b = 0x00 },
}, },
[E_MODEL_LUIGI] = { [E_MODEL_LUIGI] = {
[PANTS] = {r = 0x00, g = 0x00, b = 0xff}, [PANTS] = { r = 0x00, g = 0x00, b = 0xff },
[SHIRT] = {r = 0x00, g = 0xff, b = 0x00}, [SHIRT] = { r = 0x00, g = 0xff, b = 0x00 },
[GLOVES] = {r = 0xff, g = 0xff, b = 0xff}, [GLOVES] = { r = 0xff, g = 0xff, b = 0xff },
[SHOES] = {r = 0x72, g = 0x1c, b = 0x0e}, [SHOES] = { r = 0x72, g = 0x1c, b = 0x0e },
[HAIR] = {r = 0x73, g = 0x06, b = 0x00}, [HAIR] = { r = 0x73, g = 0x06, b = 0x00 },
[SKIN] = {r = 0xfe, g = 0xc1, b = 0x79}, [SKIN] = { r = 0xfe, g = 0xc1, b = 0x79 },
[CAP] = {r = 0x00, g = 0xff, b = 0x00}, [CAP] = { r = 0x00, g = 0xff, b = 0x00 },
[EMBLEM] = {r = 0x00, g = 0xff, b = 0x00}, [EMBLEM] = { r = 0x00, g = 0xff, b = 0x00 },
}, },
[E_MODEL_TOAD_PLAYER] = { [E_MODEL_TOAD_PLAYER] = {
[PANTS] = {r = 0xff, g = 0xff, b = 0xff}, [PANTS] = { r = 0xff, g = 0xff, b = 0xff },
[SHIRT] = {r = 0x4c, g = 0x2c, b = 0xd3}, [SHIRT] = { r = 0x4c, g = 0x2c, b = 0xd3 },
[GLOVES] = {r = 0xff, g = 0xff, b = 0xff}, [GLOVES] = { r = 0xff, g = 0xff, b = 0xff },
[SHOES] = {r = 0x68, g = 0x40, b = 0x1b}, [SHOES] = { r = 0x68, g = 0x40, b = 0x1b },
[HAIR] = {r = 0x73, g = 0x06, b = 0x00}, [HAIR] = { r = 0x73, g = 0x06, b = 0x00 },
[SKIN] = {r = 0xfe, g = 0xd5, b = 0xa1}, [SKIN] = { r = 0xfe, g = 0xd5, b = 0xa1 },
[CAP] = {r = 0xff, g = 0x00, b = 0x00}, [CAP] = { r = 0xff, g = 0x00, b = 0x00 },
[EMBLEM] = {r = 0xff, g = 0x00, b = 0x00}, [EMBLEM] = { r = 0xff, g = 0x00, b = 0x00 },
}, },
[E_MODEL_WALUIGI] = { [E_MODEL_WALUIGI] = {
[PANTS] = {r = 0x16, g = 0x16, b = 0x27}, [PANTS] = { r = 0x16, g = 0x16, b = 0x27 },
[SHIRT] = {r = 0x61, g = 0x26, b = 0xb0}, [SHIRT] = { r = 0x61, g = 0x26, b = 0xb0 },
[GLOVES] = {r = 0xff, g = 0xff, b = 0xff}, [GLOVES] = { r = 0xff, g = 0xff, b = 0xff },
[SHOES] = {r = 0xfe, g = 0x76, b = 0x00}, [SHOES] = { r = 0xfe, g = 0x76, b = 0x00 },
[HAIR] = {r = 0x73, g = 0x53, b = 0x00}, [HAIR] = { r = 0x73, g = 0x53, b = 0x00 },
[SKIN] = {r = 0xfe, g = 0xc1, b = 0x79}, [SHOES] = { r = 0xfe, g = 0x76, b = 0x00 },
[CAP] = {r = 0x61, g = 0x26, b = 0xb0}, [SKIN] = { r = 0xfe, g = 0xc1, b = 0x79 },
[EMBLEM] = {r = 0x4c, g = 0x2c, b = 0xd3}, [CAP] = { r = 0x61, g = 0x26, b = 0xb0 },
[EMBLEM] = { r = 0xff, g = 0xde, b = 0x00 },
}, },
[E_MODEL_WARIO] = { [E_MODEL_WARIO] = {
[PANTS] = {r = 0x7f, g = 0x20, b = 0x7a}, [PANTS] = { r = 0x7f, g = 0x20, b = 0x7a },
[SHIRT] = {r = 0xe3, g = 0xa9, b = 0x01}, [SHIRT] = { r = 0xff, g = 0xbd, b = 0x00 },
[GLOVES] = {r = 0xff, g = 0xff, b = 0xff}, [GLOVES] = { r = 0xff, g = 0xff, b = 0xff },
[SHOES] = {r = 0x0e, g = 0x72, b = 0x1c}, [SHOES] = { r = 0x0e, g = 0x72, b = 0x1c },
[HAIR] = {r = 0x73, g = 0x53, b = 0x00}, [HAIR] = { r = 0x73, g = 0x53, b = 0x00 },
[SKIN] = {r = 0xfe, g = 0xc1, b = 0x79}, [SHOES] = { r = 0x0e, g = 0x72, b = 0x1c },
[CAP] = {r = 0xe3, g = 0xa9, b = 0x01}, [SKIN] = { r = 0xfe, g = 0xc1, b = 0x79 },
[EMBLEM] = {r = 0x61, g = 0x26, b = 0xb0}, [CAP] = { r = 0xff, g = 0xbd, b = 0x00 },
}, [EMBLEM] = { r = 0x00, g = 0x00, b = 0xff },
}
} }
local defaultModels = { local defaultModels = {