364 Commits over 304 Days - 0.05cph!
Refactored BaseClothing -> ArmorEntity. Fixed a bug where giving an item to a container wouldn't remove it from its previous container. Added an inventory to player corpses. Transfer a player's entire inventory to their corpse.
If an item is an ArmorItem try to move it to the Equipment first when transferring. Make FindFreeSlot support passing in an InventoryItem instance to test for and add InventoryContainer.CouldTakeAny.
Pass InventoryItem as a parameter to transfer target handlers so they can provide different container options per item type
Added IHeatEmitter and SphereTrigger
Added EntityExtension class and Entity.FindParentOfType<T> extension
Implemented IHeatEmitter on Furnace and Campfire and calculate and lerp player's temperature to surrounding heat emitters
Automatically close any storage UI panels where either the entity has become invalid or the entity is a loot spawner and the inventory is now empty
Added LootSpawner base entity type. Added a basic loot crate for spawning with Hammer. Added LootTableResource, ILootTableItem. Added spawn chances etc to all available items so far. Added InventoryContainer.IsTakeOnly to make a container so the player can only take from it.
Actually take the items that are required for each structure piece
Added ItemCostAttribute and updated all Structure types to have one
Added structure item costs to the Toolbox Menu and show when it is unaffordable
Simplify radial menu by having a single SCSS file that both ReloadMenu and ToolboxMenu share
Added dry fire sound event and increase spread for buckshot
Set recoil ranges for Pump Shotgun
Increase max players to 32
Add Shotgun ammo type to enum
Have weapon base use item clip size and set hold type properly move a bunch of public virtual methods to protected
Early out if type description for item resource doesn't exist
Start adding shotgun with buckshot and slug ammo types and add temp icons for all including pistol and rifle ammo
Add ProjectileCount support to ProjectileWeapon and move projectile backwards one tick on initialize
Updated slug ammo stack size
Added pump shotgun weapon and added damage falloff curves
Add damage falloff getter to WeaponItem
Fixed to NetInventoryContainer and NetInventoryItem, update value based on previous version when hotloading
Return null if passing unique id of null or empty into InventorySystem.GetDefinition
Add working ammo type selector and switching ammo - move reloading to server-side only https://files.facepunch.com/conna/1b2811b1/sbox-dev_wuJt54qN9X.mp4
Various inventory networking fixes (invalid items) and no longer need to specify item to InventorySlot panel just the slot number
Added ICookerEntity and ICookableItem and CookingProcessor to process cooking
Ore is tagged as ore and fuel is tagged as fuel
Update InventoryView to support multiple open inventory containers
Update furnace to use CookingProcessor and implement ICookerEntity
Add cooking UI https://files.facepunch.com/conna/1b2511b1/sbox-dev_EykTn4ZqaE.mp4
Added a crafting recipe for the Storage Crate
Don't show output stack size for crafting recipe if the stack size is 1
Adjusted some placeholder item icons
Added furnance.vmdl and furnace.vmat and added attachment for fire
Added Furnace and FurnaceItem (WIP)
Added a crafting recipe for the Furnace item
Fixed some entities not being hovered properly by the cursor if they are too tall
Increase stack size of all ammo types
Added a method to Weapon to create a temporary short-lived light source at a position
Client-side create a temporary light source at the muzzle position when firing the MP5 to light up the area
When hovering a crafting queue item have it transition its border to red and show a red box shadow
Simplify the recipe categories a little for now until additional categories are needed
Have ITooltipProvider inherit IValid
Updated Bolt recipe to provide 2x Bolt per craft
Check for IsValid() in CustomTooltip to determine if the tooltip should fuck off
Item definitions are always valid
Added RecipeCategory enum and add a property for it on RecipeResource
Added the first fully working version of the crafting interface https://files.facepunch.com/conna/1b2511b1/sbox-dev_PTQgHsDnTd.mp4
Some additional styling changes for the crafting mockup
Started mocking up the first crafting menu draft
Added a client-side ConVar to show your own nametag (debug)
Fixed an out-of-range exception when clearing the crafting queue on death
Added Nametags and Nametag and update them for each client
Updated Flashlight and Laser Sight attachments to have correct rotation
Remove AttachmentResource - attachments don't really need to be a game resource they each require very specific logic
Add Flashlight derived from SpotLightEntity with pre-configured properties
Add AttachmentItem with various virtual methods (OnAttached, OnDetatched, etc)
Update InventoryContainer.FindItems to return an IEnumerable instead of a new list every time
Call a method when a WeaponItem has its weapon entity changed or nulled
Add working WeaponFlashlightItem attachment and make sure OnAttached/OnDetatched is called in AttachmentContainer
When an item in a slot contains items in its child container show an icon to represent that
Updated all weapon models with latest and source. Added AttachmentContainer, AttachmentItem and AttachmentResource. Added a simple Weapon Flashlight attachment (non-functional.)
Simplified some naming so that InventoryContainer and InventoryItem both just have Parent
Inventory containers are no longer required to have a parent entity. Inventory containers can have an optional parent item. Items can now control whether or not they register their own child containers. This is useful because now weapons can now have their own "inventory" to store attachments. Updated all inventory UIs to support selecting an item and showing any child containers.
Less spacing between inventory slots and reduce the border radius by half
Added TemperatureModifier to ArmorResource & ArmorItem and appropriately adjust the player's temperature based on what they are wearing
Extended the equipment inventory to support a new armor type: Feet. Added Army Boots, Black Hoodie and Cargo Pants as available items
Added a hover loot feature (hold Ctrl and hover over items in a container to add them to a transfer queue to be transferred to their transfer target container)
Completed refactored InventoryContainer to support derived types and custom serialization
Some tidy up around InventoryContainer
Refactored item tag system to be a hash set of strings and can be set on the game resource. Item tag display info for tooltips etc can be registered with ItemTag.Register this stuff will be used for inventory container item filtering
Completely remove hardcoded equipment check and add a new whitelist and blacklist item tag filter to inventory containers (client + server) show an invalid drag if trying to drag into a container that disallows the item
Merge branch 'main' of sbox-forsaken
Added Thoughts and some generic thoughts for invalid placement of construction pieces and deployables https://files.facepunch.com/conna/1b2211b1/sbox-dev_3TTHzT5GR3.mp4
Some tweaks to the campfire
Updated font to Vollkorn for Cursor title and action names
Added a dynamic light to the campfire that flickers and moves around for a cool effect
Added SetRadialGradientBackground PanelStyle extension method
Add ForsakenPlayer.GetChatRecipients
Added opacity transitions for Backpack, Hotbar, Storage and ToolboxMenu
Fix Draggable selecting IDroppable panels that aren't visible
Added glow background to InventorySlot and use a radial gradient
Added a chatbox with support for system messages
Merge branch 'main' of sbox-forsaken
made campfire particle smaller
Add a default muzzle flash effect to the MP5A4
Temporarily fix parse ordering error by using °
Refactored context actions to use a simple class with ids instead of a bunch of classes
Use ??= for internal environment in TimeController
Reduce size of campfire by ~50%
Support new context action stuff in player, make cursor movement less frame dependent, and simulate deployable placement in FrameSimulate
Update Storage Crate and Item Entity to new context action stuff
Add the first version of the deployable campfire (cooking UI to come later)
Some alternative styling to tooltips, draggables and inventory slots to better match the theme
Added TimeGradient<T>, ColorGradient and FloatGradient to TimeController and added TimeSystem.Temperature
Remove unused properties from MoveController
Added networked temperature to the player (for now this just gets set to the ambient temperature)
Added a simple (temporary) vitals display to show health, stamina and temperature
Merge branch 'main' of sbox-forsaken
Update InventorySlot styling
Added campfire model and Vollkorn font and resource paths
Added a command to throw an item from a container
Add `item` tag to ItemEntity entities and show stack size in the context name
PickupAction now works with ItemEntity entities as well as storage crates
Reverse FindDroppable loop in Draggable class
Make Backpack and Storage panels droppable and, when items are dropped onto the background, throw the items out of the container in that direction
Ensure that stack sizes of given items (from command, or by cancelling a crafting entry) properly respect an item's max stack size value
Added CraftingTime to RecipeResource (the amount of time it takes to craft in seconds)
Added CraftingQueueEntry networkable type
Added a networked crafting queue (CraftingQueueEntry) and various methods to add or cancel entries for crafting
Updated bolt recipe to have a crafting time of 2 seconds
Use Color cast for hex colors in ItemColors class
Add an intro transition to the custom tooltips