From 5c4ebc932d8c02522802c842d43d863d89aca162 Mon Sep 17 00:00:00 2001 From: Apickx Date: Mon, 28 Dec 2015 19:10:44 -0500 Subject: Initial commit --- content/materials/lam/musicnotes/note1.vmt | 6 + content/materials/lam/musicnotes/note1.vtf | Bin 0 -> 22080 bytes content/materials/lam/musicnotes/note2.vmt | 6 + content/materials/lam/musicnotes/note2.vtf | Bin 0 -> 22080 bytes content/materials/lam/skygrid.vmt | 7 + content/materials/lam/skygrid.vtf | Bin 0 -> 349760 bytes content/materials/mixerman3d/other/metal_galv.vmt | 4 + content/materials/mixerman3d/other/metal_galv.vtf | Bin 0 -> 43896 bytes content/materials/mixerman3d/other/metal_galv2.vmt | 4 + content/materials/mixerman3d/other/metal_galv2.vtf | Bin 0 -> 43896 bytes content/materials/mixerman3d/other/skate_deck.vmt | 4 + content/materials/mixerman3d/other/skate_deck.vtf | Bin 0 -> 349744 bytes content/materials/mixerman3d/other/skate_misc.vmt | 4 + content/materials/mixerman3d/other/skate_misc.vtf | Bin 0 -> 349744 bytes content/materials/models/weapons/archersword.vmt | 11 + content/materials/models/weapons/archersword.vtf | Bin 0 -> 349672 bytes .../models/weapons/archersword_normal.vtf | Bin 0 -> 699180 bytes content/materials/settlement/egg.vtf | Bin 0 -> 16592 bytes content/materials/settlement/flour.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_badge.vmt | 8 + content/materials/settlement/icon_badge.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_berries.vmt | 8 + content/materials/settlement/icon_berries.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_bolt.vmt | 8 + content/materials/settlement/icon_bolt.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_bowl.vmt | 8 + content/materials/settlement/icon_bowl.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_cake.vmt | 8 + content/materials/settlement/icon_cake.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_crossbow.vmt | 8 + content/materials/settlement/icon_crossbow.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_diamond.vmt | 8 + content/materials/settlement/icon_diamond.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_egg.vmt | 8 + content/materials/settlement/icon_egg.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_flour.vmt | 8 + content/materials/settlement/icon_flour.vtf | Bin 0 -> 87588 bytes content/materials/settlement/icon_friedegg.vmt | 8 + content/materials/settlement/icon_friedegg.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_grain.vmt | 8 + content/materials/settlement/icon_grain.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_hut.vmt | 8 + content/materials/settlement/icon_hut.vtf | Bin 0 -> 87588 bytes content/materials/settlement/icon_juice.vmt | 8 + content/materials/settlement/icon_juice.vtf | Bin 0 -> 87588 bytes content/materials/settlement/icon_knife.vmt | 8 + content/materials/settlement/icon_knife.vtf | Bin 0 -> 87588 bytes content/materials/settlement/icon_largefence.vmt | 8 + content/materials/settlement/icon_largefence.vtf | Bin 0 -> 87588 bytes content/materials/settlement/icon_log.vmt | 8 + content/materials/settlement/icon_log.vtf | Bin 0 -> 87588 bytes content/materials/settlement/icon_pickaxe.vmt | 8 + content/materials/settlement/icon_pickaxe.vtf | Bin 0 -> 87588 bytes content/materials/settlement/icon_pie.vmt | 8 + content/materials/settlement/icon_pie.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_rope.vmt | 8 + content/materials/settlement/icon_rope.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_scarecrow.vmt | 8 + content/materials/settlement/icon_scarecrow.vtf | Bin 0 -> 22052 bytes content/materials/settlement/icon_scythe.vmt | 8 + content/materials/settlement/icon_scythe.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_shack.vmt | 8 + content/materials/settlement/icon_shack.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_sickle.vmt | 8 + content/materials/settlement/icon_sickle.vtf | Bin 0 -> 87588 bytes content/materials/settlement/icon_soup.vmt | 8 + content/materials/settlement/icon_soup.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_stoneblock.vmt | 8 + content/materials/settlement/icon_stoneblock.vtf | Bin 0 -> 87588 bytes content/materials/settlement/icon_sword.vmt | 8 + content/materials/settlement/icon_sword.vtf | Bin 0 -> 16592 bytes content/materials/settlement/icon_tent.vmt | 8 + content/materials/settlement/icon_tent.vtf | Bin 0 -> 87588 bytes .../wintersurvival2/hud/ws1_icons/icon_1vine.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws1_icons/icon_arrow.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_arrow.vtf | Bin 0 -> 87616 bytes .../wintersurvival2/hud/ws1_icons/icon_axe.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_axe.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws1_icons/icon_beer.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_beer.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws1_icons/icon_bow.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_bow.vtf | Bin 0 -> 87616 bytes .../hud/ws1_icons/icon_bowloaded.vmt | 8 + .../hud/ws1_icons/icon_bowloaded.vtf | Bin 0 -> 87616 bytes .../wintersurvival2/hud/ws1_icons/icon_bugbait.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_bugbait.vtf | Bin 0 -> 22080 bytes .../hud/ws1_icons/icon_campfire.vmt | 8 + .../hud/ws1_icons/icon_campfire.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws1_icons/icon_crystal.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_crystal.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws1_icons/icon_fence.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_fence.vtf | Bin 0 -> 22080 bytes .../hud/ws1_icons/icon_healthkit.vmt | 8 + .../hud/ws1_icons/icon_healthkit.vtf | Bin 0 -> 22080 bytes .../hud/ws1_icons/icon_healthvial.vmt | 8 + .../hud/ws1_icons/icon_healthvial.vtf | Bin 0 -> 87616 bytes .../wintersurvival2/hud/ws1_icons/icon_molotov.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_molotov.vtf | Bin 0 -> 22080 bytes .../hud/ws1_icons/icon_newspaper.vmt | 8 + .../hud/ws1_icons/icon_newspaper.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws1_icons/icon_plank.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_plank.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws1_icons/icon_rock.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_rock.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws1_icons/icon_sap.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_sap.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws1_icons/icon_spine.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_spine.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws1_icons/icon_vine.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_vine.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws1_icons/icon_wood.vmt | 8 + .../wintersurvival2/hud/ws1_icons/icon_wood.vtf | Bin 0 -> 22080 bytes .../wintersurvival2/hud/ws2_icons/cup.psd | Bin 0 -> 59480 bytes .../wintersurvival2/hud/ws2_icons/cupempty.png | Bin 0 -> 10167 bytes .../hud/ws2_icons/icon_ancientwood.png | Bin 0 -> 10249 bytes .../wintersurvival2/hud/ws2_icons/icon_coal.png | Bin 0 -> 17007 bytes .../wintersurvival2/hud/ws2_icons/icon_crow.png | Bin 0 -> 28580 bytes .../hud/ws2_icons/icon_cupempty.png | Bin 0 -> 10167 bytes .../wintersurvival2/hud/ws2_icons/icon_feather.png | Bin 0 -> 17638 bytes .../wintersurvival2/hud/ws2_icons/icon_flint.png | Bin 0 -> 24374 bytes .../wintersurvival2/hud/ws2_icons/icon_log.png | Bin 0 -> 8739 bytes .../hud/ws2_icons/icon_magicwood.png | Bin 0 -> 14856 bytes .../hud/ws2_icons/icon_magicwood.psd | Bin 0 -> 64438 bytes .../wintersurvival2/hud/ws2_icons/icon_meat.png | Bin 0 -> 8030 bytes .../hud/ws2_icons/icon_mortarandpestle.png | Bin 0 -> 16232 bytes .../wintersurvival2/hud/ws2_icons/icon_pitch.psd | Bin 0 -> 34556 bytes .../wintersurvival2/hud/ws2_icons/icon_recipe.png | Bin 0 -> 30404 bytes .../wintersurvival2/hud/ws2_icons/icon_rune.png | Bin 0 -> 8496 bytes .../hud/ws2_icons/icon_runeelectric.png | Bin 0 -> 9772 bytes .../hud/ws2_icons/icon_runefire.png | Bin 0 -> 14463 bytes .../hud/ws2_icons/icon_runemagic.png | Bin 0 -> 11486 bytes .../hud/ws2_icons/icon_runenature.png | Bin 0 -> 11309 bytes .../hud/ws2_icons/icon_stoneblock.png | Bin 0 -> 21090 bytes .../wintersurvival2/hud/ws2_icons/icon_sword.png | Bin 0 -> 9821 bytes .../wintersurvival2/hud/ws2_icons/rune.psd | Bin 0 -> 62120 bytes .../hud/ws2_icons/runeexplosive.png | Bin 0 -> 13033 bytes content/models/mixerman3d/other/arrow.dx80.vtx | Bin 0 -> 4434 bytes content/models/mixerman3d/other/arrow.dx90.vtx | Bin 0 -> 4434 bytes content/models/mixerman3d/other/arrow.mdl | Bin 0 -> 2100 bytes content/models/mixerman3d/other/arrow.phy | Bin 0 -> 933 bytes content/models/mixerman3d/other/arrow.sw.vtx | Bin 0 -> 4418 bytes content/models/mixerman3d/other/arrow.vvd | Bin 0 -> 20288 bytes .../weapons/w_archersword/w_archersword.dx80.vtx | Bin 0 -> 9054 bytes .../weapons/w_archersword/w_archersword.dx90.vtx | Bin 0 -> 9054 bytes .../models/weapons/w_archersword/w_archersword.mdl | Bin 0 -> 1696 bytes .../models/weapons/w_archersword/w_archersword.phy | Bin 0 -> 793 bytes .../weapons/w_archersword/w_archersword.sw.vtx | Bin 0 -> 9022 bytes .../models/weapons/w_archersword/w_archersword.vvd | Bin 0 -> 15680 bytes content/particles/particletest.pcf | Bin 0 -> 4105 bytes content/sound/wintersurvival2/hud/itemequip.wav | Bin 0 -> 6342 bytes content/sound/wintersurvival2/hud/itemopen.wav | Bin 0 -> 29604 bytes content/sound/wintersurvival2/ritual/wololo.mp3 | Bin 0 -> 12120 bytes entities/entities/ws_alter/cl_init.lua | 57 ++ entities/entities/ws_alter/init.lua | 99 +++ entities/entities/ws_alter/shared.lua | 5 + entities/entities/ws_arrow/cl_init.lua | 5 + entities/entities/ws_arrow/init.lua | 27 + entities/entities/ws_arrow/shared.lua | 5 + entities/entities/ws_barrel/cl_init.lua | 5 + entities/entities/ws_barrel/init.lua | 60 ++ entities/entities/ws_barrel/shared.lua | 5 + entities/entities/ws_campfire/cl_init.lua | 80 +++ entities/entities/ws_campfire/init.lua | 96 +++ entities/entities/ws_campfire/shared.lua | 2 + entities/entities/ws_grave/cl_init.lua | 5 + entities/entities/ws_grave/init.lua | 60 ++ entities/entities/ws_grave/shared.lua | 5 + entities/entities/ws_infuser/cl_init.lua | 78 +++ entities/entities/ws_infuser/init.lua | 90 +++ entities/entities/ws_infuser/shared.lua | 2 + entities/entities/ws_item/cl_init.lua | 5 + entities/entities/ws_item/init.lua | 22 + entities/entities/ws_item/shared.lua | 5 + entities/entities/ws_npc_ambient/cl_init.lua | 66 ++ entities/entities/ws_npc_ambient/init.lua | 33 + entities/entities/ws_npc_ambient/shared.lua | 53 ++ entities/entities/ws_pigeon/cl_init.lua | 85 +++ entities/entities/ws_pigeon/init.lua | 166 +++++ entities/entities/ws_pigeon/shared.lua | 5 + entities/entities/ws_prop/cl_init.lua | 5 + entities/entities/ws_prop/init.lua | 28 + entities/entities/ws_prop/shared.lua | 5 + entities/entities/ws_researchtable/cl_init.lua | 8 + entities/entities/ws_researchtable/init.lua | 120 ++++ entities/entities/ws_researchtable/shared.lua | 5 + entities/entities/ws_shop/cl_init.lua | 12 + entities/entities/ws_shop/init.lua | 16 + entities/entities/ws_shop/shared.lua | 5 + entities/weapons/hands.lua | 130 ++++ gamemode/cl_init.lua | 20 + gamemode/client/cam.lua | 32 + gamemode/client/color.lua | 3 + gamemode/client/render_viewmodel.lua | 49 ++ gamemode/hud/draw.lua | 31 + gamemode/hud/draw_account.lua | 136 ++++ gamemode/hud/draw_circle.lua | 48 ++ gamemode/hud/draw_editor.lua | 746 +++++++++++++++++++++ gamemode/hud/draw_help.lua | 106 +++ gamemode/hud/draw_indicators.lua | 60 ++ gamemode/hud/draw_lootventory.lua | 77 +++ gamemode/hud/draw_qmenu.lua | 346 ++++++++++ gamemode/hud/draw_scoreboard.lua | 40 ++ gamemode/hud/draw_targets.lua | 11 + gamemode/hud/draw_voicechat.lua | 33 + gamemode/hud/draw_wepswap.lua | 64 ++ gamemode/init.lua | 120 ++++ gamemode/itemsystem/items/alter.lua | 66 ++ gamemode/itemsystem/items/ancientlog.lua | 17 + gamemode/itemsystem/items/ancientwood.lua | 60 ++ gamemode/itemsystem/items/arrow.lua | 25 + gamemode/itemsystem/items/axe.lua | 66 ++ gamemode/itemsystem/items/barrel.lua | 58 ++ gamemode/itemsystem/items/base.lua | 37 + gamemode/itemsystem/items/battleaxe.lua | 65 ++ gamemode/itemsystem/items/berry.lua | 24 + gamemode/itemsystem/items/bow.lua | 59 ++ gamemode/itemsystem/items/campfire.lua | 82 +++ gamemode/itemsystem/items/charcoal.lua | 10 + gamemode/itemsystem/items/cookedmeat.lua | 24 + gamemode/itemsystem/items/crystal.lua | 17 + gamemode/itemsystem/items/crystalaxe.lua | 70 ++ gamemode/itemsystem/items/crystalhammer.lua | 24 + gamemode/itemsystem/items/crystalpickaxe.lua | 72 ++ gamemode/itemsystem/items/crystalsickle.lua | 70 ++ gamemode/itemsystem/items/cup.lua | 20 + gamemode/itemsystem/items/diamond.lua | 17 + gamemode/itemsystem/items/diamondaxe.lua | 70 ++ gamemode/itemsystem/items/diamondhammer.lua | 28 + gamemode/itemsystem/items/diamondpickaxe.lua | 72 ++ gamemode/itemsystem/items/diamondsickle.lua | 70 ++ gamemode/itemsystem/items/feather.lua | 6 + gamemode/itemsystem/items/fence.lua | 59 ++ gamemode/itemsystem/items/flint.lua | 6 + gamemode/itemsystem/items/floor.lua | 60 ++ gamemode/itemsystem/items/infuser.lua | 57 ++ gamemode/itemsystem/items/juice.lua | 21 + gamemode/itemsystem/items/knife.lua | 60 ++ gamemode/itemsystem/items/log.lua | 15 + gamemode/itemsystem/items/magicwood.lua | 58 ++ gamemode/itemsystem/items/maul.lua | 58 ++ gamemode/itemsystem/items/meat.lua | 28 + gamemode/itemsystem/items/mortarandpestle.lua | 20 + gamemode/itemsystem/items/pickaxe.lua | 68 ++ gamemode/itemsystem/items/pitch.lua | 25 + gamemode/itemsystem/items/plank.lua | 25 + gamemode/itemsystem/items/ramp.lua | 60 ++ gamemode/itemsystem/items/recipe_battleaxe.lua | 27 + gamemode/itemsystem/items/recipe_crystalhammer.lua | 27 + gamemode/itemsystem/items/recipe_diamondhammer.lua | 27 + gamemode/itemsystem/items/recipe_maul.lua | 27 + gamemode/itemsystem/items/recipe_shack.lua | 27 + gamemode/itemsystem/items/recipe_stoneblock.lua | 27 + gamemode/itemsystem/items/recipe_tent.lua | 27 + gamemode/itemsystem/items/researchtable.lua | 55 ++ gamemode/itemsystem/items/rock.lua | 60 ++ gamemode/itemsystem/items/rope.lua | 14 + gamemode/itemsystem/items/runeblank.lua | 34 + gamemode/itemsystem/items/runeenergy.lua | 45 ++ gamemode/itemsystem/items/runefire.lua | 48 ++ gamemode/itemsystem/items/runemagic.lua | 21 + gamemode/itemsystem/items/runenature.lua | 39 ++ gamemode/itemsystem/items/sap.lua | 6 + gamemode/itemsystem/items/shack.lua | 111 +++ gamemode/itemsystem/items/sickle.lua | 67 ++ gamemode/itemsystem/items/stoneblock.lua | 14 + gamemode/itemsystem/items/sword.lua | 58 ++ gamemode/itemsystem/items/tent.lua | 79 +++ gamemode/itemsystem/items/vine.lua | 6 + gamemode/itemsystem/items/wood.lua | 66 ++ gamemode/itemsystem/loaditems.lua | 83 +++ gamemode/npcsystem/aidirector.lua | 36 + gamemode/npcsystem/loadnpcs.lua | 60 ++ gamemode/npcsystem/npcs/base.lua | 57 ++ gamemode/npcsystem/npcs/bird.lua | 101 +++ gamemode/npcsystem/npcs/zombie.lua | 47 ++ gamemode/server/concommands.lua | 66 ++ gamemode/server/spawnitem.lua | 12 + gamemode/server/world.lua | 60 ++ gamemode/shared.lua | 21 + gamemode/shared/accounts.lua | 153 +++++ gamemode/shared/entity_ext.lua | 19 + gamemode/shared/game_rounds.lua | 105 +++ gamemode/shared/player_accountinventory.lua | 98 +++ gamemode/shared/player_dropitem.lua | 26 + gamemode/shared/player_ghost.lua | 97 +++ gamemode/shared/player_human.lua | 66 ++ gamemode/shared/player_inventory.lua | 99 +++ gamemode/shared/player_lootventory.lua | 53 ++ gamemode/shared/player_pigeon.lua | 44 ++ gamemode/shared/player_recipes.lua | 102 +++ gamemode/shared/player_transferitem.lua | 44 ++ gamemode/shared/player_useitem.lua | 40 ++ gamemode/shared/stream.lua | 125 ++++ gamemode/shared/synchronize.lua | 22 + gamemode/shared/system_admin.lua | 118 ++++ gamemode/shared/system_fatigue.lua | 46 ++ gamemode/shared/system_heat.lua | 42 ++ gamemode/shared/system_hunger.lua | 42 ++ gamemode/shared/system_water.lua | 53 ++ gamemode/shared/vars.lua | 3 + gamemode/shared/weaponswap.lua | 168 +++++ icon24.png | Bin 0 -> 3806 bytes logo.png | Bin 0 -> 8925 bytes to-do/content.materials.settelment/badge.png | Bin 0 -> 15134 bytes to-do/content.materials.settelment/berries.png | Bin 0 -> 11584 bytes to-do/content.materials.settelment/bolt.png | Bin 0 -> 13045 bytes to-do/content.materials.settelment/bowl.png | Bin 0 -> 5134 bytes to-do/content.materials.settelment/cake.png | Bin 0 -> 9335 bytes to-do/content.materials.settelment/crossbow.png | Bin 0 -> 9035 bytes to-do/content.materials.settelment/diamond.png | Bin 0 -> 8680 bytes to-do/content.materials.settelment/egg.png | Bin 0 -> 6359 bytes to-do/content.materials.settelment/egg.vmt | 4 + to-do/content.materials.settelment/egg.vtf | Bin 0 -> 16592 bytes to-do/content.materials.settelment/flour.png | Bin 0 -> 12967 bytes to-do/content.materials.settelment/flour.vmt | 4 + to-do/content.materials.settelment/flour.vtf | Bin 0 -> 16592 bytes to-do/content.materials.settelment/friedegg.png | Bin 0 -> 8928 bytes to-do/content.materials.settelment/friedegg.psd | Bin 0 -> 61767 bytes to-do/content.materials.settelment/grain.png | Bin 0 -> 8743 bytes to-do/content.materials.settelment/icon_badge.vmt | 4 + .../content.materials.settelment/icon_berries.vmt | 4 + to-do/content.materials.settelment/icon_bolt.vmt | 4 + to-do/content.materials.settelment/icon_bowl.vmt | 4 + to-do/content.materials.settelment/icon_bowl.vtf | Bin 0 -> 16592 bytes to-do/content.materials.settelment/icon_cake.vmt | 4 + to-do/content.materials.settelment/icon_cake.vtf | Bin 0 -> 16592 bytes .../content.materials.settelment/icon_crossbow.vmt | 4 + .../content.materials.settelment/icon_crossbow.vtf | Bin 0 -> 16592 bytes .../content.materials.settelment/icon_diamond.vmt | 4 + .../content.materials.settelment/icon_diamond.vtf | Bin 0 -> 16592 bytes .../content.materials.settelment/icon_friedegg.vmt | 4 + .../content.materials.settelment/icon_friedegg.vtf | Bin 0 -> 16592 bytes to-do/content.materials.settelment/icon_grain.vmt | 4 + to-do/content.materials.settelment/icon_grain.vtf | Bin 0 -> 16592 bytes to-do/content.materials.settelment/icon_pie.vmt | 4 + to-do/content.materials.settelment/icon_pie.vtf | Bin 0 -> 16592 bytes .../icon_researchtable.vmt | 4 + .../icon_researchtable.vtf | Bin 0 -> 16592 bytes to-do/content.materials.settelment/icon_rope.vmt | 4 + to-do/content.materials.settelment/icon_rope.vtf | Bin 0 -> 16592 bytes to-do/content.materials.settelment/icon_scythe.vmt | 4 + to-do/content.materials.settelment/icon_scythe.vtf | Bin 0 -> 16592 bytes to-do/content.materials.settelment/icon_soup.vmt | 4 + to-do/content.materials.settelment/icon_soup.vtf | Bin 0 -> 16592 bytes to-do/content.materials.settelment/icon_sword.vmt | 4 + to-do/content.materials.settelment/icon_sword.vtf | Bin 0 -> 16592 bytes to-do/content.materials.settelment/pie.png | Bin 0 -> 9232 bytes .../content.materials.settelment/researchtable.png | Bin 0 -> 11929 bytes to-do/content.materials.settelment/rope.png | Bin 0 -> 14263 bytes to-do/content.materials.settelment/scythe.png | Bin 0 -> 8354 bytes to-do/content.materials.settelment/soup.png | Bin 0 -> 12569 bytes to-do/content.materials.settelment/sword.png | Bin 0 -> 5068 bytes to-do/modelsandnotes/modelsforbush | 5 + wintersurvival2.txt | 7 + 354 files changed, 8645 insertions(+) create mode 100644 content/materials/lam/musicnotes/note1.vmt create mode 100644 content/materials/lam/musicnotes/note1.vtf create mode 100644 content/materials/lam/musicnotes/note2.vmt create mode 100644 content/materials/lam/musicnotes/note2.vtf create mode 100644 content/materials/lam/skygrid.vmt create mode 100644 content/materials/lam/skygrid.vtf create mode 100644 content/materials/mixerman3d/other/metal_galv.vmt create mode 100644 content/materials/mixerman3d/other/metal_galv.vtf create mode 100644 content/materials/mixerman3d/other/metal_galv2.vmt create mode 100644 content/materials/mixerman3d/other/metal_galv2.vtf create mode 100644 content/materials/mixerman3d/other/skate_deck.vmt create mode 100644 content/materials/mixerman3d/other/skate_deck.vtf create mode 100644 content/materials/mixerman3d/other/skate_misc.vmt create mode 100644 content/materials/mixerman3d/other/skate_misc.vtf create mode 100644 content/materials/models/weapons/archersword.vmt create mode 100644 content/materials/models/weapons/archersword.vtf create mode 100644 content/materials/models/weapons/archersword_normal.vtf create mode 100644 content/materials/settlement/egg.vtf create mode 100644 content/materials/settlement/flour.vtf create mode 100644 content/materials/settlement/icon_badge.vmt create mode 100644 content/materials/settlement/icon_badge.vtf create mode 100644 content/materials/settlement/icon_berries.vmt create mode 100644 content/materials/settlement/icon_berries.vtf create mode 100644 content/materials/settlement/icon_bolt.vmt create mode 100644 content/materials/settlement/icon_bolt.vtf create mode 100644 content/materials/settlement/icon_bowl.vmt create mode 100644 content/materials/settlement/icon_bowl.vtf create mode 100644 content/materials/settlement/icon_cake.vmt create mode 100644 content/materials/settlement/icon_cake.vtf create mode 100644 content/materials/settlement/icon_crossbow.vmt create mode 100644 content/materials/settlement/icon_crossbow.vtf create mode 100644 content/materials/settlement/icon_diamond.vmt create mode 100644 content/materials/settlement/icon_diamond.vtf create mode 100644 content/materials/settlement/icon_egg.vmt create mode 100644 content/materials/settlement/icon_egg.vtf create mode 100644 content/materials/settlement/icon_flour.vmt create mode 100644 content/materials/settlement/icon_flour.vtf create mode 100644 content/materials/settlement/icon_friedegg.vmt create mode 100644 content/materials/settlement/icon_friedegg.vtf create mode 100644 content/materials/settlement/icon_grain.vmt create mode 100644 content/materials/settlement/icon_grain.vtf create mode 100644 content/materials/settlement/icon_hut.vmt create mode 100644 content/materials/settlement/icon_hut.vtf create mode 100644 content/materials/settlement/icon_juice.vmt create mode 100644 content/materials/settlement/icon_juice.vtf create mode 100644 content/materials/settlement/icon_knife.vmt create mode 100644 content/materials/settlement/icon_knife.vtf create mode 100644 content/materials/settlement/icon_largefence.vmt create mode 100644 content/materials/settlement/icon_largefence.vtf create mode 100644 content/materials/settlement/icon_log.vmt create mode 100644 content/materials/settlement/icon_log.vtf create mode 100644 content/materials/settlement/icon_pickaxe.vmt create mode 100644 content/materials/settlement/icon_pickaxe.vtf create mode 100644 content/materials/settlement/icon_pie.vmt create mode 100644 content/materials/settlement/icon_pie.vtf create mode 100644 content/materials/settlement/icon_rope.vmt create mode 100644 content/materials/settlement/icon_rope.vtf create mode 100644 content/materials/settlement/icon_scarecrow.vmt create mode 100644 content/materials/settlement/icon_scarecrow.vtf create mode 100644 content/materials/settlement/icon_scythe.vmt create mode 100644 content/materials/settlement/icon_scythe.vtf create mode 100644 content/materials/settlement/icon_shack.vmt create mode 100644 content/materials/settlement/icon_shack.vtf create mode 100644 content/materials/settlement/icon_sickle.vmt create mode 100644 content/materials/settlement/icon_sickle.vtf create mode 100644 content/materials/settlement/icon_soup.vmt create mode 100644 content/materials/settlement/icon_soup.vtf create mode 100644 content/materials/settlement/icon_stoneblock.vmt create mode 100644 content/materials/settlement/icon_stoneblock.vtf create mode 100644 content/materials/settlement/icon_sword.vmt create mode 100644 content/materials/settlement/icon_sword.vtf create mode 100644 content/materials/settlement/icon_tent.vmt create mode 100644 content/materials/settlement/icon_tent.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_1vine.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_arrow.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_arrow.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_axe.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_axe.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_beer.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_beer.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_bow.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_bow.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_bowloaded.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_bowloaded.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_bugbait.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_bugbait.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_campfire.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_campfire.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_crystal.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_crystal.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_fence.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_fence.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_healthkit.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_healthkit.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_healthvial.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_healthvial.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_molotov.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_molotov.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_newspaper.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_newspaper.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_plank.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_plank.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_rock.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_rock.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_sap.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_sap.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_spine.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_spine.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_vine.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_vine.vtf create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_wood.vmt create mode 100644 content/materials/wintersurvival2/hud/ws1_icons/icon_wood.vtf create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/cup.psd create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/cupempty.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_ancientwood.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_coal.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_crow.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_cupempty.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_feather.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_flint.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_log.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_magicwood.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_magicwood.psd create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_meat.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_mortarandpestle.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_pitch.psd create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_recipe.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_rune.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_runeelectric.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_runefire.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_runemagic.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_runenature.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_stoneblock.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/icon_sword.png create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/rune.psd create mode 100644 content/materials/wintersurvival2/hud/ws2_icons/runeexplosive.png create mode 100644 content/models/mixerman3d/other/arrow.dx80.vtx create mode 100644 content/models/mixerman3d/other/arrow.dx90.vtx create mode 100644 content/models/mixerman3d/other/arrow.mdl create mode 100644 content/models/mixerman3d/other/arrow.phy create mode 100644 content/models/mixerman3d/other/arrow.sw.vtx create mode 100644 content/models/mixerman3d/other/arrow.vvd create mode 100644 content/models/weapons/w_archersword/w_archersword.dx80.vtx create mode 100644 content/models/weapons/w_archersword/w_archersword.dx90.vtx create mode 100644 content/models/weapons/w_archersword/w_archersword.mdl create mode 100644 content/models/weapons/w_archersword/w_archersword.phy create mode 100644 content/models/weapons/w_archersword/w_archersword.sw.vtx create mode 100644 content/models/weapons/w_archersword/w_archersword.vvd create mode 100644 content/particles/particletest.pcf create mode 100644 content/sound/wintersurvival2/hud/itemequip.wav create mode 100644 content/sound/wintersurvival2/hud/itemopen.wav create mode 100644 content/sound/wintersurvival2/ritual/wololo.mp3 create mode 100644 entities/entities/ws_alter/cl_init.lua create mode 100644 entities/entities/ws_alter/init.lua create mode 100644 entities/entities/ws_alter/shared.lua create mode 100644 entities/entities/ws_arrow/cl_init.lua create mode 100644 entities/entities/ws_arrow/init.lua create mode 100644 entities/entities/ws_arrow/shared.lua create mode 100644 entities/entities/ws_barrel/cl_init.lua create mode 100644 entities/entities/ws_barrel/init.lua create mode 100644 entities/entities/ws_barrel/shared.lua create mode 100644 entities/entities/ws_campfire/cl_init.lua create mode 100644 entities/entities/ws_campfire/init.lua create mode 100644 entities/entities/ws_campfire/shared.lua create mode 100644 entities/entities/ws_grave/cl_init.lua create mode 100644 entities/entities/ws_grave/init.lua create mode 100644 entities/entities/ws_grave/shared.lua create mode 100644 entities/entities/ws_infuser/cl_init.lua create mode 100644 entities/entities/ws_infuser/init.lua create mode 100644 entities/entities/ws_infuser/shared.lua create mode 100644 entities/entities/ws_item/cl_init.lua create mode 100644 entities/entities/ws_item/init.lua create mode 100644 entities/entities/ws_item/shared.lua create mode 100644 entities/entities/ws_npc_ambient/cl_init.lua create mode 100644 entities/entities/ws_npc_ambient/init.lua create mode 100644 entities/entities/ws_npc_ambient/shared.lua create mode 100644 entities/entities/ws_pigeon/cl_init.lua create mode 100644 entities/entities/ws_pigeon/init.lua create mode 100644 entities/entities/ws_pigeon/shared.lua create mode 100644 entities/entities/ws_prop/cl_init.lua create mode 100644 entities/entities/ws_prop/init.lua create mode 100644 entities/entities/ws_prop/shared.lua create mode 100644 entities/entities/ws_researchtable/cl_init.lua create mode 100644 entities/entities/ws_researchtable/init.lua create mode 100644 entities/entities/ws_researchtable/shared.lua create mode 100644 entities/entities/ws_shop/cl_init.lua create mode 100644 entities/entities/ws_shop/init.lua create mode 100644 entities/entities/ws_shop/shared.lua create mode 100644 entities/weapons/hands.lua create mode 100644 gamemode/cl_init.lua create mode 100644 gamemode/client/cam.lua create mode 100644 gamemode/client/color.lua create mode 100644 gamemode/client/render_viewmodel.lua create mode 100644 gamemode/hud/draw.lua create mode 100644 gamemode/hud/draw_account.lua create mode 100644 gamemode/hud/draw_circle.lua create mode 100644 gamemode/hud/draw_editor.lua create mode 100644 gamemode/hud/draw_help.lua create mode 100644 gamemode/hud/draw_indicators.lua create mode 100644 gamemode/hud/draw_lootventory.lua create mode 100644 gamemode/hud/draw_qmenu.lua create mode 100644 gamemode/hud/draw_scoreboard.lua create mode 100644 gamemode/hud/draw_targets.lua create mode 100644 gamemode/hud/draw_voicechat.lua create mode 100644 gamemode/hud/draw_wepswap.lua create mode 100644 gamemode/init.lua create mode 100644 gamemode/itemsystem/items/alter.lua create mode 100644 gamemode/itemsystem/items/ancientlog.lua create mode 100644 gamemode/itemsystem/items/ancientwood.lua create mode 100644 gamemode/itemsystem/items/arrow.lua create mode 100644 gamemode/itemsystem/items/axe.lua create mode 100644 gamemode/itemsystem/items/barrel.lua create mode 100644 gamemode/itemsystem/items/base.lua create mode 100644 gamemode/itemsystem/items/battleaxe.lua create mode 100644 gamemode/itemsystem/items/berry.lua create mode 100644 gamemode/itemsystem/items/bow.lua create mode 100644 gamemode/itemsystem/items/campfire.lua create mode 100644 gamemode/itemsystem/items/charcoal.lua create mode 100644 gamemode/itemsystem/items/cookedmeat.lua create mode 100644 gamemode/itemsystem/items/crystal.lua create mode 100644 gamemode/itemsystem/items/crystalaxe.lua create mode 100644 gamemode/itemsystem/items/crystalhammer.lua create mode 100644 gamemode/itemsystem/items/crystalpickaxe.lua create mode 100644 gamemode/itemsystem/items/crystalsickle.lua create mode 100644 gamemode/itemsystem/items/cup.lua create mode 100644 gamemode/itemsystem/items/diamond.lua create mode 100644 gamemode/itemsystem/items/diamondaxe.lua create mode 100644 gamemode/itemsystem/items/diamondhammer.lua create mode 100644 gamemode/itemsystem/items/diamondpickaxe.lua create mode 100644 gamemode/itemsystem/items/diamondsickle.lua create mode 100644 gamemode/itemsystem/items/feather.lua create mode 100644 gamemode/itemsystem/items/fence.lua create mode 100644 gamemode/itemsystem/items/flint.lua create mode 100644 gamemode/itemsystem/items/floor.lua create mode 100644 gamemode/itemsystem/items/infuser.lua create mode 100644 gamemode/itemsystem/items/juice.lua create mode 100644 gamemode/itemsystem/items/knife.lua create mode 100644 gamemode/itemsystem/items/log.lua create mode 100644 gamemode/itemsystem/items/magicwood.lua create mode 100644 gamemode/itemsystem/items/maul.lua create mode 100644 gamemode/itemsystem/items/meat.lua create mode 100644 gamemode/itemsystem/items/mortarandpestle.lua create mode 100644 gamemode/itemsystem/items/pickaxe.lua create mode 100644 gamemode/itemsystem/items/pitch.lua create mode 100644 gamemode/itemsystem/items/plank.lua create mode 100644 gamemode/itemsystem/items/ramp.lua create mode 100644 gamemode/itemsystem/items/recipe_battleaxe.lua create mode 100644 gamemode/itemsystem/items/recipe_crystalhammer.lua create mode 100644 gamemode/itemsystem/items/recipe_diamondhammer.lua create mode 100644 gamemode/itemsystem/items/recipe_maul.lua create mode 100644 gamemode/itemsystem/items/recipe_shack.lua create mode 100644 gamemode/itemsystem/items/recipe_stoneblock.lua create mode 100644 gamemode/itemsystem/items/recipe_tent.lua create mode 100644 gamemode/itemsystem/items/researchtable.lua create mode 100644 gamemode/itemsystem/items/rock.lua create mode 100644 gamemode/itemsystem/items/rope.lua create mode 100644 gamemode/itemsystem/items/runeblank.lua create mode 100644 gamemode/itemsystem/items/runeenergy.lua create mode 100644 gamemode/itemsystem/items/runefire.lua create mode 100644 gamemode/itemsystem/items/runemagic.lua create mode 100644 gamemode/itemsystem/items/runenature.lua create mode 100644 gamemode/itemsystem/items/sap.lua create mode 100644 gamemode/itemsystem/items/shack.lua create mode 100644 gamemode/itemsystem/items/sickle.lua create mode 100644 gamemode/itemsystem/items/stoneblock.lua create mode 100644 gamemode/itemsystem/items/sword.lua create mode 100644 gamemode/itemsystem/items/tent.lua create mode 100644 gamemode/itemsystem/items/vine.lua create mode 100644 gamemode/itemsystem/items/wood.lua create mode 100644 gamemode/itemsystem/loaditems.lua create mode 100644 gamemode/npcsystem/aidirector.lua create mode 100644 gamemode/npcsystem/loadnpcs.lua create mode 100644 gamemode/npcsystem/npcs/base.lua create mode 100644 gamemode/npcsystem/npcs/bird.lua create mode 100644 gamemode/npcsystem/npcs/zombie.lua create mode 100644 gamemode/server/concommands.lua create mode 100644 gamemode/server/spawnitem.lua create mode 100644 gamemode/server/world.lua create mode 100644 gamemode/shared.lua create mode 100644 gamemode/shared/accounts.lua create mode 100644 gamemode/shared/entity_ext.lua create mode 100644 gamemode/shared/game_rounds.lua create mode 100644 gamemode/shared/player_accountinventory.lua create mode 100644 gamemode/shared/player_dropitem.lua create mode 100644 gamemode/shared/player_ghost.lua create mode 100644 gamemode/shared/player_human.lua create mode 100644 gamemode/shared/player_inventory.lua create mode 100644 gamemode/shared/player_lootventory.lua create mode 100644 gamemode/shared/player_pigeon.lua create mode 100644 gamemode/shared/player_recipes.lua create mode 100644 gamemode/shared/player_transferitem.lua create mode 100644 gamemode/shared/player_useitem.lua create mode 100644 gamemode/shared/stream.lua create mode 100644 gamemode/shared/synchronize.lua create mode 100644 gamemode/shared/system_admin.lua create mode 100644 gamemode/shared/system_fatigue.lua create mode 100644 gamemode/shared/system_heat.lua create mode 100644 gamemode/shared/system_hunger.lua create mode 100644 gamemode/shared/system_water.lua create mode 100644 gamemode/shared/vars.lua create mode 100644 gamemode/shared/weaponswap.lua create mode 100644 icon24.png create mode 100644 logo.png create mode 100644 to-do/content.materials.settelment/badge.png create mode 100644 to-do/content.materials.settelment/berries.png create mode 100644 to-do/content.materials.settelment/bolt.png create mode 100644 to-do/content.materials.settelment/bowl.png create mode 100644 to-do/content.materials.settelment/cake.png create mode 100644 to-do/content.materials.settelment/crossbow.png create mode 100644 to-do/content.materials.settelment/diamond.png create mode 100644 to-do/content.materials.settelment/egg.png create mode 100644 to-do/content.materials.settelment/egg.vmt create mode 100644 to-do/content.materials.settelment/egg.vtf create mode 100644 to-do/content.materials.settelment/flour.png create mode 100644 to-do/content.materials.settelment/flour.vmt create mode 100644 to-do/content.materials.settelment/flour.vtf create mode 100644 to-do/content.materials.settelment/friedegg.png create mode 100644 to-do/content.materials.settelment/friedegg.psd create mode 100644 to-do/content.materials.settelment/grain.png create mode 100644 to-do/content.materials.settelment/icon_badge.vmt create mode 100644 to-do/content.materials.settelment/icon_berries.vmt create mode 100644 to-do/content.materials.settelment/icon_bolt.vmt create mode 100644 to-do/content.materials.settelment/icon_bowl.vmt create mode 100644 to-do/content.materials.settelment/icon_bowl.vtf create mode 100644 to-do/content.materials.settelment/icon_cake.vmt create mode 100644 to-do/content.materials.settelment/icon_cake.vtf create mode 100644 to-do/content.materials.settelment/icon_crossbow.vmt create mode 100644 to-do/content.materials.settelment/icon_crossbow.vtf create mode 100644 to-do/content.materials.settelment/icon_diamond.vmt create mode 100644 to-do/content.materials.settelment/icon_diamond.vtf create mode 100644 to-do/content.materials.settelment/icon_friedegg.vmt create mode 100644 to-do/content.materials.settelment/icon_friedegg.vtf create mode 100644 to-do/content.materials.settelment/icon_grain.vmt create mode 100644 to-do/content.materials.settelment/icon_grain.vtf create mode 100644 to-do/content.materials.settelment/icon_pie.vmt create mode 100644 to-do/content.materials.settelment/icon_pie.vtf create mode 100644 to-do/content.materials.settelment/icon_researchtable.vmt create mode 100644 to-do/content.materials.settelment/icon_researchtable.vtf create mode 100644 to-do/content.materials.settelment/icon_rope.vmt create mode 100644 to-do/content.materials.settelment/icon_rope.vtf create mode 100644 to-do/content.materials.settelment/icon_scythe.vmt create mode 100644 to-do/content.materials.settelment/icon_scythe.vtf create mode 100644 to-do/content.materials.settelment/icon_soup.vmt create mode 100644 to-do/content.materials.settelment/icon_soup.vtf create mode 100644 to-do/content.materials.settelment/icon_sword.vmt create mode 100644 to-do/content.materials.settelment/icon_sword.vtf create mode 100644 to-do/content.materials.settelment/pie.png create mode 100644 to-do/content.materials.settelment/researchtable.png create mode 100644 to-do/content.materials.settelment/rope.png create mode 100644 to-do/content.materials.settelment/scythe.png create mode 100644 to-do/content.materials.settelment/soup.png create mode 100644 to-do/content.materials.settelment/sword.png create mode 100644 to-do/modelsandnotes/modelsforbush create mode 100644 wintersurvival2.txt diff --git a/content/materials/lam/musicnotes/note1.vmt b/content/materials/lam/musicnotes/note1.vmt new file mode 100644 index 0000000..6a9489c --- /dev/null +++ b/content/materials/lam/musicnotes/note1.vmt @@ -0,0 +1,6 @@ +"UnlitGeneric" +{ + "$basetexture" "lam/musicnotes/note1" + "$vertexcolor" 1 + "$vertexalpha" 1 +} \ No newline at end of file diff --git a/content/materials/lam/musicnotes/note1.vtf b/content/materials/lam/musicnotes/note1.vtf new file mode 100644 index 0000000..e49d689 Binary files /dev/null and b/content/materials/lam/musicnotes/note1.vtf differ diff --git a/content/materials/lam/musicnotes/note2.vmt b/content/materials/lam/musicnotes/note2.vmt new file mode 100644 index 0000000..4cb6d8a --- /dev/null +++ b/content/materials/lam/musicnotes/note2.vmt @@ -0,0 +1,6 @@ +"UnlitGeneric" +{ + "$basetexture" "lam/musicnotes/note2" + "$vertexcolor" 1 + "$vertexalpha" 1 +} \ No newline at end of file diff --git a/content/materials/lam/musicnotes/note2.vtf b/content/materials/lam/musicnotes/note2.vtf new file mode 100644 index 0000000..9cacba0 Binary files /dev/null and b/content/materials/lam/musicnotes/note2.vtf differ diff --git a/content/materials/lam/skygrid.vmt b/content/materials/lam/skygrid.vmt new file mode 100644 index 0000000..f9d2682 --- /dev/null +++ b/content/materials/lam/skygrid.vmt @@ -0,0 +1,7 @@ +"UnlitGeneric" +{ + "$basetexture" "lam/skygrid" + "$translucent" 1 + "$vertexalpha" 1 + "$vertexcolor" 1 +} diff --git a/content/materials/lam/skygrid.vtf b/content/materials/lam/skygrid.vtf new file mode 100644 index 0000000..00f32a2 Binary files /dev/null and b/content/materials/lam/skygrid.vtf differ diff --git a/content/materials/mixerman3d/other/metal_galv.vmt b/content/materials/mixerman3d/other/metal_galv.vmt new file mode 100644 index 0000000..2151c23 --- /dev/null +++ b/content/materials/mixerman3d/other/metal_galv.vmt @@ -0,0 +1,4 @@ +"VertexLitGeneric" +{ + "$baseTexture" "mixerman3d\other/metal_galv" +} diff --git a/content/materials/mixerman3d/other/metal_galv.vtf b/content/materials/mixerman3d/other/metal_galv.vtf new file mode 100644 index 0000000..10708e1 Binary files /dev/null and b/content/materials/mixerman3d/other/metal_galv.vtf differ diff --git a/content/materials/mixerman3d/other/metal_galv2.vmt b/content/materials/mixerman3d/other/metal_galv2.vmt new file mode 100644 index 0000000..5df40d7 --- /dev/null +++ b/content/materials/mixerman3d/other/metal_galv2.vmt @@ -0,0 +1,4 @@ +"VertexLitGeneric" +{ + "$baseTexture" "mixerman3d\other/metal_galv2" +} diff --git a/content/materials/mixerman3d/other/metal_galv2.vtf b/content/materials/mixerman3d/other/metal_galv2.vtf new file mode 100644 index 0000000..10708e1 Binary files /dev/null and b/content/materials/mixerman3d/other/metal_galv2.vtf differ diff --git a/content/materials/mixerman3d/other/skate_deck.vmt b/content/materials/mixerman3d/other/skate_deck.vmt new file mode 100644 index 0000000..ab244d5 --- /dev/null +++ b/content/materials/mixerman3d/other/skate_deck.vmt @@ -0,0 +1,4 @@ +"vertexlitgeneric" { + "$basetexture" "mixerman3d\other\skate_deck" + "$surfaceprop" "concrete" +} diff --git a/content/materials/mixerman3d/other/skate_deck.vtf b/content/materials/mixerman3d/other/skate_deck.vtf new file mode 100644 index 0000000..697e579 Binary files /dev/null and b/content/materials/mixerman3d/other/skate_deck.vtf differ diff --git a/content/materials/mixerman3d/other/skate_misc.vmt b/content/materials/mixerman3d/other/skate_misc.vmt new file mode 100644 index 0000000..ed642ab --- /dev/null +++ b/content/materials/mixerman3d/other/skate_misc.vmt @@ -0,0 +1,4 @@ +"vertexlitgeneric" { + "$basetexture" "mixerman3d\other\skate_misc" + "$surfaceprop" "concrete" +} diff --git a/content/materials/mixerman3d/other/skate_misc.vtf b/content/materials/mixerman3d/other/skate_misc.vtf new file mode 100644 index 0000000..7da40fc Binary files /dev/null and b/content/materials/mixerman3d/other/skate_misc.vtf differ diff --git a/content/materials/models/weapons/archersword.vmt b/content/materials/models/weapons/archersword.vmt new file mode 100644 index 0000000..d41ffab --- /dev/null +++ b/content/materials/models/weapons/archersword.vmt @@ -0,0 +1,11 @@ +"vertexlitgeneric" +{ + "$baseTexture" "models/weapons/archersword" + "$bumpMap" "models/weapons/archersword_normal" + "$model" "1" + "$phong" "1" + "$phongexponent" "30" + "$phongboost" "2" + "$phongfresnelranges" "[.75 1 1.25]" + "$phongalbedotint" "1" +} diff --git a/content/materials/models/weapons/archersword.vtf b/content/materials/models/weapons/archersword.vtf new file mode 100644 index 0000000..2b911e0 Binary files /dev/null and b/content/materials/models/weapons/archersword.vtf differ diff --git a/content/materials/models/weapons/archersword_normal.vtf b/content/materials/models/weapons/archersword_normal.vtf new file mode 100644 index 0000000..0288aac Binary files /dev/null and b/content/materials/models/weapons/archersword_normal.vtf differ diff --git a/content/materials/settlement/egg.vtf b/content/materials/settlement/egg.vtf new file mode 100644 index 0000000..cdce86e Binary files /dev/null and b/content/materials/settlement/egg.vtf differ diff --git a/content/materials/settlement/flour.vtf b/content/materials/settlement/flour.vtf new file mode 100644 index 0000000..55e1521 Binary files /dev/null and b/content/materials/settlement/flour.vtf differ diff --git a/content/materials/settlement/icon_badge.vmt b/content/materials/settlement/icon_badge.vmt new file mode 100644 index 0000000..65ff354 --- /dev/null +++ b/content/materials/settlement/icon_badge.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_badge" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_badge.vtf b/content/materials/settlement/icon_badge.vtf new file mode 100644 index 0000000..883d5f2 Binary files /dev/null and b/content/materials/settlement/icon_badge.vtf differ diff --git a/content/materials/settlement/icon_berries.vmt b/content/materials/settlement/icon_berries.vmt new file mode 100644 index 0000000..3025484 --- /dev/null +++ b/content/materials/settlement/icon_berries.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_berries" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_berries.vtf b/content/materials/settlement/icon_berries.vtf new file mode 100644 index 0000000..80efd18 Binary files /dev/null and b/content/materials/settlement/icon_berries.vtf differ diff --git a/content/materials/settlement/icon_bolt.vmt b/content/materials/settlement/icon_bolt.vmt new file mode 100644 index 0000000..f011ebc --- /dev/null +++ b/content/materials/settlement/icon_bolt.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_bolt" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_bolt.vtf b/content/materials/settlement/icon_bolt.vtf new file mode 100644 index 0000000..4a003e2 Binary files /dev/null and b/content/materials/settlement/icon_bolt.vtf differ diff --git a/content/materials/settlement/icon_bowl.vmt b/content/materials/settlement/icon_bowl.vmt new file mode 100644 index 0000000..48f69fd --- /dev/null +++ b/content/materials/settlement/icon_bowl.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_bowl" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_bowl.vtf b/content/materials/settlement/icon_bowl.vtf new file mode 100644 index 0000000..a9c6a88 Binary files /dev/null and b/content/materials/settlement/icon_bowl.vtf differ diff --git a/content/materials/settlement/icon_cake.vmt b/content/materials/settlement/icon_cake.vmt new file mode 100644 index 0000000..d549026 --- /dev/null +++ b/content/materials/settlement/icon_cake.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_cake" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_cake.vtf b/content/materials/settlement/icon_cake.vtf new file mode 100644 index 0000000..49c44bc Binary files /dev/null and b/content/materials/settlement/icon_cake.vtf differ diff --git a/content/materials/settlement/icon_crossbow.vmt b/content/materials/settlement/icon_crossbow.vmt new file mode 100644 index 0000000..c4b4b9d --- /dev/null +++ b/content/materials/settlement/icon_crossbow.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_crossbow" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_crossbow.vtf b/content/materials/settlement/icon_crossbow.vtf new file mode 100644 index 0000000..b1182f8 Binary files /dev/null and b/content/materials/settlement/icon_crossbow.vtf differ diff --git a/content/materials/settlement/icon_diamond.vmt b/content/materials/settlement/icon_diamond.vmt new file mode 100644 index 0000000..1802341 --- /dev/null +++ b/content/materials/settlement/icon_diamond.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_diamond" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_diamond.vtf b/content/materials/settlement/icon_diamond.vtf new file mode 100644 index 0000000..b23dc82 Binary files /dev/null and b/content/materials/settlement/icon_diamond.vtf differ diff --git a/content/materials/settlement/icon_egg.vmt b/content/materials/settlement/icon_egg.vmt new file mode 100644 index 0000000..e8577a3 --- /dev/null +++ b/content/materials/settlement/icon_egg.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_egg" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_egg.vtf b/content/materials/settlement/icon_egg.vtf new file mode 100644 index 0000000..6207cdc Binary files /dev/null and b/content/materials/settlement/icon_egg.vtf differ diff --git a/content/materials/settlement/icon_flour.vmt b/content/materials/settlement/icon_flour.vmt new file mode 100644 index 0000000..ffbba93 --- /dev/null +++ b/content/materials/settlement/icon_flour.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_flour" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_flour.vtf b/content/materials/settlement/icon_flour.vtf new file mode 100644 index 0000000..67c3c86 Binary files /dev/null and b/content/materials/settlement/icon_flour.vtf differ diff --git a/content/materials/settlement/icon_friedegg.vmt b/content/materials/settlement/icon_friedegg.vmt new file mode 100644 index 0000000..62f5e66 --- /dev/null +++ b/content/materials/settlement/icon_friedegg.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_friedegg" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_friedegg.vtf b/content/materials/settlement/icon_friedegg.vtf new file mode 100644 index 0000000..363c649 Binary files /dev/null and b/content/materials/settlement/icon_friedegg.vtf differ diff --git a/content/materials/settlement/icon_grain.vmt b/content/materials/settlement/icon_grain.vmt new file mode 100644 index 0000000..ab6ffe2 --- /dev/null +++ b/content/materials/settlement/icon_grain.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_grain" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_grain.vtf b/content/materials/settlement/icon_grain.vtf new file mode 100644 index 0000000..6e1e388 Binary files /dev/null and b/content/materials/settlement/icon_grain.vtf differ diff --git a/content/materials/settlement/icon_hut.vmt b/content/materials/settlement/icon_hut.vmt new file mode 100644 index 0000000..367d8d9 --- /dev/null +++ b/content/materials/settlement/icon_hut.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_hut" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_hut.vtf b/content/materials/settlement/icon_hut.vtf new file mode 100644 index 0000000..3533379 Binary files /dev/null and b/content/materials/settlement/icon_hut.vtf differ diff --git a/content/materials/settlement/icon_juice.vmt b/content/materials/settlement/icon_juice.vmt new file mode 100644 index 0000000..42900aa --- /dev/null +++ b/content/materials/settlement/icon_juice.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_juice" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_juice.vtf b/content/materials/settlement/icon_juice.vtf new file mode 100644 index 0000000..9c03e5e Binary files /dev/null and b/content/materials/settlement/icon_juice.vtf differ diff --git a/content/materials/settlement/icon_knife.vmt b/content/materials/settlement/icon_knife.vmt new file mode 100644 index 0000000..4741642 --- /dev/null +++ b/content/materials/settlement/icon_knife.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_knife" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_knife.vtf b/content/materials/settlement/icon_knife.vtf new file mode 100644 index 0000000..cea521f Binary files /dev/null and b/content/materials/settlement/icon_knife.vtf differ diff --git a/content/materials/settlement/icon_largefence.vmt b/content/materials/settlement/icon_largefence.vmt new file mode 100644 index 0000000..aca6c94 --- /dev/null +++ b/content/materials/settlement/icon_largefence.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_largefence" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_largefence.vtf b/content/materials/settlement/icon_largefence.vtf new file mode 100644 index 0000000..6050b9e Binary files /dev/null and b/content/materials/settlement/icon_largefence.vtf differ diff --git a/content/materials/settlement/icon_log.vmt b/content/materials/settlement/icon_log.vmt new file mode 100644 index 0000000..7c9ce42 --- /dev/null +++ b/content/materials/settlement/icon_log.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_log" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_log.vtf b/content/materials/settlement/icon_log.vtf new file mode 100644 index 0000000..8435858 Binary files /dev/null and b/content/materials/settlement/icon_log.vtf differ diff --git a/content/materials/settlement/icon_pickaxe.vmt b/content/materials/settlement/icon_pickaxe.vmt new file mode 100644 index 0000000..07a885a --- /dev/null +++ b/content/materials/settlement/icon_pickaxe.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_pickaxe" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_pickaxe.vtf b/content/materials/settlement/icon_pickaxe.vtf new file mode 100644 index 0000000..7c54380 Binary files /dev/null and b/content/materials/settlement/icon_pickaxe.vtf differ diff --git a/content/materials/settlement/icon_pie.vmt b/content/materials/settlement/icon_pie.vmt new file mode 100644 index 0000000..928b2b9 --- /dev/null +++ b/content/materials/settlement/icon_pie.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_pie" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_pie.vtf b/content/materials/settlement/icon_pie.vtf new file mode 100644 index 0000000..cf9e91d Binary files /dev/null and b/content/materials/settlement/icon_pie.vtf differ diff --git a/content/materials/settlement/icon_rope.vmt b/content/materials/settlement/icon_rope.vmt new file mode 100644 index 0000000..50d5ab1 --- /dev/null +++ b/content/materials/settlement/icon_rope.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_rope" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_rope.vtf b/content/materials/settlement/icon_rope.vtf new file mode 100644 index 0000000..742145d Binary files /dev/null and b/content/materials/settlement/icon_rope.vtf differ diff --git a/content/materials/settlement/icon_scarecrow.vmt b/content/materials/settlement/icon_scarecrow.vmt new file mode 100644 index 0000000..3675e4a --- /dev/null +++ b/content/materials/settlement/icon_scarecrow.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_scarecrow" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_scarecrow.vtf b/content/materials/settlement/icon_scarecrow.vtf new file mode 100644 index 0000000..6d41678 Binary files /dev/null and b/content/materials/settlement/icon_scarecrow.vtf differ diff --git a/content/materials/settlement/icon_scythe.vmt b/content/materials/settlement/icon_scythe.vmt new file mode 100644 index 0000000..b5460d2 --- /dev/null +++ b/content/materials/settlement/icon_scythe.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_scythe" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_scythe.vtf b/content/materials/settlement/icon_scythe.vtf new file mode 100644 index 0000000..7ca7929 Binary files /dev/null and b/content/materials/settlement/icon_scythe.vtf differ diff --git a/content/materials/settlement/icon_shack.vmt b/content/materials/settlement/icon_shack.vmt new file mode 100644 index 0000000..90caa6e --- /dev/null +++ b/content/materials/settlement/icon_shack.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_shack" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_shack.vtf b/content/materials/settlement/icon_shack.vtf new file mode 100644 index 0000000..b30afd2 Binary files /dev/null and b/content/materials/settlement/icon_shack.vtf differ diff --git a/content/materials/settlement/icon_sickle.vmt b/content/materials/settlement/icon_sickle.vmt new file mode 100644 index 0000000..138bb5f --- /dev/null +++ b/content/materials/settlement/icon_sickle.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_sickle" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_sickle.vtf b/content/materials/settlement/icon_sickle.vtf new file mode 100644 index 0000000..a645632 Binary files /dev/null and b/content/materials/settlement/icon_sickle.vtf differ diff --git a/content/materials/settlement/icon_soup.vmt b/content/materials/settlement/icon_soup.vmt new file mode 100644 index 0000000..a637338 --- /dev/null +++ b/content/materials/settlement/icon_soup.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_soup" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_soup.vtf b/content/materials/settlement/icon_soup.vtf new file mode 100644 index 0000000..91be7d2 Binary files /dev/null and b/content/materials/settlement/icon_soup.vtf differ diff --git a/content/materials/settlement/icon_stoneblock.vmt b/content/materials/settlement/icon_stoneblock.vmt new file mode 100644 index 0000000..66fb72f --- /dev/null +++ b/content/materials/settlement/icon_stoneblock.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_stoneblock" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_stoneblock.vtf b/content/materials/settlement/icon_stoneblock.vtf new file mode 100644 index 0000000..6105db4 Binary files /dev/null and b/content/materials/settlement/icon_stoneblock.vtf differ diff --git a/content/materials/settlement/icon_sword.vmt b/content/materials/settlement/icon_sword.vmt new file mode 100644 index 0000000..2cc5e62 --- /dev/null +++ b/content/materials/settlement/icon_sword.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_sword" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_sword.vtf b/content/materials/settlement/icon_sword.vtf new file mode 100644 index 0000000..9365108 Binary files /dev/null and b/content/materials/settlement/icon_sword.vtf differ diff --git a/content/materials/settlement/icon_tent.vmt b/content/materials/settlement/icon_tent.vmt new file mode 100644 index 0000000..511c861 --- /dev/null +++ b/content/materials/settlement/icon_tent.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "settlement/icon_tent" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} \ No newline at end of file diff --git a/content/materials/settlement/icon_tent.vtf b/content/materials/settlement/icon_tent.vtf new file mode 100644 index 0000000..da09565 Binary files /dev/null and b/content/materials/settlement/icon_tent.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_1vine.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_1vine.vtf new file mode 100644 index 0000000..ed76aa1 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_1vine.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_arrow.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_arrow.vmt new file mode 100644 index 0000000..5ab3c9b --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_arrow.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_arrow" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_arrow.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_arrow.vtf new file mode 100644 index 0000000..d24bce0 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_arrow.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_axe.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_axe.vmt new file mode 100644 index 0000000..1fb847e --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_axe.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_axe" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_axe.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_axe.vtf new file mode 100644 index 0000000..8952f6c Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_axe.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_beer.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_beer.vmt new file mode 100644 index 0000000..12a237c --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_beer.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_beer" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_beer.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_beer.vtf new file mode 100644 index 0000000..be95fe9 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_beer.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_bow.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_bow.vmt new file mode 100644 index 0000000..9d4a1ef --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_bow.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_bow" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_bow.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_bow.vtf new file mode 100644 index 0000000..d636833 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_bow.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_bowloaded.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_bowloaded.vmt new file mode 100644 index 0000000..2a4410d --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_bowloaded.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_bowloaded" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_bowloaded.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_bowloaded.vtf new file mode 100644 index 0000000..071785b Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_bowloaded.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_bugbait.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_bugbait.vmt new file mode 100644 index 0000000..9c93bd9 --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_bugbait.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_bugbait" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_bugbait.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_bugbait.vtf new file mode 100644 index 0000000..e33344c Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_bugbait.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_campfire.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_campfire.vmt new file mode 100644 index 0000000..60fe48f --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_campfire.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_campfire" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_campfire.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_campfire.vtf new file mode 100644 index 0000000..f9d5ada Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_campfire.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_crystal.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_crystal.vmt new file mode 100644 index 0000000..14c8ec7 --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_crystal.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_crystal" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_crystal.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_crystal.vtf new file mode 100644 index 0000000..6d5dcb7 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_crystal.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_fence.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_fence.vmt new file mode 100644 index 0000000..a67a272 --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_fence.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_fence" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_fence.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_fence.vtf new file mode 100644 index 0000000..90eb1c9 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_fence.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_healthkit.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_healthkit.vmt new file mode 100644 index 0000000..6fd40a6 --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_healthkit.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_healthkit" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_healthkit.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_healthkit.vtf new file mode 100644 index 0000000..2bc0af2 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_healthkit.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_healthvial.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_healthvial.vmt new file mode 100644 index 0000000..2a01795 --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_healthvial.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_healthvial" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_healthvial.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_healthvial.vtf new file mode 100644 index 0000000..d362801 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_healthvial.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_molotov.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_molotov.vmt new file mode 100644 index 0000000..4ce414d --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_molotov.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_molotov" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_molotov.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_molotov.vtf new file mode 100644 index 0000000..28caaab Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_molotov.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_newspaper.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_newspaper.vmt new file mode 100644 index 0000000..04dbdbb --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_newspaper.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_newspaper" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_newspaper.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_newspaper.vtf new file mode 100644 index 0000000..9bb4ef4 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_newspaper.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_plank.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_plank.vmt new file mode 100644 index 0000000..6033fad --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_plank.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_plank" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_plank.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_plank.vtf new file mode 100644 index 0000000..0f30ba9 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_plank.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_rock.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_rock.vmt new file mode 100644 index 0000000..f70e6cb --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_rock.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_rock" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_rock.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_rock.vtf new file mode 100644 index 0000000..1726122 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_rock.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_sap.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_sap.vmt new file mode 100644 index 0000000..30fe45a --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_sap.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_sap" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_sap.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_sap.vtf new file mode 100644 index 0000000..916cddf Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_sap.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_spine.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_spine.vmt new file mode 100644 index 0000000..79c337e --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_spine.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_spine" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_spine.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_spine.vtf new file mode 100644 index 0000000..eb50d0b Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_spine.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_vine.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_vine.vmt new file mode 100644 index 0000000..92e0390 --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_vine.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_vine" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_vine.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_vine.vtf new file mode 100644 index 0000000..ed76aa1 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_vine.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_wood.vmt b/content/materials/wintersurvival2/hud/ws1_icons/icon_wood.vmt new file mode 100644 index 0000000..24895cf --- /dev/null +++ b/content/materials/wintersurvival2/hud/ws1_icons/icon_wood.vmt @@ -0,0 +1,8 @@ +"UnlitGeneric" +{ + "$basetexture" "wintersurvival2/hud/ws1_icons/icon_wood" + "$vertexcolor" 1 + "$vertexalpha" 1 + "$translucent" 1 + "$nolod" "1" +} diff --git a/content/materials/wintersurvival2/hud/ws1_icons/icon_wood.vtf b/content/materials/wintersurvival2/hud/ws1_icons/icon_wood.vtf new file mode 100644 index 0000000..5be106a Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws1_icons/icon_wood.vtf differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/cup.psd b/content/materials/wintersurvival2/hud/ws2_icons/cup.psd new file mode 100644 index 0000000..9aa6d7b Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/cup.psd differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/cupempty.png b/content/materials/wintersurvival2/hud/ws2_icons/cupempty.png new file mode 100644 index 0000000..fab60bf Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/cupempty.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_ancientwood.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_ancientwood.png new file mode 100644 index 0000000..e522a9a Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_ancientwood.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_coal.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_coal.png new file mode 100644 index 0000000..c3833c3 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_coal.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_crow.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_crow.png new file mode 100644 index 0000000..de2d33b Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_crow.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_cupempty.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_cupempty.png new file mode 100644 index 0000000..fab60bf Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_cupempty.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_feather.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_feather.png new file mode 100644 index 0000000..402f1e1 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_feather.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_flint.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_flint.png new file mode 100644 index 0000000..db97b63 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_flint.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_log.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_log.png new file mode 100644 index 0000000..753262b Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_log.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_magicwood.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_magicwood.png new file mode 100644 index 0000000..54eef74 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_magicwood.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_magicwood.psd b/content/materials/wintersurvival2/hud/ws2_icons/icon_magicwood.psd new file mode 100644 index 0000000..ad84005 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_magicwood.psd differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_meat.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_meat.png new file mode 100644 index 0000000..a31b37c Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_meat.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_mortarandpestle.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_mortarandpestle.png new file mode 100644 index 0000000..00a8203 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_mortarandpestle.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_pitch.psd b/content/materials/wintersurvival2/hud/ws2_icons/icon_pitch.psd new file mode 100644 index 0000000..a27267a Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_pitch.psd differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_recipe.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_recipe.png new file mode 100644 index 0000000..c8347c0 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_recipe.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_rune.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_rune.png new file mode 100644 index 0000000..f52e0d2 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_rune.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_runeelectric.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_runeelectric.png new file mode 100644 index 0000000..a40e1a0 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_runeelectric.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_runefire.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_runefire.png new file mode 100644 index 0000000..7d3445b Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_runefire.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_runemagic.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_runemagic.png new file mode 100644 index 0000000..b950296 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_runemagic.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_runenature.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_runenature.png new file mode 100644 index 0000000..2379301 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_runenature.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_stoneblock.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_stoneblock.png new file mode 100644 index 0000000..8a734f3 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_stoneblock.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/icon_sword.png b/content/materials/wintersurvival2/hud/ws2_icons/icon_sword.png new file mode 100644 index 0000000..cec6520 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/icon_sword.png differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/rune.psd b/content/materials/wintersurvival2/hud/ws2_icons/rune.psd new file mode 100644 index 0000000..47e3daf Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/rune.psd differ diff --git a/content/materials/wintersurvival2/hud/ws2_icons/runeexplosive.png b/content/materials/wintersurvival2/hud/ws2_icons/runeexplosive.png new file mode 100644 index 0000000..1ca24a5 Binary files /dev/null and b/content/materials/wintersurvival2/hud/ws2_icons/runeexplosive.png differ diff --git a/content/models/mixerman3d/other/arrow.dx80.vtx b/content/models/mixerman3d/other/arrow.dx80.vtx new file mode 100644 index 0000000..0fb8978 Binary files /dev/null and b/content/models/mixerman3d/other/arrow.dx80.vtx differ diff --git a/content/models/mixerman3d/other/arrow.dx90.vtx b/content/models/mixerman3d/other/arrow.dx90.vtx new file mode 100644 index 0000000..bcfe4e2 Binary files /dev/null and b/content/models/mixerman3d/other/arrow.dx90.vtx differ diff --git a/content/models/mixerman3d/other/arrow.mdl b/content/models/mixerman3d/other/arrow.mdl new file mode 100644 index 0000000..13c3864 Binary files /dev/null and b/content/models/mixerman3d/other/arrow.mdl differ diff --git a/content/models/mixerman3d/other/arrow.phy b/content/models/mixerman3d/other/arrow.phy new file mode 100644 index 0000000..20f9421 Binary files /dev/null and b/content/models/mixerman3d/other/arrow.phy differ diff --git a/content/models/mixerman3d/other/arrow.sw.vtx b/content/models/mixerman3d/other/arrow.sw.vtx new file mode 100644 index 0000000..76202c6 Binary files /dev/null and b/content/models/mixerman3d/other/arrow.sw.vtx differ diff --git a/content/models/mixerman3d/other/arrow.vvd b/content/models/mixerman3d/other/arrow.vvd new file mode 100644 index 0000000..9c3d33f Binary files /dev/null and b/content/models/mixerman3d/other/arrow.vvd differ diff --git a/content/models/weapons/w_archersword/w_archersword.dx80.vtx b/content/models/weapons/w_archersword/w_archersword.dx80.vtx new file mode 100644 index 0000000..fdd0baf Binary files /dev/null and b/content/models/weapons/w_archersword/w_archersword.dx80.vtx differ diff --git a/content/models/weapons/w_archersword/w_archersword.dx90.vtx b/content/models/weapons/w_archersword/w_archersword.dx90.vtx new file mode 100644 index 0000000..1e1ca43 Binary files /dev/null and b/content/models/weapons/w_archersword/w_archersword.dx90.vtx differ diff --git a/content/models/weapons/w_archersword/w_archersword.mdl b/content/models/weapons/w_archersword/w_archersword.mdl new file mode 100644 index 0000000..ff0d6db Binary files /dev/null and b/content/models/weapons/w_archersword/w_archersword.mdl differ diff --git a/content/models/weapons/w_archersword/w_archersword.phy b/content/models/weapons/w_archersword/w_archersword.phy new file mode 100644 index 0000000..74c7459 Binary files /dev/null and b/content/models/weapons/w_archersword/w_archersword.phy differ diff --git a/content/models/weapons/w_archersword/w_archersword.sw.vtx b/content/models/weapons/w_archersword/w_archersword.sw.vtx new file mode 100644 index 0000000..77ee4f6 Binary files /dev/null and b/content/models/weapons/w_archersword/w_archersword.sw.vtx differ diff --git a/content/models/weapons/w_archersword/w_archersword.vvd b/content/models/weapons/w_archersword/w_archersword.vvd new file mode 100644 index 0000000..2bd342a Binary files /dev/null and b/content/models/weapons/w_archersword/w_archersword.vvd differ diff --git a/content/particles/particletest.pcf b/content/particles/particletest.pcf new file mode 100644 index 0000000..61fbe5d Binary files /dev/null and b/content/particles/particletest.pcf differ diff --git a/content/sound/wintersurvival2/hud/itemequip.wav b/content/sound/wintersurvival2/hud/itemequip.wav new file mode 100644 index 0000000..c404be2 Binary files /dev/null and b/content/sound/wintersurvival2/hud/itemequip.wav differ diff --git a/content/sound/wintersurvival2/hud/itemopen.wav b/content/sound/wintersurvival2/hud/itemopen.wav new file mode 100644 index 0000000..ef69fb7 Binary files /dev/null and b/content/sound/wintersurvival2/hud/itemopen.wav differ diff --git a/content/sound/wintersurvival2/ritual/wololo.mp3 b/content/sound/wintersurvival2/ritual/wololo.mp3 new file mode 100644 index 0000000..9d71ae2 Binary files /dev/null and b/content/sound/wintersurvival2/ritual/wololo.mp3 differ diff --git a/entities/entities/ws_alter/cl_init.lua b/entities/entities/ws_alter/cl_init.lua new file mode 100644 index 0000000..3baf05f --- /dev/null +++ b/entities/entities/ws_alter/cl_init.lua @@ -0,0 +1,57 @@ +include('shared.lua') + +local Up = Vector(0,0,20) +local Sc = Vector(8,1,1) + +function ENT:Initialize() + timer.Simple(0.1,function() self.Pos = self:GetPos() self.Ang = self:GetAngles() end) + + self.Dibs = ClientsideModel("models/props_c17/gravestone003a.mdl") + self.Dibs:SetNoDraw(true) +end + +function ENT:Think() + if (!self.Pos) then return end + + local light = DynamicLight(self:EntIndex()) + + if (light) then + light.Pos = self.Pos + Up + + light.r = 255 + light.g = 10 + light.b = 0 + + light.Brightness = 4 + light.Size = 400 + light.Decay = 700 + light.DieTime = CurTime()+1 + light.Style = 0 + end +end + + +local a = Angle(0,180,0) +local A = Angle(90,0,0) + +function ENT:Draw() + if (!self.Pos) then return end + + local mat = Matrix() + mat:Scale(Sc) + + local vec = Vector(22,0,0) + vec:Rotate(self.Ang) + + for i = 0,1 do + local ab = a*i + + vec:Rotate(ab) + + self.Dibs:EnableMatrix( "RenderMultiply", mat ) + self.Dibs:SetRenderOrigin(self.Pos+vec) + self.Dibs:SetRenderAngles(self.Ang+ab+A) + self.Dibs:SetupBones() + self.Dibs:DrawModel() + end +end diff --git a/entities/entities/ws_alter/init.lua b/entities/entities/ws_alter/init.lua new file mode 100644 index 0000000..a8f6641 --- /dev/null +++ b/entities/entities/ws_alter/init.lua @@ -0,0 +1,99 @@ +AddCSLuaFile("cl_init.lua") +AddCSLuaFile("shared.lua") + +include('shared.lua') + +local ResurrectionTable = { + ["Meat"] = 25, + ["Berry"] = 30, + ["Feather"] = 10, +} + +function ENT:Initialize() + self:SetModel("models/props_junk/wood_crate001a.mdl") + self:PhysicsInit(SOLID_VPHYSICS) + self:SetMoveType(MOVETYPE_NONE) + self:SetSolid(SOLID_VPHYSICS) + self:SetUseType(SIMPLE_USE) + + local phys = self:GetPhysicsObject() + phys:EnableMotion(false) + phys:Sleep() + + self:SetHealth(30) + + self.StoredItems = {} +end + +function ENT:Think() + local HasItems = {} + + for k,v in pairs(self.StoredItems) do + if (ResurrectionTable[v.Name] and v.Quantity >= ResurrectionTable[v.Name]) then + HasItems[v.Name] = {k,ResurrectionTable[v.Name]} + end + end + + if (table.Count(HasItems) >= table.Count(ResurrectionTable)) then + for k,v in pairs(player.GetAll()) do + if (v:IsPigeon() and v:Alive() and v:GetPos():Distance(self:GetPos()) < 200) then + v:SetHuman(true) + v:KillSilent() + v:ChatPrint("You have been resurrected from the dead!") + self:EmitSound("wintersurvival2/ritual/wololo.mp3") + + for a,b in pairs(HasItems) do + if (self.StoredItems[b[1]].Quantity == b[2]) then table.remove(self.StoredItems,b[1]) + else self.StoredItems[b[1]].Quantity = self.StoredItems[b[1]].Quantity-b[2] end + end + + v:Spawn() + + break + end + end + end + + self:NextThink(CurTime()+10) + return true +end + +function ENT:AddItem(item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + v.Quantity = v.Quantity + quantity + return + end + end + + table.insert(self.StoredItems,{Name = item, Quantity = quantity}) +end + +function ENT:TakeItem(pl,item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + quantity = math.min(quantity,v.Quantity) + v.Quantity = v.Quantity - quantity + + pl:AddItem(item,quantity) + + if (v.Quantity <= 0) then table.remove(self.StoredItems,k) end + break + end + end +end + +function ENT:GetItems() + return self.StoredItems +end + +function ENT:Use(pl) + if (pl:IsPigeon()) then return end + OpenLootventory(pl,self.StoredItems,self) +end + +function ENT:OnTakeDamage(dmg) + self:SetHealth(self:Health()-dmg) + + if (self:Health() <= 0) then self:Remove() end +end \ No newline at end of file diff --git a/entities/entities/ws_alter/shared.lua b/entities/entities/ws_alter/shared.lua new file mode 100644 index 0000000..e67f5f4 --- /dev/null +++ b/entities/entities/ws_alter/shared.lua @@ -0,0 +1,5 @@ +ENT.Type = "anim" +ENT.Base = "base_anim" + +function ENT:OnRemove() +end diff --git a/entities/entities/ws_arrow/cl_init.lua b/entities/entities/ws_arrow/cl_init.lua new file mode 100644 index 0000000..b323b28 --- /dev/null +++ b/entities/entities/ws_arrow/cl_init.lua @@ -0,0 +1,5 @@ +include('shared.lua') + +function ENT:Draw() + self.Entity:DrawModel() +end diff --git a/entities/entities/ws_arrow/init.lua b/entities/entities/ws_arrow/init.lua new file mode 100644 index 0000000..e27dda9 --- /dev/null +++ b/entities/entities/ws_arrow/init.lua @@ -0,0 +1,27 @@ +AddCSLuaFile("cl_init.lua") +AddCSLuaFile("shared.lua") + +include('shared.lua') + +local Ab = Color(255,255,255,100) + +function ENT:Initialize() + self:SetModel("models/mixerman3d/other/arrow.mdl") + self:PhysicsInit(SOLID_VPHYSICS) + self:SetMoveType(MOVETYPE_VPHYSICS) + self:SetSolid(SOLID_VPHYSICS) + self:SetCollisionGroup(COLLISION_GROUP_INTERACTIVE) + self:PhysWake() + self:SetUseType(SIMPLE_USE) + + util.SpriteTrail( self, 0, Ab, true, 1, 0, 1, 1, "sprites/smoke_trail.vmt" ) + + self:NextThink(CurTime()+10) +end + +function ENT:Think() + self:Remove() + return true +end + + diff --git a/entities/entities/ws_arrow/shared.lua b/entities/entities/ws_arrow/shared.lua new file mode 100644 index 0000000..e67f5f4 --- /dev/null +++ b/entities/entities/ws_arrow/shared.lua @@ -0,0 +1,5 @@ +ENT.Type = "anim" +ENT.Base = "base_anim" + +function ENT:OnRemove() +end diff --git a/entities/entities/ws_barrel/cl_init.lua b/entities/entities/ws_barrel/cl_init.lua new file mode 100644 index 0000000..b323b28 --- /dev/null +++ b/entities/entities/ws_barrel/cl_init.lua @@ -0,0 +1,5 @@ +include('shared.lua') + +function ENT:Draw() + self.Entity:DrawModel() +end diff --git a/entities/entities/ws_barrel/init.lua b/entities/entities/ws_barrel/init.lua new file mode 100644 index 0000000..28d8d20 --- /dev/null +++ b/entities/entities/ws_barrel/init.lua @@ -0,0 +1,60 @@ +AddCSLuaFile("cl_init.lua") +AddCSLuaFile("shared.lua") + +include('shared.lua') + +function ENT:Initialize() + self:SetModel("models/props_c17/oildrum001.mdl") + self:PhysicsInit(SOLID_VPHYSICS) + self:SetMoveType(MOVETYPE_NONE) + self:SetSolid(SOLID_VPHYSICS) + self:SetUseType(SIMPLE_USE) + + local phys = self:GetPhysicsObject() + phys:EnableMotion(false) + phys:Sleep() + + self:SetHealth(30) + + self.StoredItems = {} +end + +function ENT:AddItem(item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + v.Quantity = v.Quantity + quantity + return + end + end + + table.insert(self.StoredItems,{Name = item, Quantity = quantity}) +end + +function ENT:TakeItem(pl,item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + quantity = math.min(quantity,v.Quantity) + v.Quantity = v.Quantity - quantity + + pl:AddItem(item,quantity) + + if (v.Quantity <= 0) then table.remove(self.StoredItems,k) end + break + end + end +end + +function ENT:GetItems() + return self.StoredItems +end + +function ENT:Use(pl) + if (pl:IsPigeon()) then return end + OpenLootventory(pl,self.StoredItems,self) +end + +function ENT:OnTakeDamage(dmg) + self:SetHealth(self:Health()-dmg) + + if (self:Health() <= 0) then self:Remove() end +end diff --git a/entities/entities/ws_barrel/shared.lua b/entities/entities/ws_barrel/shared.lua new file mode 100644 index 0000000..e67f5f4 --- /dev/null +++ b/entities/entities/ws_barrel/shared.lua @@ -0,0 +1,5 @@ +ENT.Type = "anim" +ENT.Base = "base_anim" + +function ENT:OnRemove() +end diff --git a/entities/entities/ws_campfire/cl_init.lua b/entities/entities/ws_campfire/cl_init.lua new file mode 100644 index 0000000..21479fa --- /dev/null +++ b/entities/entities/ws_campfire/cl_init.lua @@ -0,0 +1,80 @@ +include('shared.lua') +ENT.RenderGroup = RENDERGROUP_BOTH + +local ZeroA = Angle(0,0,0) +local Flame = Material("particles/fire1") + +local Up = Vector(0,0,120) +local UP = Vector(0,0,32) + +function ENT:Initialize() + self.FrameA = 0 + self.LastDrawn = UnPredictedCurTime() + + self.Dibs = ClientsideModel("models/props_debris/wood_board02a.mdl") + self.Dibs:SetNoDraw(true) + self.Dibs:DrawShadow(false) + + timer.Simple(0.1,function() self.Pos = self:GetPos() self.Ang = self:GetAngles() end) +end + +function ENT:OnRemove() +end + +function ENT:Think() + if (!self.Pos) then return end +/* + local light = DynamicLight(self:EntIndex()) + + if (light) then + light.Pos = self.Pos + UP + + light.r = 255 + light.g = 140 + light.b = 0 + + light.Brightness = 1 + light.Size = 400 + light.Decay = 700 + light.DieTime = CurTime()+1 + light.Style = 0 + end*/ +end + +function ENT:Draw() + if (!self.Pos) then return end + + local Vec = Vector(10,0,0) + Vec:Rotate(self.Ang) + + for i = 1,4 do + Vec:Rotate(Angle(0,90,0)) + + local AB = self.Pos+Vec + + self.Dibs:SetRenderOrigin(AB) + self.Dibs:SetRenderAngles(Angle(-45,90*i,0)+self.Ang) + self.Dibs:SetupBones() + self.Dibs:DrawModel() + end + + self:DrawModel() +end + + +function ENT:DrawTranslucent() + if (!self.Pos) then return end + --[[ + local FlameStart = self.Pos + local FlameEnd = self.Pos + Up + + self.FrameA = self.FrameA+(UnPredictedCurTime()-self.LastDrawn)*20 + if (self.FrameA > 52) then self.FrameA = 0 end + + Flame:SetFloat("$frame", self.FrameA) + --render.SetMaterial(Flame) + --render.DrawBeam(FlameStart,FlameEnd,48,0.99,0,MAIN_WHITECOLOR) + + self.LastDrawn = UnPredictedCurTime() + ]]-- +end diff --git a/entities/entities/ws_campfire/init.lua b/entities/entities/ws_campfire/init.lua new file mode 100644 index 0000000..6a40aed --- /dev/null +++ b/entities/entities/ws_campfire/init.lua @@ -0,0 +1,96 @@ +AddCSLuaFile( "cl_init.lua" ) +AddCSLuaFile( "shared.lua" ) + +include('shared.lua') + +function ENT:Initialize() + self:SetModel("models/props_junk/Rock001a.mdl") + self:PhysicsInit( SOLID_VPHYSICS ) + self:SetMoveType( MOVETYPE_NONE ) + self:SetSolid( SOLID_VPHYSICS ) + self:SetCollisionGroup( COLLISION_GROUP_INTERACTIVE ) + self:SetUseType(SIMPLE_USE) + + local phys = self:GetPhysicsObject() + + phys:EnableMotion(false) + phys:Sleep() + + self.StoredItems = {} + self:Ignite(1000) +end + +function ENT:BeginCooking(item) +end + +function ENT:Think() + + if not self:IsOnFire() then + self:Remove() + end + + for k,v in pairs(player.GetAllHumans()) do + if (v:GetPos():Distance(self:GetPos()) < 500) then + v:AddHeat(-5) + end + end + + for k,v in pairs(self.StoredItems) do + if (v.Timer < CurTime()-13) then + if (GetItemByName(v.Name).OnCooked) then + GetItemByName(v.Name):OnCooked(self) + end + + if (v.Quantity > 1) then + v.Quantity = v.Quantity - 1 + else + table.remove(self.StoredItems,k) + end + + self:EmitSound("ambient/fire/mtov_flame2.wav",100,math.random(80,100)) + + v.Timer = CurTime()+13 + end + end + + self:NextThink(CurTime()+1) + return true +end + +function ENT:AddItem(item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + v.Quantity = v.Quantity + quantity + return + end + end + + table.insert(self.StoredItems,{Name = item, Quantity = quantity, Timer = CurTime(),}) +end + +function ENT:TakeItem(pl,item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + quantity = math.min(quantity,v.Quantity) + v.Quantity = v.Quantity - quantity + + pl:AddItem(item,quantity) + + if (v.Quantity <= 0) then table.remove(self.StoredItems,k) end + break + end + end +end + +function ENT:GetItems() + return self.StoredItems +end + +function ENT:Use(pl) + if (pl:IsPigeon()) then return end + OpenLootventory(pl,self.StoredItems,self) +end + +function ENT:PhysicsCollide( data, physobj ) + +end diff --git a/entities/entities/ws_campfire/shared.lua b/entities/entities/ws_campfire/shared.lua new file mode 100644 index 0000000..d5924f4 --- /dev/null +++ b/entities/entities/ws_campfire/shared.lua @@ -0,0 +1,2 @@ +ENT.Type = "anim" +ENT.Base = "base_anim" \ No newline at end of file diff --git a/entities/entities/ws_grave/cl_init.lua b/entities/entities/ws_grave/cl_init.lua new file mode 100644 index 0000000..b323b28 --- /dev/null +++ b/entities/entities/ws_grave/cl_init.lua @@ -0,0 +1,5 @@ +include('shared.lua') + +function ENT:Draw() + self.Entity:DrawModel() +end diff --git a/entities/entities/ws_grave/init.lua b/entities/entities/ws_grave/init.lua new file mode 100644 index 0000000..17995ba --- /dev/null +++ b/entities/entities/ws_grave/init.lua @@ -0,0 +1,60 @@ +AddCSLuaFile("cl_init.lua") +AddCSLuaFile("shared.lua") + +include('shared.lua') + +function ENT:Initialize() + self:SetModel("models/props_c17/gravestone002a.mdl") + self:PhysicsInit(SOLID_VPHYSICS) + self:SetMoveType(MOVETYPE_NONE) + self:SetSolid(SOLID_VPHYSICS) + self:SetUseType(SIMPLE_USE) + + local phys = self:GetPhysicsObject() + phys:EnableMotion(false) + phys:Sleep() + + self:SetHealth(30) + + self.StoredItems = {} +end + +function ENT:AddItem(item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + v.Quantity = v.Quantity + quantity + return + end + end + + table.insert(self.StoredItems,{Name = item, Quantity = quantity}) +end + +function ENT:TakeItem(pl,item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + quantity = math.min(quantity,v.Quantity) + v.Quantity = v.Quantity - quantity + + pl:AddItem(item,quantity) + + if (v.Quantity <= 0) then table.remove(self.StoredItems,k) end + break + end + end +end + +function ENT:GetItems() + return self.StoredItems +end + +function ENT:Use(pl) + if (pl:IsPigeon()) then return end + OpenLootventory(pl,self.StoredItems,self) +end + +function ENT:OnTakeDamage(dmg) + self:SetHealth(self:Health()-dmg) + + if (self:Health() <= 0) then self:Remove() end +end diff --git a/entities/entities/ws_grave/shared.lua b/entities/entities/ws_grave/shared.lua new file mode 100644 index 0000000..e67f5f4 --- /dev/null +++ b/entities/entities/ws_grave/shared.lua @@ -0,0 +1,5 @@ +ENT.Type = "anim" +ENT.Base = "base_anim" + +function ENT:OnRemove() +end diff --git a/entities/entities/ws_infuser/cl_init.lua b/entities/entities/ws_infuser/cl_init.lua new file mode 100644 index 0000000..e84bc68 --- /dev/null +++ b/entities/entities/ws_infuser/cl_init.lua @@ -0,0 +1,78 @@ +include('shared.lua') +ENT.RenderGroup = RENDERGROUP_BOTH + +local Up = Vector(0,0,20) +local Sc = Vector(8,1,1) + +function ENT:Initialize() + timer.Simple(0.1,function() self.Pos = self:GetPos() self.Ang = self:GetAngles() end) + + self.Dibs = ClientsideModel("models/props_c17/gravestone001a.mdl") + self.Dibs:SetNoDraw(true) +end + +function ENT:OnRemove() +end + +function ENT:Think() + if (!self.Pos) then return end +/* + local light = DynamicLight(self:EntIndex()) + + if (light) then + light.Pos = self.Pos + UP + + light.r = 255 + light.g = 140 + light.b = 0 + + light.Brightness = 1 + light.Size = 400 + light.Decay = 700 + light.DieTime = CurTime()+1 + light.Style = 0 + end*/ +end + + + +local a = Angle(0,180,0) +local A = Angle(90,0,90) + +function ENT:Draw() + if (!self.Pos) then return end + + local mat = Matrix() + mat:Scale(Sc) + + local vec = Vector(0,0,0) + vec:Rotate(self.Ang) + + local ab = a*0 + + vec:Rotate(ab) + + self.Dibs:EnableMatrix( "RenderMultiply", mat ) + self.Dibs:SetRenderOrigin(self.Pos+vec) + self.Dibs:SetRenderAngles(self.Ang+ab+A) + self.Dibs:SetupBones() + self.Dibs:DrawModel() +end + +function ENT:DrawTranslucent() + --[[ + if (!self.Pos) then return end + + local FlameStart = self.Pos + local FlameEnd = self.Pos + Up + + self.FrameA = self.FrameA+(UnPredictedCurTime()-self.LastDrawn)*20 + if (self.FrameA > 52) then self.FrameA = 0 end + + Flame:SetFloat("$frame", self.FrameA) + render.SetMaterial(Flame) + render.DrawBeam(FlameStart,FlameEnd,48,0.99,0,MAIN_WHITECOLOR) + + self.LastDrawn = UnPredictedCurTime() + ]]-- +end diff --git a/entities/entities/ws_infuser/init.lua b/entities/entities/ws_infuser/init.lua new file mode 100644 index 0000000..fb180d0 --- /dev/null +++ b/entities/entities/ws_infuser/init.lua @@ -0,0 +1,90 @@ +AddCSLuaFile( "cl_init.lua" ) +AddCSLuaFile( "shared.lua" ) + +include('shared.lua') + +function ENT:Initialize() + self:SetModel("models/props_junk/wood_crate002a.mdl") + self:PhysicsInit( SOLID_VPHYSICS ) + self:SetMoveType( MOVETYPE_NONE ) + self:SetSolid( SOLID_VPHYSICS ) + self:SetCollisionGroup( COLLISION_GROUP_INTERACTIVE ) + self:SetUseType(SIMPLE_USE) + + local phys = self:GetPhysicsObject() + + phys:EnableMotion(false) + phys:Sleep() + + self.StoredItems = {} +end + +function ENT:BeginCooking(item) +end + +function ENT:Think() + for k,v in pairs(self.StoredItems) do + if (v.Timer < CurTime()-13) then + nearbyrunes = ents.FindByClass("ws_rune") + for k,v in pairs(nearbyrunes) do + if(v:GetPos():Distance(self:GetPos()) > 1000) then + table.remove(nearbyrunes,k) + end + end + if (GetItemByName(v.Name).OnEnchanted) then + GetItemByName(v.Name):OnEnchanted(self, nearbyrunes) + end + + if (v.Quantity > 1) then + v.Quantity = v.Quantity - 1 + else + table.remove(self.StoredItems,k) + end + + self:EmitSound("ambient/fire/mtov_flame2.wav",100,math.random(80,100)) + + v.Timer = CurTime()+13 + end + end + + self:NextThink(CurTime()+1) + return true +end + +function ENT:AddItem(item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + v.Quantity = v.Quantity + quantity + return + end + end + + table.insert(self.StoredItems,{Name = item, Quantity = quantity, Timer = CurTime(),}) +end + +function ENT:TakeItem(pl,item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + quantity = math.min(quantity,v.Quantity) + v.Quantity = v.Quantity - quantity + + pl:AddItem(item,quantity) + + if (v.Quantity <= 0) then table.remove(self.StoredItems,k) end + break + end + end +end + +function ENT:GetItems() + return self.StoredItems +end + +function ENT:Use(pl) + if (pl:IsPigeon()) then return end + OpenLootventory(pl,self.StoredItems,self) +end + +function ENT:PhysicsCollide( data, physobj ) + +end diff --git a/entities/entities/ws_infuser/shared.lua b/entities/entities/ws_infuser/shared.lua new file mode 100644 index 0000000..d5924f4 --- /dev/null +++ b/entities/entities/ws_infuser/shared.lua @@ -0,0 +1,2 @@ +ENT.Type = "anim" +ENT.Base = "base_anim" \ No newline at end of file diff --git a/entities/entities/ws_item/cl_init.lua b/entities/entities/ws_item/cl_init.lua new file mode 100644 index 0000000..b323b28 --- /dev/null +++ b/entities/entities/ws_item/cl_init.lua @@ -0,0 +1,5 @@ +include('shared.lua') + +function ENT:Draw() + self.Entity:DrawModel() +end diff --git a/entities/entities/ws_item/init.lua b/entities/entities/ws_item/init.lua new file mode 100644 index 0000000..84b7134 --- /dev/null +++ b/entities/entities/ws_item/init.lua @@ -0,0 +1,22 @@ +AddCSLuaFile("cl_init.lua") +AddCSLuaFile("shared.lua") + +include('shared.lua') + +function ENT:Initialize() + self:PhysicsInit(SOLID_VPHYSICS) + self:SetMoveType(MOVETYPE_VPHYSICS) + self:SetSolid(SOLID_VPHYSICS) + self:SetCollisionGroup(COLLISION_GROUP_WEAPON) + self:PhysWake() + self:SetUseType(SIMPLE_USE) + + if (!self.Item) then self:Remove() end +end + +function ENT:Use(pl) + if (pl:IsPigeon()) then return end + pl:AddItem(self.Item.Name,1) + + self:Remove() +end diff --git a/entities/entities/ws_item/shared.lua b/entities/entities/ws_item/shared.lua new file mode 100644 index 0000000..e67f5f4 --- /dev/null +++ b/entities/entities/ws_item/shared.lua @@ -0,0 +1,5 @@ +ENT.Type = "anim" +ENT.Base = "base_anim" + +function ENT:OnRemove() +end diff --git a/entities/entities/ws_npc_ambient/cl_init.lua b/entities/entities/ws_npc_ambient/cl_init.lua new file mode 100644 index 0000000..fd4b29d --- /dev/null +++ b/entities/entities/ws_npc_ambient/cl_init.lua @@ -0,0 +1,66 @@ +include('shared.lua') + +ENT.RenderGroup = RENDERGROUP_BOTH + +/*--------------------------------------------------------- + Name: Draw + Desc: Draw it! +---------------------------------------------------------*/ +function ENT:Draw() + self:DrawModel() +end + +/*--------------------------------------------------------- + Name: DrawTranslucent + Desc: Draw translucent +---------------------------------------------------------*/ +function ENT:DrawTranslucent() + + // This is here just to make it backwards compatible. + // You shouldn't really be drawing your model here unless it's translucent + + self:Draw() + +end + +/*--------------------------------------------------------- + Name: BuildBonePositions + Desc: +---------------------------------------------------------*/ +function ENT:BuildBonePositions( NumBones, NumPhysBones ) + + // You can use this section to position the bones of + // any animated model using self:SetBonePosition( BoneNum, Pos, Angle ) + + // This will override any animation data and isn't meant as a + // replacement for animations. We're using this to position the limbs + // of ragdolls. + +end + + + +/*--------------------------------------------------------- + Name: SetRagdollBones + Desc: +---------------------------------------------------------*/ +function ENT:SetRagdollBones( bIn ) + + // If this is set to true then the engine will call + // DoRagdollBone (below) for each ragdoll bone. + // It will then automatically fill in the rest of the bones + + self.m_bRagdollSetup = bIn + +end + + +/*--------------------------------------------------------- + Name: DoRagdollBone + Desc: +---------------------------------------------------------*/ +function ENT:DoRagdollBone( PhysBoneNum, BoneNum ) + + // self:SetBonePosition( BoneNum, Pos, Angle ) + +end diff --git a/entities/entities/ws_npc_ambient/init.lua b/entities/entities/ws_npc_ambient/init.lua new file mode 100644 index 0000000..f9aa726 --- /dev/null +++ b/entities/entities/ws_npc_ambient/init.lua @@ -0,0 +1,33 @@ + +AddCSLuaFile( "cl_init.lua" ) +AddCSLuaFile( "shared.lua" ) + +include('shared.lua') + +function ENT:Initialize() + print("NPC spawned!") + if(self.Model) then self:SetModel(self.Model) + else print("NPC created without model, this might be a bug!") end + --self:SetModel( "models/Humans/Group01/Female_01.mdl" ) + --[[ + self:SetHullType( HULL_HUMAN ); + self:SetHullSizeNormal(); + + self:SetSolid( SOLID_BBOX ) + self:SetMoveType( MOVETYPE_STEP ) + + self:CapabilitiesAdd( CAP_MOVE_GROUND or CAP_OPEN_DOORS or CAP_ANIMATEDFACE or CAP_TURN_HEAD or CAP_USE_SHOT_REGULATOR or CAP_AIM_GUN ) + + self:SetMaxYawSpeed( 5000 ) + ]]-- +end + +function ENT:OnTakeDamage(dmg) + print("Taking some dammage") + self:SetHealth(self:Health() - dmg:GetDamage()) + if self.OnDammage != nil then self:OnDammage(dmg) end + if self:Health() <= 0 then //run on death + self:Remove() + --self:SetSchedule( SCHED_FALL_TO_GROUND ) + end +end diff --git a/entities/entities/ws_npc_ambient/shared.lua b/entities/entities/ws_npc_ambient/shared.lua new file mode 100644 index 0000000..cac9e39 --- /dev/null +++ b/entities/entities/ws_npc_ambient/shared.lua @@ -0,0 +1,53 @@ +ENT.Base = "base_nextbot" + +//WS stuff +ENT.Drops = nil +ENT.OnDammage = nil +ENT.Vitality = 1 +ENT.Speed = 0 +ENT.Model = nil + +ENT.Behave = nil +ENT.Act = nil + +/*--------------------------------------------------------- + Name: OnRemove + Desc: Called just before entity is deleted +---------------------------------------------------------*/ +function ENT:OnRemove() + print("Doing onremove") + if(CLIENT) then return end + if not self.Drops then return end + print("Looks like we have some drops") + local rng = math.random(0,100) + for k,v in pairs(self.Drops) do + local itemname = self.Drops[k][1] + local itemchance = self.Drops[k][2] + local heightoffset = 10 + if rng < itemchance then + print("Createing a " .. itemname) + local drop = ents.Create("ws_item") + drop.Item = GetItemByName(itemname) + drop:SetModel(drop.Item.Model) + drop:SetPos(self:GetUp()*heightoffset) + drop:Spawn() + heightoffset = heightoffset + 10 + end + end +end + +function ENT:BehaveAct() + if(self.Act) then + self:Act() + else + print("NPC spawned without an Act function, this might be an error!") + end +end + +function ENT:RunBehaviour() + if(self.Behave) then + self:Behave() + else + print("NPC spawned without a Behave function, this might be an error!") + end +end diff --git a/entities/entities/ws_pigeon/cl_init.lua b/entities/entities/ws_pigeon/cl_init.lua new file mode 100644 index 0000000..8ac0557 --- /dev/null +++ b/entities/entities/ws_pigeon/cl_init.lua @@ -0,0 +1,85 @@ +include('shared.lua') + +//Some of this code originated from Termy and Night Eagle. Might aswell reuse some of it and fix the best of it. + +function ENT:Initialize() + self.Cycle = 0 + self.lastdraw = UnPredictedCurTime() + self.Player = NULL + self.Seq = -1 + self.Rate = 1 + + self.AutomaticFrameAdvance = true + + timer.Simple(0.5,function() if (IsValid(self)) then self:InitializeOwner() end end) +end + +function ENT:InitializeOwner() + for k,v in pairs(player.GetAll()) do + if (IsValid(v.Pigeon) and v.Pigeon == self) then self.Player = v v.DeathPos = nil return end + end + + timer.Simple(0.5,function() if (IsValid(self)) then self:InitializeOwner() end end) +end + +function ENT:OnRemove() + if (IsValid(self.Player)) then + self.Player.DeathPos = self:GetPos() + local Rag = self:BecomeRagdollOnClient( ) + local Phy = Rag:GetPhysicsObject() + Phy:ApplyForceCenter(self:GetVelocity()*Phy:GetMass()*12) + timer.Simple(3,function() if (IsValid(Rag)) then Rag:Remove() end end) + end +end + +function ENT:Think() + local Pos = self:GetPos() + local vel = self:GetVelocity() + local velL = vel:Length() + + local tr = util.TraceLine({ + start = Pos, + endpos = Pos - Vector(0,0,12), + filter = self, + }) + + local ground = tr.Hit + + if (velL < 16 and !ground) then + self.Seq = 0 + self.Rate = 0.7 + + elseif (ground) then + if (velL > 30) then + self.Rate = 2 + self.Seq = 3 + elseif (velL > 7) then + self.Rate = 1 + self.Seq = 2 + else + self.Seq = 1 + self.Rate = .1 + end + elseif (vel.z > 2) then + self.Seq = 0 + elseif (velL < 16 and ground) then + else + self.Seq = 7 + end + + if (self:GetSequence() != self.Seq) then self:SetSequence(self.Seq) end + + local delta = UnPredictedCurTime()-self.lastdraw + self.lastdraw = UnPredictedCurTime() + + self.Cycle = self.Cycle + delta*self.Rate + if (self.Cycle > 1) then self.Cycle = 0 end + + self:SetCycle(self.Cycle) +end + +function ENT:Draw() + if (!IsValid(self.Player)) then return end + + self:DrawModel() +end \ No newline at end of file diff --git a/entities/entities/ws_pigeon/init.lua b/entities/entities/ws_pigeon/init.lua new file mode 100644 index 0000000..d0b95cc --- /dev/null +++ b/entities/entities/ws_pigeon/init.lua @@ -0,0 +1,166 @@ +AddCSLuaFile("cl_init.lua") +AddCSLuaFile("shared.lua") + +include('shared.lua') + +local bo,ao = Vector(-3,-3,-1),Vector(3,3,3) +local up = Vector(0,0,1) +local zero = Vector(0,0,0) + +function ENT:OnRemove() +end + +function ENT:KeyValue(key,value) +end + +function ENT:Initialize() + self:SetModel("models/crow.mdl") + self:PhysicsInitBox(bo,ao) + self:SetMoveCollide(MOVECOLLIDE_FLY_SLIDE) + self:SetSolid(SOLID_VPHYSICS) + self:SetCollisionGroup(COLLISION_GROUP_WEAPON) + + self.ShadowParams = {} + self.ShadowParams.secondstoarrive = 0.1 + self.ShadowParams.angle = Angle(0,0,0) + self.ShadowParams.maxangular = 5000 + self.ShadowParams.maxangulardamp = 10000 + self.ShadowParams.maxspeed = 1000000 + self.ShadowParams.maxspeeddamp = 10000 + self.ShadowParams.dampfactor = 0.8 + self.ShadowParams.teleportdistance = 0 + + self.IsMoving = false + self.Dir = Vector(1,0,0) + self.Phys = self:GetPhysicsObject() + self.Speed = 0 + self.Up = zero + self.Caw = CurTime() + self.Yaw = 0 + + self.Phys:EnableMotion(false) + self.Phys:Sleep() +end + +function ENT:SetPlayer(pl) + self.Player = pl +end + +function ENT:OnRemove() + if (IsValid(self.Player)) then + self.Player:KillSilent() + self:EmitSound("npc/crow/die"..math.random(1,2)..".wav") + + if (math.random(1,2) == 1) then SpawnWSItem("Meat",self:GetPos()) + else SpawnWSItem("Feather",self:GetPos()) end + end +end + +function ENT:OnTakeDamage(dmg) + if (IsValid(self.Player)) then + self.Player:KillSilent() + self:Remove() + end +end + +function ENT:OnTheGround() + local Pos = self:GetPos() + local tr = util.TraceLine({ + start = Pos, + endpos = Pos - Vector(0,0,5), + filter = self, + }) + + return tr.Hit,tr.HitNormal +end + +function ENT:Think() + if (IsValid(self.Player) and self.Player:Alive()) then + local pl = self.Player + local For = self:GetForward() + local Jump = pl:KeyDown(IN_JUMP) + + if (pl:KeyDown(IN_FORWARD) or Jump) then + if (!self.IsMoving) then + self.IsMoving = true + self.Phys:EnableMotion(true) + self.Phys:Wake() + self:StartMotionController() + end + + self.Speed = self.Speed+(300-self.Speed)/16 + + if (Jump) then self.Up = up end + elseif (self.Speed < 0.01 and self.Dir:DotProduct(For) > 0.9) then + if (self.IsMoving) then + self.IsMoving = false + self.Phys:EnableMotion(false) + self.Phys:Sleep() + self:StopMotionController() + end + else + self.Speed = self.Speed-self.Speed/4 + end + + if (!Jump and self.Up) then self.Up = zero end + + if (self.Speed > 1) then + self.Dir = pl:GetAimVector() + self.Yaw = self.Dir:Angle().y + + if (!self.IsMoving and self.Dir:DotProduct(For) < 0.9) then + self.IsMoving = true + self.Phys:EnableMotion(true) + self.Phys:Wake() + self:StartMotionController() + end + end + + if (pl:KeyDown(IN_ATTACK) and self.Caw < CurTime()) then + self:EmitSound("npc/crow/idle"..math.random(1,3)..".wav") + self.Caw = CurTime()+1.5 + end + + if (self.Speed > 0.01) then + if (!self.PLTimer or self.PLTimer < CurTime()) then pl:SetPos(self:GetPos()) self.PLTimer = CurTime()+1 end + + local Hit,Norm = self:OnTheGround() + + if (Hit) then + self.Speed = math.min(5,self.Speed) + + if (pl:KeyDown(IN_SPEED)) then self.Speed = self.Speed*5 end + + local ang = self.Dir:Angle() + local an2 = Norm:Angle() + local avel = an2:Right():Angle() + local rot = self.Yaw-avel.y + + avel:RotateAroundAxis(an2:Forward(),rot) + vel = avel:Forward() + + self.Dir = vel + end + end + else + self:Remove() + end + + self.Entity:NextThink(CurTime()+0.01) + return true +end + +function ENT:PhysicsSimulate( phys, deltatime ) + + phys:Wake() + + self.ShadowParams.angle = self.Dir:Angle() + self.ShadowParams.pos = self:GetPos() + (self.Dir+self.Up)*self.Speed/8 + + phys:ComputeShadowControl(self.ShadowParams) + +end + +function ENT:UpdateTransmitState() + return TRANSMIT_ALWAYS +end diff --git a/entities/entities/ws_pigeon/shared.lua b/entities/entities/ws_pigeon/shared.lua new file mode 100644 index 0000000..e67f5f4 --- /dev/null +++ b/entities/entities/ws_pigeon/shared.lua @@ -0,0 +1,5 @@ +ENT.Type = "anim" +ENT.Base = "base_anim" + +function ENT:OnRemove() +end diff --git a/entities/entities/ws_prop/cl_init.lua b/entities/entities/ws_prop/cl_init.lua new file mode 100644 index 0000000..b323b28 --- /dev/null +++ b/entities/entities/ws_prop/cl_init.lua @@ -0,0 +1,5 @@ +include('shared.lua') + +function ENT:Draw() + self.Entity:DrawModel() +end diff --git a/entities/entities/ws_prop/init.lua b/entities/entities/ws_prop/init.lua new file mode 100644 index 0000000..519f1e7 --- /dev/null +++ b/entities/entities/ws_prop/init.lua @@ -0,0 +1,28 @@ +AddCSLuaFile("cl_init.lua") +AddCSLuaFile("shared.lua") + +include('shared.lua') + +function ENT:Initialize() + self:PhysicsInit(SOLID_VPHYSICS) + self:SetMoveType(MOVETYPE_NONE) + self:SetSolid(SOLID_VPHYSICS) + self:DrawShadow(false) + + local phys = self:GetPhysicsObject() + phys:EnableMotion(false) + phys:Sleep() + + self:SetHealth(30) + + self.HP = 500 +end + +function ENT:OnTakeDamage(dmginfo) + self.HP = self.HP-dmginfo:GetDamage() + + if (self.HP <= 0) then + self:EmitSound(Sound("physics/wood/wood_plank_break"..math.random(1,4)..".wav")) + self:Remove() + end +end diff --git a/entities/entities/ws_prop/shared.lua b/entities/entities/ws_prop/shared.lua new file mode 100644 index 0000000..e67f5f4 --- /dev/null +++ b/entities/entities/ws_prop/shared.lua @@ -0,0 +1,5 @@ +ENT.Type = "anim" +ENT.Base = "base_anim" + +function ENT:OnRemove() +end diff --git a/entities/entities/ws_researchtable/cl_init.lua b/entities/entities/ws_researchtable/cl_init.lua new file mode 100644 index 0000000..94b84c5 --- /dev/null +++ b/entities/entities/ws_researchtable/cl_init.lua @@ -0,0 +1,8 @@ +include('shared.lua') + +function ENT:Initialize() + timer.Simple(0.1,function() self.Pos = self:GetPos() self.Ang = self:GetAngles() end) + + self.Dibs = ClientsideModel("models/props/cs_italy/it_mkt_table3.mdl") + self.Dibs:SetNoDraw(true) +end diff --git a/entities/entities/ws_researchtable/init.lua b/entities/entities/ws_researchtable/init.lua new file mode 100644 index 0000000..9f09365 --- /dev/null +++ b/entities/entities/ws_researchtable/init.lua @@ -0,0 +1,120 @@ +AddCSLuaFile("cl_init.lua") +AddCSLuaFile("shared.lua") + +include('shared.lua') +--[[An item to give hints to players that are just starting out]] +local ResurrectionTable = { + ["Wood"] = 10, + ["Rock"] = 10, + ["Sap"] = 10, +} + +local PossibleRecipies = { + [1] = { [0]="Arrow", + [1]="Rock, Flint, Sap, and Wood"}, + [2] = { [0]="Barrel", + [1]="Planks and Sap"}, + [3] = { [0]="Fence", + [1]="Planks and Sap"}, + [4] = { [0]="Knife", + [1]="Rock, Sap, Wood, and Crystal"}, + [5] = { [0]="Log", + [1]="Vine, Sap, and Wood"}, + [6] = { [0]="Plank", + [1]="Wood and Sap"}, + [7] = { [0]="Rope", + [1]="Vine and Sap"}, + [8] = { [0]="Sickle", + [1]="Wood, Rock, and Sap"}, + [9] = { [0]="Stoneblock", + [1]="Rock and Sap"}, + [10] = { [0]="Arrow", + [1]="Rock, Flint, Sap, and Wood"}, +} + +function ENT:Initialize() + self:SetModel("models/props_junk/wood_crate002a.mdl") + self:PhysicsInit(SOLID_VPHYSICS) + self:SetMoveType(MOVETYPE_NONE) + self:SetSolid(SOLID_VPHYSICS) + self:SetUseType(SIMPLE_USE) + + local phys = self:GetPhysicsObject() + if(phys) then + phys:EnableMotion(false) + phys:Sleep() + end + + self:SetHealth(30) + + self.StoredItems = {} +end + +function ENT:Think() + local HasItems = {} + if(!self.StoredItems) then return end + for k,v in pairs(self.StoredItems) do + if (ResurrectionTable[v.Name] and v.Quantity >= ResurrectionTable[v.Name]) then + HasItems[v.Name] = {k,ResurrectionTable[v.Name]} + end + end + + if (table.Count(HasItems) >= table.Count(ResurrectionTable)) then + local randomrecipie = PossibleRecipies[math.random(1,10)] + for k,v in pairs(player.GetAll()) do + if (v:Alive() and v:GetPos():Distance(self:GetPos()) < 200) then + v:ChatPrint("Perhaps you can make a " .. randomrecipie[0] .. " with " .. randomrecipie[1]) + + for a,b in pairs(HasItems) do + if (self.StoredItems[b[1]].Quantity == b[2]) then table.remove(self.StoredItems,b[1]) + else self.StoredItems[b[1]].Quantity = self.StoredItems[b[1]].Quantity-b[2] end + end + + break + end + end + end + + self:NextThink(CurTime()+10) + return true +end + +function ENT:AddItem(item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + v.Quantity = v.Quantity + quantity + return + end + end + + table.insert(self.StoredItems,{Name = item, Quantity = quantity}) +end + +function ENT:TakeItem(pl,item,quantity) + for k,v in pairs(self.StoredItems) do + if (v.Name == item) then + quantity = math.min(quantity,v.Quantity) + v.Quantity = v.Quantity - quantity + + pl:AddItem(item,quantity) + + if (v.Quantity <= 0) then table.remove(self.StoredItems,k) end + break + end + end +end + +function ENT:GetItems() + return self.StoredItems +end + +function ENT:Use(pl) + if (pl:IsPigeon()) then return end + OpenLootventory(pl,self.StoredItems,self) +end + +function ENT:OnTakeDamage(dmg) + self:SetHealth(self:Health()-dmg) + + if (self:Health() <= 0) then self:Remove() end +end diff --git a/entities/entities/ws_researchtable/shared.lua b/entities/entities/ws_researchtable/shared.lua new file mode 100644 index 0000000..e67f5f4 --- /dev/null +++ b/entities/entities/ws_researchtable/shared.lua @@ -0,0 +1,5 @@ +ENT.Type = "anim" +ENT.Base = "base_anim" + +function ENT:OnRemove() +end diff --git a/entities/entities/ws_shop/cl_init.lua b/entities/entities/ws_shop/cl_init.lua new file mode 100644 index 0000000..4185da9 --- /dev/null +++ b/entities/entities/ws_shop/cl_init.lua @@ -0,0 +1,12 @@ +include('shared.lua') + +local Col = Color(0,0,0,150) + +function ENT:Draw() + self:DrawModel() + + cam.Start3D2D(self:GetPos()+self:GetUp()*50,Angle(0,CurTime()*40,90),0.3) + DrawRect(-100,0,200,20,Col) + DrawText("Shop (To be announced!)","Trebuchet18",0,10,MAIN_TEXTCOLOR,1) + cam.End3D2D() +end diff --git a/entities/entities/ws_shop/init.lua b/entities/entities/ws_shop/init.lua new file mode 100644 index 0000000..ea0e5e8 --- /dev/null +++ b/entities/entities/ws_shop/init.lua @@ -0,0 +1,16 @@ +AddCSLuaFile("cl_init.lua") +AddCSLuaFile("shared.lua") + +include('shared.lua') + +function ENT:Initialize() + self:SetModel("models/props_junk/wood_crate001a.mdl") + self:PhysicsInit(SOLID_VPHYSICS) + self:SetMoveType(MOVETYPE_NONE) + self:SetSolid(SOLID_VPHYSICS) + + local phys = self:GetPhysicsObject() + phys:EnableMotion(false) + phys:Sleep() +end + diff --git a/entities/entities/ws_shop/shared.lua b/entities/entities/ws_shop/shared.lua new file mode 100644 index 0000000..e67f5f4 --- /dev/null +++ b/entities/entities/ws_shop/shared.lua @@ -0,0 +1,5 @@ +ENT.Type = "anim" +ENT.Base = "base_anim" + +function ENT:OnRemove() +end diff --git a/entities/weapons/hands.lua b/entities/weapons/hands.lua new file mode 100644 index 0000000..02c2500 --- /dev/null +++ b/entities/weapons/hands.lua @@ -0,0 +1,130 @@ +AddCSLuaFile("hands.lua") + +SWEP.ViewModel = "models/error.mdl" +SWEP.WorldModel = "models/error.mdl" + +SWEP.HoldType = "normal" + +SWEP.Primary.ClipSize = -1 +SWEP.Primary.DefaultClip = -1 +SWEP.Primary.Automatic = true +SWEP.Primary.Ammo = "none" + +SWEP.Secondary.Clipsize = -1 +SWEP.Secondary.DefaultClip = -1 +SWEP.Secondary.Automatic = false +SWEP.Secondary.Ammo = "none" + +SWEP.DrawAmmo = false +SWEP.DrawCrosshair = false + +function SWEP:Initialize() + self:SetWeaponHoldType(self.HoldType) + self:DrawShadow(false) + + if (CLIENT) then + self.MOB = ClientsideModel("error.mdl") + self.MOB:SetNoDraw(true) + self.MOB:DrawShadow(false) + end +end + +function SWEP:ShouldDropOnDie() + return false +end + +function SWEP:Think() +end + +function SWEP:Reload() +end + +local Box = Vector(8,8,8) + +function SWEP:PrimaryAttack() + if (CLIENT and !IsFirstTimePredicted()) then return end + if (!self.Owner.Weapons or !self.Owner.Weapons[self.Owner.Select]) then return end + if (self.Owner.CD and self.Owner.CD > CurTime()) then return end + + local item = self.Owner.Weapons[self.Owner.Select].Item + + if (!item or !item.OnPrimary) then return end + + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + + local Trace = { + start = self.Owner:GetShootPos(), + endpos = self.Owner:GetShootPos()+self.Owner:GetAimVector()*item.Range, + filter = self.Owner, + mins = Box*-1, + maxs = Box, + } + + local Tr = util.TraceHull(Trace) + + item:OnPrimary(self.Owner,Tr) + + self.Owner.CD = CurTime()+item.CD +end + +function SWEP:SecondaryAttack() + if (CLIENT and !IsFirstTimePredicted()) then return end + if (!self.Owner.Weapons or !self.Owner.Weapons[self.Owner.Select]) then return end + if (self.Owner.CD and self.Owner.CD > CurTime()) then return end + + local item = self.Owner.Weapons[self.Owner.Select].Item + + if (!item or !item.OnSecondary) then return end + + self.Owner:SetAnimation( PLAYER_ATTACK1 ) + + local Trace = { + start = self.Owner:GetShootPos(), + endpos = self.Owner:GetShootPos()+self.Owner:GetAimVector()*item.Range, + filter = self.Owner, + mins = Box*-1, + maxs = Box, + } + + local Tr = util.TraceHull(Trace) + + item:OnSecondary(self.Owner,Tr) + + self.Owner.CD = CurTime()+item.CD +end + +if (CLIENT) then + local Zero = Vector(1,1,1) + + function SWEP:DrawWorldModel() + if (!self.Owner.Weapons or !self.Owner.Weapons[self.Owner.Select]) then return end + + local item = self.Owner.Weapons[self.Owner.Select].Item + + for k,v in pairs(item.Structure) do + local ID = self.Owner:LookupBone(v.Bone) + local Pos,Ang = self.Owner:GetBonePosition(ID) + + local Offset = v.Pos*1 + Offset:Rotate(Ang) + Pos = Pos + Offset + + local Dang = Ang*1 + + Ang:RotateAroundAxis(Dang:Right(),v.Ang.p) + Ang:RotateAroundAxis(Dang:Up(),v.Ang.y) + Ang:RotateAroundAxis(Dang:Forward(),v.Ang.r) + + self.MOB:SetModel(v.Model) + self.MOB:SetRenderOrigin(Pos) + self.MOB:SetRenderAngles(Ang) + + local mat = Matrix() + mat:Scale( v.Size or Zero ) + + self.MOB:EnableMatrix( "RenderMultiply", mat ) + self.MOB:SetupBones() + self.MOB:DrawModel() + end + end +end diff --git a/gamemode/cl_init.lua b/gamemode/cl_init.lua new file mode 100644 index 0000000..c07a730 --- /dev/null +++ b/gamemode/cl_init.lua @@ -0,0 +1,20 @@ + +include( "shared.lua" ) + +function GM:Initialize() + self:SetEnableMawCircle(false) + self:EnableMOTD(false) + self:SetEnableMawNameTag(false) + self:SetEnableMawChat(false) + self:SetEnableThirdPerson(false) + + self.KnownRecipes = { + GetItemByName("Axe"), + GetItemByName("Campfire"), + GetItemByName("Pickaxe"), + GetItemByName("Research Table") + } +end + +function GM:Think() +end diff --git a/gamemode/client/cam.lua b/gamemode/client/cam.lua new file mode 100644 index 0000000..26ff6f2 --- /dev/null +++ b/gamemode/client/cam.lua @@ -0,0 +1,32 @@ +local Off = Vector(0,0,10) + +OverrideDefaultGFCamera(function(ply, origin, angles, fov) + local Bg = ply:GetRagdollEntity() + + if (IsValid(Bg)) then + local view = { + origin = Bg:GetPos()-angles:Forward()*80+Off, + angles = angles, + } + + return view + else + local Pig = ply:GetPigeon() + + if (IsValid(Pig)) then + local view = { + origin = Pig:GetPos()-angles:Forward()*80+Off, + angles = angles, + } + + return view + elseif (!ply:Alive() and ply.DeathPos) then + local view = { + origin = ply.DeathPos-angles:Forward()*80+Off, + angles = angles, + } + + return view + end + end +end) \ No newline at end of file diff --git a/gamemode/client/color.lua b/gamemode/client/color.lua new file mode 100644 index 0000000..1a0bf0e --- /dev/null +++ b/gamemode/client/color.lua @@ -0,0 +1,3 @@ +MAIN_COLOR = Color(20,20,20,200) +MAIN_COLORD = Color(0,0,0,100) +MAIN_TEXTCOLOR = Color(255,255,255,255) \ No newline at end of file diff --git a/gamemode/client/render_viewmodel.lua b/gamemode/client/render_viewmodel.lua new file mode 100644 index 0000000..3ab1230 --- /dev/null +++ b/gamemode/client/render_viewmodel.lua @@ -0,0 +1,49 @@ + +local Zero = Vector(1,1,1) + +function GM:PreDrawViewModel() + local pl = LocalPlayer() + local Wep = pl:GetActiveWeapon() + + if (!pl:IsPigeon() and IsValid(Wep)) then return true end + return false +end + +function GM:PostDrawOpaqueRenderables() + local pl = LocalPlayer() + local Wep = pl:GetActiveWeapon() + + if (pl:IsPigeon() or !IsValid(Wep)) then return end + if (!pl.Weapons or !pl.Weapons[pl.Select]) then return end + + local Ent = Wep.MOB + local item = pl.Weapons[pl.Select].Item + + for k,v in pairs(item.Structure) do + local ID = pl:LookupBone(v.Bone) + local Pos,Ang = pl:GetBonePosition(ID) + + local Rop = v.Pos*1 + local Roa = Ang*1 + + Roa:RotateAroundAxis(Ang:Right(),v.Ang.p) + Roa:RotateAroundAxis(Ang:Forward(),v.Ang.r) + Roa:RotateAroundAxis(Ang:Up(),v.Ang.y) + + Rop:Rotate(Ang) + + Ent:SetModel(v.Model) + Ent:SetRenderOrigin(Pos+Rop) + Ent:SetRenderAngles(Roa) + + local mat = Matrix() + mat:Scale( v.Size or Zero ) + + Ent:EnableMatrix( "RenderMultiply", mat ) + Ent:SetupBones() + + Ent:DrawModel() + end +end + + diff --git a/gamemode/hud/draw.lua b/gamemode/hud/draw.lua new file mode 100644 index 0000000..1d30d6a --- /dev/null +++ b/gamemode/hud/draw.lua @@ -0,0 +1,31 @@ + +local MCO = Color(0,0,0,150) + +function GM:HUDPaint() + local CountDown = self.CountDown + + if (CountDown and CountDown > CurTime()) then + DrawRect(5,5,100,20,MCO) + DrawText("Preround: "..math.ceil(CountDown-CurTime()), "Trebuchet18", 10, 6, MAIN_WHITECOLOR) + end + + if (CountDown and CountDown < CurTime() and CountDown > CurTime()-MAIN_PVPTIMER) then + DrawRect(5,5,130,20,MCO) + DrawText("Anti PVP timer: "..math.ceil(CountDown-(CurTime()-MAIN_PVPTIMER)), "Trebuchet18", 10, 6, MAIN_WHITECOLOR) + end + + if(#player.GetAll() == 1) then + local height = 20 + local width = 65*6 + local x = (ScrH()/2) - (height/2) + local y = (ScrW()/2) - (width/2) + DrawRect(x,y,width,height,MCO) + DrawText("Winter Survival requires at least 2 players to begin, Invite a friend!","Trebuchet18",x+3,y, MAIN_WHITECOLOR) + end + + DrawAccountInventory() + DrawHelp() + DrawIndicators() + DrawWepSwap() + DrawTargets() +end diff --git a/gamemode/hud/draw_account.lua b/gamemode/hud/draw_account.lua new file mode 100644 index 0000000..861445c --- /dev/null +++ b/gamemode/hud/draw_account.lua @@ -0,0 +1,136 @@ + +local SCO = Color(0,0,0,250) +local MCO = Color(0,0,0,150) +local x,y = ScrW()-200,30 + +local AccountMenu = nil +local Info = nil + +hook.Add("Tick","AccountInventory",function() + if (input.KeyPress(KEY_F2)) then + if IsAccountMenuOpen() then + AccountMenu:SetVisible(false) + else + OpenAccountMenu() + end + end +end) + + +function ReloadAccountMenu() + if (!IsAccountMenuOpen()) then return end + AccountMenu.List:Clear() + + for k,v in pairs(LocalPlayer():GetAccountInventory()) do + local a = AccountMenu.List:Add("DPanel") + a:SetSize(64,64) + a.Item = GetItemByName(v.Name) + a.Quantity = v.Quantity + a:Droppable("ACCOUNT") + a.Paint = function(s,w,h) + DrawRect(0,0,w,h,MCO) + DrawMaterialRect(0,0,w,h,MAIN_WHITECOLOR,s.Item.Icon) + + DrawText("x"..v.Quantity,"ChatFont",1,h-18,MAIN_TEXTCOLOR) + end + + a.OnCursorEntered = function(s) + if (!Info) then + Info = vgui.Create("DPanel") + Info:SetPos(x-410,60) + Info:SetSize(195,100) + Info.Paint = function(s,w,h) DrawRect(0,0,w,h,SCO) end + + Info.Label = vgui.Create("DLabel",Info) + Info.Label:SetPos(5,5) + Info.Label:SetSize(185,20) + + Info.LabelDesc = vgui.Create("DLabel",Info) + Info.LabelDesc:SetPos(5,30) + Info.LabelDesc:SetSize(185,65) + Info.LabelDesc:SetWrap(true) + Info.LabelDesc:SetAutoStretchVertical(true) + end + + Info.Label:SetText(v.Name) + Info.LabelDesc:SetText(s.Item.Desc) + + Info:SetVisible(true) + end + + a.OnCursorExited = function(s) + Info:SetVisible(false) + end + + a.OnStopDragging = function(s,a,b,c) + end + + + local Ab = a.OnMousePressed + a.OnMousePressed = function(s,m) + if (m == MOUSE_RIGHT) then + local X,Y = gui.MousePos() + + local menu = DermaMenu() + menu.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + menu:AddOption( "Use", function() if (s.Item) then RequestUseItem(s.Item.Name,true) end end ):SetColor(MAIN_TEXTCOLOR) + menu:AddOption( "Destroy", function() if (s.Item) then RequestDropItem(s.Item.Name,true) end end ):SetColor(MAIN_TEXTCOLOR) + + menu:Open() + menu:SetPos(X,Y) + end + + Ab(s,m) + end + end +end + +function OpenAccountMenu() + if (IsAccountMenuOpen()) then return end + + surface.PlaySound("wintersurvival2/hud/itemopen.wav") + + if (!AccountMenu) then + --Inventory + AccountMenu = vgui.Create("MBFrame") + AccountMenu:SetPos(x-205,y+25) + AccountMenu:SetSize(400,400) + AccountMenu:SetTitle("Account") + AccountMenu:SetDeleteOnClose(false) + AccountMenu:MakePopup() + AccountMenu.Paint = function(s,w,h) + DrawRect(0,0,w,h,MCO) + DrawRect(5,20,w-10,20,MCO) + + DrawText("Time spent: "..math.SecondsToTime(LocalPlayer():GetTimeSpent()),"Trebuchet18",8,21,MAIN_WHITECOLOR) + end + AccountMenu.OnClose = function(s) surface.PlaySound("wintersurvival2/hud/itemequip.wav") end + + local Pane = vgui.Create( "DScrollPanel", AccountMenu ) + Pane:SetPos(5,45) + Pane:SetSize(AccountMenu:GetWide()-10,AccountMenu:GetTall()-50) + Pane.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + + local l = vgui.Create("DIconLayout",Pane) + l:SetSize(Pane:GetWide()-10,Pane:GetTall()-10) + l:SetPos(5,5) + l:SetSpaceY(5) + l:SetSpaceX(5) + + AccountMenu.List = l + AccountMenu:ShowCloseButton(false) + end + + AccountMenu:SetVisible(true) + + ReloadAccountMenu() +end + +function IsAccountMenuOpen() + return (IsValid(AccountMenu) and AccountMenu:IsVisible()) +end + +function DrawAccountInventory() + DrawRect(x,y,200,20,MCO) + DrawText("F2 - Account","Trebuchet18",x+4,y+2,MAIN_TEXTCOLOR) +end diff --git a/gamemode/hud/draw_circle.lua b/gamemode/hud/draw_circle.lua new file mode 100644 index 0000000..9620a3d --- /dev/null +++ b/gamemode/hud/draw_circle.lua @@ -0,0 +1,48 @@ +local rad = math.rad +local cos = math.cos +local sin = math.sin +local abs = math.abs + +function DrawOutlinedCircle(x,y,r,s,ang,dang,iter,color) + ang = rad(ang) + dang = rad(dang) + iter = iter or 8 + + local step = abs(dang)/iter + + surface.SetDrawColor(color.r,color.g,color.b,color.a) + + for i = 0, iter-1 do + local r2 = r + s + local Time1 = step*i+ang + local Time2 = Time1+step + local dat = { + { + x=cos(Time2)*r+x, + y=-sin(Time2)*r+y, + u=0, + v=0, + }, + { + x=cos(Time2)*r2+x, + y=-sin(Time2)*r2+y, + u=1, + v=0, + }, + { + x=cos(Time1)*r2+x, + y=-sin(Time1)*r2+y, + u=1, + v=1, + }, + { + x=cos(Time1)*r+x, + y=-sin(Time1)*r+y, + u=0, + v=1, + }, + } + + surface.DrawPoly(dat) + end +end \ No newline at end of file diff --git a/gamemode/hud/draw_editor.lua b/gamemode/hud/draw_editor.lua new file mode 100644 index 0000000..9a058c4 --- /dev/null +++ b/gamemode/hud/draw_editor.lua @@ -0,0 +1,746 @@ + +local Icons = {} +local Folders = { + "wintersurvival2/hud/ws2_icons", + "wintersurvival2/hud/ws1_icons", + "settlement", +} + +local insert = table.insert +local cos = math.cos +local sin = math.sin + +local Editor = nil +local x,y = ScrW()/2,ScrH()/2 +local MCO = Color(0,0,0,150) +local BCO = Color(0,50,100,150) +local GCO = Color(0,100,0,150) +local HCO = Color(30,30,30,150) + +local LimitS = 60 +local LimitScale = 5 + +local ValidBones = { + "ValveBiped.Bip01_R_Hand", + "ValveBiped.Bip01_L_Hand", +} + +local ValidModels = { + "models/props_junk/Rock001a.mdl", + "models/props_debris/wood_board02a.mdl", + "models/props_combine/breenlight.mdl", +} + +local ValidHoldTypes = { + "normal", + "melee", + "melee2", + "fist", + "knife", + "smg", + "ar2", + "pistol", + "rpg", + "physgun", + "grenade", + "shotgun", + "crossbow", + "slam", + "passive", +} + + +hook.Add("Initialize","AddEditorIcons",function() + for k,v in pairs(Folders) do + local F = file.Find("materials/"..v.."/*","GAME") + + for a,icon in pairs(F) do + if (!icon:find(".vtf")) then + if (icon:find(".vmt")) then icon = icon:gsub(".vmt","") end + + local IM,loadtime = Material(v.."/"..icon) + insert(Icons,{Icon = IM,Path = v.."/"..icon,}) + end + end + end +end) + +function GetItemIcons() + return Icons +end + + + +--Now the actual HUD + +local Offset = Vector(0,0,50) +local Zero = Vector(0,0,0) +local AngZ = Angle(0,0,0) +local OneV = Vector(1,1,1) + +local function ReloadIcons() + if (!Editor or !Editor:IsVisible()) then return end + Editor.List:Clear() + + for k,v in pairs(Icons) do + local a = Editor.List:Add("MBButton") + a:SetSize(64,64) + a.Paint = function(s,w,h) + if (s.Pressed) then DrawRect(0,0,w,h,BCO) + elseif (s.Hover) then DrawRect(0,0,w,h,HCO) + else DrawRect(0,0,w,h,MCO) end + + DrawMaterialRect(0,0,w,h,MAIN_WHITECOLOR,v.Icon) + end + a.DoClick = function(s) + Editor.Icon = v.Path + Editor.IconEntry:SetText("Icon: "..Editor.Icon) + end + end +end + +local function ReloadModelList() + if (!Editor or !Editor:IsVisible()) then return end + Editor.ModelList:Clear() + + for k,v in pairs(Editor.ModelManager.Items) do + local a = Editor.ModelList:Add("MBButton") + a:SetText("Model "..k) + a:SetSize(Editor.ModelList:GetWide()-5,23) + a.Paint = function(s,w,h) + if (s.Pressed) then DrawRect(0,0,w,h,BCO) + elseif (s.Hover) then DrawRect(0,0,w,h,HCO) + else DrawRect(0,0,w,h,MCO) end + + DrawText(s.Text,"Trebuchet18",w/2,h/2,MAIN_TEXTCOLOR,1) + end + a.DoClick = function(s) + local X,Y = gui.MousePos() + local menu = DermaMenu() + menu.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + + local Bones,op = menu:AddSubMenu( "Set bone" ) + op:SetColor(MAIN_TEXTCOLOR) + Bones.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + + for d,b in pairs(ValidBones) do + Bones:AddOption( b, function() if (v.Bone) then v.Bone = b end end ):SetColor(MAIN_TEXTCOLOR) + end + + local Bones,op = menu:AddSubMenu( "Set model" ) + op:SetColor(MAIN_TEXTCOLOR) + Bones.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + + for d,b in pairs(ValidModels) do + Bones:AddOption( b, function() if (v.Model) then v.Model = b end end ):SetColor(MAIN_TEXTCOLOR) + end + + menu:AddOption( "Select", function() + if (v.Bone) then + Editor.ModelManager.Selected = k + + Editor.SliderX:SetSlideX(0.5+v.Pos.x/LimitS) + Editor.SliderX:TranslateValues(0.5+v.Pos.x/LimitS) + + Editor.SliderY:SetSlideX(0.5+v.Pos.y/LimitS) + Editor.SliderY:TranslateValues(0.5+v.Pos.y/LimitS) + + Editor.SliderZ:SetSlideX(0.5+v.Pos.z/LimitS) + Editor.SliderZ:TranslateValues(0.5+v.Pos.z/LimitS) + + Editor.SliderPitch:SetSlideX(0.5+v.Ang.p/360) + Editor.SliderPitch:TranslateValues(0.5+v.Ang.p/360) + + Editor.SliderYaw:SetSlideX(0.5+v.Ang.y/360) + Editor.SliderYaw:TranslateValues(0.5+v.Ang.y/360) + + Editor.SliderRoll:SetSlideX(0.5+v.Ang.r/360) + Editor.SliderRoll:TranslateValues(0.5+v.Ang.r/360) + + Editor.SliderXScale:SetSlideX(v.Size.x/LimitScale) + Editor.SliderXScale:TranslateValues(v.Size.x/LimitScale) + + Editor.SliderYScale:SetSlideX(v.Size.y/LimitScale) + Editor.SliderYScale:TranslateValues(v.Size.y/LimitScale) + + Editor.SliderZScale:SetSlideX(v.Size.z/LimitScale) + Editor.SliderZScale:TranslateValues(v.Size.z/LimitScale) + end + end):SetColor(MAIN_TEXTCOLOR) + + menu:AddOption( "Delete", function() if (v.Model) then table.remove(Editor.ModelManager.Items,k) ReloadModelList() end end ):SetColor(MAIN_TEXTCOLOR) + + menu:Open() + menu:SetPos(X,Y) + end + end +end + +function OpenEditor() + if (!Editor) then + Editor = vgui.Create("MBFrame") + Editor:SetPos(x-400,y-300) + Editor:SetSize(800,600) + Editor:SetTitle("Editor") + Editor:SetDeleteOnClose(false) + Editor:MakePopup() + Editor.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) DrawRect(0,0,w,20,MCO) end + Editor.OnClose = function(s) surface.PlaySound("wintersurvival2/hud/itemequip.wav") end + Editor.Icon = "wintersurvival2/hud/ws1_icons/icon_axe" + + --Icon list + local Pane = vgui.Create( "DScrollPanel", Editor ) + Pane:SetPos(600,25) + Pane:SetSize(195,390) + Pane.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + + local l = vgui.Create("DIconLayout",Pane) + l:SetSize(Pane:GetWide()-10,Pane:GetTall()-10) + l:SetPos(5,5) + l:SetSpaceY(5) + l:SetSpaceX(5) + + Editor.List = l + --End + + + --Model list + local Pane = vgui.Create( "DScrollPanel", Editor ) + Pane:SetPos(5,25) + Pane:SetSize(195,390) + Pane.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + + local l = vgui.Create("DListLayout",Pane) + l:SetSize(Pane:GetWide()-10,Pane:GetTall()-10) + l:SetPos(5,5) + + Editor.ModelList = l + --End + + + --Model manager + local l = vgui.Create("DPanel",Editor) + l:SetPos(205,25) + l:SetSize(390,390) + + l.Entity = ClientsideModel("models/player/Group03/male_07.mdl") + l.Entity:SetNoDraw(true) + + l.EntityItem = ClientsideModel("models/player/Group03/male_07.mdl") + l.EntityItem:SetNoDraw(true) + + l.Items = {} + + l.CamDis = 200 + l.CamPos = Vector(l.CamDis,0,0) + l.Origin = Offset + + l.Selected = 0 + + l.Paint = function(s,w,h) + DrawRect(0,0,w,h,MCO) + + local x, y = s:LocalToScreen( 0, 0 ) + + cam.Start3D( s.Origin+s.CamPos, (-s.CamPos):Angle(), 90, x, y, w, h, 1, 4096 ) + cam.IgnoreZ( true ) + render.SuppressEngineLighting( true ) + s.Entity:DrawModel() + + local Mod = s.Entity:GetModel() + local Time = CurTime()*10 + + for k,v in pairs(s.Items) do + if (v.Bone and v.Model and v.Pos and v.Ang and v.Size) then + local ind = s.Entity:LookupBone(v.Bone) + local Pos,Ang = s.Entity:GetBonePosition(ind) + + if (Pos and Ang) then + s.EntityItem:SetModel(v.Model) + + local Rop = v.Pos*1 + local Roa = Ang*1 + + Roa:RotateAroundAxis(Ang:Right(),v.Ang.p) + Roa:RotateAroundAxis(Ang:Forward(),v.Ang.r) + Roa:RotateAroundAxis(Ang:Up(),v.Ang.y) + + Rop:Rotate(Ang) + + local Org = Pos+Rop + local PAng = Roa + + local mat = Matrix() + mat:Scale( v.Size or Zero ) + + s.EntityItem:EnableMatrix( "RenderMultiply", mat ) + s.EntityItem:SetRenderOrigin(Org) + s.EntityItem:SetRenderAngles(PAng) + s.EntityItem:SetupBones() + + if (s.Selected == k) then + local A = cos(Time)+2 + render.SetColorModulation(A,A,A) + s.EntityItem:DrawModel() + render.SetColorModulation(1,1,1) + + render.DrawLine( Org, Org+PAng:Forward()*20, MAIN_BLUECOLOR, false ) + render.DrawLine( Org, Org+PAng:Right()*20, MAIN_REDCOLOR, false ) + render.DrawLine( Org, Org+PAng:Up()*20, MAIN_GREENCOLOR, false ) + + s.Origin = Org + else + s.EntityItem:DrawModel() + end + end + end + end + + render.SuppressEngineLighting( false ) + cam.IgnoreZ( false ) + cam.End3D() + end + + l.Think = function(s) + if (s.LastCamDis) then + local mx,my = gui.MousePos() + local dx,dy = mx-s.LastClickPos.x,my-s.LastClickPos.y + + s.CamDis = math.Clamp(s.LastCamDis + dy,10,200) + s.CamPos = s.CamPos:GetNormal()*s.CamDis + elseif (s.LastCamPos) then + local mx,my = gui.MousePos() + local dx,dy = mx-s.LastClickPos.x,my-s.LastClickPos.y + + local Ab = s.LastCamPos:Angle() + Ab = Ab + Angle(-dy,-dx,0) + + s.CamPos = Ab:Forward()*s.CamDis + end + end + + l.OnMousePressed = function(s,m) + if (m == MOUSE_RIGHT) then + if (!s.LastClickPos) then + local x,y = gui.MousePos() + s.LastClickPos = {x=x,y=y} + s.LastCamDis = s.CamDis*1 + end + elseif (m == MOUSE_LEFT) then + if (!s.LastClickPos) then + local x,y = gui.MousePos() + s.LastClickPos = {x=x,y=y} + s.LastCamPos = s.CamPos*1 + end + end + end + + l.OnMouseReleased = function(s,m) + if (s.LastClickPos) then + s.LastClickPos = nil + s.LastCamPos = nil + s.LastCamDis = nil + end + end + + Editor.ModelManager = l + --End + + --EditorPanels + local l = vgui.Create("DPanel",Editor) + l:SetPos(5,420) + l:SetSize(790,175) + l.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + + local a = vgui.Create("MBButton",l) + a:SetText("Add Model") + a:SetPos(5,5) + a:SetSize(185,20) + a.Paint = function(s,w,h) + if (s.Pressed) then DrawRect(0,0,w,h,BCO) + elseif (s.Hover) then DrawRect(0,0,w,h,HCO) + else DrawRect(0,0,w,h,MCO) end + + DrawText(s.Text,"Trebuchet18",w/2,h/2,MAIN_TEXTCOLOR,1) + end + a.DoClick = function(s) + local id = insert(Editor.ModelManager.Items,{ + Bone="ValveBiped.Bip01_R_Hand", + Model="models/props_debris/wood_board02a.mdl", + Size=Vector(1,1,1), + Pos=Vector(0,0,0), + Ang=Angle(0,0,0), + }) + + Editor.ModelManager.Selected = id + + Editor.SliderX:SetSlideX(0.5) + Editor.SliderX:TranslateValues(0.5) + + Editor.SliderY:SetSlideX(0.5) + Editor.SliderY:TranslateValues(0.5) + + Editor.SliderZ:SetSlideX(0.5) + Editor.SliderZ:TranslateValues(0.5) + + Editor.SliderPitch:SetSlideX(0.5) + Editor.SliderPitch:TranslateValues(0.5) + + Editor.SliderYaw:SetSlideX(0.5) + Editor.SliderYaw:TranslateValues(0.5) + + Editor.SliderRoll:SetSlideX(0.5) + Editor.SliderRoll:TranslateValues(0.5) + + local S = 1/LimitScale + + Editor.SliderXScale:SetSlideX(S) + Editor.SliderXScale:TranslateValues(S) + + Editor.SliderYScale:SetSlideX(S) + Editor.SliderYScale:TranslateValues(S) + + Editor.SliderZScale:SetSlideX(S) + Editor.SliderZScale:TranslateValues(S) + + ReloadModelList() + end + + local Title = vgui.Create("DTextEntry",l) + Title:SetText("Item Name") + Title:SetPos(5,55) + Title:SetSize(185,20) + + local Icon = vgui.Create("DTextEntry",l) + Icon:SetText("Icon: "..Editor.Icon) + Icon:SetPos(205,145) + Icon:SetSize(380,20) + Icon:SetEditable(false) + + local Desc = vgui.Create("DTextEntry",l) + Desc:SetText("Description") + Desc:SetPos(5,80) + Desc:SetSize(185,60) + Desc:SetMultiline(true) + + local ModelP = vgui.Create("DComboBox",l) + ModelP:SetPos(5,145) + ModelP:SetSize(185,20) + + for k,v in pairs(ValidModels) do + if (k==1) then ModelP:AddChoice(v,nil,true) + else ModelP:AddChoice(v) end + end + + local HoldType = vgui.Create("DComboBox",l) + HoldType:SetPos(600,145) + HoldType:SetSize(185,20) + + for k,v in pairs(ValidHoldTypes) do + if (k==1) then HoldType:AddChoice(v,nil,true) + else HoldType:AddChoice(v) end + end + + Editor.IconEntry = Icon + + --OffsetSliders... Gawd why does VGUI has to be so LOOONG!!!! + --SlideX + local B = vgui.Create("DLabel",l) + B:SetPos(405,5) + B:SetText("x offset") + + local B2 = vgui.Create("DLabel",l) + B2:SetPos(490,5) + B2:SetText("0") + + local SlideOffset = vgui.Create("DSlider",l) + SlideOffset:SetPos(410,25) + SlideOffset:SetSize(170,20) + SlideOffset.Label = B2 + SlideOffset.Paint = function(s,w,h) DrawRect(0,h/2-2,w,2,MCO) end + SlideOffset.TranslateValues = function(s, x, y ) + local V = math.ceil((x*LimitS-LimitS/2)*100)/100 + B2:SetText(tostring(V)) + + if (Editor.ModelManager.Items[Editor.ModelManager.Selected]) then + Editor.ModelManager.Items[Editor.ModelManager.Selected].Pos.x = V + end + return x, y + end + + Editor.SliderX = SlideOffset + --End + + --SlideY + local B = vgui.Create("DLabel",l) + B:SetPos(405,50) + B:SetText("y offset") + + local B2 = vgui.Create("DLabel",l) + B2:SetPos(490,50) + B2:SetText("0") + + local SlideOffset = vgui.Create("DSlider",l) + SlideOffset:SetPos(410,70) + SlideOffset:SetSize(170,20) + SlideOffset.Label = B2 + SlideOffset.Paint = function(s,w,h) DrawRect(0,h/2-2,w,2,MCO) end + SlideOffset.TranslateValues = function(s, x, y ) + local V = math.ceil((x*LimitS-LimitS/2)*100)/100 + B2:SetText(tostring(V)) + + if (Editor.ModelManager.Items[Editor.ModelManager.Selected]) then + Editor.ModelManager.Items[Editor.ModelManager.Selected].Pos.y = V + end + return x, y + end + + Editor.SliderY = SlideOffset + --End + + --SlideZ + local B = vgui.Create("DLabel",l) + B:SetPos(405,95) + B:SetText("z offset") + + local B2 = vgui.Create("DLabel",l) + B2:SetPos(490,95) + B2:SetText("0") + + local SlideOffset = vgui.Create("DSlider",l) + SlideOffset:SetPos(410,115) + SlideOffset:SetSize(170,20) + SlideOffset.Label = B2 + SlideOffset.Paint = function(s,w,h) DrawRect(0,h/2-2,w,2,MCO) end + SlideOffset.TranslateValues = function(s, x, y ) + local V = math.ceil((x*LimitS-LimitS/2)*100)/100 + B2:SetText(tostring(V)) + + if (Editor.ModelManager.Items[Editor.ModelManager.Selected]) then + Editor.ModelManager.Items[Editor.ModelManager.Selected].Pos.z = V + end + return x, y + end + + Editor.SliderZ = SlideOffset + --End + --End + + --OffsetSliders Angles + --SlidePitch + local B = vgui.Create("DLabel",l) + B:SetPos(605,5) + B:SetText("Pitch") + + local B2 = vgui.Create("DLabel",l) + B2:SetPos(690,5) + B2:SetText("0") + + local SlideOffset = vgui.Create("DSlider",l) + SlideOffset:SetPos(610,25) + SlideOffset:SetSize(170,20) + SlideOffset.Label = B2 + SlideOffset.Paint = function(s,w,h) DrawRect(0,h/2-2,w,2,MCO) end + SlideOffset.TranslateValues = function(s, x, y ) + local V = math.ceil((x*360-180)*100)/100 + B2:SetText(tostring(V)) + + if (Editor.ModelManager.Items[Editor.ModelManager.Selected]) then + Editor.ModelManager.Items[Editor.ModelManager.Selected].Ang.p = V + end + return x, y + end + + Editor.SliderPitch = SlideOffset + --End + + --SlideYaw + local B = vgui.Create("DLabel",l) + B:SetPos(605,50) + B:SetText("Yaw") + + local B2 = vgui.Create("DLabel",l) + B2:SetPos(690,50) + B2:SetText("0") + + local SlideOffset = vgui.Create("DSlider",l) + SlideOffset:SetPos(610,70) + SlideOffset:SetSize(170,20) + SlideOffset.Label = B2 + SlideOffset.Paint = function(s,w,h) DrawRect(0,h/2-2,w,2,MCO) end + SlideOffset.TranslateValues = function(s, x, y ) + local V = math.ceil((x*360-180)*100)/100 + B2:SetText(tostring(V)) + + if (Editor.ModelManager.Items[Editor.ModelManager.Selected]) then + Editor.ModelManager.Items[Editor.ModelManager.Selected].Ang.y = V + end + return x, y + end + + Editor.SliderYaw = SlideOffset + --End + + --SlideRoll + local B = vgui.Create("DLabel",l) + B:SetPos(605,95) + B:SetText("Roll") + + local B2 = vgui.Create("DLabel",l) + B2:SetPos(690,95) + B2:SetText("0") + + local SlideOffset = vgui.Create("DSlider",l) + SlideOffset:SetPos(610,115) + SlideOffset:SetSize(170,20) + SlideOffset.Label = B2 + SlideOffset.Paint = function(s,w,h) DrawRect(0,h/2-2,w,2,MCO) end + SlideOffset.TranslateValues = function(s, x, y ) + local V = math.ceil((x*360-180)*100)/100 + B2:SetText(tostring(V)) + + if (Editor.ModelManager.Items[Editor.ModelManager.Selected]) then + Editor.ModelManager.Items[Editor.ModelManager.Selected].Ang.r = V + end + return x, y + end + + Editor.SliderRoll = SlideOffset + --End + --End + + --OffsetScale + --SlideX + local B = vgui.Create("DLabel",l) + B:SetPos(205,5) + B:SetText("x offset") + + local B2 = vgui.Create("DLabel",l) + B2:SetPos(290,5) + B2:SetText("0") + + local SlideOffset = vgui.Create("DSlider",l) + SlideOffset:SetPos(210,25) + SlideOffset:SetSize(170,20) + SlideOffset.Label = B2 + SlideOffset.Paint = function(s,w,h) DrawRect(0,h/2-2,w,2,MCO) end + SlideOffset.TranslateValues = function(s, x, y ) + local V = math.ceil(math.max(0.01,x*LimitScale)*100)/100 + B2:SetText(tostring(V)) + + if (Editor.ModelManager.Items[Editor.ModelManager.Selected]) then + Editor.ModelManager.Items[Editor.ModelManager.Selected].Size.x = V + end + return x, y + end + + Editor.SliderXScale = SlideOffset + --End + + --SlideY + local B = vgui.Create("DLabel",l) + B:SetPos(205,50) + B:SetText("y offset") + + local B2 = vgui.Create("DLabel",l) + B2:SetPos(290,50) + B2:SetText("0") + + local SlideOffset = vgui.Create("DSlider",l) + SlideOffset:SetPos(210,70) + SlideOffset:SetSize(170,20) + SlideOffset.Label = B2 + SlideOffset.Paint = function(s,w,h) DrawRect(0,h/2-2,w,2,MCO) end + SlideOffset.TranslateValues = function(s, x, y ) + local V = math.ceil(math.max(0.01,x*LimitScale)*100)/100 + B2:SetText(tostring(V)) + + if (Editor.ModelManager.Items[Editor.ModelManager.Selected]) then + Editor.ModelManager.Items[Editor.ModelManager.Selected].Size.y = V + end + return x, y + end + + Editor.SliderYScale = SlideOffset + --End + + --SlideZ + local B = vgui.Create("DLabel",l) + B:SetPos(205,95) + B:SetText("z offset") + + local B2 = vgui.Create("DLabel",l) + B2:SetPos(290,95) + B2:SetText("0") + + local SlideOffset = vgui.Create("DSlider",l) + SlideOffset:SetPos(210,115) + SlideOffset:SetSize(170,20) + SlideOffset.Label = B2 + SlideOffset.Paint = function(s,w,h) DrawRect(0,h/2-2,w,2,MCO) end + SlideOffset.TranslateValues = function(s, x, y ) + local V = math.ceil(math.max(0.01,x*LimitScale)*100)/100 + B2:SetText(tostring(V)) + + if (Editor.ModelManager.Items[Editor.ModelManager.Selected]) then + Editor.ModelManager.Items[Editor.ModelManager.Selected].Size.z = V + end + return x, y + end + + Editor.SliderZScale = SlideOffset + --End + --End + + local Compile = vgui.Create("MBButton",l) + Compile:SetText("Compile") + Compile:SetPos(5,30) + Compile:SetSize(185,20) + Compile.Paint = function(s,w,h) + if (s.Pressed) then DrawRect(0,0,w,h,BCO) + elseif (s.Hover) then DrawRect(0,0,w,h,HCO) + else DrawRect(0,0,w,h,MCO) end + + DrawText(s.Text,"Trebuchet18",w/2,h/2,MAIN_TEXTCOLOR,1) + end + Compile.DoClick = function(s) + local Text = "" + + Text = Text.."ITEM.Name\t= [["..Title:GetValue().."]]\n" + Text = Text.."ITEM.Desc\t= [["..Desc:GetValue().."]]\n" + Text = Text.."ITEM.Model\t= [["..ModelP:GetValue().."]]\n" + Text = Text.."ITEM.Icon\t= Material([["..Editor.Icon.."]])\n" + Text = Text.."ITEM.HoldType\t= [["..HoldType:GetValue().."]]\n" + Text = Text.."ITEM.Structure\t= {\n" + + for k,v in pairs(Editor.ModelManager.Items) do + Text = Text.."\t{\n" + Text = Text.."\t\tBone\t= \""..v.Bone.."\",\n" + Text = Text.."\t\tModel\t= \""..v.Model.."\",\n" + Text = Text.."\t\tSize\t= Vector("..v.Size.x..","..v.Size.y..","..v.Size.z.."),\n" + Text = Text.."\t\tPos \t= Vector("..v.Pos.x..","..v.Pos.y..","..v.Pos.z.."),\n" + Text = Text.."\t\tAng \t= Angle("..v.Ang.p..","..v.Ang.y..","..v.Ang.r.."),\n" + Text = Text.."\t},\n" + end + + Text = Text.."}\n" + + if (!file.Exists("wsitems","DATA")) then file.CreateDir("wsitems") end + file.Write("wsitems/"..Title:GetValue()..".txt",Text) + + print("Item has been compiled and is located in garrysmod/data/wsitems folder.") + end + --End + end + + Editor.ModelManager.CamDis = 200 + Editor.ModelManager.CamPos = Vector(200,0,0) + + Editor:SetVisible(true) + + ReloadIcons() +end + + + +concommand.Add("ws_openeditor",function(pl,com,arg) OpenEditor() end) diff --git a/gamemode/hud/draw_help.lua b/gamemode/hud/draw_help.lua new file mode 100644 index 0000000..b1b9425 --- /dev/null +++ b/gamemode/hud/draw_help.lua @@ -0,0 +1,106 @@ + +local MCO = Color(0,0,0,150) + +MAIN_HELP = false +MAIN_HELP_PAGES = 5 + +hook.Add("Tick","Help",function() + if (input.KeyPress(KEY_F1)) then + if (MAIN_HELP and MAIN_HELP < MAIN_HELP_PAGES) then + MAIN_HELP = MAIN_HELP + 1 + elseif (MAIN_HELP) then MAIN_HELP = false + else MAIN_HELP = 1 end + end +end) + +local function WrapString(str,width) + local dp = string.Explode(" ",str) + local dout = dp[1] + local curline = dout + + for k,v in pairs(dp) do + if k ~= 1 then + local sz = surface.GetTextSize(curline) + local sza = surface.GetTextSize(" "..v) + if sz+sza < width then + dout = dout .. " " .. v + curline = curline .. " " .. v + else + dout = dout .. "\n" .. v + curline = v + end + end + end + + return dout +end + +function DrawHelp() + local gx,gy = 5,30 + + if (!MAIN_HELP) then + DrawRect(gx,gy,140,20,MCO) + DrawText("F1 - Help/Next Page","Trebuchet18",gx+4,gy,MAIN_TEXTCOLOR) + return + end + + DrawRect(gx,gy,256,392,MCO) + + gx = gx + 4 + gy = gy + 4 + + if (MAIN_HELP == 1) then + draw.DrawText("Bird","Trebuchet24",gx+4,gy,MAIN_TEXTCOLOR,0) + gy = gy + 24 + + draw.DrawText("Controls:\n\t[W] Fly/Move forward\n\t[Mouse] Steer the bird\n\t[Left Mouse] Taunt\n","Trebuchet18",gx+4,gy,MAIN_TEXTCOLOR,0) + gy = gy + 72 + + draw.DrawText("Purpose:"..WrapString("\n You are a spectator. When you first join, you are assigned as a bird. To become a human you must wait until the round is over, which means you will have to wait til everyones dead.\n\nIn addition to this, the gamemode needs atleast 2 people in the server before the round can actually begin, invite a friend over!\n\nAlternativly, players can perform ritual resurrections to bring a player back to life.",240),"Trebuchet18",gx+4,gy,MAIN_TEXTCOLOR,0) + elseif (MAIN_HELP == 2) then + draw.DrawText("Survivor","Trebuchet24",gx+4,gy,MAIN_TEXTCOLOR,0) + gy = gy + 24 + + draw.DrawText("Controls:\n\t[WASD] Move around\n\t[Mouse] Aim\n\t[Left Mouse] Attack\n\t[Scroll] Select equipment\n","Trebuchet18",gx+4,gy,MAIN_TEXTCOLOR,0) + gy = gy + 90 + + draw.DrawText("Halo:\n","Trebuchet18",gx+4,gy,MAIN_TEXTCOLOR,0) + gy = gy + 18 + + draw.DrawText("\t[GREEN] \t- Hunger","Trebuchet18",gx+4,gy,MAIN_GREENCOLOR,0) + gy = gy + 18 + + draw.DrawText("\t[BLUE] \t- Thirst","Trebuchet18",gx+4,gy,MAIN_BLUECOLOR,0) + gy = gy + 18 + + draw.DrawText("\t[YELLOW] \t- Fatigue","Trebuchet18",gx+4,gy,MAIN_YELLOWCOLOR,0) + gy = gy + 18 + + draw.DrawText("\t[RED] \t- Heat","Trebuchet18",gx+4,gy,MAIN_REDCOLOR,0) + gy = gy + 18 + + draw.DrawText("\t[WHITE] \t- Health","Trebuchet18",gx+4,gy,MAIN_WHITECOLOR,0) + elseif (MAIN_HELP == 3) then + draw.DrawText("Inventory","Trebuchet24",gx+4,gy,MAIN_TEXTCOLOR,0) + gy = gy + 24 + + draw.DrawText("While hovering:\n\t[Right Click] Open drop-down menu\n\t[Left Click] Start dragging item\n\t[Hover] Item info\n","Trebuchet18",gx+4,gy,MAIN_TEXTCOLOR,0) + gy = gy + 72 + + draw.DrawText("While dragging:\n\tDrop in a slot to equip\n\tDrop outside inventory to drop it\n","Trebuchet18",gx+4,gy,MAIN_TEXTCOLOR,0) + gy = gy + 54 + + draw.DrawText("Drop-down menu:\n\t[Drop] Drops the item\n\t[Use] Use/Eat the item\n","Trebuchet18",gx+4,gy,MAIN_TEXTCOLOR,0) + elseif (MAIN_HELP == 4) then + draw.DrawText("Recipes:","Trebuchet24",gx+4,gy,MAIN_TEXTCOLOR,0) + gy = gy + 24 + + surface.SetFont("Trebuchet18") + draw.DrawText(WrapString("Combining:\n To create an item, you drag and drop an item into the bottom of your recipes menu and then press combine. If there is a recipe corresponding to the items you placed, then a recipe will be discovered and you can select it from your recipes list to create the item.",240),"Trebuchet18",gx+4,gy,MAIN_TEXTCOLOR,0) + elseif (MAIN_HELP == 5) then + draw.DrawText("Credits:","Trebuchet24",gx+4,gy,MAIN_TEXTCOLOR,0) + gy = gy + 24 + + draw.DrawText("The Maw\nThirteen (Notes textures)\nApickx","Trebuchet18",gx+4,gy,MAIN_TEXTCOLOR,0) + end +end diff --git a/gamemode/hud/draw_indicators.lua b/gamemode/hud/draw_indicators.lua new file mode 100644 index 0000000..2daf925 --- /dev/null +++ b/gamemode/hud/draw_indicators.lua @@ -0,0 +1,60 @@ + +local x,y = ScrW()-140,ScrH()-140 +local cos = math.cos + +function DrawIndicators() + local pl = LocalPlayer() + if (pl:IsPigeon()) then return end + + local HP = pl:Health() + local HP_c = 1-math.max(0,HP/100) + local A = MAIN_WHITECOLOR.a*1 + + --1 == Hunger + --2 == Thirst + --3 == Heat + --4 == Fatigue + + local Cur = UnPredictedCurTime()*0.1%1*360 + local Time = (cos(Cur)+1)/2 + local CUR = (cos(UnPredictedCurTime())+1)/2 + + for i = 1,4 do + local Col = MAIN_GREENCOLOR + local Siz = 4 + + if (i == 1) then Col = MAIN_GREENCOLOR Siz=Siz+30*math.Clamp(pl:GetHunger()/100,0,1) + elseif (i == 2) then Col = MAIN_BLUECOLOR Siz=Siz+30*math.Clamp(pl:GetWater()/100,0,1) + elseif (i == 3) then Col = MAIN_REDCOLOR Siz=Siz+30*math.Clamp(pl:GetHeat()/100,0,1) + else Col = MAIN_YELLOWCOLOR Siz=Siz+30*math.Clamp(pl:GetFatigue()/100,0,1) + end + + local AB = Col.a*1 + Col.a = 200+50*CUR + + DrawOutlinedCircle(x,y,Siz,8,Cur+90*i,90,8,Col) + + Col.a = AB + end + + --HP + local Time = 255-(255*HP_c)*(cos(UnPredictedCurTime()*(1+10*HP_c))+1)/2 + MAIN_WHITECOLOR.r = Time + MAIN_WHITECOLOR.g = Time + MAIN_WHITECOLOR.b = Time + + DrawOutlinedCircle(x,y,40,8,Cur,360,32,MAIN_WHITECOLOR) + + MAIN_WHITECOLOR.r = 255 + MAIN_WHITECOLOR.g = 255 + MAIN_WHITECOLOR.b = 255 + + local Time2 = (cos(UnPredictedCurTime()*2*(1+3*HP_c))+1)/2 + local Alpha = math.max(0,50-90*Time2) + + MAIN_WHITECOLOR.a = Alpha + + DrawOutlinedCircle(x,y,40+200*Time2,8,Cur*30,360,32,MAIN_WHITECOLOR) + + MAIN_WHITECOLOR.a = 255 +end diff --git a/gamemode/hud/draw_lootventory.lua b/gamemode/hud/draw_lootventory.lua new file mode 100644 index 0000000..fc62280 --- /dev/null +++ b/gamemode/hud/draw_lootventory.lua @@ -0,0 +1,77 @@ +local Ventory = nil +local MCO = Color(0,0,0,150) + +function ReloadLootventory() + if (!IsValid(Ventory)) then return end + + Ventory.List:Clear() + + for k,v in pairs(Ventory.DATA) do + local a = Ventory.List:Add("DPanel") + a:SetSize(64,64) + a.Item = GetItemByName(v.Name) + a.Par = Ventory + a.Quantity = v.Quantity + a:Droppable("LOOTVENTORY") + a.Paint = function(s,w,h) + DrawRect(0,0,w,h,MCO) + if (s.Item) then DrawMaterialRect(0,0,w,h,MAIN_WHITECOLOR,s.Item.Icon) end + + DrawText("x"..v.Quantity,"ChatFont",1,h-18,MAIN_TEXTCOLOR) + end + end +end + +function IsLootventoryOpen() + return (Ventory and Ventory:IsVisible()) +end + +function CloseLootventory() + if (!IsLootventoryOpen()) then return end + + Ventory:SetVisible(false) +end + +function MakeLootventory(dat,ent) + if (!dat) then return end + + if (!Ventory) then + Ventory = vgui.Create("MBFrame") + Ventory:SetPos(690,ScrH()-480) + Ventory:SetSize(200,200) + Ventory:SetTitle("Lootventory") + Ventory:SetDeleteOnClose(false) + --Ventory:MakePopup() + Ventory:ShowCloseButton(false) + Ventory.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + Ventory.OnClose = function(s) surface.PlaySound("wintersurvival2/hud/itemequip.wav") end + + local Pane = vgui.Create( "DScrollPanel", Ventory ) + Pane:SetPos(5,25) + Pane:SetSize(Ventory:GetWide()-10,Ventory:GetTall()-30) + Pane.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + Pane:Receiver("INVENTORY", function(s,a,b,c) + local p = a[1] + + if (p.Item and IsValid(Ventory.Entity) and b) then + TransferItems(p.Item.Name,p.Quantity,Ventory.Entity) + DemandLootventoryUpdate(Ventory.Entity) + end + end) + + local l = vgui.Create("DIconLayout",Pane) + l:SetSize(Pane:GetWide()-10,Pane:GetTall()-10) + l:SetPos(5,5) + l:SetSpaceY(5) + l:SetSpaceX(5) + + Ventory.List = l + end + + Ventory:SetVisible(true) + + Ventory.Entity = ent + Ventory.DATA = dat + + ReloadLootventory() +end diff --git a/gamemode/hud/draw_qmenu.lua b/gamemode/hud/draw_qmenu.lua new file mode 100644 index 0000000..1466704 --- /dev/null +++ b/gamemode/hud/draw_qmenu.lua @@ -0,0 +1,346 @@ +local Inventory = nil +local RecipeMenu = nil +local MCO = Color(0,0,0,150) +local BCO = Color(0,50,100,150) +local GCO = Color(0,100,0,150) +local HCO = Color(30,30,30,150) + +--Garry... for the love of god, this fucking function is spamming the console with debug information. +--I decided to override it so it shuts up! +dragndrop.HandleDroppedInGame = function() end + +function ReloadInventory() + if (!IsInventoryOpen()) then return end + Inventory.List:Clear() + + ReloadRecipes() + + for k,v in pairs(LocalPlayer():GetInventory()) do + local a = Inventory.List:Add("DPanel") + a:SetSize(64,64) + a.Item = GetItemByName(v.Name) + a.Quantity = v.Quantity + a:Droppable("INVENTORY") + a.Paint = function(s,w,h) + DrawRect(0,0,w,h,MCO) + DrawMaterialRect(0,0,w,h,MAIN_WHITECOLOR,s.Item.Icon) + + DrawText("x"..v.Quantity,"ChatFont",1,h-18,MAIN_TEXTCOLOR) + end + + a.OnStopDragging = function(s,a,b,c) + local ID = IsMouseInSlot() + + if (!ID) then return end + + RequestEquip(ID,s.Item.Name) + end + + local Ab = a.OnMousePressed + a.OnMousePressed = function(s,m) + if (m == MOUSE_RIGHT) then + local X,Y = gui.MousePos() + + local menu = DermaMenu() + menu.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + menu:AddOption( "Use", function() if (s.Item) then RequestUseItem(s.Item.Name) end end ):SetColor(MAIN_TEXTCOLOR) + menu:AddOption( "Drop", function() if (s.Item) then RequestDropItem(s.Item.Name) end end ):SetColor(MAIN_TEXTCOLOR) + + menu:Open() + menu:SetPos(X,Y) + end + + Ab(s,m) + end + + a.OnCursorEntered = function(s) + Inventory.Desc:SetVisible(true) + Inventory.Desc:SetText(s.Item.Name.."\n\n"..s.Item.Desc) + Inventory.CraftingButton:SetVisible(false) + + s.Hover = true + end + + a.OnCursorExited = function(s) + Inventory.Desc:SetVisible(false) + + if (RecipeMenu.SelectedRecipe) then + Inventory.CraftingButton:SetVisible(true) + end + + s.Hover = false + end + end +end + +function ReloadRecipes() + if (!IsInventoryOpen()) then return end + RecipeMenu.List:Clear() + RecipeMenu.Combine.Items = {} + + for k,v in pairs(GAMEMODE.KnownRecipes) do + local a = RecipeMenu.List:Add("MBButton") + a:SetText(v.Name) + a:SetSize(RecipeMenu.List:GetWide()-5,23) + a.Item = v + a.Paint = function(s,w,h) + if (s.Pressed) then DrawRect(0,0,w,h-3,BCO) + elseif (s.Hover) then DrawRect(0,0,w,h-3,HCO) + else DrawRect(0,0,w,h-3,MCO) end + + DrawText(s.Item.Name,"Trebuchet18",4,0,MAIN_TEXTCOLOR) + end + a.DoClick = function(s) + if (RecipeMenu.SelectedRecipe == a.Item) then RecipeMenu.SelectedRecipe = nil Inventory.CraftingButton:SetVisible(false) + else RecipeMenu.SelectedRecipe = a.Item Inventory.CraftingButton:SetVisible(true) end + end + end +end + +function GM:OnSpawnMenuOpen() + if (LocalPlayer():IsPigeon()) then return end + if (IsInventoryOpen()) then return end + + surface.PlaySound("wintersurvival2/hud/itemopen.wav") + + if (!Inventory) then + --Recipes + RecipeMenu = vgui.Create("MBFrame") + RecipeMenu:SetPos(485,ScrH()-480) + RecipeMenu:SetSize(200,400) + RecipeMenu:SetTitle("Recipes") + RecipeMenu:ShowCloseButton(false) + RecipeMenu.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + RecipeMenu.SelectedRecipe = nil + + local Pane = vgui.Create( "DScrollPanel", RecipeMenu ) + Pane:SetPos(5,25) + Pane:SetSize(RecipeMenu:GetWide()-10,RecipeMenu:GetTall()-150) + Pane.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + + local l = vgui.Create("DListLayout",Pane) + l:SetSize(Pane:GetWide()-10,Pane:GetTall()-10) + l:SetPos(5,5) + + RecipeMenu.List = l + + local c = vgui.Create( "MBFrame", RecipeMenu ) + c:SetPos(5,RecipeMenu:GetTall()-120) + c:SetSize(RecipeMenu:GetWide()-10,115) + c:SetTitle("") + c:ShowCloseButton(false) + c.Items = {} + c.Paint = function(s,w,h) + DrawRect(0,0,w,h,MCO) + + local Press = input.MousePress(MOUSE_LEFT,"MenuPress") + + if (table.Count(s.Items) < 1) then + DrawText("Draw items here!","Trebuchet24",w/2,h/2-3,MAIN_WHITECOLOR,1) + else + for i = 1,4 do + local v = s.Items[i] + + if (v and v.Name) then + local Item = GetItemByName(v.Name) + local y = -15+20*i + local x = 5 + + local X,Y = s:GetParent():GetPos() + local SX,SY = s:GetPos() + X = X+SX + Y = Y+SY + + if (!input.IsMouseInBox(X+x,Y+y,w-10,18)) then DrawRect(x,y,w-10,18,MCO) + else + DrawRect(x,y,w-10,18,GCO) + + if (Press) then + s.Items[i] = nil + break + end + end + + if (Item.Icon) then + DrawMaterialRect(x+1,y+1,16,16,MAIN_WHITECOLOR,Item.Icon) + end + + DrawText("x "..v.Quantity.." "..v.Name,"Trebuchet18",23,y,MAIN_WHITECOLOR) + end + end + end + end + c:Receiver("INVENTORY", function(s,a,b,c) + local p = a[1] + + if (p.Item and b) then + local Find = false + + for i = 1,4 do + if (s.Items[i] and s.Items[i].Name == p.Item.Name) then + if (LocalPlayer():HasItem(s.Items[i].Name,s.Items[i].Quantity+1)) then + s.Items[i].Quantity = s.Items[i].Quantity + 1 + end + + Find = true + break + end + end + + if (!Find) then + for i = 1,4 do + if (!s.Items[i]) then + s.Items[i] = {Name = p.Item.Name,Quantity = 1} + break + end + end + end + end + end) + + local B = vgui.Create("MBButton",c) + B:SetPos(5,c:GetTall()-25) + B:SetSize(c:GetWide()-10,20) + B:SetVisible(true) + B.DoClick = function(s) + local Items = RecipeMenu.Combine.Items + + if (Items and table.Count(Items) > 0) then + DiscoverItems(Items) + end + end + B.Paint = function(s,w,h) + if (s.Pressed) then DrawRect(0,0,w,h-3,BCO) + elseif (s.Hover) then DrawRect(0,0,w,h-3,HCO) + else DrawRect(0,0,w,h-3,MCO) end + + DrawText("Combine","Trebuchet18",w/2,h/2,MAIN_TEXTCOLOR,1) + end + + RecipeMenu.Combine = c + + --Inventory + Inventory = vgui.Create("MBFrame") + Inventory:SetPos(80,ScrH()-480) + Inventory:SetSize(400,400) + Inventory:SetTitle("Inventory") + Inventory:SetDeleteOnClose(false) + Inventory:MakePopup() + Inventory:SetVisible(false) + Inventory:ShowCloseButton(false) + Inventory.OnKeyCodePressed = function(panel, key) + if(key == 27 or key == 15) then + if(Inventory and Inventory:IsVisible())then + Inventory:SetVisible(false) + RecipeMenu:SetVisible(false) + CloseLootventory() + surface.PlaySound("wintersurvival2/hud/itemequip.wav") + else + Inventory:SetVisible(true) + RecipeMenu:SetVisible(true) + end + end + end + Inventory.Paint = function(s,w,h) + DrawRect(0,0,w,h,MCO) + + local X,Y,W,H = 5,h-120,w-10,115 + DrawRect(X,Y,W,H,MCO) + + local Rec = RecipeMenu.SelectedRecipe + + if (Rec and Inventory.CraftingButton:IsVisible()) then + local Recipe = Rec.Recipe + local pl = LocalPlayer() + local C = 0 + local Step = W/3 + + DrawText("Products:","Trebuchet18",X+5,Y,MAIN_TEXTCOLOR) + DrawText("Reagents:","Trebuchet18",X+Step+5,Y,MAIN_TEXTCOLOR) + DrawText("Tools:","Trebuchet18",X+Step*2+5,Y,MAIN_TEXTCOLOR) + + for k,v in pairs(Recipe.Resources) do + C = C+1 + if (pl:HasItem(k,v)) then DrawText(v.." x "..k,"Trebuchet18",X+Step+5,Y+16*C,MAIN_GREENCOLOR) + else DrawText(v.." x "..k,"Trebuchet18",X+Step+5,Y+16*C,MAIN_REDCOLOR) end + end + + C = 0 + for k,v in pairs(Recipe.Tools) do + C = C+1 + if (pl:HasItem(k,v)) then DrawText(v.."x "..k,"Trebuchet18",X+5+Step*2,Y+16*C,MAIN_GREENCOLOR) + else DrawText(v.."x "..k,"Trebuchet18",X+5+Step*2,Y+16*C,MAIN_REDCOLOR) end + end + + DrawText("1 x "..Rec.Name,"Trebuchet18",X+5,Y+16,MAIN_GREENCOLOR) + end + end + Inventory.OnClose = function(s) CloseLootventory() RecipeMenu:SetVisible(false) surface.PlaySound("wintersurvival2/hud/itemequip.wav") end + + local Pane = vgui.Create( "DScrollPanel", Inventory ) + Pane:SetPos(5,25) + Pane:SetSize(Inventory:GetWide()-10,Inventory:GetTall()-150) + Pane.Paint = function(s,w,h) DrawRect(0,0,w,h,MCO) end + Pane:Receiver("LOOTVENTORY", function(s,a,b,c) + local p = a[1] + + if (p.Item and IsValid(p.Par.Entity) and b) then + DemandItems(p.Item.Name,p.Quantity,p.Par.Entity) + DemandLootventoryUpdate(p.Par.Entity) + end + end) + + local l = vgui.Create("DIconLayout",Pane) + l:SetSize(Pane:GetWide()-10,Pane:GetTall()-10) + l:SetPos(5,5) + l:SetSpaceY(5) + l:SetSpaceX(5) + + Inventory.List = l + + local B = vgui.Create("MBButton",Inventory) + B:SetPos(Inventory:GetWide()-110,Inventory:GetTall()-25) + B:SetSize(100,20) + B:SetVisible(false) + B.DoClick = function(s) + if (RecipeMenu.SelectedRecipe) then RequestCreateRecipe(RecipeMenu.SelectedRecipe.Name) end + end + B.Paint = function(s,w,h) + if (s.Pressed) then DrawRect(0,0,w,h-3,BCO) + elseif (s.Hover) then DrawRect(0,0,w,h-3,HCO) + else DrawRect(0,0,w,h-3,MCO) end + + DrawText("Craft!","Trebuchet18",w/2,h/2,MAIN_TEXTCOLOR,1) + end + + Inventory.CraftingButton = B + + local a = vgui.Create("DLabel",Inventory) + a:SetPos(10,Inventory:GetTall()-120) + a:SetSize(Inventory:GetWide()-2,1) + a:SetText("") + a:SetWrap(true) + a:SetVisible(false) + a:SetTextColor(MAIN_TEXTCOLOR) + a:SetFont("Trebuchet18") + a:SetAutoStretchVertical(true) + + Inventory.Desc = a + end + + --RecipeMenu:SetVisible(true) + --Inventory:SetVisible(true) + if(Inventory and Inventory:IsVisible())then + Inventory:SetVisible(false) + RecipeMenu:SetVisible(false) + else + Inventory:SetVisible(true) + RecipeMenu:SetVisible(true) + end + + ReloadInventory() +end + +function IsInventoryOpen() + return (Inventory and Inventory:IsVisible()) +end diff --git a/gamemode/hud/draw_scoreboard.lua b/gamemode/hud/draw_scoreboard.lua new file mode 100644 index 0000000..8062c56 --- /dev/null +++ b/gamemode/hud/draw_scoreboard.lua @@ -0,0 +1,40 @@ +local SCOREBOARD_FADE = Color(20,20,20,70) + +local SCOREBOARD_OFF = 101 +local SCOREBOARD_WIDTH = 700 +local SCOREBOARD_X = ScrW() / 2 - SCOREBOARD_WIDTH / 2 + +function GM:ScoreboardShow() + self.ShowSB = true +end + +function GM:ScoreboardHide() + self.ShowSB = false +end + +function GM:HUDDrawScoreBoard() + if (!self.ShowSB) then return end + + local NPly = #player.GetAll() + local Tall = SCOREBOARD_OFF + 20 * NPly + local y = ScrH() / 2 - Tall / 2 + local by = y + SCOREBOARD_OFF + + DrawRect(SCOREBOARD_X, y, SCOREBOARD_WIDTH, Tall, MAIN_COLOR) + DrawRect(SCOREBOARD_X, by, SCOREBOARD_WIDTH, NPly*20, MAIN_COLORD) + + DrawText(self.Name, "ScoreboardFont", ScrW()/2, y + 50, MAIN_TEXTCOLOR,1) + DrawText("By The Maw", "Trebuchet18", ScrW()/2-150, y + 80, MAIN_TEXTCOLOR,1) + + for k,v in pairs( player.GetAll() ) do + local Y = by + 20 * (k-1) + + if (v:IsPigeon()) then + DrawText(v:Nick(), "Trebuchet18", SCOREBOARD_X + 2, Y, MAIN_GREYCOLOR) + DrawText(v:Ping(), "Trebuchet18", SCOREBOARD_X + SCOREBOARD_WIDTH - 30, Y, MAIN_GREYCOLOR) + else + DrawText(v:Nick(), "Trebuchet18", SCOREBOARD_X + 2, Y, MAIN_TEXTCOLOR) + DrawText(v:Ping(), "Trebuchet18", SCOREBOARD_X + SCOREBOARD_WIDTH - 30, Y, MAIN_TEXTCOLOR) + end + end +end diff --git a/gamemode/hud/draw_targets.lua b/gamemode/hud/draw_targets.lua new file mode 100644 index 0000000..b5eadac --- /dev/null +++ b/gamemode/hud/draw_targets.lua @@ -0,0 +1,11 @@ +function DrawTargets() + local pl = LocalPlayer() + + if (pl:IsPigeon()) then return end + + local tr = pl:GetEyeTrace() + + if (IsValid(tr.Entity) and tr.Entity:IsPlayer()) then + DrawText(tr.Entity:Nick(),"ChatFont",ScrW()/2,ScrH()/2,MAIN_YELLOWCOLOR,1) + end +end \ No newline at end of file diff --git a/gamemode/hud/draw_voicechat.lua b/gamemode/hud/draw_voicechat.lua new file mode 100644 index 0000000..f0c63c8 --- /dev/null +++ b/gamemode/hud/draw_voicechat.lua @@ -0,0 +1,33 @@ +local VoiceEna = true +local VOCOL = table.Copy(MAIN_COLOR) +local x,y = ScrW(),ScrH() + +function GM:PlayerStartVoice( ply ) + ply.Talking = true +end + +function GM:PlayerEndVoice( ply ) + ply.Talking = nil +end + +hook.Add("HUDPaint","_VoiceChatDraw",function() + local D = 0 + + for k,v in pairs( player.GetAll() ) do + if (v.Talking) then + local H = 45*D + D = D+1 + + local V = v:VoiceVolume() + local D = MAIN_COLOR + + VOCOL.r = math.Clamp(D.r-100*V,0,255) + VOCOL.g = math.Clamp(D.g+200*V,0,255) + VOCOL.b = math.Clamp(D.b-100*V,0,255) + + DrawRect( x-250, y-170-H, 200, 40, VOCOL ) + DrawRect( x-246, y-166-H, 32, 32, MAIN_WHITECOLOR ) + DrawText( v:Nick(), "Trebuchet18", x-206, y-159-H, MAIN_TEXTCOLOR ) + end + end +end) \ No newline at end of file diff --git a/gamemode/hud/draw_wepswap.lua b/gamemode/hud/draw_wepswap.lua new file mode 100644 index 0000000..40c2310 --- /dev/null +++ b/gamemode/hud/draw_wepswap.lua @@ -0,0 +1,64 @@ +local Num = 0 +local MCO = Color(0,0,0,150) + +local max = math.max +local min = math.min +local cos = math.cos +local sin = math.sin +local rad = math.rad + +local h = ScrH() +local s = 65 +local B = s+5 + +function DrawWepSwap() + local pl = LocalPlayer() + if (pl:IsPigeon()) then return end + if (GetRecentSwapTime() < CurTime()-3 and !IsInventoryOpen()) then return end + + local Slot = GetWeaponSlot() + + Num = Num+math.Clamp((Slot-Num)/6,-1,1) + + if (!IsInventoryOpen()) then MCO.a = 150*min(1,GetRecentSwapTime()-(CurTime()-3)) + else MCO.a = 150 end + + local Ib = input.MousePress(MOUSE_LEFT,"Unequip") + + for i = 0,9 do + local r = Num-i + local x = max(0,B*r) + local y = max(0,B*-r) + + if (Slot == i) then MCO.b = 150 + else MCO.b = 0 end + + DrawRect(x+10,h-s-y-10,s,s,MCO) + + if (pl.Weapons and pl.Weapons[i]) then + if (pl.Weapons[i].Item.Icon) then DrawMaterialRect(x+10,h-s-y-10,s,s,MAIN_WHITECOLOR,pl.Weapons[i].Item.Icon) end + + if (input.IsMouseInBox(x+10,h-s-y-10,s,s) and Ib) then + RequestUnEquip(i) + timer.Simple(0.05,function() ReloadInventory() end) + end + end + end +end + +function IsMouseInSlot() + local mx,my = gui.MousePos() + + for i = 0,9 do + local r = Num-i + local x = max(0,B*r) + local y = max(0,B*-r) + + if (input.IsMouseInBox(x+10,h-s-y-10,s,s)) then + return i + end + end + + return false +end + \ No newline at end of file diff --git a/gamemode/init.lua b/gamemode/init.lua new file mode 100644 index 0000000..717a65c --- /dev/null +++ b/gamemode/init.lua @@ -0,0 +1,120 @@ + +AddCSLuaFile( "cl_init.lua" ) +AddCSLuaFile( "shared.lua" ) + +include( "shared.lua" ) + +hook.Remove("Initialize","LoadGearFox") + +local models = { + "models/player/Group03/female_01.mdl", + "models/player/Group03/female_02.mdl", + "models/player/Group03/female_03.mdl", + "models/player/Group03/female_04.mdl", + "models/player/Group03/male_01.mdl", + "models/player/Group03/male_02.mdl", + "models/player/Group03/male_03.mdl", + "models/player/Group03/male_04.mdl", + "models/player/Group03/male_05.mdl", + "models/player/Group03/male_06.mdl", + "models/player/Group03/male_07.mdl", + "models/player/Group03/male_08.mdl", + "models/player/Group03/male_09.mdl", +} + +function GM:Initialize() + resource.AddDir("sound/wintersurvival2") + resource.AddDir("materials/wintersurvival2") + resource.AddDir("materials/settlement") + resource.AddDir("materials/mixerman3d") + resource.AddDir("materials/lam") + + resource.AddDir("models/mixerman3d") + + resource.AddDir("materials/gearfox") + resource.AddDir("materials/mawbase") + resource.AddDir("models/gearfox") + resource.AddDir("sound/mawbase") + + resource.AddFile("models/weapons/w_archersword/w_archersword.mdl") + resource.AddFile("materials/models/weapons/archersword.vmt") +end + +function GM:PlayerAuthed(pl) + pl:UpdateHumans() + pl:UpdatePigeons() + pl:UpdateRoundTimer() +end + +function GM:PlayerInitialSpawn(pl) + if (!self.CountDown and #player.GetAll() > 1) then self:StartCountDown() end + pl:SetHuman(false) +end + +function GM:PlayerSpawn(pl) + pl:SetHeat(0) + pl:SetHunger(0) + pl:SetFatigue(0) + pl:SetWater(0) + + if (pl:IsPigeon()) then + pl:SetNoDraw(true) + pl:SetNotSolid(true) + pl:SetMoveType(MOVETYPE_NONE) + + pl:SpawnPigeon() + else + --hook.Call("PlayerSetModel",self,pl) + + pl:SetModel(Model(models[math.random(#models)])) + pl:Give("hands") + pl:SelectWeapon("hands") + end +end + +function GM:PlayerCanHearPlayersVoice() + return true +end + +function GM:Think() +end + +local Up = Vector(0,0,20) + +function GM:DoPlayerDeath( pl, attacker, dmginfo ) + if (!pl:IsPigeon()) then + if (#player.GetAllHumans() > 1) then + local a = ents.Create("ws_grave") + a:SetPos(pl:GetPos()+Up) + a:SetAngles(Angle(0,math.random(0,360),0)) + a:Spawn() + a:Activate() + a:AddItem("Meat",math.random(8,10)) + + for k,v in pairs(pl:GetInventory()) do + a:AddItem(v.Name,v.Quantity) + end + end + + pl:CreateRagdoll() + pl:SetHuman(false) + pl:ResetKnownRecipes() + end + +end + +function GM:PlayerDeathSound() + return true +end + +function GM:PlayerShouldTakeDamage( pl, inf ) + if (inf:IsPlayer() and pl:IsPlayer() and !pl:IsPigeon()) then + if (self.CountDown > CurTime()-MAIN_PVPTIMER) then + return false + end + end + + return true +end + + diff --git a/gamemode/itemsystem/items/alter.lua b/gamemode/itemsystem/items/alter.lua new file mode 100644 index 0000000..31d1b4f --- /dev/null +++ b/gamemode/itemsystem/items/alter.lua @@ -0,0 +1,66 @@ + +ITEM.Name = "Alter" +ITEM.Class = "structure" +ITEM.Desc = "This allows you to sacrifice your soul for a player." +ITEM.Model = "models/props_c17/gravestone003a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_crow.png") +ITEM.Recipe = { + Resources = { + ["Ancient Log"] = 20, + ["Plank"] = 16, + ["Rope"] = 16, + ["Sap"] = 30, + }, + Tools = { + ["Diamond Hammer"] = 1, + }, +} + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Ghost = { + { + Model = "models/props_c17/gravestone003a.mdl", + Size = Vector(8,1,1), + Pos = Vector(22,0,0), + Ang = Angle(90,0,0), + }, + { + Model = "models/props_c17/gravestone003a.mdl", + Size = Vector(8,1,1), + Pos = Vector(-22,0,0), + Ang = Angle(-90,0,0), + }, +} + +ITEM.Range = 200 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (!pl:CanPlaceStructure(tr)) then pl:GhostStructure(self.Name) return end + + if (tr.Hit) then + local drop = ents.Create("ws_alter") + drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,0)) + drop:SetPos(tr.HitPos) + drop:Spawn() + drop:Activate() + + if (pl:HasItem(self.Name)) then pl:RemoveItem(self.Name,1) + else pl:UnEquipWeaponSlot(pl.Select,true) end + + pl:GhostRemove() + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/ancientlog.lua b/gamemode/itemsystem/items/ancientlog.lua new file mode 100644 index 0000000..2948d08 --- /dev/null +++ b/gamemode/itemsystem/items/ancientlog.lua @@ -0,0 +1,17 @@ + +ITEM.Name = "Ancient Log" +ITEM.Class = "resource" +ITEM.Desc = "Powerful wood." +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("settlement/icon_log") + +ITEM.Recipe = { + Resources = { + ["Vine"] = 1, + ["Sap"] = 1, + ["Ancient Wood"] = 3, + }, + Tools = { + ["Crystal Hammer"] = 1, + }, +} diff --git a/gamemode/itemsystem/items/ancientwood.lua b/gamemode/itemsystem/items/ancientwood.lua new file mode 100644 index 0000000..8f38c17 --- /dev/null +++ b/gamemode/itemsystem/items/ancientwood.lua @@ -0,0 +1,60 @@ + +ITEM.Name = "Ancient Wood" +ITEM.Class = "weapon" +ITEM.Desc = "A stronger type of wood.\nUsed for advanced equipment." +ITEM.Model = "models/gibs/furniture_gibs/furniturewooddrawer003a_chunk04.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_ancientwood.png") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/gibs/furniture_gibs/furniturewooddrawer003a_chunk04.mdl", + Size = Vector(.5,.5,.5), + Pos = Vector(3,-1.5,-12), + Ang = Angle(0,0,0), + }, +} + +ITEM.Damage = 5 +ITEM.Range = 60 +ITEM.CD = 0.6 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:GetModel():find("tree")) then + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end + +function ITEM:OnSecondary(pl,tr) + if (CLIENT) then return end + if (!pl:HasItem(self.Name)) then return end + + local drop = SpawnWSItem(self.Name,pl:GetShootPos()+pl:GetAimVector()*20) + drop:GetPhysicsObject():ApplyForceCenter(pl:GetAimVector() * 200) + + pl:RemoveItem(self.Name,1) + + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(40,60)) +end + + diff --git a/gamemode/itemsystem/items/arrow.lua b/gamemode/itemsystem/items/arrow.lua new file mode 100644 index 0000000..30047d8 --- /dev/null +++ b/gamemode/itemsystem/items/arrow.lua @@ -0,0 +1,25 @@ + +ITEM.Name = "Arrow" +ITEM.Class = "ammo" +ITEM.Desc = "An arrow, used for bows." +ITEM.Model = "models/mixerman3d/other/arrow.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_arrow") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/mixerman3d/other/arrow.mdl", + Pos = Vector(1,-1,-2.5), + Ang = Angle(0,90,180), + }, +} + +ITEM.Recipe = { + Resources = { + ["Rock"] = 1, + ["Flint"] = 1, + ["Sap"] = 1, + ["Wood"] = 1, + }, + Tools = {}, +} diff --git a/gamemode/itemsystem/items/axe.lua b/gamemode/itemsystem/items/axe.lua new file mode 100644 index 0000000..b5d2063 --- /dev/null +++ b/gamemode/itemsystem/items/axe.lua @@ -0,0 +1,66 @@ + +ITEM.Name = "Axe" +ITEM.Class = "weapon" +ITEM.Desc = "A primitive axe held together with sap." +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_axe") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.1,0.5,1), + Pos = Vector(3,-4,-27), + Ang = Angle(0,0,0), + }, + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(3,-1.5,-12), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Wood"] = 1, + ["Rock"] = 1, + ["Sap"] = 1, + }, + Tools = {}, +} + + + +ITEM.Damage = 30 +ITEM.Range = 64 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:IsTree()) then + if (math.random(1,35)/10 < 1) then pl:AddItem("Wood",1) end + + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/barrel.lua b/gamemode/itemsystem/items/barrel.lua new file mode 100644 index 0000000..6f99d7e --- /dev/null +++ b/gamemode/itemsystem/items/barrel.lua @@ -0,0 +1,58 @@ + +ITEM.Name = "Barrel" +ITEM.Class = "structure" +ITEM.Desc = "Barrel for storage of items." +ITEM.Model = "models/props_c17/oildrum001.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_fence") +ITEM.Recipe = { + Resources = { + ["Plank"] = 3, + ["Sap"] = 2, + }, + Tools = { + ["Crystal"] = 1, + }, +} + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Ghost = { + { + Model = "models/props_c17/oildrum001.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,0,0), + Ang = Angle(0,0,0), + }, +} + +ITEM.Range = 200 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (!pl:CanPlaceStructure(tr)) then pl:GhostStructure(self.Name) return end + + if (tr.Hit) then + local drop = ents.Create("ws_barrel") + drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,0)) + drop:SetPos(tr.HitPos) + drop:Spawn() + drop:Activate() + + if (pl:HasItem(self.Name)) then pl:RemoveItem(self.Name,1) + else pl:UnEquipWeaponSlot(pl.Select,true) end + + pl:GhostRemove() + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/base.lua b/gamemode/itemsystem/items/base.lua new file mode 100644 index 0000000..a3b6b31 --- /dev/null +++ b/gamemode/itemsystem/items/base.lua @@ -0,0 +1,37 @@ +ITEM.Name = "Winter Survival 2 Base Item" +ITEM.Desc = "Why the hell did I write this? No one will read it anyways!!" +ITEM.Class = "Other" +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_rock") +ITEM.Burnable = false +ITEM.CD = 0.3 +ITEM.Range = 120 +ITEM.HoldType = "melee" + +ITEM.Structure = {} +ITEM.Recipe = nil +ITEM.Tools = nil +ITEM.CookCD = 1 +ITEM.CookProduct = nil +ITEM.Ghost = nil + +--These are just here to tell the editors/develoeprs what functions are available.. dont un-comment them out, as this could affect all the items. +/* +function ITEM:OnPrimary(user,tr) +end + +function ITEM:OnSecondary(user,tr) +end + +function ITEM:OnUse(user) +end + +function ITEM:OnCooked(campfire) +end + +function ITEM:OnEnchanted(enchanttalbe, nearbyrunes) +end + +function ITEM:OnCraft(player) +end +*/ diff --git a/gamemode/itemsystem/items/battleaxe.lua b/gamemode/itemsystem/items/battleaxe.lua new file mode 100644 index 0000000..96b3cf6 --- /dev/null +++ b/gamemode/itemsystem/items/battleaxe.lua @@ -0,0 +1,65 @@ +ITEM.Name = [[Battle Axe]] +ITEM.Desc = [[The vikings once used these]] +ITEM.Model = [[models/props_junk/Rock001a.mdl]] +ITEM.Icon = Material([[wintersurvival2/hud/ws1_icons/icon_axe]]) +ITEM.Structure = { + { + Bone="ValveBiped.Bip01_R_Hand", + Model="models/props_debris/wood_board02a.mdl", + Size=Vector(0.5,0.5,0.5), + Pos=Vector(3.182,-1.76,-11.64), + Ang=Angle(0,86.83,0), + }, + { + Bone="ValveBiped.Bip01_R_Hand", + Model="models/props_junk/Rock001a.mdl", + Size=Vector(1.18,0.06,1), + Pos=Vector(6,-1.76,-22.94), + Ang=Angle(0,0,0), + }, + { + Bone="ValveBiped.Bip01_R_Hand", + Model="models/props_junk/Rock001a.mdl", + Size=Vector(0.74,0.06,0.62), + Pos=Vector(4.24,-1.75,-14.82), + Ang=Angle(0,0,-180), + }, +} + +ITEM.Recipe = { + Resources = { + ["Plank"] = 2, + ["Flint"] = 1, + ["Sap"] = 1, + }, + Tools = {}, +} + +ITEM.HoldType = "melee2" +ITEM.Damage = 70 +ITEM.Range = 80 +ITEM.CD = 0.9 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(60,80)) + end +end \ No newline at end of file diff --git a/gamemode/itemsystem/items/berry.lua b/gamemode/itemsystem/items/berry.lua new file mode 100644 index 0000000..90ec4c4 --- /dev/null +++ b/gamemode/itemsystem/items/berry.lua @@ -0,0 +1,24 @@ + +ITEM.Name = "Berry" +ITEM.Class = "food" +ITEM.Desc = "Berries..." +ITEM.Model = "models/Weapons/w_bugbait.mdl" +ITEM.Icon = Material("settlement/icon_berries") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/Weapons/w_bugbait.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +function ITEM:OnUse(user) + if (CLIENT) then return end + + user:SetHealth(math.min(100,user:Health()+5)) + user:AddHunger(-25) + user:RemoveItem(self.Name,1) +end \ No newline at end of file diff --git a/gamemode/itemsystem/items/bow.lua b/gamemode/itemsystem/items/bow.lua new file mode 100644 index 0000000..8ecee8e --- /dev/null +++ b/gamemode/itemsystem/items/bow.lua @@ -0,0 +1,59 @@ + +ITEM.Name = "Bow" +ITEM.Class = "weapon" +ITEM.Desc = "A primitive bow made from vine, sap, and wood." +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_bow") +ITEM.HoldType = "smg" + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_L_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(.5,.5,.35), + Pos = Vector(-1,-6,9), + Ang = Angle(-30,-65,180), + }, + { + Bone = "ValveBiped.Bip01_L_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(.5,.5,.35), + Pos = Vector(-1,-6,-9), + Ang = Angle(30,-65,180), + }, + { + Bone = "ValveBiped.Bip01_L_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(.05,.05,.51), + Pos = Vector(-3.3,-9.5,0), + Ang = Angle(0,-65,180), + }, +} + +ITEM.Recipe = { + Resources = { + ["Plank"] = 2, + ["Rope"] = 1, + ["Sap"] = 1, + }, + Tools = {}, +} + +ITEM.CD = 1 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + if (!pl:HasItem("Arrow",1)) then return end + + local aim = pl:GetAimVector() + + local D = ents.Create("ws_arrow") + D:SetPos(pl:GetShootPos()+aim*20) + D:SetOwner(pl) + D:SetAngles(aim:Angle()) + D:Spawn() + pl:EmitSound(Sound("physics/flesh/flesh_impact_hard.wav"),100,math.random(90,110)) + D:GetPhysicsObject():ApplyForceCenter(aim * 10000) + + pl:RemoveItem("Arrow",1) +end diff --git a/gamemode/itemsystem/items/campfire.lua b/gamemode/itemsystem/items/campfire.lua new file mode 100644 index 0000000..5cc4987 --- /dev/null +++ b/gamemode/itemsystem/items/campfire.lua @@ -0,0 +1,82 @@ + +ITEM.Name = "Campfire" +ITEM.Class = "structure" +ITEM.Desc = "Ready to be lit. Some assembly required." +ITEM.Model = "models/props_debris/wood_board07a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_campfire") +ITEM.Recipe = { + Resources = { + ["Wood"] = 4, + ["Rock"] = 1, + }, + Tools = { + ["Crystal"] = 1, + }, +} + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Ghost = { + { + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,0,0), + Ang = Angle(0,0,0), + }, + { + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,10,0), + Ang = Angle(-45,90,0), + }, + { + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(1,1,1), + Pos = Vector(-10,0,0), + Ang = Angle(-45,180,0), + }, + { + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,-10,0), + Ang = Angle(-45,-90,0), + }, + { + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(1,1,1), + Pos = Vector(10,0,0), + Ang = Angle(-45,0,0), + }, +} + +ITEM.Range = 200 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (!pl:CanPlaceStructure(tr)) then pl:GhostStructure(self.Name) return end + + if (tr.Hit and tr.HitWorld) then + local drop = ents.Create("ws_campfire") + drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,0)) + drop:SetPos(tr.HitPos) + drop:Spawn() + drop:Activate() + + if (pl:HasItem(self.Name)) then pl:RemoveItem(self.Name,1) + else pl:UnEquipWeaponSlot(pl.Select,true) end + + pl:GhostRemove() + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/charcoal.lua b/gamemode/itemsystem/items/charcoal.lua new file mode 100644 index 0000000..ed5e900 --- /dev/null +++ b/gamemode/itemsystem/items/charcoal.lua @@ -0,0 +1,10 @@ +ITEM.Name = "Charcoal" +ITEM.Class = "resource" +ITEM.Desc = "A hunk of carbon" +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_coal.png") + + +function ITEM:OnCooked(campfire) + campfire:Ignite(1000) +end diff --git a/gamemode/itemsystem/items/cookedmeat.lua b/gamemode/itemsystem/items/cookedmeat.lua new file mode 100644 index 0000000..b8b1999 --- /dev/null +++ b/gamemode/itemsystem/items/cookedmeat.lua @@ -0,0 +1,24 @@ + +ITEM.Name = "Cooked Meat" +ITEM.Class = "food" +ITEM.Desc = "Delicious... and prepared!" +ITEM.Model = "models/Weapons/w_bugbait.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_meat.png") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/Weapons/w_bugbait.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +function ITEM:OnUse(user) + if (CLIENT) then return end + + user:SetHealth(math.min(100,user:Health()+40)) + user:AddHunger(-90) + user:RemoveItem(self.Name,1) +end diff --git a/gamemode/itemsystem/items/crystal.lua b/gamemode/itemsystem/items/crystal.lua new file mode 100644 index 0000000..ef9c12e --- /dev/null +++ b/gamemode/itemsystem/items/crystal.lua @@ -0,0 +1,17 @@ + +ITEM.Name = "Crystal" +ITEM.Class = "resource" +ITEM.Desc = "A noteworthy stone." +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_crystal") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_combine/breenlight.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + diff --git a/gamemode/itemsystem/items/crystalaxe.lua b/gamemode/itemsystem/items/crystalaxe.lua new file mode 100644 index 0000000..c9acf71 --- /dev/null +++ b/gamemode/itemsystem/items/crystalaxe.lua @@ -0,0 +1,70 @@ + +ITEM.Name = "Crystal Axe" +ITEM.Class = "weapon" +ITEM.Desc = "A more advanced axe made from crystals." +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_axe") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_combine/breenlight.mdl", + Size = Vector(0.1,0.5,1), + Pos = Vector(3,-4,-27), + Ang = Angle(0,0,0), + }, + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(3,-1.5,-12), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Log"] = 1, + ["Crystal"] = 1, + ["Rope"] = 1, + ["Vine"] = 1, + }, + Tools = { + ["Crystal Hammer"] = 1, + }, +} + + + +ITEM.Damage = 30 +ITEM.Range = 64 +ITEM.CD = 0.4 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:IsTree()) then + if (math.random(1,35)/10 < 2) then pl:AddItem("Wood",1) end + if (math.random(1,90)/10 < 1) then pl:AddItem("Ancient Wood",1) end + + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/crystalhammer.lua b/gamemode/itemsystem/items/crystalhammer.lua new file mode 100644 index 0000000..4348d0f --- /dev/null +++ b/gamemode/itemsystem/items/crystalhammer.lua @@ -0,0 +1,24 @@ + +ITEM.Name = "Crystal Hammer" +ITEM.Class = "resource" +ITEM.Desc = "A tool used for crystal equipment" +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_crystal") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_combine/breenlight.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Crystal"] = 8, + ["Sap"] = 4, + }, + Tools = {}, +} diff --git a/gamemode/itemsystem/items/crystalpickaxe.lua b/gamemode/itemsystem/items/crystalpickaxe.lua new file mode 100644 index 0000000..8c981e1 --- /dev/null +++ b/gamemode/itemsystem/items/crystalpickaxe.lua @@ -0,0 +1,72 @@ + +ITEM.Name = "Crystal Pickaxe" +ITEM.Class = "weapon" +ITEM.Desc = "An advanced crystal pickaxe. More efficient than an ordinary pickaxe." +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("settlement/icon_pickaxe") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_combine/breenlight.mdl", + Size = Vector(0.1,1,0.4), + Pos = Vector(3,-1,-27), + Ang = Angle(0,0,0), + }, + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(3,-1.5,-12), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Log"] = 1, + ["Crystal"] = 2, + ["Rope"] = 1, + ["Vine"] = 1, + }, + Tools = { + ["Crystal Hammer"] = 1, + }, +} + + + +ITEM.Damage = 30 +ITEM.Range = 64 +ITEM.CD = 0.4 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:IsRock()) then + if (math.random(1,35)/10 < 2) then pl:AddItem("Rock",1) end + if (math.random(1,55)/10 < 2) then pl:AddItem("Crystal",1) end + if (math.random(1,90)/10 < 1) then pl:AddItem("Diamond",1) end + if (math.random(1,90)/10 < 2) then pl:AddItem("Flint",1) end + + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/crystalsickle.lua b/gamemode/itemsystem/items/crystalsickle.lua new file mode 100644 index 0000000..1753a2a --- /dev/null +++ b/gamemode/itemsystem/items/crystalsickle.lua @@ -0,0 +1,70 @@ + +ITEM.Name = "Crystal Sickle" +ITEM.Class = "weapon" +ITEM.Desc = "A sickle. Used for bushes for vines and berries" +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("settlement/icon_sickle") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_combine/breenlight.mdl", + Size = Vector(0.5,0.1,0.2), + Pos = Vector(3,-4,-22), + Ang = Angle(0,0,0), + }, + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(.5,.5,.1), + Pos = Vector(3,-1.5,-6), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Log"] = 1, + ["Crystal"] = 2, + ["Rope"] = 1, + ["Vine"] = 1, + }, + Tools = { + ["Crystal Hammer"] = 1, + }, +} + + + +ITEM.Damage = 10 +ITEM.Range = 64 +ITEM.CD = 0.4 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:IsPlant()) then + if (math.random(1,35)/10 < 2) then pl:AddItem("Vine",1) end + if (math.random(1,35)/10 < 2) then pl:AddItem("Berry",1) end + + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/cup.lua b/gamemode/itemsystem/items/cup.lua new file mode 100644 index 0000000..5c8e27d --- /dev/null +++ b/gamemode/itemsystem/items/cup.lua @@ -0,0 +1,20 @@ + +ITEM.Name = "Cup" +ITEM.Class = "resource" +ITEM.Desc = "It could hold some liquid" +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_cupempty.png") + +ITEM.Recipe = { + Resources = { + ["Log"] = 1, + ["Sap"] = 1, + }, + Tools = { + ["Knife"] = 1, + }, +} + +function ITEM:OnPrimary() + +end diff --git a/gamemode/itemsystem/items/diamond.lua b/gamemode/itemsystem/items/diamond.lua new file mode 100644 index 0000000..d491638 --- /dev/null +++ b/gamemode/itemsystem/items/diamond.lua @@ -0,0 +1,17 @@ + +ITEM.Name = "Diamond" +ITEM.Class = "resource" +ITEM.Desc = "A very powerful resource for use with more advanced equipment." +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("settlement/icon_diamond") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + diff --git a/gamemode/itemsystem/items/diamondaxe.lua b/gamemode/itemsystem/items/diamondaxe.lua new file mode 100644 index 0000000..9edc6e4 --- /dev/null +++ b/gamemode/itemsystem/items/diamondaxe.lua @@ -0,0 +1,70 @@ + +ITEM.Name = "Diamond Axe" +ITEM.Class = "weapon" +ITEM.Desc = "An axe made from diamonds and ancient wood." +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_axe") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_combine/breenlight.mdl", + Size = Vector(0.1,0.5,1), + Pos = Vector(3,-4,-27), + Ang = Angle(0,0,0), + }, + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(3,-1.5,-12), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Ancient Log"] = 1, + ["Diamond"] = 1, + ["Rope"] = 1, + ["Vine"] = 1, + }, + Tools = { + ["Diamond Hammer"] = 1, + }, +} + + + +ITEM.Damage = 30 +ITEM.Range = 64 +ITEM.CD = 0.3 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:IsTree()) then + if (math.random(1,100) < 90) then pl:AddItem("Wood",1) end + if (math.random(1,100) < 20) then pl:AddItem("Ancient Wood",1) end + + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/diamondhammer.lua b/gamemode/itemsystem/items/diamondhammer.lua new file mode 100644 index 0000000..56cab21 --- /dev/null +++ b/gamemode/itemsystem/items/diamondhammer.lua @@ -0,0 +1,28 @@ + +ITEM.Name = "Diamond Hammer" +ITEM.Class = "resource" +ITEM.Desc = "A tool used for diamond equipment" +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_crystal") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_combine/breenlight.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Diamond"] = 8, + ["Ancient Wood"] = 8, + ["Rope"] = 4, + ["Sap"] = 6, + }, + Tools = { + ["Crystal Hammer"] = 1, + }, +} diff --git a/gamemode/itemsystem/items/diamondpickaxe.lua b/gamemode/itemsystem/items/diamondpickaxe.lua new file mode 100644 index 0000000..f0599a3 --- /dev/null +++ b/gamemode/itemsystem/items/diamondpickaxe.lua @@ -0,0 +1,72 @@ + +ITEM.Name = "Diamond Pickaxe" +ITEM.Class = "weapon" +ITEM.Desc = "An advanced pickaxe. Made from ancient wood and diamonds." +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("settlement/icon_pickaxe") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_combine/breenlight.mdl", + Size = Vector(0.1,1,0.4), + Pos = Vector(3,-1,-27), + Ang = Angle(0,0,0), + }, + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(3,-1.5,-12), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Ancient Log"] = 1, + ["Diamond"] = 2, + ["Rope"] = 1, + ["Vine"] = 1, + }, + Tools = { + ["Diamond Hammer"] = 1, + }, +} + + + +ITEM.Damage = 30 +ITEM.Range = 64 +ITEM.CD = 0.3 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:IsRock()) then + if (math.random(1,35)/10 < 3) then pl:AddItem("Rock",1) end + if (math.random(1,55)/10 < 3) then pl:AddItem("Crystal",1) end + if (math.random(1,90)/10 < 2) then pl:AddItem("Diamond",1) end + if (math.random(1,90)/10 < 3) then pl:AddItem("Flint",1) end + + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/diamondsickle.lua b/gamemode/itemsystem/items/diamondsickle.lua new file mode 100644 index 0000000..0fd2688 --- /dev/null +++ b/gamemode/itemsystem/items/diamondsickle.lua @@ -0,0 +1,70 @@ + +ITEM.Name = "Diamond Sickle" +ITEM.Class = "weapon" +ITEM.Desc = "A sickle made from ancient wood and diamonds" +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("settlement/icon_sickle") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_combine/breenlight.mdl", + Size = Vector(0.5,0.1,0.2), + Pos = Vector(3,-4,-22), + Ang = Angle(0,0,0), + }, + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(.5,.5,.1), + Pos = Vector(3,-1.5,-6), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Ancient Log"] = 1, + ["Diamond"] = 2, + ["Rope"] = 1, + ["Vine"] = 1, + }, + Tools = { + ["Diamond Hammer"] = 1, + }, +} + + + +ITEM.Damage = 10 +ITEM.Range = 64 +ITEM.CD = 0.3 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:IsPlant()) then + if (math.random(1,35)/10 < 3) then pl:AddItem("Vine",1) end + if (math.random(1,35)/10 < 3) then pl:AddItem("Berry",1) end + + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/feather.lua b/gamemode/itemsystem/items/feather.lua new file mode 100644 index 0000000..d53acc8 --- /dev/null +++ b/gamemode/itemsystem/items/feather.lua @@ -0,0 +1,6 @@ + +ITEM.Name = "Feather" +ITEM.Class = "resource" +ITEM.Desc = "Material used for making arrows" +ITEM.Model = "models/Gibs/HGIBS_scapula.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_feather.png") diff --git a/gamemode/itemsystem/items/fence.lua b/gamemode/itemsystem/items/fence.lua new file mode 100644 index 0000000..e4a8217 --- /dev/null +++ b/gamemode/itemsystem/items/fence.lua @@ -0,0 +1,59 @@ + +ITEM.Name = "Fence" +ITEM.Class = "structure" +ITEM.Desc = "Some basic wood structure for setting up camps." +ITEM.Model = "models/props_debris/wood_board07a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_fence") +ITEM.Recipe = { + Resources = { + ["Plank"] = 2, + ["Sap"] = 1, + }, + Tools = { + ["Crystal"] = 1, + }, +} + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Ghost = { + { + Model = "models/props_wasteland/wood_fence02a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,0,0), + Ang = Angle(0,0,0), + }, +} + +ITEM.Range = 200 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (!pl:CanPlaceStructure(tr)) then pl:GhostStructure(self.Name) return end + + if (tr.Hit) then + local drop = ents.Create("ws_prop") + drop:SetModel("models/props_wasteland/wood_fence02a.mdl") + drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,0)) + drop:SetPos(tr.HitPos) + drop:Spawn() + drop:Activate() + + if (pl:HasItem(self.Name)) then pl:RemoveItem(self.Name,1) + else pl:UnEquipWeaponSlot(pl.Select,true) end + + pl:GhostRemove() + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/flint.lua b/gamemode/itemsystem/items/flint.lua new file mode 100644 index 0000000..63fd085 --- /dev/null +++ b/gamemode/itemsystem/items/flint.lua @@ -0,0 +1,6 @@ + +ITEM.Name = "Flint" +ITEM.Class = "resource" +ITEM.Desc = "Sharp stone" +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_flint.png") diff --git a/gamemode/itemsystem/items/floor.lua b/gamemode/itemsystem/items/floor.lua new file mode 100644 index 0000000..c02815b --- /dev/null +++ b/gamemode/itemsystem/items/floor.lua @@ -0,0 +1,60 @@ + +ITEM.Name = "Floor" +ITEM.Class = "structure" +ITEM.Desc = "Some basic wood structure for setting up camps." +ITEM.Model = "models/props_debris/wood_board07a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_fence") +ITEM.Recipe = { + Resources = { + ["Plank"] = 2, + ["Wood"] = 3, + ["Sap"] = 1, + }, + Tools = { + ["Crystal"] = 1, + }, +} + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Ghost = { + { + Model = "models/props_wasteland/wood_fence02a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,0,0), + Ang = Angle(0,0,90), + }, +} + +ITEM.Range = 200 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (!pl:CanPlaceStructure(tr)) then pl:GhostStructure(self.Name) return end + + if (tr.Hit) then + local drop = ents.Create("ws_prop") + drop:SetModel("models/props_wasteland/wood_fence02a.mdl") + drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,90)) + drop:SetPos(tr.HitPos) + drop:Spawn() + drop:Activate() + + if (pl:HasItem(self.Name)) then pl:RemoveItem(self.Name,1) + else pl:UnEquipWeaponSlot(pl.Select,true) end + + pl:GhostRemove() + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/infuser.lua b/gamemode/itemsystem/items/infuser.lua new file mode 100644 index 0000000..d2f72ad --- /dev/null +++ b/gamemode/itemsystem/items/infuser.lua @@ -0,0 +1,57 @@ +ITEM.Name = "Infuser" +ITEM.Class = "structure" +ITEM.Desc = "Cast enchantments\nPlace runes nearby to boost magical power and have different effects" +ITEM.Model = "models/props_junk/wood_crate002a.mdl" +ITEM.Icon = Material("settlement/icon_researchtable") +ITEM.Recipe = { + Resources = { + ["Log"] = 5, + ["Sap"] = 5, + }, + Tools = { + ["Crystal Hammer"] = 1, + }, +} + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/wood_crate002a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Ghost = { + { + Model = "models/props_junk/wood_crate002a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,0,0), + Ang = Angle(0,0,0), + }, +} + +ITEM.Range = 200 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (!pl:CanPlaceStructure(tr)) then pl:GhostStructure(self.Name) return end + + if (tr.Hit) then + local drop = ents.Create("ws_infuser") + drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,0)) + drop:SetPos(tr.HitPos) + drop:Spawn() + drop:Activate() + + if (pl:HasItem(self.Name)) then pl:RemoveItem(self.Name,1) + else pl:UnEquipWeaponSlot(pl.Select,true) end + + pl:GhostRemove() + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/juice.lua b/gamemode/itemsystem/items/juice.lua new file mode 100644 index 0000000..ff24b84 --- /dev/null +++ b/gamemode/itemsystem/items/juice.lua @@ -0,0 +1,21 @@ + +ITEM.Name = "Juice" +ITEM.Class = "food" +ITEM.Desc = "Restores some thirst." +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_beer") + +ITEM.Recipe = { + Resources = { + ["Berry"] = 3, + ["Cup"] = 1, + }, + Tools = {}, +} + +function ITEM:OnUse(user) + if (CLIENT) then return end + + user:SetWater(0) + user:RemoveItem(self.Name,1) +end diff --git a/gamemode/itemsystem/items/knife.lua b/gamemode/itemsystem/items/knife.lua new file mode 100644 index 0000000..63959ce --- /dev/null +++ b/gamemode/itemsystem/items/knife.lua @@ -0,0 +1,60 @@ + +ITEM.Name = "Knife" +ITEM.Class = "weapon" +ITEM.Desc = "A knife, what do u expect?" +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("settlement/icon_knife") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_combine/breenlight.mdl", + Size = Vector(.1,.5,.5), + Pos = Vector(3,-1.6,0.5), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Rock"] = 1, + ["Sap"] = 1, + ["Wood"] = 1, + ["Crystal"] = 1, + }, + Tools = {}, +} + + + +ITEM.Damage = 1 +ITEM.Range = 64 +ITEM.CD = 0.1 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:IsTree()) then + if (math.random(1,35)/10 < 1) then pl:AddItem("Sap",1) end + + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/log.lua b/gamemode/itemsystem/items/log.lua new file mode 100644 index 0000000..07b8352 --- /dev/null +++ b/gamemode/itemsystem/items/log.lua @@ -0,0 +1,15 @@ + +ITEM.Name = "Log" +ITEM.Class = "resource" +ITEM.Desc = "Bigger wood." +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_log.png") + +ITEM.Recipe = { + Resources = { + ["Vine"] = 1, + ["Sap"] = 1, + ["Wood"] = 3, + }, + Tools = {}, +} diff --git a/gamemode/itemsystem/items/magicwood.lua b/gamemode/itemsystem/items/magicwood.lua new file mode 100644 index 0000000..00c1605 --- /dev/null +++ b/gamemode/itemsystem/items/magicwood.lua @@ -0,0 +1,58 @@ + +ITEM.Name = "Magic Wood" +ITEM.Class = "weapon" +ITEM.Desc = "Some magically infused wood" +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_magicwood.png") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(.5,.5,.5), + Pos = Vector(3,-1.5,-12), + Ang = Angle(0,0,0), + }, +} + +ITEM.Damage = 2 +ITEM.Range = 60 +ITEM.CD = 1.0 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:GetModel():find("tree")) then + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end + +function ITEM:OnSecondary(pl,tr) + if (CLIENT) then return end + if (!pl:HasItem(self.Name)) then return end + + local drop = SpawnWSItem(self.Name,pl:GetShootPos()+pl:GetAimVector()*20) + drop:GetPhysicsObject():ApplyForceCenter(pl:GetAimVector() * 200) + + pl:RemoveItem(self.Name,1) + + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(40,60)) +end diff --git a/gamemode/itemsystem/items/maul.lua b/gamemode/itemsystem/items/maul.lua new file mode 100644 index 0000000..2189eef --- /dev/null +++ b/gamemode/itemsystem/items/maul.lua @@ -0,0 +1,58 @@ +ITEM.Name = [[Maul]] +ITEM.Desc = [[The ultimate nutcracker!]] +ITEM.Model = [[models/props_debris/wood_board02a.mdl]] +ITEM.Icon = Material([[wintersurvival2/hud/ws2_icons/icon_sword.png]]) +ITEM.HoldType = [[melee2]] +ITEM.Structure = { + { + Bone ="ValveBiped.Bip01_R_Hand", + Model ="models/props_debris/wood_board02a.mdl", + Size =Vector(0.5,0.5,0.5), + Pos =Vector(3.8900001049042,-2.1099998950958,-11.640000343323), + Ang =Angle(0,74.120002746582,0), + }, + { + Bone ="ValveBiped.Bip01_R_Hand", + Model ="models/props_debris/wood_board02a.mdl", + Size =Vector(2.2999999523163,1.7999999523163,0.15000000596046), + Pos =Vector(3.8900001049042,-2.1099998950958,-22.579999923706), + Ang =Angle(0,78.360000610352,91.059997558594), + }, +} + +ITEM.Recipe = { + Resources = { + ["Plank"] = 4, + ["Log"] = 1, + ["Sap"] = 1, + }, + Tools = {}, +} + +ITEM.Damage = 70 +ITEM.Range = 80 +ITEM.CD = 1 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(50,60)) + end +end \ No newline at end of file diff --git a/gamemode/itemsystem/items/meat.lua b/gamemode/itemsystem/items/meat.lua new file mode 100644 index 0000000..d26d3c1 --- /dev/null +++ b/gamemode/itemsystem/items/meat.lua @@ -0,0 +1,28 @@ + +ITEM.Name = "Meat" +ITEM.Class = "food" +ITEM.Desc = "Delicious..." +ITEM.Model = "models/Weapons/w_bugbait.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_bugbait") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/Weapons/w_bugbait.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +function ITEM:OnUse(user) + if (CLIENT) then return end + + user:SetHealth(math.min(100,user:Health()+10)) + user:AddHunger(-30) + user:RemoveItem(self.Name,1) +end + +function ITEM:OnCooked(campfire) + campfire:AddItem("Cooked Meat",1) +end \ No newline at end of file diff --git a/gamemode/itemsystem/items/mortarandpestle.lua b/gamemode/itemsystem/items/mortarandpestle.lua new file mode 100644 index 0000000..42b1baa --- /dev/null +++ b/gamemode/itemsystem/items/mortarandpestle.lua @@ -0,0 +1,20 @@ + +ITEM.Name = "Mortar and Pestle" +ITEM.Class = "tool" +ITEM.Desc = "Something to grind things down in" +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_mortarandpestle.png") + +ITEM.Recipe = { + Resources = { + ["Cup"] = 1, + ["Rock"] = 1, + }, + Tools = { + ["Knife"] = 1, + }, +} + +function ITEM:OnPrimary() + +end diff --git a/gamemode/itemsystem/items/pickaxe.lua b/gamemode/itemsystem/items/pickaxe.lua new file mode 100644 index 0000000..2032d12 --- /dev/null +++ b/gamemode/itemsystem/items/pickaxe.lua @@ -0,0 +1,68 @@ + +ITEM.Name = "Pickaxe" +ITEM.Class = "weapon" +ITEM.Desc = "A primitive axe held together with sap." +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("settlement/icon_pickaxe") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.1,1,0.4), + Pos = Vector(3,-1,-27), + Ang = Angle(0,0,0), + }, + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(3,-1.5,-12), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Wood"] = 1, + ["Rock"] = 2, + ["Sap"] = 1, + }, + Tools = {}, +} + + + +ITEM.Damage = 30 +ITEM.Range = 64 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:IsRock()) then + if (math.random(1,35)/10 < 1) then pl:AddItem("Rock",1) end + if (math.random(1,55)/10 < 1) then pl:AddItem("Crystal",1) end + if (math.random(1,90)/10 < 1) then pl:AddItem("Flint",1) end + + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/pitch.lua b/gamemode/itemsystem/items/pitch.lua new file mode 100644 index 0000000..40c2a57 --- /dev/null +++ b/gamemode/itemsystem/items/pitch.lua @@ -0,0 +1,25 @@ + +ITEM.Name = "Pitch" +ITEM.Class = "resource" +ITEM.Desc = "A sticky stubstance, probably flamable" +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_pitch.png") + +ITEM.Recipe = { + Resources = { + ["Charcoal"] = 1, + ["Sap"] = 1, + }, + Tools = { + ["Mortar and Pestle"] = 1, + }, +} + +function ITEM:OnPrimary() + +end + + +function ITEM:OnCooked(campfire) + campfire:Ignite(500) +end diff --git a/gamemode/itemsystem/items/plank.lua b/gamemode/itemsystem/items/plank.lua new file mode 100644 index 0000000..5726434 --- /dev/null +++ b/gamemode/itemsystem/items/plank.lua @@ -0,0 +1,25 @@ + +ITEM.Name = "Plank" +ITEM.Class = "resource" +ITEM.Desc = "Advanced wood material." +ITEM.Model = "models/props_debris/wood_board06a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_plank") +ITEM.Recipe = { + Resources = { + ["Wood"] = 2, + ["Sap"] = 1, + }, + Tools = { + ["Crystal"] = 1, + }, +} + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} \ No newline at end of file diff --git a/gamemode/itemsystem/items/ramp.lua b/gamemode/itemsystem/items/ramp.lua new file mode 100644 index 0000000..96e6c27 --- /dev/null +++ b/gamemode/itemsystem/items/ramp.lua @@ -0,0 +1,60 @@ + +ITEM.Name = "Ramp" +ITEM.Class = "structure" +ITEM.Desc = "Some basic wood structure for setting up camps." +ITEM.Model = "models/props_debris/wood_board07a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_fence") +ITEM.Recipe = { + Resources = { + ["Plank"] = 2, + ["Log"] = 1, + ["Sap"] = 1, + }, + Tools = { + ["Crystal"] = 1, + }, +} + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Ghost = { + { + Model = "models/props_wasteland/wood_fence02a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,0,0), + Ang = Angle(0,0,45), + }, +} + +ITEM.Range = 200 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (!pl:CanPlaceStructure(tr)) then pl:GhostStructure(self.Name) return end + + if (tr.Hit) then + local drop = ents.Create("ws_prop") + drop:SetModel("models/props_wasteland/wood_fence02a.mdl") + drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,45)) + drop:SetPos(tr.HitPos) + drop:Spawn() + drop:Activate() + + if (pl:HasItem(self.Name)) then pl:RemoveItem(self.Name,1) + else pl:UnEquipWeaponSlot(pl.Select,true) end + + pl:GhostRemove() + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/recipe_battleaxe.lua b/gamemode/itemsystem/items/recipe_battleaxe.lua new file mode 100644 index 0000000..2ae7c9b --- /dev/null +++ b/gamemode/itemsystem/items/recipe_battleaxe.lua @@ -0,0 +1,27 @@ + +ITEM.Name = "Recipe: Battle Axe" +ITEM.Class = "account" +ITEM.Desc = "A recipe. Use it to print it on chat!" +ITEM.Model = "models/Weapons/w_bugbait.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png") + +function ITEM:OnUse(user) + if (CLIENT) then return end + + local rec,item = GetRecipeForItem("Battle Axe") + local txt = "Recipe: " + + txt = txt.." RESOURCES(" + for a,b in pairs(rec.Resources) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + txt = txt.." TOOLS(" + for a,b in pairs(rec.Tools) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + user:ChatPrint(txt) +end \ No newline at end of file diff --git a/gamemode/itemsystem/items/recipe_crystalhammer.lua b/gamemode/itemsystem/items/recipe_crystalhammer.lua new file mode 100644 index 0000000..097aa1a --- /dev/null +++ b/gamemode/itemsystem/items/recipe_crystalhammer.lua @@ -0,0 +1,27 @@ + +ITEM.Name = "Recipe: Crystal Hammer" +ITEM.Class = "account" +ITEM.Desc = "A recipe. Use it to print it on chat!" +ITEM.Model = "models/Weapons/w_bugbait.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png") + +function ITEM:OnUse(user) + if (CLIENT) then return end + + local rec,item = GetRecipeForItem("Crystal Hammer") + local txt = "Recipe: " + + txt = txt.." RESOURCES(" + for a,b in pairs(rec.Resources) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + txt = txt.." TOOLS(" + for a,b in pairs(rec.Tools) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + user:ChatPrint(txt) +end \ No newline at end of file diff --git a/gamemode/itemsystem/items/recipe_diamondhammer.lua b/gamemode/itemsystem/items/recipe_diamondhammer.lua new file mode 100644 index 0000000..aab1a74 --- /dev/null +++ b/gamemode/itemsystem/items/recipe_diamondhammer.lua @@ -0,0 +1,27 @@ + +ITEM.Name = "Recipe: Diamond Hammer" +ITEM.Class = "account" +ITEM.Desc = "A recipe. Use it to print it on chat!" +ITEM.Model = "models/Weapons/w_bugbait.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png") + +function ITEM:OnUse(user) + if (CLIENT) then return end + + local rec,item = GetRecipeForItem("Diamond Hammer") + local txt = "Recipe: " + + txt = txt.." RESOURCES(" + for a,b in pairs(rec.Resources) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + txt = txt.." TOOLS(" + for a,b in pairs(rec.Tools) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + user:ChatPrint(txt) +end \ No newline at end of file diff --git a/gamemode/itemsystem/items/recipe_maul.lua b/gamemode/itemsystem/items/recipe_maul.lua new file mode 100644 index 0000000..04c78f1 --- /dev/null +++ b/gamemode/itemsystem/items/recipe_maul.lua @@ -0,0 +1,27 @@ + +ITEM.Name = "Recipe: Maul" +ITEM.Class = "account" +ITEM.Desc = "A recipe. Use it to print it on chat!" +ITEM.Model = "models/Weapons/w_bugbait.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png") + +function ITEM:OnUse(user) + if (CLIENT) then return end + + local rec,item = GetRecipeForItem("Maul") + local txt = "Recipe: " + + txt = txt.." RESOURCES(" + for a,b in pairs(rec.Resources) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + txt = txt.." TOOLS(" + for a,b in pairs(rec.Tools) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + user:ChatPrint(txt) +end \ No newline at end of file diff --git a/gamemode/itemsystem/items/recipe_shack.lua b/gamemode/itemsystem/items/recipe_shack.lua new file mode 100644 index 0000000..060fccb --- /dev/null +++ b/gamemode/itemsystem/items/recipe_shack.lua @@ -0,0 +1,27 @@ + +ITEM.Name = "Recipe: Shack" +ITEM.Class = "account" +ITEM.Desc = "A recipe for the shack. Use it to print it on chat!" +ITEM.Model = "models/Weapons/w_bugbait.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png") + +function ITEM:OnUse(user) + if (CLIENT) then return end + + local rec,item = GetRecipeForItem("Shack") + local txt = "Recipe: " + + txt = txt.." RESOURCES(" + for a,b in pairs(rec.Resources) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + txt = txt.." TOOLS(" + for a,b in pairs(rec.Tools) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + user:ChatPrint(txt) +end \ No newline at end of file diff --git a/gamemode/itemsystem/items/recipe_stoneblock.lua b/gamemode/itemsystem/items/recipe_stoneblock.lua new file mode 100644 index 0000000..ba1447d --- /dev/null +++ b/gamemode/itemsystem/items/recipe_stoneblock.lua @@ -0,0 +1,27 @@ + +ITEM.Name = "Recipe: Stoneblock" +ITEM.Class = "account" +ITEM.Desc = "A recipe. Use it to print it on chat!" +ITEM.Model = "models/Weapons/w_bugbait.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png") + +function ITEM:OnUse(user) + if (CLIENT) then return end + + local rec,item = GetRecipeForItem("Stoneblock") + local txt = "Recipe: " + + txt = txt.." RESOURCES(" + for a,b in pairs(rec.Resources) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + txt = txt.." TOOLS(" + for a,b in pairs(rec.Tools) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + user:ChatPrint(txt) +end \ No newline at end of file diff --git a/gamemode/itemsystem/items/recipe_tent.lua b/gamemode/itemsystem/items/recipe_tent.lua new file mode 100644 index 0000000..fd810af --- /dev/null +++ b/gamemode/itemsystem/items/recipe_tent.lua @@ -0,0 +1,27 @@ + +ITEM.Name = "Recipe: Tent" +ITEM.Class = "account" +ITEM.Desc = "A recipe for the tent. Use it to print it on chat!" +ITEM.Model = "models/Weapons/w_bugbait.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png") + +function ITEM:OnUse(user) + if (CLIENT) then return end + + local rec,item = GetRecipeForItem("Tent") + local txt = "Recipe: " + + txt = txt.." RESOURCES(" + for a,b in pairs(rec.Resources) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + txt = txt.." TOOLS(" + for a,b in pairs(rec.Tools) do + txt=txt..b.." x "..a..", " + end + txt = txt..")" + + user:ChatPrint(txt) +end \ No newline at end of file diff --git a/gamemode/itemsystem/items/researchtable.lua b/gamemode/itemsystem/items/researchtable.lua new file mode 100644 index 0000000..4b05cf2 --- /dev/null +++ b/gamemode/itemsystem/items/researchtable.lua @@ -0,0 +1,55 @@ +ITEM.Name = "Research Table" +ITEM.Class = "structure" +ITEM.Desc = "A table to find recepies\nPlace 10 wood, sap, and rock in the table to discover a new recipe." +ITEM.Model = "models/props_junk/wood_crate001a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png") +ITEM.Recipe = { + Resources = { + ["Wood"] = 10, + ["Sap"] = 5, + }, + Tools = {}, +} + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/wood_crate001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Ghost = { + { + Model = "models/props/cs_italy/it_mkt_table3.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,0,0), + Ang = Angle(0,0,0), + }, +} + +ITEM.Range = 200 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (!pl:CanPlaceStructure(tr)) then pl:GhostStructure(self.Name) return end + + if (tr.Hit) then + local drop = ents.Create("ws_researchtable") + drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,0)) + drop:SetPos(tr.HitPos) + drop:Spawn() + drop:Activate() + + if (pl:HasItem(self.Name)) then pl:RemoveItem(self.Name,1) + else pl:UnEquipWeaponSlot(pl.Select,true) end + + pl:GhostRemove() + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/rock.lua b/gamemode/itemsystem/items/rock.lua new file mode 100644 index 0000000..5ee7e09 --- /dev/null +++ b/gamemode/itemsystem/items/rock.lua @@ -0,0 +1,60 @@ + +ITEM.Name = "Rock" +ITEM.Class = "weapon" +ITEM.Desc = "A rock.\nIt is somewhat jagged." +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_rock") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Damage = 6 +ITEM.Range = 60 +ITEM.CD = .4 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:IsTree()) then + if (math.random(1,35)/10 < 1) then pl:AddItem("Sap",1) end + + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end + +function ITEM:OnSecondary(pl,tr) + if (CLIENT) then return end + if (!pl:HasItem(self.Name)) then return end + + local drop = SpawnWSItem(self.Name,pl:GetShootPos()+pl:GetAimVector()*20) + drop:GetPhysicsObject():ApplyForceCenter(pl:GetAimVector() * 200) + + pl:RemoveItem(self.Name,1) + + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(40,60)) +end diff --git a/gamemode/itemsystem/items/rope.lua b/gamemode/itemsystem/items/rope.lua new file mode 100644 index 0000000..a9d0c53 --- /dev/null +++ b/gamemode/itemsystem/items/rope.lua @@ -0,0 +1,14 @@ + +ITEM.Name = "Rope" +ITEM.Class = "resource" +ITEM.Desc = "Handy rope for more advanced structures and tools." +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("settlement/icon_rope") + +ITEM.Recipe = { + Resources = { + ["Vine"] = 3, + ["Sap"] = 1, + }, + Tools = {}, +} diff --git a/gamemode/itemsystem/items/runeblank.lua b/gamemode/itemsystem/items/runeblank.lua new file mode 100644 index 0000000..2935b4e --- /dev/null +++ b/gamemode/itemsystem/items/runeblank.lua @@ -0,0 +1,34 @@ + +ITEM.Name = "Blank Rune" +ITEM.Class = "resource" +ITEM.Desc = "A blank peice of stone" +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_rune.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 = { + ["Rock"] = 3, + ["Sap"] = 1, + }, + Tools = {}, +} + + + +ITEM.Damage = 1 +ITEM.Range = 64 +ITEM.CD = 1 + +function ITEM:OnEnchanted(enchanttable, nearbyrunes) + enchanttable:AddItem("Magic Rune", 1) +end diff --git a/gamemode/itemsystem/items/runeenergy.lua b/gamemode/itemsystem/items/runeenergy.lua new file mode 100644 index 0000000..226344e --- /dev/null +++ b/gamemode/itemsystem/items/runeenergy.lua @@ -0,0 +1,45 @@ + +ITEM.Name = "Energy Rune" +ITEM.Class = "resource" +ITEM.Desc = "A rune infused with energy!\nYou could probably run really far with one of these" +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_runeelectric.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 = { + ["Blank Rune"] = 1, + ["Juice"] = 1, + }, + Tools = {}, +} + + + +ITEM.Damage = 1 +ITEM.Range = 64 +ITEM.CD = 1 + +function ITEM:OnPrimary(user) + user:UnEquipWeaponSlot(user:GetSelectedWeapon()) + self:OnUse(user) +end + +function ITEM:OnUse(user) + if(CLIENT) then return end + user:SetFatigue(math.max(0,user:GetFatigue()-20)) + user:RemoveItem(self.Name,1) +end + +function ITEM:OnCraft(ply) + ply:AddFatigue(25) +end diff --git a/gamemode/itemsystem/items/runefire.lua b/gamemode/itemsystem/items/runefire.lua new file mode 100644 index 0000000..419712e --- /dev/null +++ b/gamemode/itemsystem/items/runefire.lua @@ -0,0 +1,48 @@ + +ITEM.Name = "Fire Rune" +ITEM.Class = "resource" +ITEM.Desc = "A perpetually warm stone" +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_runefire.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 = { + ["Blank Rune"] = 1, + ["Pitch"] = 1, + }, + Tools = {}, +} + + + +ITEM.Damage = 1 +ITEM.Range = 500 +ITEM.CD = 1 + +function ITEM:OnUse(user) + if(CLIENT) then return end + user:Ignite(1) + user:SetHeat(0) + user:RemoveItem(self.Name,1) +end + +function ITEM:OnPrimary(ply,tr) + if(CLIENT) then + game.AddParticles("particles/particletest.pcf") + else + if(tr.Hit && tr.Entity && tr.Entity:IsPlayer()) then + tr.Entity:Ignite(5) + end + end + +end diff --git a/gamemode/itemsystem/items/runemagic.lua b/gamemode/itemsystem/items/runemagic.lua new file mode 100644 index 0000000..e999299 --- /dev/null +++ b/gamemode/itemsystem/items/runemagic.lua @@ -0,0 +1,21 @@ + +ITEM.Name = "Magic Rune" +ITEM.Class = "resource" +ITEM.Desc = "A stone infused with magic" +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_runemagic.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.Damage = 1 +ITEM.Range = 64 +ITEM.CD = 1 diff --git a/gamemode/itemsystem/items/runenature.lua b/gamemode/itemsystem/items/runenature.lua new file mode 100644 index 0000000..286a957 --- /dev/null +++ b/gamemode/itemsystem/items/runenature.lua @@ -0,0 +1,39 @@ + +ITEM.Name = "Nature Rune" +ITEM.Class = "resource" +ITEM.Desc = "A blank peice of stone" +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_runenature.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 = { + ["Blank Rune"] = 1, + ["Sap"] = 1, + ["Berry"] = 1, + ["Vine"] = 1 + }, + Tools = {}, +} + + + +ITEM.Damage = 1 +ITEM.Range = 64 +ITEM.CD = 1 + +function ITEM:OnUse(user) + if(CLIENT) then return end + if not user then return end + user:SetHealth(math.min(100,user:Health()+25)) + user:AddFatigue(10) +end diff --git a/gamemode/itemsystem/items/sap.lua b/gamemode/itemsystem/items/sap.lua new file mode 100644 index 0000000..18ff486 --- /dev/null +++ b/gamemode/itemsystem/items/sap.lua @@ -0,0 +1,6 @@ + +ITEM.Name = "Sap" +ITEM.Class = "resource" +ITEM.Desc = "Tree sap. Very sticky, could be used as an adhesive." +ITEM.Model = "models/props_junk/Rock001a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_sap") diff --git a/gamemode/itemsystem/items/shack.lua b/gamemode/itemsystem/items/shack.lua new file mode 100644 index 0000000..f66fe38 --- /dev/null +++ b/gamemode/itemsystem/items/shack.lua @@ -0,0 +1,111 @@ + +ITEM.Name = "Shack" +ITEM.Class = "structure" +ITEM.Desc = "An actual building... how convenient." +ITEM.Model = "models/props_debris/wood_board07a.mdl" +ITEM.Icon = Material("settlement/icon_shack") +ITEM.Recipe = { + Resources = { + ["Tent"] = 1, + ["Log"] = 1, + ["Rope"] = 1, + ["Stoneblock"] = 1, + }, + Tools = { + ["Crystal Hammer"] = 1, + }, +} + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Ghost = { + { + Model = "models/props_wasteland/wood_fence01a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,30,130), + Ang = Angle(0,0,45), + }, + { + Model = "models/props_wasteland/wood_fence01a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,-30,130), + Ang = Angle(0,180,45), + }, + { + Model = "models/props_wasteland/wood_fence01a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,-55,40), + Ang = Angle(0,0,0), + }, + { + Model = "models/props_wasteland/wood_fence01a.mdl", + Size = Vector(1,1,1), + Pos = Vector(-55,0,40), + Ang = Angle(0,90,0), + }, + { + Model = "models/props_wasteland/wood_fence01a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,55,40), + Ang = Angle(0,180,0), + }, + { + Model = "models/props_wasteland/wood_fence02a.mdl", + Size = Vector(1,1,1), + Pos = Vector(55,27,40), + Ang = Angle(0,270,0), + }, + { + Model = "models/props_wasteland/wood_fence01a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,0,100), + Ang = Angle(0,0,90), + }, +} + +ITEM.Range = 300 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (!pl:CanPlaceStructure(tr)) then pl:GhostStructure(self.Name) return end + + if (tr.Hit) then + local Ang = Angle(0,pl:GetAimVector():Angle().y+90,0) + local Pos = tr.HitPos + + for k,v in pairs(self.Ghost) do + local Off = v.Pos*1 + Off:Rotate(Ang) + + local Roa = Ang*1 + + Roa:RotateAroundAxis(Ang:Right(),v.Ang.p) + Roa:RotateAroundAxis(Ang:Forward(),v.Ang.r) + Roa:RotateAroundAxis(Ang:Up(),v.Ang.y) + + local drop = ents.Create("ws_prop") + drop:SetModel(v.Model) + drop:SetAngles(Roa) + drop:SetPos(Pos+Off) + drop:Spawn() + drop:Activate() + end + + if (pl:HasItem(self.Name)) then pl:RemoveItem(self.Name,1) + else pl:UnEquipWeaponSlot(pl.Select,true) end + + pl:GhostRemove() + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/sickle.lua b/gamemode/itemsystem/items/sickle.lua new file mode 100644 index 0000000..4703655 --- /dev/null +++ b/gamemode/itemsystem/items/sickle.lua @@ -0,0 +1,67 @@ + +ITEM.Name = "Sickle" +ITEM.Class = "weapon" +ITEM.Desc = "A sickle. Used for bushes for vines and berries" +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("settlement/icon_sickle") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.1,0.2), + Pos = Vector(3,-4,-22), + Ang = Angle(0,0,0), + }, + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(.5,.5,.1), + Pos = Vector(3,-1.5,-6), + Ang = Angle(0,0,0), + }, +} + +ITEM.Recipe = { + Resources = { + ["Wood"] = 1, + ["Rock"] = 2, + ["Sap"] = 1, + }, + Tools = {}, +} + + + +ITEM.Damage = 10 +ITEM.Range = 64 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:IsPlant()) then + if (math.random(1,35)/10 < 1) then pl:AddItem("Vine",1) end + if (math.random(1,35)/10 < 1) then pl:AddItem("Berry",1) end + + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/stoneblock.lua b/gamemode/itemsystem/items/stoneblock.lua new file mode 100644 index 0000000..36f1c35 --- /dev/null +++ b/gamemode/itemsystem/items/stoneblock.lua @@ -0,0 +1,14 @@ + +ITEM.Name = "Stoneblock" +ITEM.Class = "resource" +ITEM.Desc = "A useful building material." +ITEM.Model = "models/props_junk/CinderBlock01a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_stoneblock.png") + +ITEM.Recipe = { + Resources = { + ["Rock"] = 4, + ["Sap"] = 2, + }, + Tools = {}, +} diff --git a/gamemode/itemsystem/items/sword.lua b/gamemode/itemsystem/items/sword.lua new file mode 100644 index 0000000..47388d2 --- /dev/null +++ b/gamemode/itemsystem/items/sword.lua @@ -0,0 +1,58 @@ + +ITEM.Name = "Sword" +ITEM.Class = "weapon" +ITEM.Desc = "A sword for combat." +ITEM.Model = "models/weapons/w_archersword/w_archersword.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_sword.png") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/weapons/w_archersword/w_archersword.mdl", + Size = Vector(1,1,1), + Pos = Vector(3,-1,0), + Ang = Angle(0,0,-90), + }, +} + +ITEM.Recipe = { + Resources = { + ["Wood"] = 1, + ["Crystal"] = 1, + ["Sap"] = 1, + }, + Tools = {}, +} + + + +ITEM.Damage = 60 +ITEM.Range = 64 +ITEM.CD = 0.4 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + print("Class:") + print(class) + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/tent.lua b/gamemode/itemsystem/items/tent.lua new file mode 100644 index 0000000..1d5a1b5 --- /dev/null +++ b/gamemode/itemsystem/items/tent.lua @@ -0,0 +1,79 @@ + +ITEM.Name = "Tent" +ITEM.Class = "structure" +ITEM.Desc = "Something to duck under." +ITEM.Model = "models/props_debris/wood_board07a.mdl" +ITEM.Icon = Material("settlement/icon_tent") +ITEM.Recipe = { + Resources = { + ["Fence"] = 4, + ["Rope"] = 2, + }, + Tools = { + ["Crystal"] = 1, + }, +} + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(0.5,0.5,0.5), + Pos = Vector(4,-3,-1), + Ang = Angle(0,0,0), + }, +} + +ITEM.Ghost = { + { + Model = "models/props_wasteland/wood_fence01a.mdl", + Size = Vector(1,1,1), + Pos = Vector(30,0,40), + Ang = Angle(0,-90,45), + }, + { + Model = "models/props_wasteland/wood_fence01a.mdl", + Size = Vector(1,1,1), + Pos = Vector(-30,0,40), + Ang = Angle(0,90,45), + }, +} + +ITEM.Range = 300 +ITEM.CD = 0.5 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (!pl:CanPlaceStructure(tr)) then pl:GhostStructure(self.Name) return end + + if (tr.Hit) then + local Ang = Angle(0,pl:GetAimVector():Angle().y+90,0) + local Pos = tr.HitPos + + for k,v in pairs(self.Ghost) do + local Off = v.Pos*1 + Off:Rotate(Ang) + + local Roa = Ang*1 + + Roa:RotateAroundAxis(Ang:Right(),v.Ang.p) + Roa:RotateAroundAxis(Ang:Forward(),v.Ang.r) + Roa:RotateAroundAxis(Ang:Up(),v.Ang.y) + + local drop = ents.Create("ws_prop") + drop:SetModel(v.Model) + drop:SetAngles(Roa) + drop:SetPos(Pos+Off) + drop:Spawn() + drop:Activate() + end + + if (pl:HasItem(self.Name)) then pl:RemoveItem(self.Name,1) + else pl:UnEquipWeaponSlot(pl.Select,true) end + + pl:GhostRemove() + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end diff --git a/gamemode/itemsystem/items/vine.lua b/gamemode/itemsystem/items/vine.lua new file mode 100644 index 0000000..beeb5d4 --- /dev/null +++ b/gamemode/itemsystem/items/vine.lua @@ -0,0 +1,6 @@ + +ITEM.Name = "Vine" +ITEM.Class = "resource" +ITEM.Desc = "A sturdy vine." +ITEM.Model = "models/Gibs/Antlion_gib_Large_2.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_vine") diff --git a/gamemode/itemsystem/items/wood.lua b/gamemode/itemsystem/items/wood.lua new file mode 100644 index 0000000..9d2d976 --- /dev/null +++ b/gamemode/itemsystem/items/wood.lua @@ -0,0 +1,66 @@ + +ITEM.Name = "Wood" +ITEM.Class = "weapon" +ITEM.Desc = "Lumber. Maybe timber." +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_wood") + +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_debris/wood_board02a.mdl", + Size = Vector(.5,.5,.5), + Pos = Vector(3,-1.5,-12), + Ang = Angle(0,0,0), + }, +} + +ITEM.Damage = 5 +ITEM.Range = 60 +ITEM.CD = 0.6 + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + + if (tr.Hit) then + if (IsValid(tr.Entity)) then + local ent = tr.Entity + local class = ent:GetClass() + + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then + ent:TakeDamage(self.Damage,pl) + + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) + else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end + elseif (ent:GetModel():find("tree")) then + pl:EmitSound(Sound("physics/concrete/rock_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("physics/surfaces/sand_impact_bullet"..math.random(1,4)..".wav"),100,math.random(90,110)) + end + else + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(90,110)) + end +end + +function ITEM:OnCooked(campfire) + campfire:AddItem("Charcoal",1) +end + +function ITEM:OnSecondary(pl,tr) + if (CLIENT) then return end + if (!pl:HasItem(self.Name)) then return end + + local drop = SpawnWSItem(self.Name,pl:GetShootPos()+pl:GetAimVector()*20) + drop:GetPhysicsObject():ApplyForceCenter(pl:GetAimVector() * 200) + + pl:RemoveItem(self.Name,1) + + pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(40,60)) +end + +function ITEM:OnEnchanted(enchanttable, runes) + enchanttable:AddItem("Magic Wood", 1) +end diff --git a/gamemode/itemsystem/loaditems.lua b/gamemode/itemsystem/loaditems.lua new file mode 100644 index 0000000..a593e0d --- /dev/null +++ b/gamemode/itemsystem/loaditems.lua @@ -0,0 +1,83 @@ +local Folder = GM.Folder:gsub("gamemodes/","").."/gamemode/itemsystem/items" +local insert = table.insert + +function GM:LoadItems() + local Items = file.Find(Folder.."/*.lua","LUA") + local BaseItem = {} + + GAMEMODE.Items = {} + GAMEMODE.Recipes = {} + + ITEM = {} + + AddCSLuaFile(Folder.."/base.lua") + include(Folder.."/base.lua") + + BaseItem = table.Copy(ITEM) + + for k,v in pairs(Items) do + if (v != "base.lua") then + AddCSLuaFile(Folder.."/"..v) + include(Folder.."/"..v) + + insert(GAMEMODE.Items,ITEM) + if (ITEM.Recipe) then insert(GAMEMODE.Recipes,ITEM) end + + ITEM = table.Copy(BaseItem) + + end + end +end + +hook.Add("Initialize","LoadItems",function() + local Items = file.Find(Folder.."/*.lua","LUA") + local BaseItem = {} + + GAMEMODE.Items = {} + GAMEMODE.Recipes = {} + + ITEM = {} + + AddCSLuaFile(Folder.."/base.lua") + include(Folder.."/base.lua") + + BaseItem = table.Copy(ITEM) + + for k,v in pairs(Items) do + if (v != "base.lua") then + AddCSLuaFile(Folder.."/"..v) + include(Folder.."/"..v) + + insert(GAMEMODE.Items,ITEM) + if (ITEM.Recipe) then insert(GAMEMODE.Recipes,ITEM) end + + ITEM = table.Copy(BaseItem) + + end + end +end) + +function GetItemByName(name) + for k,v in pairs( GAMEMODE.Items ) do + if (v.Name == name) then return v end + end + + return nil +end + +function GetRecipeForItem(name) + for k,v in pairs( GAMEMODE.Recipes ) do + if (v.Name == name) then return v.Recipe,v end + end + + return nil +end + +function GetItemsByClass(class) + local Dat = {} + for k,v in pairs( GAMEMODE.Items ) do + if (v.Class == class) then table.insert(Dat,v) end + end + + return Dat +end diff --git a/gamemode/npcsystem/aidirector.lua b/gamemode/npcsystem/aidirector.lua new file mode 100644 index 0000000..bcaa63b --- /dev/null +++ b/gamemode/npcsystem/aidirector.lua @@ -0,0 +1,36 @@ +--Lol i dunno, spawn some npc's or something + +concommand.Add("ws_spawnbird",function(ply, cmd, args) + SpawnNpcByName("Bird",ply:GetPos()) + end +) + +function SpawnNpcByName(name, position) + entdata = GetNpcByName(name) + ent = ents.Create("ws_npc_ambient") + ent:SetPos(position) + + + if(entdata.Speed) then + ent.Speed = entdata.Speed + end + if(entdata.Model) then + ent.Model = entdata.Model + end + if(entdata.vitality) then + ent:SetHealth(entdata.vitality) + end + if(entdata.Drops) then + ent.Drops = entdata.Drops + end + if(entdata.OnDammage) then + ent.OnDammage = entdata.OnDammage + end + if(entdata.Behave) then + ent.Behave = entdata.Behave + end + if(entdata.Act) then + ent.Act = entdata.Act + end + ent:Spawn() +end diff --git a/gamemode/npcsystem/loadnpcs.lua b/gamemode/npcsystem/loadnpcs.lua new file mode 100644 index 0000000..2db2aae --- /dev/null +++ b/gamemode/npcsystem/loadnpcs.lua @@ -0,0 +1,60 @@ +local Folder = GM.Folder:gsub("gamemodes/","").."/gamemode/npcsystem/npcs" +local insert = table.insert + +function GM:LoadNPCS() + local Items = file.Find(Folder.."/*.lua","LUA") + local BaseItem = {} + + GAMEMODE.Npcs = {} + + NPC = {} + + AddCSLuaFile(Folder.."/base.lua") + include(Folder.."/base.lua") + + BaseItem = table.Copy(NPC) + + for k,v in pairs(Items) do + if (v != "base.lua") then + AddCSLuaFile(Folder.."/"..v) + include(Folder.."/"..v) + + insert(GAMEMODE.Npcs,NPC) + + NPC = table.Copy(BaseItem) + + end + end +end + +hook.Add("Initialize","Loadnpcs",function() + GAMEMODE:LoadNPCS() +end) + +function GetNpcByName(name) + for k,v in pairs( GAMEMODE.Npcs ) do + if (v.Name == name) then return v end + end + + return nil +end + +--[[ +function GetRecipeForItem(name) + for k,v in pairs( GAMEMODE.Recipes ) do + if (v.Name == name) then return v.Recipe,v end + end + + return nil +end +]]-- +--[[ +function GetItemsByClass(class) + local Dat = {} + for k,v in pairs( GAMEMODE.Items ) do + if (v.Class == class) then table.insert(Dat,v) end + end + + return Dat +end +]]-- diff --git a/gamemode/npcsystem/npcs/base.lua b/gamemode/npcsystem/npcs/base.lua new file mode 100644 index 0000000..7afb4fe --- /dev/null +++ b/gamemode/npcsystem/npcs/base.lua @@ -0,0 +1,57 @@ +NPC.Name = "Winter Survival 2 Base NPC" +NPC.Desc = "Why the hell did I write this? No one will read it anyways!!" +NPC.Class = "Other" --Ambient, Agressive, Boss +NPC.Model = "models/props_combine/breenlight.mdl" +NPC.Icon = Material("wintersurvival2/hud/ws1_icons/icon_rock") + +NPC.Social = "Pack" --Solo, Pack + +NPC.Vitality = 0 +NPC.Speed = 0 +--Drops should be formated as [index]={["item name"], percent_drop} where percent_drop is a number from 0 to 100 +NPC.Drops = nil + +--Attacks should be formated as [i]={function attackpriority() = function doattack()} +NPC.Attacks = nil + +--A function that takes a position and returns true if this is an acceptable place to spawn +NPC.SpawnLocations = nil + +--The entity that is this npc's current target, if it has one +NPC.Target = nil + +--All enemies that this NPC is aware of +NPC.AwareEnemies = nil + +--These are just here to tell the editors/develoeprs what functions are available.. dont un-comment them out, as this could affect all the items. +/* +--What to replace the ENT:BehaveAct with +function NPC:Act() +end + +--What to replace RunBehaviour with +function NPC:Behaviour() +end + +function NPC:OnSpawn() +end + +--If we need to do more than just reduce health on dammage +function NPC:OnDammage(ammount) +end + +--If we need to do more than just drop items on death +function NPC:OnDeath() +end + +--A particular spell was cast on this npc by player +function NPC:OnSpell(spell, player) +end + +function NPC:OnFindEnemy(enemy) +end + +--Called when the npc is attacking anything with any attack +function NPC:OnAttack(target) +end +*/ diff --git a/gamemode/npcsystem/npcs/bird.lua b/gamemode/npcsystem/npcs/bird.lua new file mode 100644 index 0000000..d5cd1e0 --- /dev/null +++ b/gamemode/npcsystem/npcs/bird.lua @@ -0,0 +1,101 @@ +NPC.Name = "Bird" +NPC.Desc = "A flappy little guy" +NPC.Class = "Ambient" --Ambient, Agressive, Boss +NPC.Model = "models/pigeon.mdl" +NPC.Icon = Material("wintersurvival2/hud/ws1_icons/icon_rock") + +NPC.Social = "Pack" --Solo, Pack + +NPC.Vitality = 10 +NPC.Speed = 100 +--Drops should be formated as [index]={["item name"], percent_drop} where percent_drop is a number from 0 to 100 +NPC.Drops = { + [0] = {"Meat",100},--Birds will drop at least 1 meat, and have a 50% chance of dropping 2 + [1] = {"Meat",50}, + [2] = {"Feather",50}, +} + +--Attacks should be formated as [i]={function attackpriority() = function doattack()} +NPC.Attacks = nil + +--A function that takes a position and returns true if this is an acceptable place to spawn +NPC.SpawnLocations = nil + +--The entity that is this npc's current target, if it has one. Nil otherwise +NPC.Target = nil + +--All enemies that this NPC is aware of +NPC.AwareEnemies = nil + +--What to replace the ENT:BehaveAct with +function NPC:Act() +end + +--What to replace ENT:RunBehaviour with +function NPC:Behave() + print("Going into bird's custom behaviour") + while ( true ) do + self:StartActivity( ACT_FLY ) -- walk anims + self.loco:SetDesiredSpeed( 100 ) -- walk speeds + self:MoveToPos( self:GetPos() + Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), 0 ) * 200 ) -- walk to a random place within about 200 units (yielding) + + + self:StartActivity( ACT_IDLE ) -- revert to idle activity + + + self:PlaySequenceAndWait( "Idle01" ) -- Sit on the floor + --Check if there are any players nearby + local players = ents.FindByClass("Player") + for k,v in pairs(players) do + print(k) + print(v) + end + --self:SetSequence( "sit_ground" ) -- Stay sitting + --coroutine.wait( self:PlayScene( "scenes/eli_lab/mo_gowithalyx01.vcd" ) ) -- play a scene and wait for it to finish before progressing + self:PlaySequenceAndWait( "Fly01" ) -- Get up + + + -- find the furthest away hiding spot + local pos = self:FindSpot( "random", { type = 'hiding', radius = 5000 } ) + + + -- if the position is valid + if ( pos ) then + self:StartActivity( ACT_RUN ) -- run anim + self.loco:SetDesiredSpeed( 200 ) -- run speed + self:PlayScene( "scenes/npc/female01/watchout.vcd" ) -- shout something while we run just for a laugh + self:MoveToPos( pos ) -- move to position (yielding) + self:PlaySequenceAndWait( "fear_reaction" ) -- play a fear animation + self:StartActivity( ACT_IDLE ) -- when we finished, go into the idle anim + else + --print("Bird could not find anywhere to fly to") + -- some activity to signify that we didn't find shit + end + end + coroutine.yield() +end + +--These are just here to tell the editors/develoeprs what functions are available.. dont un-comment them out, as this could affect all the items. +/* +function NPC:OnSpawn() +end + +--If we need to do more than just reduce health on dammage +function NPC:OnDammage(ammount) +end + +--If we need to do more than just drop items on death +function NPC:OnDeath() +end + +--A particular spell was cast on this npc by player +function NPC:OnSpell(spell, player) +end + +function NPC:OnFindEnemy(enemy) +end + +--Called when the npc is attacking anything with any attack +function NPC:OnAttack(target) +end +*/ diff --git a/gamemode/npcsystem/npcs/zombie.lua b/gamemode/npcsystem/npcs/zombie.lua new file mode 100644 index 0000000..0980cdc --- /dev/null +++ b/gamemode/npcsystem/npcs/zombie.lua @@ -0,0 +1,47 @@ +NPC.Name = "Zombie" +NPC.Desc = "Ahh! The Undead!!" +NPC.Class = "Other" --Ambient, Agressive, Boss +NPC.Model = "models/props_combine/breenlight.mdl" +NPC.Icon = Material("wintersurvival2/hud/ws1_icons/icon_rock") + +NPC.Vitality = 100 +NPC.Speed = 100 +--Drops should be formated as [index]={["item name"], percent_drop} where percent_drop is a number from 0 to 100 +NPC.Drops = nil + +--Attacks should be formated as [range]={index = function doattack(target)} +--Where range is the range of the target, and doattack(target) is the function called to attack +NPC.Attacks = nil + +--A function that takes a position and returns true if this is an acceptable place to spawn +NPC.SpawnLocations = function(pos) return true end + +--The entity that is this npc's current target, if it has one +NPC.Target = nil + +--All enemies that this NPC is aware of +NPC.AwareEnemies = nil +--These are just here to tell the editors/develoeprs what functions are available.. dont un-comment them out, as this could affect all the items. +/* +function NPC:OnSpawn() +end + +--If we need to do more than just reduce health on dammage +function NPC:OnDammage(ammount) +end + +--If we need to do more than just drop items on death +function NPC:OnDeath() +end + +--A particular spell was cast on this npc by player +function NPC:OnSpell(spell, player) +end + +function NPC:OnFindEnemy(enemy) +end + +--Called when the npc is attacking anything with any attack +function NPC:OnAttack(target) +end +*/ diff --git a/gamemode/server/concommands.lua b/gamemode/server/concommands.lua new file mode 100644 index 0000000..a6c891c --- /dev/null +++ b/gamemode/server/concommands.lua @@ -0,0 +1,66 @@ +concommand.Add("ws_giveitem",function(pl,com,args) + if (!IsValid(pl)) then return end + if (!pl:IsAdmin()) then return end + if (!args[1]) then return end + + pl:AddItem(args[1],tonumber(args[2] or 1)) +end) + +concommand.Add("ws_revive",function(pl,com,args) + if (IsValid(pl) and !pl:IsAdmin()) then return end + if (!args[1]) then return end + + for k,v in pairs(player.GetAll()) do + if (v:Nick():lower():find(args[1]) and v:IsPigeon()) then + v:ChatPrint("You have been resurrected from the dead by an admin!") + v:SetHuman(true) + v:KillSilent() + v:EmitSound("wintersurvival2/ritual/wololo.mp3") + end + end +end) + +--Manual generate a proprain, for debugging +concommand.Add("ws_proprain",function(ply,cmd,args) + if (IsValid(pl) and !pl:IsAdmin()) then return end + GAMEMODE:GeneratePropRain() +end) + +--Manual reload of items + recepies, usefull for testing +concommand.Add("ws_reloaditems",function(ply,cmd,args) + if (IsValid(pl) and !pl:IsAdmin()) then return end + GAMEMODE:LoadItems() +end) + +--Manual reload of npc's, usefull for testing +concommand.Add("ws_reloadnpcs",function(ply,cmd,args) + if (IsValid(pl) and !pl:IsAdmin()) then return end + GAMEMODE:LoadNPCS() +end) + +--Generate a nice HTML representation of all the recepies. +concommand.Add("ws_generaterecipes",function(pl,com,args) + if (IsValid(pl) and !pl:IsAdmin()) then return end + local filename = "ws_recipedata.txt" + for k,v in pairs(GAMEMODE.Recipes) do + if not v.Recipe then continue end + if not v.Name then continue end + file.Append(filename,"
  • \n\t\n
  • \n") + end +end) diff --git a/gamemode/server/spawnitem.lua b/gamemode/server/spawnitem.lua new file mode 100644 index 0000000..ef13104 --- /dev/null +++ b/gamemode/server/spawnitem.lua @@ -0,0 +1,12 @@ + +function SpawnWSItem(Item,pos) + local IT = GetItemByName(Item) + + local drop = ents.Create("ws_item") + drop.Item = IT + drop:SetModel(drop.Item.Model) + drop:SetPos(pos) + drop:Spawn() + + return drop +end \ No newline at end of file diff --git a/gamemode/server/world.lua b/gamemode/server/world.lua new file mode 100644 index 0000000..9d23c7b --- /dev/null +++ b/gamemode/server/world.lua @@ -0,0 +1,60 @@ + +local random = math.random +local traceline = util.TraceLine +local contents = util.PointContents +local Up = Vector(0,0,1) + +function GM:GeneratePropRain() + local Items = { + GetItemByName("Wood"), + GetItemByName("Rock"), + GetItemByName("Crystal"), + } + + --THIS PIECE OF CODE IS FOR OLDER VERSIONS OF WS MAPS! ITS CRAP BUT WE HAVE TO... For WS players! + local areas = {} + + for i,area in pairs(ents.FindByClass("info_target")) do + if (area:GetName() == "survival_spawn") then + local parent = area:GetParent() + if (IsValid(parent)) then + areas[area] = parent + end + end + end + + for pAe,pBe in pairs(areas) do + local pA,pB = pAe:GetPos(),pBe:GetPos() + local Dis = pA:Distance(pB) + + for i = 1,40+math.ceil(Dis/70) do + local V = Vector(random(pB.x,pA.x),random(pB.y,pA.y),random(pB.z,pA.z)) + local Tr = traceline({start=V,endpos=V-Up*40000}) + local Pos = Tr.HitPos+Up*20 + local C = contents(Pos) + + if (C != CONTENTS_WATER and C != CONTENTS_WATER+CONTENTS_TRANSLUCENT) then + local drop = ents.Create("ws_item") + drop.Item = Items[random(1,3)] + drop:SetModel(drop.Item.Model) + drop:SetPos(Pos) + drop:Spawn() + drop:GetPhysicsObject():Sleep() + end + end + + --Shop spawn + local V = Vector(random(pB.x,pA.x),random(pB.y,pA.y),random(pB.z,pA.z)) + local Tr = traceline({start=V,endpos=V-Up*40000}) + local Pos = Tr.HitPos+Up*20 + local C = contents(Pos) + + if (C != CONTENTS_WATER and C != CONTENTS_WATER+CONTENTS_TRANSLUCENT) then + local drop = ents.Create("ws_shop") + drop:SetPos(Pos) + drop:Spawn() + drop:Activate() + end + end + --END... Newer versions of maps should use a brush entity instead. +end diff --git a/gamemode/shared.lua b/gamemode/shared.lua new file mode 100644 index 0000000..031025e --- /dev/null +++ b/gamemode/shared.lua @@ -0,0 +1,21 @@ +DeriveGamemode( "gearfox" ) + +AddLuaCSFolder("hud") +AddLuaCSFolder("client") + +AddLuaSHFolder("shared") +AddLuaSHFolder("itemsystem") +AddLuaSHFolder("npcsystem") + +AddLuaSVFolder("server") + +GM.Name = "Winter Survival 2 - Anarchy" +GM.Author = "Apickx" +GM.Email = "admin@cogarr.org" +GM.Website = "www.cogarr.org" + +local Zero = Vector(0,0,0) + +function GM:Move(ply,mv) + if (ply:IsPigeon() or !ply:Alive()) then mv:SetVelocity(-ply:GetVelocity()) return mv end +end diff --git a/gamemode/shared/accounts.lua b/gamemode/shared/accounts.lua new file mode 100644 index 0000000..06cc296 --- /dev/null +++ b/gamemode/shared/accounts.lua @@ -0,0 +1,153 @@ + +--Not sure if i should make this MySQLoo, textbased or SQLites + +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("UpdatePlayerDB") + + concommand.Add("ws_printallaccounts",function(pl) + if (!IsValid(pl) or !pl:IsAdmin()) then return end + + local dat = sql.Query("SELECT * FROM WS2Accounts") + + pl:ChatPrint(table.Count(dat) .. " accounts registered!") + end) + + concommand.Add("ws_setrank",function(pl,com,arg) + if (!IsValid(pl) or !pl:IsAdmin()) then return end + if (!arg[2]) then return end + + local name = arg[1]:lower() + local rank = tonumber(arg[2]) + + for k,v in pairs(player.GetAll()) do + if (v:Nick():find(name)) then + v.Rank = rank + v:ChatPrint("Your rank has been set to "..rank) + + if (rank == 1) then v:SetUserGroup("admin") end + + MsgN("Player "..v:Nick().." has been set to "..rank) + break + end + end + end) + + + hook.Add("Initialize","InitSQLiteDB",function() + if (!sql.TableExists("WS2Accounts")) then + local Dat = { + "id INT UNSIGNED NOT NULL PRIMARY KEY", + "inventory MEDIUMTEXT", + "equipped MEDIUMTEXT", + "rank TINYINT", + "timespent INT UNSIGNED", + } + + Msg("Table not found. Creating new table for accounts!\n") + sql.Query("CREATE TABLE IF NOT EXISTS WS2Accounts ("..table.concat(Dat,",")..");") + end + end) + + hook.Add("PlayerAuthed","InitSQLitePlayer",function(pl) + pl:LoadPlayer() + end) + + hook.Add("EntityRemoved","UpdatePlayer",function(ent) + if (ent:IsPlayer()) then + local f,err = pcall(ent.UpdateSQLite,ent) + end + end) + + hook.Add("Tick","UpdatePlayerDB",function() + for k,v in pairs(player.GetAll()) do + if (v.UpdateTime and v.UpdateTime < CurTime()) then + v.UpdateTime = CurTime()+30 + v:UpdateSQLite() + end + end + end) + + function meta:LoadPlayer() + local ID = self:SteamID64() + + if (!ID) then + Msg("Retrying loading player "..self:Nick().."\n") + timer.Simple(1,function() if (IsValid(self)) then self:LoadPlayer() end end) + return + end + + local data = sql.Query("SELECT * FROM WS2Accounts WHERE id="..ID) + + self.UpdateTime = CurTime()+30 + self.LastJoined = CurTime() + self.AccountInv = {} + self.Equipped = {} + self.Rank = 0 + + self.StoredID = ID + + if (!data) then + Msg("Player "..self:Nick().." was not found. Creating new account!\n") + + local dat = { + self.StoredID, + "''", + "''", + 0, + 0, + } + + sql.Query("INSERT INTO WS2Accounts(id,inventory,equipped,rank,timespent) VALUES ("..table.concat(dat,",")..");") + else + self.LastJoined = CurTime()-tonumber(data[1].timespent) + self.Rank = tonumber(data[1].rank) + + for k,v in pairs(string.Explode("\n",data[1].inventory)) do + local Ab = string.Explode("æ",v) + if (Ab[2]) then self:AddAccountItem(Ab[1],tonumber(Ab[2])) end + end + + if (self.Rank == 1) then self:SetUserGroup("admin") self:ChatPrint("You are an admin on this server!") end + + net.Start("UpdatePlayerDB") + net.WriteUInt(tonumber(data[1].timespent),32) + net.WriteUInt(self.Rank,4) + net.Send(self) + end + end + + function meta:UpdateSQLite() + if (!self.StoredID) then self:Kick("Your ID seems to be invailed. Reconnect please!") return end + + local Inventory = "" + + for k,v in pairs(self:GetAccountInventory()) do + Inventory = Inventory..v.Name.."æ"..v.Quantity.."\n" + end + + local dat = { + "timespent="..math.ceil(CurTime()-self.LastJoined), + "rank="..self.Rank, + "inventory="..SQLStr(Inventory) + } + + sql.Query("UPDATE WS2Accounts SET "..table.concat(dat,",").." WHERE id="..self.StoredID..";") + end +else + net.Receive("UpdatePlayerDB",function() + local pl = LocalPlayer() + + pl.LastJoined = CurTime()-net.ReadUInt(32) + pl.Rank = net.ReadUInt(4) + end) +end + +function meta:GetRank() + return self.Rank or 0 +end + +function meta:GetTimeSpent() + return ((self.LastJoined and CurTime() - self.LastJoined) or 0) +end \ No newline at end of file diff --git a/gamemode/shared/entity_ext.lua b/gamemode/shared/entity_ext.lua new file mode 100644 index 0000000..c0e1b34 --- /dev/null +++ b/gamemode/shared/entity_ext.lua @@ -0,0 +1,19 @@ +local meta = FindMetaTable("Entity") + +function meta:IsTree() + local model = self:GetModel() + local class = self:GetClass() + return ((model:find("tree") or model:find("pine")) and !class:find("ws_")) +end + +function meta:IsRock() + local model = self:GetModel() + local class = self:GetClass() + return (model:find("rock") and !class:find("ws_")) +end + +function meta:IsPlant() + local model = self:GetModel() + local class = self:GetClass() + return (model:find("antlionhill") and !class:find("ws_")) +end \ No newline at end of file diff --git a/gamemode/shared/game_rounds.lua b/gamemode/shared/game_rounds.lua new file mode 100644 index 0000000..67b77c9 --- /dev/null +++ b/gamemode/shared/game_rounds.lua @@ -0,0 +1,105 @@ +local meta = FindMetaTable("Player") +local Time = 10 + +if (SERVER) then + util.AddNetworkString("RoundStart") + + function GM:StartCountDown() + self.CountDown = CurTime()+Time+1 + + //items to clean up in between rounds + cleanup = { + "ws_alter", + "ws_arrow", + "ws_barrel", + "ws_campfire", + "ws_grave", + "ws_infuser", + "ws_item", + "ws_prop", + "ws_researchtable", + "ws_shop", + "ws_rune", + } + for k,v in pairs(cleanup) do + for i,j in pairs(ents.FindByClass(v)) do + j:Remove() + end + end + + + + --Generate a completly new rain of props :D + self:GeneratePropRain() + + net.Start("RoundStart") + net.WriteUInt(Time,8) + net.Broadcast() + end + + function meta:UpdateRoundTimer() + if (!self.CountDown or self.CountDown quantity) then + self.AccountInv[i].Quantity = self.AccountInv[i].Quantity-quantity + self:UpdateAccountSlot(i) + return + else + quantity = quantity - self.AccountInv[i].Quantity + + self.AccountInv[i].Quantity = 0 + + self:UpdateAccountSlot(i) + + self.AccountInv[i] = nil + + if (quantity > 0) then self:RemoveAccountItem(item,quantity) return end + end + end + end + end +else + net.Receive("UpdateAccountInventory",function() + local pl = LocalPlayer() + + if (!pl.AccountInv) then pl.AccountInv = {} end + + local ID = net.ReadUInt(5) + pl.AccountInv[ID] = {Name = net.ReadString(),Quantity = net.ReadUInt(32)} + + if (pl.AccountInv[ID].Quantity <= 0) then pl.AccountInv[ID] = nil end + + ReloadAccountMenu() + end) +end + +function meta:GetAccountInventory() + return self.AccountInv or {} +end + +function meta:HasAccountItem(name,quantity) + if (!self.AccountInv) then return end + + quantity = quantity or 1 + + for k,v in pairs(self.AccountInv) do + if (v.Name == name and v.Quantity >= quantity) then + return k + end + end + + return false +end + +function meta:GetAccountSlot(id) + return (self.AccountInv and self.AccountInv[id]) or nil +end \ No newline at end of file diff --git a/gamemode/shared/player_dropitem.lua b/gamemode/shared/player_dropitem.lua new file mode 100644 index 0000000..717e1b5 --- /dev/null +++ b/gamemode/shared/player_dropitem.lua @@ -0,0 +1,26 @@ + +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("DropItemReq") + + function meta:DropItem(item,bAccount) + if ((!bAccount and !self:HasItem(item)) or (bAccount and !self:HasAccountItem(item))) then return end + + if (bAccount) then self:RemoveAccountItem(item,1) return + else self:RemoveItem(item,1) end + + SpawnWSItem(item,self:GetShootPos()+self:GetAimVector()*20) + end + + net.Receive("DropItemReq",function(seq,pl) pl:DropItem(net.ReadString(),util.tobool(net.ReadBit())) end) +else + function RequestDropItem(item,bAccount) + net.Start("DropItemReq") + net.WriteString(item) + net.WriteBit(bAccount) + net.SendToServer() + end +end + + \ No newline at end of file diff --git a/gamemode/shared/player_ghost.lua b/gamemode/shared/player_ghost.lua new file mode 100644 index 0000000..049ede7 --- /dev/null +++ b/gamemode/shared/player_ghost.lua @@ -0,0 +1,97 @@ +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("Ghost") + util.AddNetworkString("GhostRemove") + + function meta:GhostStructure(item) + item = GetItemByName(item) + + if (!item or !item.Ghost) then return end + if (!self.StructurePlace) then self.StructurePlace = true end + + net.Start("Ghost") + net.WriteString(item.Name) + net.Send(self) + end + + function meta:GhostRemove() + self.StructurePlace = false + net.Start("GhostRemove") net.Send(self) + end +else + local Zero = Vector(0,0,0) + local gr = Color(0,255,0,100) + local Box = Vector(8,8,8) + + net.Receive("Ghost",function() + local pl = LocalPlayer() + local It = GetItemByName(net.ReadString()) + + if (!It) then return end + if (!IsValid(pl.Ghost)) then pl.Ghost = ClientsideModel("error.mdl") pl.Ghost:SetNoDraw(true) end + + pl.GhostItem = It + pl.StructurePlace = true + end) + + net.Receive("GhostRemove",function() LocalPlayer().StructurePlace = false end) + + hook.Add("PostDrawTranslucentRenderables","GhostStructure",function() + local pl = LocalPlayer() + + if (pl:IsPigeon() or !pl.GhostItem or !pl.GhostItem.Ghost or !IsValid(pl.Ghost) or !pl.StructurePlace) then return end + + local Ghost = pl.Ghost + local Aim = Angle(0,pl:GetAimVector():Angle().y+90,0) + local Pos = util.TraceHull({ + start = pl:GetShootPos(), + endpos = pl:GetShootPos()+pl:GetAimVector()*pl.GhostItem.Range, + filter = pl, + mins = Box*-1, + maxs = Box, + }) + + local CanP = pl:CanPlaceStructure(Pos) + Pos = Pos.HitPos + + for k,v in pairs(pl.GhostItem.Ghost) do + local OffPos = v.Pos*1 + OffPos:Rotate(Aim) + + Ghost:SetModel(v.Model) + Ghost:SetRenderOrigin(Pos+OffPos) + Ghost:SetRenderAngles(v.Ang+Aim) + + local mat = Matrix() + mat:Scale( v.Size or Zero ) + + Ghost:EnableMatrix( "RenderMultiply", mat ) + Ghost:SetupBones() + + if (CanP) then render.SetColorModulation(0,10,0) + else render.SetColorModulation(10,0,0) end + + render.SetBlend(0.7) + Ghost:DrawModel() + render.SetColorModulation(1,1,1) + render.SetBlend(1) + end + + Ghost:SetRenderOrigin(Pos) + end) +end + +function meta:CanPlaceStructure(Tr) + if (Tr and Tr.HitPos) then + local A = util.PointContents( Tr.HitPos ) + local Ang = math.AngleNormalize(Tr.HitNormal:Angle()) + + if (A == CONTENTS_WATER or A == CONTENTS_WATER+CONTENTS_TRANSLUCENT ) then return false end + if (Ang.p < -120 or Ang.p > -60) then return false end + + --if (!Tr.HitWorld) then return false end + end + + return self.StructurePlace +end diff --git a/gamemode/shared/player_human.lua b/gamemode/shared/player_human.lua new file mode 100644 index 0000000..8fa6997 --- /dev/null +++ b/gamemode/shared/player_human.lua @@ -0,0 +1,66 @@ + +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("SetHuman") + + function meta:SetHuman(bool) + self.IsHuman = bool + self.Inventory = {} + self.Weapons = {} + + net.Start("SetHuman") + net.WriteEntity(self) + net.WriteBit(self.IsHuman) + net.Broadcast() + end + + function meta:UpdateHumans() + for k,v in pairs(player.GetAll()) do + if (v.IsHuman) then + timer.Simple(math.Rand(0.1,0.2),function() + net.Start("SetHuman") + net.WriteEntity(v) + net.WriteBit(true) + net.Send(self) + end) + end + end + end +else + net.Receive("SetHuman",function() + local pl = net.ReadEntity() + + pl.IsHuman = util.tobool(net.ReadBit()) + pl.Inventory = {} + pl.Weapons = {} + end) +end + +function meta:IsPigeon() + return !util.tobool(self.IsHuman) +end + +function player.GetAllHumans() + local dat = {} + + for k,v in pairs(player.GetAll()) do + if (!v:IsPigeon()) then + table.insert(dat,v) + end + end + + return dat +end + +function player.GetAllHumansAlive() + local dat = {} + + for k,v in pairs(player.GetAll()) do + if (!v:IsPigeon() and v:Alive()) then + table.insert(dat,v) + end + end + + return dat +end diff --git a/gamemode/shared/player_inventory.lua b/gamemode/shared/player_inventory.lua new file mode 100644 index 0000000..8cb31ea --- /dev/null +++ b/gamemode/shared/player_inventory.lua @@ -0,0 +1,99 @@ + +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("UpdateInventory") + + function meta:UpdateSlot(id) + if (!self.Inventory[id]) then return end + + net.Start("UpdateInventory") + net.WriteUInt(id,5) + net.WriteString(self.Inventory[id].Name) + net.WriteUInt(self.Inventory[id].Quantity,32) + net.Send(self) + end + + function meta:AddItem(item,quantity) + local Item = GetItemByName(item) + + if (!Item) then return end + if (!self.Inventory) then self.Inventory = {} end + + --First search for existing items + for i = 1,MAIN_MAX_SLOTS do + if (self.Inventory[i] and self.Inventory[i].Name == item) then + self.Inventory[i].Quantity = self.Inventory[i].Quantity+quantity + self:UpdateSlot(i) + return + end + end + + --If it hasnt found any existing item, find an empty spot + for i = 1,MAIN_MAX_SLOTS do + if (!self.Inventory[i]) then + self.Inventory[i] = {Name = item,Quantity = quantity} + self:UpdateSlot(i) + return + end + end + end + + function meta:RemoveItem(item,quantity) + for i = 1,MAIN_MAX_SLOTS do + if (self.Inventory[i] and self.Inventory[i].Name == item) then + if (self.Inventory[i].Quantity > quantity) then + self.Inventory[i].Quantity = self.Inventory[i].Quantity-quantity + self:UpdateSlot(i) + return + else + quantity = quantity - self.Inventory[i].Quantity + + self.Inventory[i].Quantity = 0 + + self:UpdateSlot(i) + + self.Inventory[i] = nil + + if (quantity > 0) then self:RemoveItem(item,quantity) return end + end + end + end + end +else + net.Receive("UpdateInventory",function() + local pl = LocalPlayer() + + if (!pl.Inventory) then pl.Inventory = {} end + + local ID = net.ReadUInt(5) + pl.Inventory[ID] = {Name = net.ReadString(),Quantity = net.ReadUInt(32)} + + if (pl.Inventory[ID].Quantity <= 0) then pl.Inventory[ID] = nil end + + ReloadInventory() + end) +end + + +function meta:GetInventory() + return self.Inventory or {} +end + +function meta:HasItem(name,quantity) + if (!self.Inventory) then return end + + quantity = quantity or 1 + + for k,v in pairs(self.Inventory) do + if (v.Name == name and v.Quantity >= quantity) then + return k + end + end + + return false +end + +function meta:GetSlot(id) + return (self.Inventory and self.Inventory[id]) or nil +end \ No newline at end of file diff --git a/gamemode/shared/player_lootventory.lua b/gamemode/shared/player_lootventory.lua new file mode 100644 index 0000000..b973932 --- /dev/null +++ b/gamemode/shared/player_lootventory.lua @@ -0,0 +1,53 @@ +local insert = table.insert + +if (SERVER) then + util.AddNetworkString("OpenLootventory") + util.AddNetworkString("DemandLootventoryUpdate") + + function OpenLootventory(pl,items,entity) + if (!IsValid(pl) or !items) then return end + + net.Start("OpenLootventory") + net.WriteEntity(entity) + for k,v in pairs(items) do + if (v.Name and v.Quantity) then + net.WriteBit(true) + net.WriteString(v.Name) + net.WriteUInt(v.Quantity,32) + end + end + net.Send(pl) + end + + net.Receive("DemandLootventoryUpdate",function(siz,pl) + local ent = net.ReadEntity() + + if (!IsValid(ent) or !ent.GetItems) then return end + if (pl:GetPos():Distance(ent:GetPos()) > 200) then return end + + OpenLootventory(pl,ent:GetItems(),ent) + end) +else + net.Receive("OpenLootventory",function() + local dat = {} + local ent = net.ReadEntity() + + while (util.tobool(net.ReadBit())) do + local Ab = GetItemByName(net.ReadString()) + local Co = net.ReadUInt(32) + + if (Ab and Co > 0) then insert(dat,{Name = Ab.Name, Quantity = Co}) end + end + + MakeLootventory(dat,ent) + GAMEMODE:OnSpawnMenuOpen() + end) + + function DemandLootventoryUpdate(entity) + if (!IsLootventoryOpen()) then return end + + net.Start("DemandLootventoryUpdate") + net.WriteEntity(entity) + net.SendToServer() + end +end \ No newline at end of file diff --git a/gamemode/shared/player_pigeon.lua b/gamemode/shared/player_pigeon.lua new file mode 100644 index 0000000..2256af0 --- /dev/null +++ b/gamemode/shared/player_pigeon.lua @@ -0,0 +1,44 @@ +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("AssignPigeon") + + function meta:SpawnPigeon() + if (IsValid(self.Pigeon)) then return end + + self.Pigeon = ents.Create("ws_pigeon") + self.Pigeon:SetPos(self:GetPos()) + self.Pigeon:SetPlayer(self) + self.Pigeon:Spawn() + self.Pigeon:Activate() + + print("Spawned Pigeon: "..self:Nick()) + + timer.Simple(0.2,function() + net.Start("AssignPigeon") + net.WriteEntity(self) + net.WriteEntity(self.Pigeon) + net.Broadcast() end) + end + + function meta:UpdatePigeons() + for k,v in pairs(player.GetAll()) do + if (IsValid(v.Pigeon)) then + timer.Simple(math.Rand(0.1,0.2),function() + net.Start("AssignPigeon") + net.WriteEntity(v) + net.WriteEntity(v.Pigeon) + net.Send(self) + end) + end + end + end +else + net.Receive("AssignPigeon",function() net.ReadEntity().Pigeon = net.ReadEntity() end) +end + +function meta:GetPigeon() + return self.Pigeon +end + + diff --git a/gamemode/shared/player_recipes.lua b/gamemode/shared/player_recipes.lua new file mode 100644 index 0000000..4a85535 --- /dev/null +++ b/gamemode/shared/player_recipes.lua @@ -0,0 +1,102 @@ + +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("CreateRecipe") + util.AddNetworkString("ResetRecipes") + + function meta:CreateRecipe(item) + if (!self:CanCreateItem(item)) then return end + + local Rec,Item = GetRecipeForItem(item) + + if (!Rec) then return false end + + for a,b in pairs(Rec.Resources) do + self:RemoveItem(a,b) + end + + if(Item.OnCraft) then + Item:OnCraft(self) + end + + self:AddItem(item,1) + end + + function meta:ResetKnownRecipes() + net.Start("ResetRecipes") net.Send(self) + end + + net.Receive("CreateRecipe",function(siz,pl) pl:CreateRecipe(net.ReadString()) end) +else + function RequestCreateRecipe(item) + net.Start("CreateRecipe") + net.WriteString(item) + net.SendToServer() + end + + function DiscoverItems(Combinations) + local Dat = {} + + for k,v in pairs(GAMEMODE.Recipes) do + local Ab = v.Recipe.Resources + local Tools = v.Recipe.Tools + local PA = table.Count(Ab) + + if (PA == table.Count(Combinations)) then + local Check = 0 + + for e,c in pairs(Combinations) do + for a,b in pairs(Ab) do + if (c.Name == a and c.Quantity == b) then Check = Check+1 break end + end + end + + if (Check == PA) then table.insert(Dat,v) end + end + end + + if (table.Count(Dat) > 0) then + for e,c in pairs(GAMEMODE.KnownRecipes) do + for k,v in pairs(Dat) do + if (v.Name == c.Name) then table.remove(Dat,k) break end + end + end + + if (table.Count(Dat) > 0) then + for k,v in pairs(Dat) do + LocalPlayer():AddNote("You discovered the recipe for "..v.Name) + end + + table.Add(GAMEMODE.KnownRecipes,Dat) + + ReloadRecipes() + end + end + end + + net.Receive("ResetRecipes",function() + GAMEMODE.KnownRecipes = { + GetItemByName("Axe"), + GetItemByName("Campfire"), + GetItemByName("Pickaxe"), + GetItemByName("Research Table") + } + + ReloadRecipes() + end) +end + +function meta:CanCreateItem(name) + local Rec,Item = GetRecipeForItem(name) + + if (!Rec) then return false end + + for k,v in pairs(Rec) do + for a,b in pairs(v) do + if (!self:HasItem(a,b)) then return false end + end + end + + return true +end diff --git a/gamemode/shared/player_transferitem.lua b/gamemode/shared/player_transferitem.lua new file mode 100644 index 0000000..944af63 --- /dev/null +++ b/gamemode/shared/player_transferitem.lua @@ -0,0 +1,44 @@ + +if (SERVER) then + util.AddNetworkString("RequestTransfer") + util.AddNetworkString("RequestTransferFrom") + + net.Receive("RequestTransfer",function(siz,pl) + local item = net.ReadString() + local quan = net.ReadUInt(32) + local ent = net.ReadEntity() + + if (!IsValid(ent) or !ent.AddItem) then return end + + if (!pl:HasItem(item,quan)) then return end + + pl:RemoveItem(item,quan) + ent:AddItem(item,quan) + end) + + net.Receive("RequestTransferFrom",function(siz,pl) + local item = net.ReadString() + local quan = net.ReadUInt(32) + local ent = net.ReadEntity() + + if (!IsValid(ent) or !ent.TakeItem) then return end + + ent:TakeItem(pl,item,quan) + end) +else + function TransferItems(item,quantity,to) + net.Start("RequestTransfer") + net.WriteString(item) + net.WriteUInt(quantity,32) + net.WriteEntity(to) + net.SendToServer() + end + + function DemandItems(item,quantity,from) + net.Start("RequestTransferFrom") + net.WriteString(item) + net.WriteUInt(quantity,32) + net.WriteEntity(from) + net.SendToServer() + end +end \ No newline at end of file diff --git a/gamemode/shared/player_useitem.lua b/gamemode/shared/player_useitem.lua new file mode 100644 index 0000000..128146a --- /dev/null +++ b/gamemode/shared/player_useitem.lua @@ -0,0 +1,40 @@ + +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("UseItem") + util.AddNetworkString("UseItemReq") + + function meta:UseItem(item,bAccount) + if ((!bAccount and !self:HasItem(item)) or (bAccount and !self:HasAccountItem(item))) then return end + + local IT = GetItemByName(item) + + if (IT.OnUse) then + IT:OnUse(self) + + net.Start("UseItem") + net.WriteEntity(self) + net.WriteString(item) + net.Broadcast() + end + end + + net.Receive("UseItemReq",function(seq,pl) pl:UseItem(net.ReadString(),util.tobool(net.ReadBit())) end) +else + net.Receive("UseItem",function() + local pl = net.ReadEntity() + local it = GetItemByName(net.ReadString()) + + if (it.OnUse) then it:OnUse(pl) end + end) + + function RequestUseItem(item,bAccount) + net.Start("UseItemReq") + net.WriteString(item) + net.WriteBit(bAccount) + net.SendToServer() + end +end + + \ No newline at end of file diff --git a/gamemode/shared/stream.lua b/gamemode/shared/stream.lua new file mode 100644 index 0000000..e4d45e8 --- /dev/null +++ b/gamemode/shared/stream.lua @@ -0,0 +1,125 @@ +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("STREAM") + util.AddNetworkString("ENDSTREAM") + + concommand.Add("StreamURL",function(pl,com,args) + if (!IsValid(pl)) then return end + + pl:StreamSong(table.concat(args," ")) + end) + + concommand.Add("EndStream",function(pl,com,args) + if (!IsValid(pl)) then return end + + pl:EndStream() + end) + + function meta:StreamSong(URL) + if (!self:IsAdmin()) then return end + + self.URL = URL + + net.Start("STREAM") + net.WriteEntity(self) + net.WriteString(URL) + net.Broadcast() + end + + function meta:EndStream() + if (!self:IsAdmin()) then return end + + self.URL = nil + + net.Start("ENDSTREAM") + net.WriteEntity(self) + net.Broadcast() + end + + function meta:UpdateStream(v) + if (v.URL) then + net.Start("STREAM") + net.WriteEntity(v) + net.WriteString(v.URL) + net.Send(self) + end + end +else + local Emitter = ParticleEmitter( Vector(0,0,0) ) + local Up = Vector(0,0,20) + local Retries = 0 + local Streams = {} + + function TryURL(url,pl) + if (!IsValid(pl)) then return end + + local ID = pl:UniqueID() + if (Streams[ID]) then Streams[ID]:Stop() Streams[ID] = nil end + + if (Retries < 4) then + sound.PlayURL( url, "3d mono noplay", function( chan ) + if (!chan) then TryURL(url,pl) Retries = Retries+1 + elseif (IsValid(pl)) then Streams[ID] = chan chan:Play() Retries = 0 end + end) + else + Retries = 0 + Msg("Couldn't play "..url.." \n") + end + end + + net.Receive("STREAM",function() + local pl = net.ReadEntity() + local URL = net.ReadString() + + if (!IsValid(pl)) then return end + + TryURL(URL,pl) + end) + + net.Receive("ENDSTREAM",function() + local pl = net.ReadEntity() + + if (!IsValid(pl)) then return end + + local ID = pl:UniqueID() + if (Streams[ID]) then Streams[ID]:Stop() Streams[ID] = nil end + end) + + hook.Add("Think","Streamer",function() + for k,st in pairs(Streams) do + if (!st) then table.remove(Streams,k) + else + local v = player.GetByUniqueID(k) + + if (!IsValid(v)) then + st:Stop() + table.remove(Streams,k) + else + local pig = v:GetPigeon() + local Pos = v:GetPos() + + if (IsValid(pig)) then Pos = pig:GetPos() end + + if (!v.PTime or v.PTime < CurTime()) then + local particle = Emitter:Add( "lam/musicnotes/note"..math.random(1,2), Pos + VectorRand()*15) + particle:SetDieTime( 1 ) + particle:SetVelocity( Up ) + + particle:SetStartAlpha( 250 ) + particle:SetEndAlpha( 0 ) + + particle:SetStartSize( 10 ) + particle:SetEndSize( 10 ) + + particle:SetColor( math.random( 0, 250 ), math.random( 0, 250 ), math.random( 0, 250 ) ) + + v.PTime = CurTime()+0.1 + end + + st:SetPos(Pos) + end + end + end + end) +end \ No newline at end of file diff --git a/gamemode/shared/synchronize.lua b/gamemode/shared/synchronize.lua new file mode 100644 index 0000000..126c616 --- /dev/null +++ b/gamemode/shared/synchronize.lua @@ -0,0 +1,22 @@ + +if (SERVER) then + util.AddNetworkString("LoadEntity_WS") + + net.Receive("LoadEntity_WS",function(siz,pl) + local Ab = net.ReadEntity() + + if (Ab:IsPlayer()) then + Ab:UpdateSelection(pl) + --pl:UpdateStream(Ab) + end + end) +else + local Q = 0 + function GM:NetworkEntityCreated(ent) + Q=Q+1 + timer.Simple(math.Rand(0.1,0.2)*Q,function() + net.Start("LoadEntity_WS") net.WriteEntity(ent) net.SendToServer() + Q=Q-1 + end) + end +end \ No newline at end of file diff --git a/gamemode/shared/system_admin.lua b/gamemode/shared/system_admin.lua new file mode 100644 index 0000000..14dfb3d --- /dev/null +++ b/gamemode/shared/system_admin.lua @@ -0,0 +1,118 @@ + + +local meta = FindMetaTable("Player") +local Banlist = {} + +local insert = table.insert + +if (SERVER) then + hook.Add("InitPostEntity","InitBanlist",function() + if (!sql.TableExists("Banlist")) then + local Dat = { + "id INTEGER PRIMARY KEY", + "steamid TEXT", + "time INT", + "name TEXT", + "reason TEXT", + } + + Msg("No banlist was found.\nCreating new banlist!\n") + sql.Query("CREATE TABLE IF NOT EXISTS Banlist ("..table.concat(Dat,",")..");") + else + local dat = sql.Query("SELECT * FROM Banlist") + + if (dat) then + for k,v in pairs(dat) do insert(Banlist,v.steamid) end + end + end + end) + + hook.Add("CheckPassword","BlockBannedPlayers",function(SteamID64,NetworkID,ServerPassword,Password,Name) + if (table.HasValue(Banlist,util.SteamIDFrom64(SteamID64))) then + print(Name.." attempted to join, but was found in the banlist. Blocking access!") + + return false, "You are banned from this server!" + end + end) + + concommand.Add("mas_bansteamid",function(pl,com,arg) + if (!IsValid(pl) or !pl:IsAdmin()) then return end + if (!arg[3]) then return end + + local steamid = arg[1] + local time = tonumber(arg[2] or 0) + local reason = table.concat(arg," ",3) + + local dat = sql.Query("SELECT * FROM Banlist WHERE steamid="..SQLStr(steamid)) + + if (!dat) then + sql.Query("INSERT INTO Banlist(steamid,time,name,reason) VALUES ("..SQLStr(steamid)..","..time..",'Unknown',"..SQLStr(reason)..")") + insert(Banlist,steamid) + + for k,v in pairs(player.GetAll()) do + if (v:SteamID() == steamid) then + v:Kick("Banned from server: "..reason) + end + + v:ChatPrint(pl:Nick().." has banned "..steamid) + end + + MsgN(pl:Nick().." has banned "..steamid) + else + MsgN(steamid.." was already located in the database.") + end + end) + + concommand.Add("mas_unbansteamid",function(pl,com,arg) + if (!IsValid(pl) or !pl:IsAdmin()) then return end + if (!arg[1]) then return end + + local dat = sql.Query("DELETE * FROM Banlist WHERE steamid="..SQLStr(arg[1])) + + if (dat) then + MsgN(pl:Nick().." has unbanned "..arg[1]) + + for k,v in pairs(Banlist) do + if (v == arg[1]) then + table.remove(Banlist,k) + break + end + end + end + end) + + concommand.Add("mas_printbannedplayers",function(pl,com,arg) + if (!IsValid(pl) or !pl:IsAdmin()) then return end + + local dat = sql.Query("SELECT * FROM Banlist") + + if (dat) then + for k,v in pairs(dat) do + pl:ChatPrint(v.steamid.." - "..v.name) + end + end + end) + + concommand.Add("mas_banplayer",function(pl,com,arg) + if (!IsValid(pl) or !pl:IsAdmin()) then return end + if (!arg[3]) then return end + + local name = arg[1] + local time = tonumber(arg[2] or 0) + local reason = table.concat(arg," ",3) + + for k,v in pairs(player.GetAll()) do + if (v:Nick():lower():find(name:lower())) then + local dat = sql.Query("SELECT * FROM Banlist WHERE steamid="..SQLStr(v:SteamID())) + + if (!dat) then + sql.Query("INSERT INTO Banlist(steamid,time,name,reason) VALUES ("..SQLStr(v:SteamID())..","..time..","..SQLStr(v:Nick())..","..SQLStr(reason)..")") + insert(Banlist,v:SteamID()) + v:Kick("Banned from server: "..reason) + break + end + end + end + end) +else +end \ No newline at end of file diff --git a/gamemode/shared/system_fatigue.lua b/gamemode/shared/system_fatigue.lua new file mode 100644 index 0000000..9f5a413 --- /dev/null +++ b/gamemode/shared/system_fatigue.lua @@ -0,0 +1,46 @@ + +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("SetFatigue") + + local Tick = CurTime() + + function meta:SetFatigue(s) + if (s > 100) then self:TakeDamage(s-100) s = 100 end + s = math.Clamp(s,0,100) + + self.Fatigue = s + + net.Start("SetFatigue") + net.WriteUInt(s,8) + net.Send(self) + end + + function meta:AddFatigue(s) + self:SetFatigue(self:GetFatigue()+s) + end + + hook.Add("Tick","Fatigue",function() + if (Tick < CurTime()) then + for k,v in pairs(player.GetAllHumans()) do + local Fat = v.Fatigue or 0 + + if (Fat > 0) then Fat = Fat-2 end + Fat = Fat+math.ceil(v:GetVelocity():Length()/100) + + v:SetFatigue(Fat) + end + + Tick = CurTime()+0.5 + end + end) +else + net.Receive("SetFatigue",function() + LocalPlayer().Fatigue = net.ReadUInt(8) + end) +end + +function meta:GetFatigue() + return self.Fatigue or 0 +end diff --git a/gamemode/shared/system_heat.lua b/gamemode/shared/system_heat.lua new file mode 100644 index 0000000..84c9c30 --- /dev/null +++ b/gamemode/shared/system_heat.lua @@ -0,0 +1,42 @@ + +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("SetHeat") + + local Tick = CurTime() + + function meta:SetHeat(s) + if (s > 100) then self:TakeDamage(s-100) s = 100 end + s = math.Clamp(s,0,100) + + self.Heat = s + + net.Start("SetHeat") + net.WriteUInt(s,8) + net.Send(self) + end + + function meta:AddHeat(s) + self:SetHeat(self:GetHeat()+s) + end + + hook.Add("Tick","Heat",function() + if (Tick < CurTime()) then + for k,v in pairs(player.GetAllHumans()) do + v:AddHeat(1+v:WaterLevel()) + end + + Tick = CurTime()+1.5 + end + end) +else + net.Receive("SetHeat",function() + LocalPlayer().Heat = net.ReadUInt(8) + end) +end + +function meta:GetHeat() + return self.Heat or 0 +end + \ No newline at end of file diff --git a/gamemode/shared/system_hunger.lua b/gamemode/shared/system_hunger.lua new file mode 100644 index 0000000..99128b1 --- /dev/null +++ b/gamemode/shared/system_hunger.lua @@ -0,0 +1,42 @@ + +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("SetHunger") + + local Tick = CurTime() + + function meta:SetHunger(s) + if (s > 100) then self:TakeDamage(s-100) s = 100 end + s = math.Clamp(s,0,100) + + self.Hunger = s + + net.Start("SetHunger") + net.WriteUInt(s,8) + net.Send(self) + end + + function meta:AddHunger(s) + self:SetHunger(self:GetHunger()+s) + end + + hook.Add("Tick","Hunger",function() + if (Tick < CurTime()) then + for k,v in pairs(player.GetAllHumans()) do + v:AddHunger(1) + end + + Tick = CurTime()+10 + end + end) +else + net.Receive("SetHunger",function() + LocalPlayer().Hunger = net.ReadUInt(8) + end) +end + +function meta:GetHunger() + return self.Hunger or 0 +end + \ No newline at end of file diff --git a/gamemode/shared/system_water.lua b/gamemode/shared/system_water.lua new file mode 100644 index 0000000..f55dd53 --- /dev/null +++ b/gamemode/shared/system_water.lua @@ -0,0 +1,53 @@ + +local meta = FindMetaTable("Player") + +if (SERVER) then + util.AddNetworkString("SetWater") + + local Tick = CurTime() + + function meta:SetWater(s) + if (s > 100) then self:TakeDamage(s-100) s = 100 end + s = math.Clamp(s,0,100) + + self.Water = s + + net.Start("SetWater") + net.WriteUInt(s,8) + net.Send(self) + end + + function meta:AddWater(s) + self:SetWater(self:GetWater()+s) + end + + hook.Add("Tick","Water",function() + if (Tick < CurTime()) then + for k,v in pairs(player.GetAllHumans()) do + v:AddWater(1) + end + + Tick = CurTime()+3.5 + end + end) + + hook.Add("KeyPress","FindWater",function(pl,key) + if (key == IN_USE) then + local tr = util.TraceLine({start=pl:GetShootPos(),endpos=pl:GetShootPos()+pl:GetAimVector()*200,filter=pl}) + local A = util.PointContents( tr.HitPos ) + + if (A == CONTENTS_WATER or A == CONTENTS_WATER+CONTENTS_TRANSLUCENT ) then + pl:AddWater(-20) + end + end + end) +else + net.Receive("SetWater",function() + LocalPlayer().Water = net.ReadUInt(8) + end) +end + +function meta:GetWater() + return self.Water or 0 +end + \ No newline at end of file diff --git a/gamemode/shared/vars.lua b/gamemode/shared/vars.lua new file mode 100644 index 0000000..e605816 --- /dev/null +++ b/gamemode/shared/vars.lua @@ -0,0 +1,3 @@ +MAIN_PVPTIMER = 300 + +MAIN_MAX_SLOTS = 30 \ No newline at end of file diff --git a/gamemode/shared/weaponswap.lua b/gamemode/shared/weaponswap.lua new file mode 100644 index 0000000..f6e0a5c --- /dev/null +++ b/gamemode/shared/weaponswap.lua @@ -0,0 +1,168 @@ + +local meta = FindMetaTable("Player") + +if (CLIENT) then + local Num = 0 + local STi = CurTime() + + hook.Add("PlayerBindPress","SwapWeapons",function(pl,bind,pressed) + if (LocalPlayer():IsPigeon()) then + if (bind:find("invprev")) then return true + elseif (bind:find("invnext")) then return true end + end + + if (pressed) then + local Wep = pl:GetActiveWeapon() + + if (bind:find("invprev")) then + Num = Num+1 + STi = CurTime() + + if (Num > 9) then Num = 0 end + + net.Start("Select") net.WriteUInt(Num,4) net.SendToServer() + + surface.PlaySound("wintersurvival2/hud/itemequip.wav") + + if (IsValid(Wep)) then + if (pl.Weapons and pl.Weapons[Num]) then Wep:SetWeaponHoldType(pl.Weapons[Num].Item.HoldType) + else Wep:SetWeaponHoldType("normal") end + end + + return true + elseif (bind:find("invnext")) then + Num = Num-1 + STi = CurTime() + + if (Num < 0) then Num = 9 end + + net.Start("Select") net.WriteUInt(Num,4) net.SendToServer() + + surface.PlaySound("wintersurvival2/hud/itemequip.wav") + + if (IsValid(Wep)) then + if (pl.Weapons and pl.Weapons[Num]) then Wep:SetWeaponHoldType(pl.Weapons[Num].Item.HoldType) + else Wep:SetWeaponHoldType("normal") end + end + + return true + end + end + end) + + function GetWeaponSlot() + return Num + end + + function GetRecentSwapTime() + return STi + end + + net.Receive("ReceiveSelect",function() + local pl = net.ReadEntity() + if (!IsValid(pl)) then return end + + pl.Select = net.ReadUInt(4) + local wep = pl:GetActiveWeapon() + + if (!IsValid(wep)) then return end + + if (pl.Weapons and pl.Weapons[pl.Select]) then wep:SetWeaponHoldType(pl.Weapons[pl.Select].Item.HoldType) + else wep:SetWeaponHoldType("normal") end + end) + + net.Receive("SetSlot",function() + local pl = net.ReadEntity() + + if (!IsValid(pl)) then return end + if (!pl.Weapons) then pl.Weapons = {} end + + local id = net.ReadUInt(5) + local na = net.ReadString() + local A = GetItemByName(na) + + if (A) then pl.Weapons[id] = {Name = na,Item = A} + else pl.Weapons[id] = nil end + + pl:EmitSound("wintersurvival2/hud/itemequip.wav") + end) + + function RequestEquip(id,item) + net.Start("SetSlotReq") + net.WriteUInt(id,5) + net.WriteString(item) + net.SendToServer() + end + + function RequestUnEquip(id) + net.Start("SetSlotReqUn") + net.WriteUInt(id,5) + net.SendToServer() + end + + function EraseSlot(id) + net.Start("EraseSlot") + net.WriteUInt(id,5) + net.SendToServer() + end +else + util.AddNetworkString("Select") + util.AddNetworkString("ReceiveSelect") + util.AddNetworkString("SetSlot") + util.AddNetworkString("SetSlotReq") + util.AddNetworkString("SetSlotReqUn") + util.AddNetworkString("EraseSlot") + + net.Receive("Select",function(siz,pl) pl.Select = net.ReadUInt(4) pl:UpdateSelection() end) + net.Receive("SetSlotReq",function(siz,pl) pl:SetWeaponSlot(net.ReadUInt(5),net.ReadString()) end) + net.Receive("SetSlotReqUn",function(siz,pl) pl:UnEquipWeaponSlot(net.ReadUInt(5)) end) + net.Receive("EraseSlot",function(siz,pl) pl:UnEquipWeaponSlot(net.ReadUInt(5),true) end) + + function meta:UpdateSelection(pl) + if (self.Select) then + net.Start("ReceiveSelect") + net.WriteEntity(self) + net.WriteUInt(self.Select,4) + if (IsValid(pl)) then net.Send(pl) + else net.Broadcast() end + end + + if (self:CanPlaceStructure()) then self:GhostRemove() end + end + + function meta:SetWeaponSlot(id,item) + if (!self:HasItem(item)) then return end + if (!self.Weapons) then self.Weapons = {} end + + self:RemoveItem(item,1) + + local A = GetItemByName(item) + + if (self.Weapons[id]) then self:AddItem(self.Weapons[id].Name,1) end + + self.Weapons[id] = {Name = item,Item = A} + + net.Start("SetSlot") + net.WriteEntity(self) + net.WriteUInt(id,5) + net.WriteString(item) + net.Broadcast() + end + + function meta:UnEquipWeaponSlot(id,bErase) + if (!self.Weapons or !self.Weapons[id]) then return end + + if (!bErase) then self:AddItem(self.Weapons[id].Name,1) end + + self.Weapons[id] = nil + + net.Start("SetSlot") + net.WriteEntity(self) + net.WriteUInt(id,5) + net.Broadcast() + end +end + +function meta:GetSelectedWeapon() + return self.Select or 0 +end \ No newline at end of file diff --git a/icon24.png b/icon24.png new file mode 100644 index 0000000..3fc1381 Binary files /dev/null and b/icon24.png differ diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..6dee05d Binary files /dev/null and b/logo.png differ diff --git a/to-do/content.materials.settelment/badge.png b/to-do/content.materials.settelment/badge.png new file mode 100644 index 0000000..87efc38 Binary files /dev/null and b/to-do/content.materials.settelment/badge.png differ diff --git a/to-do/content.materials.settelment/berries.png b/to-do/content.materials.settelment/berries.png new file mode 100644 index 0000000..da582a3 Binary files /dev/null and b/to-do/content.materials.settelment/berries.png differ diff --git a/to-do/content.materials.settelment/bolt.png b/to-do/content.materials.settelment/bolt.png new file mode 100644 index 0000000..572e519 Binary files /dev/null and b/to-do/content.materials.settelment/bolt.png differ diff --git a/to-do/content.materials.settelment/bowl.png b/to-do/content.materials.settelment/bowl.png new file mode 100644 index 0000000..d682513 Binary files /dev/null and b/to-do/content.materials.settelment/bowl.png differ diff --git a/to-do/content.materials.settelment/cake.png b/to-do/content.materials.settelment/cake.png new file mode 100644 index 0000000..00681d9 Binary files /dev/null and b/to-do/content.materials.settelment/cake.png differ diff --git a/to-do/content.materials.settelment/crossbow.png b/to-do/content.materials.settelment/crossbow.png new file mode 100644 index 0000000..45f5164 Binary files /dev/null and b/to-do/content.materials.settelment/crossbow.png differ diff --git a/to-do/content.materials.settelment/diamond.png b/to-do/content.materials.settelment/diamond.png new file mode 100644 index 0000000..5fdd01e Binary files /dev/null and b/to-do/content.materials.settelment/diamond.png differ diff --git a/to-do/content.materials.settelment/egg.png b/to-do/content.materials.settelment/egg.png new file mode 100644 index 0000000..4e6afe9 Binary files /dev/null and b/to-do/content.materials.settelment/egg.png differ diff --git a/to-do/content.materials.settelment/egg.vmt b/to-do/content.materials.settelment/egg.vmt new file mode 100644 index 0000000..2178ab1 --- /dev/null +++ b/to-do/content.materials.settelment/egg.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/egg" +} diff --git a/to-do/content.materials.settelment/egg.vtf b/to-do/content.materials.settelment/egg.vtf new file mode 100644 index 0000000..cdce86e Binary files /dev/null and b/to-do/content.materials.settelment/egg.vtf differ diff --git a/to-do/content.materials.settelment/flour.png b/to-do/content.materials.settelment/flour.png new file mode 100644 index 0000000..08bdb3b Binary files /dev/null and b/to-do/content.materials.settelment/flour.png differ diff --git a/to-do/content.materials.settelment/flour.vmt b/to-do/content.materials.settelment/flour.vmt new file mode 100644 index 0000000..27de26a --- /dev/null +++ b/to-do/content.materials.settelment/flour.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/flour" +} diff --git a/to-do/content.materials.settelment/flour.vtf b/to-do/content.materials.settelment/flour.vtf new file mode 100644 index 0000000..55e1521 Binary files /dev/null and b/to-do/content.materials.settelment/flour.vtf differ diff --git a/to-do/content.materials.settelment/friedegg.png b/to-do/content.materials.settelment/friedegg.png new file mode 100644 index 0000000..98de51d Binary files /dev/null and b/to-do/content.materials.settelment/friedegg.png differ diff --git a/to-do/content.materials.settelment/friedegg.psd b/to-do/content.materials.settelment/friedegg.psd new file mode 100644 index 0000000..33e9429 Binary files /dev/null and b/to-do/content.materials.settelment/friedegg.psd differ diff --git a/to-do/content.materials.settelment/grain.png b/to-do/content.materials.settelment/grain.png new file mode 100644 index 0000000..f8e05d0 Binary files /dev/null and b/to-do/content.materials.settelment/grain.png differ diff --git a/to-do/content.materials.settelment/icon_badge.vmt b/to-do/content.materials.settelment/icon_badge.vmt new file mode 100644 index 0000000..026f0ad --- /dev/null +++ b/to-do/content.materials.settelment/icon_badge.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_badge" +} diff --git a/to-do/content.materials.settelment/icon_berries.vmt b/to-do/content.materials.settelment/icon_berries.vmt new file mode 100644 index 0000000..4e6bd11 --- /dev/null +++ b/to-do/content.materials.settelment/icon_berries.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_berries" +} diff --git a/to-do/content.materials.settelment/icon_bolt.vmt b/to-do/content.materials.settelment/icon_bolt.vmt new file mode 100644 index 0000000..c6c5e8d --- /dev/null +++ b/to-do/content.materials.settelment/icon_bolt.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_bolt" +} diff --git a/to-do/content.materials.settelment/icon_bowl.vmt b/to-do/content.materials.settelment/icon_bowl.vmt new file mode 100644 index 0000000..7a8b9e4 --- /dev/null +++ b/to-do/content.materials.settelment/icon_bowl.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_bowl" +} diff --git a/to-do/content.materials.settelment/icon_bowl.vtf b/to-do/content.materials.settelment/icon_bowl.vtf new file mode 100644 index 0000000..a9c6a88 Binary files /dev/null and b/to-do/content.materials.settelment/icon_bowl.vtf differ diff --git a/to-do/content.materials.settelment/icon_cake.vmt b/to-do/content.materials.settelment/icon_cake.vmt new file mode 100644 index 0000000..b824960 --- /dev/null +++ b/to-do/content.materials.settelment/icon_cake.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_cake" +} diff --git a/to-do/content.materials.settelment/icon_cake.vtf b/to-do/content.materials.settelment/icon_cake.vtf new file mode 100644 index 0000000..49c44bc Binary files /dev/null and b/to-do/content.materials.settelment/icon_cake.vtf differ diff --git a/to-do/content.materials.settelment/icon_crossbow.vmt b/to-do/content.materials.settelment/icon_crossbow.vmt new file mode 100644 index 0000000..614b941 --- /dev/null +++ b/to-do/content.materials.settelment/icon_crossbow.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_crossbow" +} diff --git a/to-do/content.materials.settelment/icon_crossbow.vtf b/to-do/content.materials.settelment/icon_crossbow.vtf new file mode 100644 index 0000000..b1182f8 Binary files /dev/null and b/to-do/content.materials.settelment/icon_crossbow.vtf differ diff --git a/to-do/content.materials.settelment/icon_diamond.vmt b/to-do/content.materials.settelment/icon_diamond.vmt new file mode 100644 index 0000000..203035c --- /dev/null +++ b/to-do/content.materials.settelment/icon_diamond.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_diamond" +} diff --git a/to-do/content.materials.settelment/icon_diamond.vtf b/to-do/content.materials.settelment/icon_diamond.vtf new file mode 100644 index 0000000..b23dc82 Binary files /dev/null and b/to-do/content.materials.settelment/icon_diamond.vtf differ diff --git a/to-do/content.materials.settelment/icon_friedegg.vmt b/to-do/content.materials.settelment/icon_friedegg.vmt new file mode 100644 index 0000000..c499dec --- /dev/null +++ b/to-do/content.materials.settelment/icon_friedegg.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_friedegg" +} diff --git a/to-do/content.materials.settelment/icon_friedegg.vtf b/to-do/content.materials.settelment/icon_friedegg.vtf new file mode 100644 index 0000000..363c649 Binary files /dev/null and b/to-do/content.materials.settelment/icon_friedegg.vtf differ diff --git a/to-do/content.materials.settelment/icon_grain.vmt b/to-do/content.materials.settelment/icon_grain.vmt new file mode 100644 index 0000000..4ab0b46 --- /dev/null +++ b/to-do/content.materials.settelment/icon_grain.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_grain" +} diff --git a/to-do/content.materials.settelment/icon_grain.vtf b/to-do/content.materials.settelment/icon_grain.vtf new file mode 100644 index 0000000..6e1e388 Binary files /dev/null and b/to-do/content.materials.settelment/icon_grain.vtf differ diff --git a/to-do/content.materials.settelment/icon_pie.vmt b/to-do/content.materials.settelment/icon_pie.vmt new file mode 100644 index 0000000..28cb99d --- /dev/null +++ b/to-do/content.materials.settelment/icon_pie.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_pie" +} diff --git a/to-do/content.materials.settelment/icon_pie.vtf b/to-do/content.materials.settelment/icon_pie.vtf new file mode 100644 index 0000000..cf9e91d Binary files /dev/null and b/to-do/content.materials.settelment/icon_pie.vtf differ diff --git a/to-do/content.materials.settelment/icon_researchtable.vmt b/to-do/content.materials.settelment/icon_researchtable.vmt new file mode 100644 index 0000000..d6cac0d --- /dev/null +++ b/to-do/content.materials.settelment/icon_researchtable.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_researchtable" +} diff --git a/to-do/content.materials.settelment/icon_researchtable.vtf b/to-do/content.materials.settelment/icon_researchtable.vtf new file mode 100644 index 0000000..5f01d8c Binary files /dev/null and b/to-do/content.materials.settelment/icon_researchtable.vtf differ diff --git a/to-do/content.materials.settelment/icon_rope.vmt b/to-do/content.materials.settelment/icon_rope.vmt new file mode 100644 index 0000000..4b7309e --- /dev/null +++ b/to-do/content.materials.settelment/icon_rope.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_rope" +} diff --git a/to-do/content.materials.settelment/icon_rope.vtf b/to-do/content.materials.settelment/icon_rope.vtf new file mode 100644 index 0000000..742145d Binary files /dev/null and b/to-do/content.materials.settelment/icon_rope.vtf differ diff --git a/to-do/content.materials.settelment/icon_scythe.vmt b/to-do/content.materials.settelment/icon_scythe.vmt new file mode 100644 index 0000000..a9b31d5 --- /dev/null +++ b/to-do/content.materials.settelment/icon_scythe.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_scythe" +} diff --git a/to-do/content.materials.settelment/icon_scythe.vtf b/to-do/content.materials.settelment/icon_scythe.vtf new file mode 100644 index 0000000..7ca7929 Binary files /dev/null and b/to-do/content.materials.settelment/icon_scythe.vtf differ diff --git a/to-do/content.materials.settelment/icon_soup.vmt b/to-do/content.materials.settelment/icon_soup.vmt new file mode 100644 index 0000000..4214ca1 --- /dev/null +++ b/to-do/content.materials.settelment/icon_soup.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_soup" +} diff --git a/to-do/content.materials.settelment/icon_soup.vtf b/to-do/content.materials.settelment/icon_soup.vtf new file mode 100644 index 0000000..91be7d2 Binary files /dev/null and b/to-do/content.materials.settelment/icon_soup.vtf differ diff --git a/to-do/content.materials.settelment/icon_sword.vmt b/to-do/content.materials.settelment/icon_sword.vmt new file mode 100644 index 0000000..45421fa --- /dev/null +++ b/to-do/content.materials.settelment/icon_sword.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ + "$basetexture" ".settelment/icon_sword" +} diff --git a/to-do/content.materials.settelment/icon_sword.vtf b/to-do/content.materials.settelment/icon_sword.vtf new file mode 100644 index 0000000..9365108 Binary files /dev/null and b/to-do/content.materials.settelment/icon_sword.vtf differ diff --git a/to-do/content.materials.settelment/pie.png b/to-do/content.materials.settelment/pie.png new file mode 100644 index 0000000..6257491 Binary files /dev/null and b/to-do/content.materials.settelment/pie.png differ diff --git a/to-do/content.materials.settelment/researchtable.png b/to-do/content.materials.settelment/researchtable.png new file mode 100644 index 0000000..df94747 Binary files /dev/null and b/to-do/content.materials.settelment/researchtable.png differ diff --git a/to-do/content.materials.settelment/rope.png b/to-do/content.materials.settelment/rope.png new file mode 100644 index 0000000..8e2be40 Binary files /dev/null and b/to-do/content.materials.settelment/rope.png differ diff --git a/to-do/content.materials.settelment/scythe.png b/to-do/content.materials.settelment/scythe.png new file mode 100644 index 0000000..f196408 Binary files /dev/null and b/to-do/content.materials.settelment/scythe.png differ diff --git a/to-do/content.materials.settelment/soup.png b/to-do/content.materials.settelment/soup.png new file mode 100644 index 0000000..6344ddb Binary files /dev/null and b/to-do/content.materials.settelment/soup.png differ diff --git a/to-do/content.materials.settelment/sword.png b/to-do/content.materials.settelment/sword.png new file mode 100644 index 0000000..fe800ff Binary files /dev/null and b/to-do/content.materials.settelment/sword.png differ diff --git a/to-do/modelsandnotes/modelsforbush b/to-do/modelsandnotes/modelsforbush new file mode 100644 index 0000000..01b2f8b --- /dev/null +++ b/to-do/modelsandnotes/modelsforbush @@ -0,0 +1,5 @@ +models/props/de_train/bush.mdl +models/props/de_inferno/largebush06.mdl +models/props_foliage/shrub_01a.mdl +models/props_foliage/shrub_02a.mdl +models/props_foliage/bramble001a.mdl diff --git a/wintersurvival2.txt b/wintersurvival2.txt new file mode 100644 index 0000000..dd4fbf5 --- /dev/null +++ b/wintersurvival2.txt @@ -0,0 +1,7 @@ +"wintersurvival2" +{ + "base" "gearfox" + "title" "Winter Survival 2 - Anarchy" + "menusystem" "1" + "maps" "^ws_|^ws2_" +} -- cgit v1.2.3-70-g09d2