mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Fix game mode switching countdown (which was the only thing really wrong with #15)
This commit is contained in:
@@ -14528,6 +14528,10 @@
|
|||||||
{
|
{
|
||||||
"message": "Warning, live without warning\nI say, warning, live without warning\nWithout, all right",
|
"message": "Warning, live without warning\nI say, warning, live without warning\nWithout, all right",
|
||||||
"duration": 20
|
"duration": 20
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Spitzer Damn!",
|
||||||
|
"duration": 20
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ pub(super) fn allowed_maps_provider() -> SimpleFunc<146, crate::UserTy, impl (Fn
|
|||||||
(Typed::Str("RC_Planet_Earth_02_BA".into()), Typed::Str("strCustomGameMapNameRC_Planet_Earth_02_BA".into())),
|
(Typed::Str("RC_Planet_Earth_02_BA".into()), Typed::Str("strCustomGameMapNameRC_Planet_Earth_02_BA".into())),
|
||||||
(Typed::Str("RC_Planet_Earth_01_BA".into()), Typed::Str("strCustomGameMapNameRC_Planet_Earth_01_BA".into())),
|
(Typed::Str("RC_Planet_Earth_01_BA".into()), Typed::Str("strCustomGameMapNameRC_Planet_Earth_01_BA".into())),
|
||||||
(Typed::Str("RC_Planet_Neptune_03_BA".into()), Typed::Str("strCustomGameMapNameRC_Planet_Neptune_03_BA".into())),
|
(Typed::Str("RC_Planet_Neptune_03_BA".into()), Typed::Str("strCustomGameMapNameRC_Planet_Neptune_03_BA".into())),
|
||||||
(Typed::Str("TestRobot".into()), Typed::Str("TestRobot".into())),
|
//(Typed::Str("TestRobot".into()), Typed::Str("TestRobot".into())),
|
||||||
],
|
],
|
||||||
}));
|
}));
|
||||||
Ok(params.into())
|
Ok(params.into())
|
||||||
|
|||||||
@@ -9,6 +9,17 @@ const MODE_PARAM_KEY: u8 = 136;
|
|||||||
const AUTO_HEAL_PARAM_KEY: u8 = 37;
|
const AUTO_HEAL_PARAM_KEY: u8 = 37;
|
||||||
const REMAINING_TICKS_PARAM_KEY: u8 = 145;
|
const REMAINING_TICKS_PARAM_KEY: u8 = 145;
|
||||||
|
|
||||||
|
/* Valid map names
|
||||||
|
RC_Planet_Mars_02_BA
|
||||||
|
RC_Planet_Mars_03_BA
|
||||||
|
RC_Planet_Neptune_02_BA
|
||||||
|
RC_Planet_Neptune_03_BA
|
||||||
|
RC_Planet_Earth_01_BA
|
||||||
|
RC_Planet_Earth_02_BA
|
||||||
|
RC_Planet_Mars_01_CTF
|
||||||
|
RC_Planet_Neptune_01_CTF
|
||||||
|
*/
|
||||||
|
|
||||||
pub(super) fn event_system_params_provider() -> SimpleFunc<24, crate::UserTy, impl (Fn(ParameterTable, &crate::UserTy) -> Result<ParameterTable, i16>) + Sync + Sync> {
|
pub(super) fn event_system_params_provider() -> SimpleFunc<24, crate::UserTy, impl (Fn(ParameterTable, &crate::UserTy) -> Result<ParameterTable, i16>) + Sync + Sync> {
|
||||||
SimpleFunc::new(|params, _| {
|
SimpleFunc::new(|params, _| {
|
||||||
let mut params = params.to_dict();
|
let mut params = params.to_dict();
|
||||||
@@ -16,21 +27,21 @@ pub(super) fn event_system_params_provider() -> SimpleFunc<24, crate::UserTy, im
|
|||||||
ty: TypePrefix::Str, // str
|
ty: TypePrefix::Str, // str
|
||||||
items: vec![
|
items: vec![
|
||||||
Typed::Str("RC_Planet_Neptune_03_BA".into()),
|
Typed::Str("RC_Planet_Neptune_03_BA".into()),
|
||||||
Typed::Str("RC_Planet_Earth_01_BA".into()),
|
Typed::Str("RC_Planet_Mars_02_BA".into()),
|
||||||
],
|
],
|
||||||
}));
|
}));
|
||||||
params.insert(VISIBILITY_PARAM_KEY, Typed::Arr(Arr {
|
params.insert(VISIBILITY_PARAM_KEY, Typed::Arr(Arr {
|
||||||
ty: TypePrefix::Int, // int
|
ty: TypePrefix::Int, // int
|
||||||
items: vec![
|
items: vec![
|
||||||
Typed::Int(GameMode::BattleArena as _),
|
Typed::Int(MapVisibility::Good as _),
|
||||||
Typed::Int(GameMode::BattleArena as _),
|
Typed::Int(MapVisibility::Bad as _),
|
||||||
],
|
],
|
||||||
}));
|
}));
|
||||||
params.insert(MODE_PARAM_KEY, Typed::Arr(Arr {
|
params.insert(MODE_PARAM_KEY, Typed::Arr(Arr {
|
||||||
ty: TypePrefix::Int, // int
|
ty: TypePrefix::Int, // int
|
||||||
items: vec![
|
items: vec![
|
||||||
Typed::Int(MapVisibility::Good as _),
|
Typed::Int(GameMode::SinglePlayer as _),
|
||||||
Typed::Int(MapVisibility::Bad as _),
|
Typed::Int(GameMode::BattleArena as _),
|
||||||
],
|
],
|
||||||
}));
|
}));
|
||||||
params.insert(AUTO_HEAL_PARAM_KEY, Typed::Arr(Arr {
|
params.insert(AUTO_HEAL_PARAM_KEY, Typed::Arr(Arr {
|
||||||
@@ -40,7 +51,7 @@ pub(super) fn event_system_params_provider() -> SimpleFunc<24, crate::UserTy, im
|
|||||||
Typed::Bool(false.into()),
|
Typed::Bool(false.into()),
|
||||||
],
|
],
|
||||||
}));
|
}));
|
||||||
params.insert(REMAINING_TICKS_PARAM_KEY, Typed::Long(1_000_000));
|
params.insert(REMAINING_TICKS_PARAM_KEY, Typed::Long(24 * 60 * 60 * 1_000_000 * 10 /* 24 hours in ticks (100ns units) */));
|
||||||
Ok(params.into())
|
Ok(params.into())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ pub(super) fn platform_config_provider() -> SimpleFunc<165, crate::UserTy, impl
|
|||||||
(Typed::Str("MainShopButtonAvailable".into()), Typed::Bool(false.into())),
|
(Typed::Str("MainShopButtonAvailable".into()), Typed::Bool(false.into())),
|
||||||
(Typed::Str("RoboPassButtonAvailable".into()), Typed::Bool(false.into())),
|
(Typed::Str("RoboPassButtonAvailable".into()), Typed::Bool(false.into())),
|
||||||
(Typed::Str("LanguageSelectionAvailable".into()), Typed::Bool(false.into())),
|
(Typed::Str("LanguageSelectionAvailable".into()), Typed::Bool(false.into())),
|
||||||
(Typed::Str("AutoJoinPublicChatRoom".into()), Typed::Bool(false.into())), // TODO maybe?
|
(Typed::Str("AutoJoinPublicChatRoom".into()), Typed::Bool(true.into())), // TODO maybe?
|
||||||
(Typed::Str("CanCreateChatRooms".into()), Typed::Bool(false.into())), // TODO
|
(Typed::Str("CanCreateChatRooms".into()), Typed::Bool(true.into())), // TODO
|
||||||
(Typed::Str("CurseVoiceEnabled".into()), Typed::Bool(false.into())),
|
(Typed::Str("CurseVoiceEnabled".into()), Typed::Bool(false.into())),
|
||||||
(Typed::Str("DeltaDNAEnabled".into()), Typed::Bool(false.into())),
|
(Typed::Str("DeltaDNAEnabled".into()), Typed::Bool(false.into())),
|
||||||
(Typed::Str("UseDecimalSystem".into()), Typed::Bool(false.into())),
|
(Typed::Str("UseDecimalSystem".into()), Typed::Bool(true.into())),
|
||||||
(Typed::Str("FeedbackURL".into()), Typed::Str("https://mstdn.ca/@ngram".into())),
|
(Typed::Str("FeedbackURL".into()), Typed::Str("https://mstdn.ca/@ngram".into())),
|
||||||
(Typed::Str("SupportURL".into()), Typed::Str("https://git.ngni.us/OpenJam/servers".into())),
|
(Typed::Str("SupportURL".into()), Typed::Str("https://git.ngni.us/OpenJam/servers".into())),
|
||||||
(Typed::Str("WikiURL".into()), Typed::Str("https://git.ngram.ca/OpenJam/servers/wiki".into())),
|
(Typed::Str("WikiURL".into()), Typed::Str("https://git.ngram.ca/OpenJam/servers/wiki".into())),
|
||||||
|
|||||||
@@ -189,6 +189,7 @@ LOGIN_MESSAGES = [
|
|||||||
"Made in sovereign Canada",
|
"Made in sovereign Canada",
|
||||||
"Finally, how to craft Robo",
|
"Finally, how to craft Robo",
|
||||||
"Warning, live without warning\nI say, warning, live without warning\nWithout, all right",
|
"Warning, live without warning\nI say, warning, live without warning\nWithout, all right",
|
||||||
|
"Spitzer Damn!",
|
||||||
]
|
]
|
||||||
|
|
||||||
def guess_category(name: str, sprite: str) -> str:
|
def guess_category(name: str, sprite: str) -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user