From f95eeb9e7d941e203b0d268bc8ee88567f38e03d Mon Sep 17 00:00:00 2001 From: J Maverick 16 Date: Fri, 4 May 2018 16:22:36 +0200 Subject: [PATCH] Update damage.nas --- Nasal/damage.nas | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/Nasal/damage.nas b/Nasal/damage.nas index 03ffed6..93f3e1a 100755 --- a/Nasal/damage.nas +++ b/Nasal/damage.nas @@ -21,8 +21,10 @@ var cannon_types = { " GAU-8/A hit": 0.10, # 30mm " BK27 cannon hit": 0.07, # 27mm " GSh-30 hit": 0.10, # 30mm + " GSh-23 hit": 0.065,# 23mm " 7.62 hit": 0.005,# 7.62mm " 50 BMG hit": 0.015,# 12.7mm + " S-5 rocket hit": 0.20, #55mm }; @@ -54,10 +56,14 @@ var warhead_lbs = { "SCALP": 992.00, "KN-06": 315.00, "GBU12": 190.00, + "GBU-12": 190.00, "GBU16": 450.00, "Sea Eagle": 505.00, "SeaEagle": 505.00, "AGM65": 200.00, + "AGM-65": 126.00, + "AGM-84": 488.00, + "AGM-88": 146.00, "RB-04E": 661.00, "RB-05A": 353.00, "RB-75": 126.00, @@ -71,11 +77,32 @@ var warhead_lbs = { "AIM132": 22.05, "ALARM": 450.00, "STORMSHADOW": 850.00, + "S-21": 245.00, + "S-24": 271.00, + "Kh-66": 244.71, + "RS-2US": 28.66, + "R-55": 20.06, + "R-3S": 16.31, + "R-3R": 16.31, + "R-13M": 16.31, "R-60": 6.60, + "R-60M": 7.70, "R-27R1": 85.98, "R-27T1": 85.98, - "FAB-500": 564.00, + "R-73E": 16.31, + "R-77": 49.60, + "RN-14T": 800.00, #fictional, thermobaeric replacement for the RN-24 nuclear bomb + "RN-18T": 1200.00, #fictional, thermobaeric replacement for the RN-28 nuclear bomb + "ZB-250": 236.99, + "ZB-500": 473.99, + "KH-25MP": 197.53, + "FAB-100": 92.59, + "OFAB-100": 92.59, + "FAB-250": 202.85, + "FAB-500": 564.38, + "KAB-500": 564.38, "Exocet": 364.00, + "HVAR": 7.50,#P51 }; var fireMsgs = { @@ -111,6 +138,7 @@ var incoming_listener = func { var last_vector = split(":", last); var author = last_vector[0]; var callsign = getprop("sim/multiplay/callsign"); + callsign = size(callsign) < 8 ? callsign : left(callsign,7); if (size(last_vector) > 1 and author != callsign) { # not myself #print("not me"); @@ -229,6 +257,11 @@ var incoming_listener = func { } } elsif (cannon_types[last_vector[1]] != nil) { if (size(last_vector) > 2 and last_vector[2] == " "~callsign) { + if (size(last_vector) < 4) { + # msg is either missing number of hits, or has no trailing dots from spam filter. + print('"'~last~'" is not a legal hit message, tell the shooter to upgrade his OPRF plane :)'); + return; + } var last3 = split(" ", last_vector[3]); if(size(last3) > 2 and size(last3[2]) > 2 and last3[2] == "hits" ) { var probability = cannon_types[last_vector[1]]; @@ -336,4 +369,4 @@ var re_init = func { } } -setlistener("/sim/signals/reinit", re_init, 0, 0); \ No newline at end of file +setlistener("/sim/signals/reinit", re_init, 0, 0);