Skip to content

Commit

Permalink
Merge pull request #632 from Kefta/master
Browse files Browse the repository at this point in the history
Added NPCs and deleted game_ep2.lua
  • Loading branch information
UnderscoreKilburn committed Mar 23, 2014
2 parents f548f3b + 5db1679 commit 02c47b6
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 96 deletions.
144 changes: 121 additions & 23 deletions garrysmod/lua/autorun/base_npcs.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@

--
-- Don't try to edit this file if you're trying to add new NPCs.
-- Just make a new file and copy the format below.
--

local Category = "Humans + Resistance"

Expand Down Expand Up @@ -59,10 +56,10 @@ local NPC = {
list.Set( "NPC", NPC.Class, NPC )

local NPC = {
Name = "Metro Police",
Class = "npc_metropolice",
Name = "Father Grigori",
Class = "npc_monk",
Category = Category,
Weapons = { "weapon_stunstick", "weapon_pistol", "weapon_smg1" }
Weapons = { "weapon_annabelle" }
}
list.Set( "NPC", NPC.Class, NPC )

Expand All @@ -81,6 +78,14 @@ local NPC = {
}
list.Set( "NPC", NPC.Class, NPC )

local NPC = {
Name = "Vortigaunt Slave",
Class = "npc_vortigaunt",
Category = Category,
Model = "models/vortigaunt_slave.mdl"
}
list.Set( "NPC", "VortigauntSlave", NPC )

local NPC = {
Name = "Rebel",
Class = "npc_citizen",
Expand Down Expand Up @@ -127,8 +132,26 @@ local NPC = {
}
list.Set( "NPC", NPC.Class, NPC )

--EP2

local NPC = {
Name = "Uriah",
Class = "npc_vortigaunt",
Category = Category,
Model = "models/vortigaunt_doctor.mdl"
}
if ( IsMounted( "ep2" ) ) then list.Set( "NPC", "Uriah", NPC ) end

local NPC = {
Name = "Dr. Magnusson",
Class = "npc_magnusson",
Category = Category
}
if ( IsMounted( "ep2" ) ) then list.Set( "NPC", NPC.Class, NPC ) end

-- Lost Coast

--Has no death sequence
local NPC = {
Name = "Fisherman",
Class = "npc_fisherman",
Expand All @@ -137,6 +160,7 @@ local NPC = {
}
if ( IsMounted( "lostcoast" ) ) then list.Set( "NPC", NPC.Class, NPC ) end


Category = "Zombies + Enemy Aliens"

local NPC = {
Expand Down Expand Up @@ -177,9 +201,9 @@ list.Set( "NPC", NPC.Class, NPC )
local NPC = {
Name = "Barnacle",
Class = "npc_barnacle",
Category = Category,
OnCeiling = true,
Offset = 2,
Category = Category
}
list.Set( "NPC", NPC.Class, NPC )

Expand All @@ -190,13 +214,6 @@ local NPC = {
}
list.Set( "NPC", NPC.Class, NPC )

local NPC = {
Name = "Fast Zomb Torso",
Class = "npc_fastzombie_torso",
Category = Category
}
if ( IsMounted( "episodic" ) || IsMounted( "ep2" ) ) then list.Set( "NPC", NPC.Class, NPC ) end

local NPC = {
Name = "Headcrab",
Class = "npc_headcrab",
Expand All @@ -218,6 +235,50 @@ local NPC = {
}
list.Set( "NPC", NPC.Class, NPC )

--EP1 or EP2

local NPC = {
Name = "Fast Zombie Torso",
Class = "npc_fastzombie_torso",
Category = Category
}
if ( IsMounted( "episodic" ) || IsMounted( "ep2" ) ) then list.Set( "NPC", NPC.Class, NPC ) end

--EP2

local NPC = {
Name = "Antlion Guardian",
Class = "npc_antlionguard",
Category = Category,
KeyValues = { cavernbreed = 1, incavern = 1 },
Material = "Models/antlion_guard/antlionGuard2"
}
if ( IsMounted( "ep2" ) ) then list.Set( "NPC", "npc_antlionguardian", NPC ) end

local NPC = {
Name = "Antlion Grub",
Class = "npc_antlion_grub",
Category = Category,
NoDrop = true,
Offset = 1
}
if ( IsMounted( "ep2" ) ) then list.Set( "NPC", NPC.Class, NPC ) end

local NPC = {
Name = "Antlion Worker",
Class = "npc_antlion_worker",
Category = Category
}
if ( IsMounted( "ep2" ) ) then list.Set( "NPC", NPC.Class, NPC ) end

local NPC = {
Name = "Zombine",
Class = "npc_zombine",
Category = Category
}
if ( IsMounted( "ep2" ) ) then list.Set( "NPC", NPC.Class, NPC ) end


Category = "Animals"

local NPC = {
Expand All @@ -241,18 +302,18 @@ local NPC = {
}
list.Set( "NPC", NPC.Class, NPC )

-- Countdown to "This is in the wrong category" emails, prompted by this hilarious joke

Category = "Combine"

--Yes, they are human, however, they are still associated with the combine
local NPC = {
Name = "Father Grigori",
Class = "npc_monk",
Name = "Metro Police",
Class = "npc_metropolice",
Category = Category,
Weapons = { "weapon_annabelle" }
Weapons = { "weapon_stunstick", "weapon_pistol", "weapon_smg1" }
}
list.Set( "NPC", NPC.Class, NPC )

Category = "Combine"

local NPC = {
Name = "Rollermine",
Class = "npc_rollermine",
Expand All @@ -277,19 +338,39 @@ local NPC = {
Class = "npc_combine_s",
Category = Category,
Model = "models/combine_soldier.mdl",
Weapons = { "weapon_smg1", "weapon_ar2", "weapon_shotgun" }
Weapons = { "weapon_smg1", "weapon_ar2" }
}
list.Set( "NPC", NPC.Class, NPC )

local NPC = {
Name = "Shotgun Soldier",
Class = "npc_combine_s",
Category = Category,
Model = "models/Combine_Soldier.mdl",
Skin = 1,
Weapons = { "weapon_shotgun" }
}
list.Set( "NPC", "ShotgunSoldier", NPC )

local NPC = {
Name = "Prison Guard",
Class = "npc_combine_s",
Category = Category,
Model = "models/combine_soldier_prisonguard.mdl",
Weapons = { "weapon_smg1", "weapon_ar2", "weapon_shotgun" }
Weapons = { "weapon_smg1", "weapon_ar2" }
}
list.Set( "NPC", "CombinePrison", NPC )

local NPC = {
Name = "Prison Shotgun Guard",
Class = "npc_combine_s",
Category = Category,
Model = "models/Combine_Soldier_PrisonGuard.mdl",
Skin = 1,
Weapons = { "weapon_shotgun" }
}
list.Set( "NPC", "PrisonShotgunner", NPC )

local NPC = {
Name = "Combine Elite",
Class = "npc_combine_s",
Expand All @@ -299,6 +380,14 @@ local NPC = {
}
list.Set( "NPC", "CombineElite", NPC )

--Guy has a few issues: No holdtype and won't shoot the player after he has died once
--[[local NPC = {
Name = "Combine Sniper",
Class = "npc_sniper",
Category = Category
}
list.Set( "NPC", NPC.Class, NPC )]]--

local NPC = {
Name = "City Scanner",
Class = "npc_cscanner",
Expand Down Expand Up @@ -352,7 +441,7 @@ local NPC = {
Name = "Ceiling Turret",
Class = "npc_turret_ceiling",
Category = Category,
SpawnFlags = 32, // SF_NPC_TURRET_AUTOACTIVATE
SpawnFlags = 32, -- SF_NPC_TURRET_AUTOACTIVATE
OnCeiling = true,
Offset = 0
}
Expand Down Expand Up @@ -381,6 +470,15 @@ local NPC = {
}
list.Set( "NPC", NPC.Class, NPC )

--EP2

local NPC = {
Name = "Hunter",
Class = "npc_hunter",
Category = Category
}
if ( IsMounted( "ep2" ) ) then list.Set( "NPC", NPC.Class, NPC ) end


if ( IsMounted( "hl1" ) ) then

Expand Down
21 changes: 18 additions & 3 deletions garrysmod/lua/autorun/base_vehicles.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@

--
-- Don't try to edit this file if you're trying to add new vehicles
-- Just make a new file and copy the format below.
--

local Category = "Half-Life 2"

Expand Down Expand Up @@ -62,6 +59,24 @@ local V = {
}
list.Set( "Vehicles", "Pod", V )

local V = {
-- Required information
Name = "Jalopy",
Class = "prop_vehicle_jeep",
Category = Category,

-- Optional information
Author = "VALVe",
Information = "The muscle car from Episode 2",
Model = "models/vehicle.mdl",

KeyValues = {
vehiclescript = "scripts/vehicles/jalopy.txt"
}
}
if ( IsMounted( "ep2" ) ) then list.Set ( "Vehicles", "Jalopy", V ) end


local Category = "Chairs"

local V = {
Expand Down
59 changes: 0 additions & 59 deletions garrysmod/lua/autorun/game_ep2.lua

This file was deleted.

Loading

0 comments on commit 02c47b6

Please sign in to comment.