WeaponMode record
public sealed record WeaponMode One of a weapon’s modes, an entry in its record’s modes list, as Garry’s Mod’s physics gun has. A player picks one by holding Alt, and while it’s picked its title, icons, view model, world model, hold, effects and attachments stand in for the weapon’s. Each one it leaves out is the weapon’s. A behaviour reads the picked mode’s index from IWeaponHolder.Mode, and the record’s EffectsIn, WorldModelIn, HoldIn and AttachmentsIn fold a mode over the weapon for it.
modes = [
{ title = "Rifle", accent = "#40a0ff" },
{ title = "Grenade", accent = "#ff8020", viewmodel = "pulse:viewmodel/pulse_gl", effects = { muzzle = "pulse:effect/thump" } },
]
- Assembly
- EvilEngine.Formats
- Commit
- 4ff877b1