branchrust_reboot/main/world_update_2/radioactive_watercancel
48 Commits over 31 Days - 0.06cph!
Radioactive water~
- Ensure base radioactivity is always set on object init
- Ensure base radioactivity is always set on object load
- Added profiling to item container rad count
- Move radiation map creation to just happen when the first radioactive body tries to add anything
Ensure current serialized map data is updated with the new radiation map each time set radiation body is called
Ensure water radiation map persists between saves
Cleaned up and streamlined onItemAddedToStack calls from base liquid vessel
ItemModContainerRads now listens for a bunch more ItemContainer changes
Much more accurate rad count for a vessel
Swapped radioactive water icon
Added generalised Radioactive flag to item
Flag is set true/false by static general radioactivity
Flag is also set true/false by the new item container (that supports rads)
Play some rad noises at appropriate levels for a few seconds should the player be inflicted with rads through poisoning rather than exposure
Huge reword and restructure to radioactive items~
Any item can now be radioactive
Added new flag on containers to check if any radioactive material is inside before they end up having to count up all their rads. Only used on the ItemModContainerRads for the moment
BaseRadioactiveMaterial now declared
Extra comments
Huge code cleanup with clearer method names
Poll rad amount inside container when opening
Centralised MaterialToRadsRatio inside Radiation.cs
Buffed radioactive water.
Hazmat still more than enough protection
Reworked ItemModContainerRads to only cache rad updates on item added/removed
Should improve reliability whilst also preventing checks on OnDirty providing a decent performance increase
Ensure ItemModConsumeContents also calls onItemAddedRemove
Drinking from a vessel now calls onItemAddedRemoved
Added static WaterTypes class. Swapped water Item Definition string lookup to a centralised set of definitions. Eg:
ItemManager.FindItemDefinition( "water" ) -> WaterTypes.WaterItemDef
Remove weird ass Visual Studio Code formatting
Can no longer splash players with radioactive water who are in safe zones
Vehicle fuel tank now supports radioactive water
world_update_2 -> radioactive_water
Radioactive water~
Looting player will now be irradiated whilst looting a dead/alive player that has large amounts of radioactive water on them (this only happens in the looting window)
Items now have some standardised methods to look for radiation amounts. For the time being these are only > 0 if the item has a ContainerRads item mod
Much cleaner routing through BasePlayer-Client.Looting as well as LootableCorpse
New file to specifically deal with these radiation changes on BasePlayer
Splashable now uses new methods
Route radiation check updates through PlayerLoot::SendUpdate to further prevent unneeded calculations
Fixed broken rad counts from container
Amounts update on changed instead
Player loot method to grab rads
Rerouted to ItemContainer instead
Fixed a bug crashing the editor on start
ModInit was too early for ItemManager?
Attempt at routing rad amounts through item containers
Balanced radioactive water splashes on players
Balanced radioactive water sprinker splashes on players
Moved Radiation calculations (tiers, protection discounts) to its own static class rather than storing it in TriggerRadiation
Rads are applyed to player motabolism instead
world_update_2 -> world_update_2/radioactive_water
world_update_2 -> world_update_2/radioactive_water
Added boolean to enable automatic topology changes
Lake/Oasis/Radtown S2P
Revert set topology on water sources - fixes incorrect topology map with lakes on terrain generation
Temprorarily breaks Radioactive Water
Merge World Update 2 -> Radioactive Water
Radioactive water reduces thirst rather than increasing it
Ensured radtown has correct lake setup
Water barrel accepts radioactive water
Player is now splashable by radioactive water. Irradiates players.
This means sprinklers filled with radioactive water will gradually radiate any player under its spray
Bunch of bug fixes
Added remove all force methods to planter. Removes all with no fibre drops when radioactive water is used
Fillwater command now supports radioactive water
Radioactive water will kill all plants in a planter when splashed
Added icon to radioactive water
Radioactive water will merge together with water or salt water in containers, turning them into radioactive water
Keep the map as low res as possible (256x256) since we only have a couple of radioactive water objects
Swapped radioactive water check from physics checks to a texture map instead
Added drinkable radioactive water to new radtown
S2P
Actually add water body to the topology map. Water bodies marked as lake/river should now be drinkable as expected