1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-07 21:58:06 -05:00

H2M-Mod Support (#337)

* feat: add h2m support

* fix: remove unneeded comma
This commit is contained in:
Liam 2024-08-13 02:05:25 +01:00 committed by GitHub
parent 4d1e7c2692
commit 88d05f5a8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 356 additions and 33 deletions

View File

@ -614,7 +614,7 @@
} }
] ]
}, },
{ {
"Game": "H1", "Game": "H1",
"Gametypes": [ "Gametypes": [
{ {
@ -662,7 +662,56 @@
"Alias": "Team Deathmatch" "Alias": "Team Deathmatch"
} }
] ]
} },
{
"Game": "H2M",
"Gametypes": [
{
"Name": "conf",
"Alias": "Kill Confirmed"
},
{
"Name": "ctf",
"Alias": "Capture The Flag"
},
{
"Name": "dd",
"Alias": "Demolition"
},
{
"Name": "dm",
"Alias": "Free For All"
},
{
"Name": "dom",
"Alias": "Domination"
},
{
"Name": "gun",
"Alias": "Gun Game"
},
{
"Name": "hp",
"Alias": "Hardpoint"
},
{
"Name": "koth",
"Alias": "Headquarters"
},
{
"Name": "sab",
"Alias": "Sabotage"
},
{
"Name": "sd",
"Alias": "Search & Destroy"
},
{
"Name": "war",
"Alias": "Team Deathmatch"
}
]
}
], ],
"Maps": [ "Maps": [
{ {
@ -2159,6 +2208,227 @@
} }
] ]
}, },
{
"Game": "H2M",
"Maps": [
{
"Alias": "Ambush",
"Name": "mp_convoy"
},
{
"Alias": "Backlot",
"Name": "mp_backlot"
},
{
"Alias": "Bloc",
"Name": "mp_bloc"
},
{
"Alias": "Bog",
"Name": "mp_bog"
},
{
"Alias": "Countdown",
"Name": "mp_countdown"
},
{
"Alias": "Crash",
"Name": "mp_crash"
},
{
"Alias": "Crossfire",
"Name": "mp_crossfire"
},
{
"Alias": "District",
"Name": "mp_citystreets"
},
{
"Alias": "Downpour",
"Name": "mp_farm"
},
{
"Alias": "Overgrown",
"Name": "mp_overgrown"
},
{
"Alias": "Pipeline",
"Name": "mp_pipeline"
},
{
"Alias": "Shipment",
"Name": "mp_shipment"
},
{
"Alias": "Showdown",
"Name": "mp_showdown"
},
{
"Alias": "Strike",
"Name": "mp_strike"
},
{
"Alias": "Vacant",
"Name": "mp_vacant"
},
{
"Alias": "Wet Work",
"Name": "mp_cargoship"
},
{
"Alias": "Winter Crash",
"Name": "mp_crash_snow"
},
{
"Alias": "Broadcast",
"Name": "mp_broadcast"
},
{
"Alias": "Creek",
"Name": "mp_creek"
},
{
"Alias": "Chinatown",
"Name": "mp_carentan"
},
{
"Alias": "Killhouse",
"Name": "mp_killhouse"
},
{
"Alias": "Day Break",
"Name": "mp_farm_spring"
},
{
"Alias": "Beach Bog",
"Name": "mp_bog_summer"
},
{
"Alias": "Airport",
"Name": "airport"
},
{
"Alias": "Blizzard",
"Name": "cliffhanger"
},
{
"Alias": "Contingency",
"Name": "contingency"
},
{
"Alias": "DC Burning",
"Name": "dcburning"
},
{
"Alias": "Dumpsite",
"Name": "boneyard"
},
{
"Alias": "Gulag",
"Name": "gulag"
},
{
"Alias": "Oilrig",
"Name": "oilrig"
},
{
"Alias": "Safehouse",
"Name": "estate"
},
{
"Alias": "Whiskey Hotel",
"Name": "dc_whitehouse"
},
{
"Alias": "Afghan",
"Name": "mp_afghan"
},
{
"Alias": "Bailout",
"Name": "mp_complex"
},
{
"Alias": "Carnival",
"Name": "mp_abandon"
},
{
"Alias": "Derail",
"Name": "mp_derail"
},
{
"Alias": "Estate",
"Name": "mp_estate"
},
{
"Alias": "Favela",
"Name": "mp_favela"
},
{
"Alias": "Fuel",
"Name": "mp_fuel2"
},
{
"Alias": "Highrise",
"Name": "mp_highrise"
},
{
"Alias": "Invasion",
"Name": "mp_invasion"
},
{
"Alias": "Karachi",
"Name": "mp_checkpoint"
},
{
"Alias": "Quarry",
"Name": "mp_quarry"
},
{
"Alias": "Rundown",
"Name": "mp_rundown"
},
{
"Alias": "Rust",
"Name": "mp_rust"
},
{
"Alias": "Salvage",
"Name": "mp_compact"
},
{
"Alias": "Scrapyard",
"Name": "mp_boneyard"
},
{
"Alias": "Skidrow",
"Name": "mp_nightshift"
},
{
"Alias": "Storm",
"Name": "mp_storm"
},
{
"Alias": "Sub Base",
"Name": "mp_subbase"
},
{
"Alias": "Terminal",
"Name": "mp_terminal"
},
{
"Alias": "Trailer Park",
"Name": "mp_trailerpark"
},
{
"Alias": "Underpass",
"Name": "mp_underpass"
},
{
"Alias": "Wasteland",
"Name": "mp_brecourt"
}
]
},
{ {
"Game": "CSGO", "Game": "CSGO",
"Maps": [ "Maps": [

View File

@ -0,0 +1,49 @@
var rconParser;
var eventParser;
var plugin = {
author: "fed, diamante",
version: 0.2,
name: "H2M-Mod Parser",
isParser: true,
onEventAsync: function (gameEvent, server) {},
onLoadAsync: function (manager) {
rconParser = manager.GenerateDynamicRConParser(this.name);
eventParser = manager.GenerateDynamicEventParser(this.name);
rconParser.Configuration.CommandPrefixes.Kick = 'kickClient {0} "{1}"';
rconParser.Configuration.CommandPrefixes.Ban = 'kickClient {0} "{1}"';
rconParser.Configuration.CommandPrefixes.TempBan = 'kickClient {0} "{1}"';
rconParser.Configuration.CommandPrefixes.Tell = 'tellraw {0} "{1}"';
rconParser.Configuration.CommandPrefixes.Say = 'sayraw "{0}"';
rconParser.Configuration.CommandPrefixes.RConResponse =
"\xff\xff\xff\xffprint";
rconParser.Configuration.Dvar.Pattern =
'^ *\\"(.+)\\" is: \\"(.+)?\\" default: \\"(.+)?\\"';
rconParser.Configuration.Status.Pattern =
"^ *([0-9]+) +-?([0-9]+) +(Yes|No) +((?:[A-Z]+|[0-9]+)) +((?:[a-z]|[0-9]){8,32}|(?:[a-z]|[0-9]){8,32}|bot[0-9]+|(?:[0-9]+)) *(.{0,32}) +(\\d+\\.\\d+\\.\\d+.\\d+\\:-*\\d{1,5}|0+.0+:-*\\d{1,5}|loopback|unknown|bot) +(-*[0-9]+) *$";
rconParser.Configuration.StatusHeader.Pattern =
"num +score +bot +ping +guid +name +address +qport *";
rconParser.Configuration.Status.AddMapping(102, 4);
rconParser.Configuration.Status.AddMapping(103, 5);
rconParser.Configuration.Status.AddMapping(104, 6);
rconParser.Configuration.WaitForResponse = false;
rconParser.Configuration.DefaultRConPort = 27016;
eventParser.Configuration.GameDirectory = "";
eventParser.Configuration.LocalizeText = "\x1f";
rconParser.Version =
"H1 MP 1.15 build 1251288 Tue Jul 23 13:38:30 2019 win64";
rconParser.GameName = 13; // H2M
eventParser.Version =
"H1 MP 1.15 build 1251288 Tue Jul 23 13:38:30 2019 win64";
eventParser.GameName = 13; // H2M
},
onUnloadAsync: function () {},
onTickAsync: function (server) {},
};

View File

@ -124,6 +124,9 @@ const plugin = {
'csgo': { 'csgo': {
right: colorLeft right: colorLeft
}, },
'h2m': {
right: colorLeft
},
}; };
const servers = plugin.manager.servers; const servers = plugin.manager.servers;

View File

@ -36,7 +36,8 @@ namespace SharedLibraryCore
SHG1 = 9, SHG1 = 9,
CSGO = 10, CSGO = 10,
H1 = 11, H1 = 11,
L4D2 = 12 L4D2 = 12,
H2M = 13
} }
// only here for performance // only here for performance