diff options
| author | Alexander Pickering <Alexander.Pickering@anondomain.site90.net> | 2015-12-31 14:53:50 -0500 |
|---|---|---|
| committer | Alexander Pickering <Alexander.Pickering@anondomain.site90.net> | 2015-12-31 14:53:50 -0500 |
| commit | 2afeee8c129aed8fac045735c302f290305f4e5c (patch) | |
| tree | 2703eb3cb80f3b2e388b0338b37475d37dd0a80b | |
| parent | 4c1738ba648def1547549a81c7fd9e5f392e80b3 (diff) | |
| download | wintersurvival2-2afeee8c129aed8fac045735c302f290305f4e5c.tar.gz wintersurvival2-2afeee8c129aed8fac045735c302f290305f4e5c.tar.bz2 wintersurvival2-2afeee8c129aed8fac045735c302f290305f4e5c.zip | |
Added explosive rune
| -rw-r--r-- | content/materials/wintersurvival2/hud/ws2_icons/icon_runeexplosive.png (renamed from content/materials/wintersurvival2/hud/ws2_icons/runeexplosive.png) | bin | 13033 -> 13033 bytes | |||
| -rw-r--r-- | gamemode/itemsystem/items/cup.lua | 2 | ||||
| -rw-r--r-- | gamemode/itemsystem/items/runeexplosive.lua | 54 |
3 files changed, 55 insertions, 1 deletions
diff --git a/content/materials/wintersurvival2/hud/ws2_icons/runeexplosive.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_runeexplosive.png Binary files differindex 1ca24a5..1ca24a5 100644 --- a/content/materials/wintersurvival2/hud/ws2_icons/runeexplosive.png +++ b/content/materials/wintersurvival2/hud/ws2_icons/icon_runeexplosive.png diff --git a/gamemode/itemsystem/items/cup.lua b/gamemode/itemsystem/items/cup.lua index 5c8e27d..92e2a7e 100644 --- a/gamemode/itemsystem/items/cup.lua +++ b/gamemode/itemsystem/items/cup.lua @@ -7,7 +7,7 @@ ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_cupempty.png") ITEM.Recipe = {
Resources = {
- ["Log"] = 1,
+ ["Wood"] = 1,
["Sap"] = 1,
},
Tools = {
diff --git a/gamemode/itemsystem/items/runeexplosive.lua b/gamemode/itemsystem/items/runeexplosive.lua new file mode 100644 index 0000000..96d574c --- /dev/null +++ b/gamemode/itemsystem/items/runeexplosive.lua @@ -0,0 +1,54 @@ + +ITEM.Name = "Explosive Rune" +ITEM.Class = "resource" +ITEM.Desc = "A highly volitile rune! Handle with care." +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_runeexplosive.png") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/rock001a.mdl", + Size = Vector(1,1,1), + Pos = Vector(3,-1.6,0.5), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Energy Rune"] = 1, + ["Fire Rune"] = 1, + }, + Tools = {}, +} + + + +ITEM.Damage = 1 +ITEM.Range = 64 +ITEM.CD = 1 + +function ITEM:OnPrimary(user) + if(user:HasItem("Explosive Rune",1)) then + self:OnUse(user) + else + user:UnEquipWeaponSlot(user:GetSelectedWeapon()) + self:OnUse(user) + end +end + +function ITEM:OnUse(user) + if( not user:IsOnGround()) then + user:SetVelocity(Vector(0,0,500)) + user:TakeDamage(30) + else + user:TakeDamage(40) + end + user:RemoveItem(self.Name,1) + if(CLIENT) then return end + local exp = ents.Create("env_explosion") + exp:SetPos(user:GetPos()) + exp:Fire("Explode","",0) + exp:Spawn() +end |
