aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDinorush <62536724+Dinorush@users.noreply.github.com>2023-03-09 16:05:01 -0500
committerGitHub <noreply@github.com>2023-03-09 22:05:01 +0100
commite1215c96997a0f348285055998254ba064787af5 (patch)
tree64dbc3751f130b9c2609d3ae5b366032726d2b03
parent967889c217bcea0a9edcfd5828febed45e31b0fd (diff)
downloadNorthstarMods-e1215c96997a0f348285055998254ba064787af5.tar.gz
NorthstarMods-e1215c96997a0f348285055998254ba064787af5.zip
Add damage source IDs for custom Northstar weapons (#539)
* Add custom IDs for custom northstar weapons * Update to use localization * Merge updated files * Fix missing text
-rw-r--r--Northstar.Custom/mod.json5
-rw-r--r--Northstar.Custom/mod/resource/northstar_custom_english.txtbin6318 -> 6446 bytes
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/sh_northstar_custom_precache.gnut10
3 files changed, 7 insertions, 8 deletions
diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json
index e81b197f..1f672ee4 100644
--- a/Northstar.Custom/mod.json
+++ b/Northstar.Custom/mod.json
@@ -29,10 +29,7 @@
"Scripts": [
{
"Path": "sh_northstar_custom_precache.gnut",
- "RunOn": "( CLIENT || SERVER ) && MP",
- "ClientCallback": {
- "After": "NorthstarCustomPrecache"
- },
+ "RunOn": "SERVER && MP",
"ServerCallback": {
"After": "NorthstarCustomPrecache"
}
diff --git a/Northstar.Custom/mod/resource/northstar_custom_english.txt b/Northstar.Custom/mod/resource/northstar_custom_english.txt
index 04a8d009..dbd3b106 100644
--- a/Northstar.Custom/mod/resource/northstar_custom_english.txt
+++ b/Northstar.Custom/mod/resource/northstar_custom_english.txt
Binary files differ
diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_northstar_custom_precache.gnut b/Northstar.Custom/mod/scripts/vscripts/sh_northstar_custom_precache.gnut
index 848a4b86..79e64684 100644
--- a/Northstar.Custom/mod/scripts/vscripts/sh_northstar_custom_precache.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/sh_northstar_custom_precache.gnut
@@ -1,4 +1,3 @@
-untyped
global function NorthstarCustomPrecache
void function NorthstarCustomPrecache()
@@ -7,7 +6,10 @@ void function NorthstarCustomPrecache()
PrecacheWeapon( "mp_titanweapon_triplethreat" )
PrecacheWeapon( "melee_pilot_kunai" )
- // create kunai damage source so game won't crash when we hit smth with it
- // just using the default melee one, easier than making a new one
- getconsttable()[ "eDamageSourceId" ][ "melee_pilot_kunai" ] <- eDamageSourceId.melee_pilot_emptyhanded
+ RegisterWeaponDamageSources(
+ {
+ mp_weapon_peacekraber = "#WPN_PEACEKRABER",
+ melee_pilot_kunai = "#MELEE_KUNAI"
+ }
+ )
}