luadox fix?

This commit is contained in:
FatalErr42O 2025-01-03 17:56:46 -08:00
parent 4837b8f36f
commit 305abdf906
13 changed files with 425 additions and 49 deletions

View File

@ -25,6 +25,7 @@ local Vec = vector
-- *Please note:* there are likey undocumented fields that are used in internal functions. If you find one, please make an issue on Github.
--
-- @class gun
-- @display Gun
-- @field properties @{lvl1_fields.properties|properties} which define the vast majority of gun attributes and may change accross instances
-- @field consts @{lvl1_fields.consts|constants} which define gun attributes and should not be changed in an instance of the gun
-- @field offsets runtime storage of @{lvl1_fields.offsets|offsets} generated by recoil sway wag or any other element.

View File

@ -69,7 +69,7 @@
<div class="classes">
<div class="heading">Classes</div>
<ul>
<li class="selected"><a href="../class/gun.html">Gun.gun</a></li>
<li class="selected"><a href="../class/gun.html">Gun</a></li>
<li><a href="../class/player_model_handler.html">Player_model_handler.player_model_handler</a></li>
</ul>
</div>

View File

@ -41,7 +41,7 @@
<div class="classes">
<div class="heading">Classes</div>
<ul>
<li><a href="../class/gun.html">Gun.gun</a></li>
<li><a href="../class/gun.html">Gun</a></li>
<li class="selected"><a href="../class/player_model_handler.html">Player_model_handler.player_model_handler</a></li>
</ul>
</div>

View File

@ -32,7 +32,7 @@
<div class="classes">
<div class="heading">Classes</div>
<ul>
<li><a href="class/gun.html">Gun.gun</a></li>
<li><a href="class/gun.html">Gun</a></li>
<li><a href="class/player_model_handler.html">Player_model_handler.player_model_handler</a></li>
</ul>
</div>

View File

@ -1,5 +1,5 @@
var docs = [
{path:"class/gun.html", type:"class", title:"Gun.gun", text:"class fields Defining a gun: *method documentation coming soon (or never...) The appearance and handling of guns by default are defined by two table fields: their consts and their properties. properties define nearly everything, from how a gun handles to how it looks, what model it uses, etc. while consts define attributes that should never change, like bones within the gun, framerates, wether the gun is allowed to have certain attributes at all. The other fields of the class define tracking variables or other important things for the internal workings. There are essentially only 3 fields you must define to register a gun: itemstring, name, and properties. To hold the gun, the item defined in itemstring must actually exist, it will not automatically register. To have a functional gun however, more will need to be changed in terms of properties. it's reccomended that you take a look at existing mods (like guns4d_pack_1) for guidance Guns4d uses a class system for most moving parts- including the gun. New guns therefore are created with the :inherit(def) method, where def is the definition of your new gun- or rather the changed parts of it. So to make a new gun you can run Guns4d.gun:inherit() or you can do the same thing with a seperate class of weapons. Set name to \"__template\" for template classes of guns. for properties: for tables where you wish to delete the parent class's fields altogether (since inheritence prevents this) you can set the field \"__replace_old_table=true\" additionally Please note:* there are likey undocumented fields that are used in internal functions. If you find one, please make an issue on Github."},
{path:"class/gun.html", type:"class", title:"Gun", text:"class fields Defining a gun: *method documentation coming soon (or never...) The appearance and handling of guns by default are defined by two table fields: their consts and their properties. properties define nearly everything, from how a gun handles to how it looks, what model it uses, etc. while consts define attributes that should never change, like bones within the gun, framerates, wether the gun is allowed to have certain attributes at all. The other fields of the class define tracking variables or other important things for the internal workings. There are essentially only 3 fields you must define to register a gun: itemstring, name, and properties. To hold the gun, the item defined in itemstring must actually exist, it will not automatically register. To have a functional gun however, more will need to be changed in terms of properties. it's reccomended that you take a look at existing mods (like guns4d_pack_1) for guidance Guns4d uses a class system for most moving parts- including the gun. New guns therefore are created with the :inherit(def) method, where def is the definition of your new gun- or rather the changed parts of it. So to make a new gun you can run Guns4d.gun:inherit() or you can do the same thing with a seperate class of weapons. Set name to \"__template\" for template classes of guns. for properties: for tables where you wish to delete the parent class's fields altogether (since inheritence prevents this) you can set the field \"__replace_old_table=true\" additionally Please note:* there are likey undocumented fields that are used in internal functions. If you find one, please make an issue on Github."},
{path:"class/player_model_handler.html", type:"class", title:"Player_model_handler.player_model_handler", text:"player_model_handler defining the player model when holding a gun each player model should have a \"gun holding equivelant\". There are numerous reasons for this first and foremost is that because Minetest is a [redacted mindless insults]. because of this you cannot unset bone offsets and return to normal animations. Bone offsets are needed for the arms to aim at the gun there's no simple way around this fact. Since every model is different custom behavior has to be defined for most."},
{path:"module/misc_helpers.html", type:"module", title:"misc_helpers", text:""},
{path:"module/play_sound.html", type:"module", title:"play_sound", text:"implements tools for quickly playing audio."},

View File

@ -38,7 +38,7 @@
<div class="classes">
<div class="heading">Classes</div>
<ul>
<li><a href="../class/gun.html">Gun.gun</a></li>
<li><a href="../class/gun.html">Gun</a></li>
<li><a href="../class/player_model_handler.html">Player_model_handler.player_model_handler</a></li>
</ul>
</div>

View File

@ -39,7 +39,7 @@
<div class="classes">
<div class="heading">Classes</div>
<ul>
<li><a href="../class/gun.html">Gun.gun</a></li>
<li><a href="../class/gun.html">Gun</a></li>
<li><a href="../class/player_model_handler.html">Player_model_handler.player_model_handler</a></li>
</ul>
</div>

View File

@ -39,7 +39,7 @@
<div class="classes">
<div class="heading">Classes</div>
<ul>
<li><a href="../class/gun.html">Gun.gun</a></li>
<li><a href="../class/gun.html">Gun</a></li>
<li><a href="../class/player_model_handler.html">Player_model_handler.player_model_handler</a></li>
</ul>
</div>

View File

@ -39,7 +39,7 @@
<div class="classes">
<div class="heading">Classes</div>
<ul>
<li><a href="../class/gun.html">Gun.gun</a></li>
<li><a href="../class/gun.html">Gun</a></li>
<li><a href="../class/player_model_handler.html">Player_model_handler.player_model_handler</a></li>
</ul>
</div>

View File

@ -3,7 +3,7 @@
<!-- Documentation generated by LuaDox: https://github.com/jtackaberry/luadox -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Gun - Guns4d</title>
<title>gun - Guns4d</title>
<link href="../prism.css?7653a2d" rel="stylesheet" />
<link rel="stylesheet" href="../luadox.css?7653a2d" type="text/css">
@ -27,7 +27,7 @@
<div class="sections">
<div class="heading">Contents</div>
<ul>
<li><a href="#Gun">Module <code>Gun</code></a></li>
<li><a href="#gun">Module <code>gun</code></a></li>
<li><a href="#lvl1_fields.properties"><p>properties</p>
</a></li>
<li><a href="#gun.properties.inventory"><p>properties.inventory</p>
@ -69,7 +69,7 @@
<div class="classes">
<div class="heading">Classes</div>
<ul>
<li class="selected"><a href="../module/Gun.html">Gun.Gun</a></li>
<li class="selected"><a href="../module/gun.html">gun.gun</a></li>
<li><a href="../class/player_model_handler.html">Player_model_handler.player_model_handler</a></li>
</ul>
</div>
@ -81,16 +81,391 @@
<li><a href="../module/Bullet_hole.html">Bullet_hole</a></li>
<li><a href="../module/Control_handler.html">Control_handler</a></li>
<li><a href="../module/Gun-methods.html">Gun-methods</a></li>
<li class="selected"><a href="../module/Gun.html">Gun</a></li>
<li class="selected"><a href="../module/gun.html">gun</a></li>
</ul>
</div>
</div>
<div class="body">
<div class="section">
<h2 class="module" id="Gun">Module <code>Gun</code>
<a class="permalink" href="#Gun" title="Permalink to this definition"></a>
<h2 class="module" id="gun">Module <code>gun</code>
<a class="permalink" href="#gun" title="Permalink to this definition"></a>
</h2>
<div class="inner">
<p>module</p>
<div class="synopsis">
<h3>Synopsis</h3>
<div class="heading">Attributes</div>
<table class="fields ">
<tr>
<td class="name"><a href="#gun.properties"><var>properties</var></a></td>
<td class="doc"><p><a href="../module/gun.html#lvl1_fields.properties">properties</a> which define the vast majority of gun attributes and may change accross instances</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.consts"><var>consts</var></a></td>
<td class="doc"><p><a href="../module/gun.html#lvl1_fields.consts">constants</a> which define gun attributes and should not be changed in an instance of the gun</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.offsets"><var>offsets</var></a></td>
<td class="doc"><p>runtime storage of <a href="../module/gun.html#lvl1_fields.offsets">offsets</a> generated by recoil sway wag or any other element</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.name"><var>name</var></a></td>
<td class="doc"><p><code>string</code> the name of the gun</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.itemstring"><var>itemstring</var></a></td>
<td class="doc"><p><code>string</code> the itemstring of the gun- i.e. <code>&quot;guns4d_pack_1:m4&quot;</code></p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.itemstack"><var>itemstack</var></a></td>
<td class="doc"><p><code>ItemStack</code> the gun itemstack</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.player"><var>player</var></a></td>
<td class="doc"><p><code>ObjRef</code> the operator of the weapon</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.meta"><var>meta</var></a></td>
<td class="doc"><p><code>MetaDataRef</code> itemstack meta</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.id"><var>id</var></a></td>
<td class="doc"><p><code>string</code> the ID of the gun used for tracking of it's inventory</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.gun_entity"><var>gun_entity</var></a></td>
<td class="doc"><p><code>ObjRef</code> the gun entity</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun._registered"><var>_registered</var></a></td>
<td class="doc"><p>list of registered guns, <strong>DO NOT MODIFY</strong> I really need a metatable for this class</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.bolt_charged"><var>bolt_charged</var></a></td>
<td class="doc"><p><code>bool</code> is the bolt charged</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.particle_spawners"><var>particle_spawners</var></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> list of particle spawner handles (generated by firing)</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.current_firemode"><var>current_firemode</var></a></td>
<td class="doc"><p><code>int</code> the active index of the firemode from <a href="../module/gun.html#lvl1_fields.properties.firemodes">firemodes</a></p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.walking_tick"><var>walking_tick</var></a></td>
<td class="doc"><p><code>float</code> walking time used to generate the figure 8 for wag</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.time_since_last_fire"><var>time_since_last_fire</var></a></td>
<td class="doc"><p><code>float</code></p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.time_since_creation"><var>time_since_creation</var></a></td>
<td class="doc"><p><code>float</code></p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.rechamber_time"><var>rechamber_time</var></a></td>
<td class="doc"><p><code>float</code> time left for the chamber to cycle (for firerates)</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.burst_queue"><var>burst_queue</var></a></td>
<td class="doc"><p><code>int</code> number of rounds left that need to be fired after a burst fire</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.muzzle_flash"><var>muzzle_flash</var></a></td>
<td class="doc"><p><code>function</code></p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.gun_translation"><var>gun_translation</var></a></td>
<td class="doc"><p><code>vec3</code> translation of the gun relative to the &quot;gun&quot; bone or the player axial rotation</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.property_modifiers"><var>property_modifiers</var></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> indexed list of functions which are called when the gun's properties need to be built</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.attached_objects"><var>attached_objects</var></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> a list of ObjRefs that are attached to the gun as a result of attached_objects</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.subclass_instances"><var>subclass_instances</var></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> list of subclass instances (i.e. Sprite_scope)</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.animation_rotation"><var>animation_rotation</var></a></td>
<td class="doc"><p><code>vector</code> containing the rotation offset from the current frame, this will be factored into the gun's direction if {@consts.ANIMATIONS_OFFSET_AIM}=true</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.animation_translation"><var>animation_translation</var></a></td>
<td class="doc"><p><code>vector</code> containing the translational/positional offset from the current frame</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.total_offsets"><var>total_offsets</var></a></td>
<td class="doc"><p>all offsets from <a href="../module/gun.html#gun.offsets">gun.offset</a> of a type added together gun in the same format as a <a href="../module/gun.html#gun.offsets">an offset</a> (that is, five vectors, <code>gun_axial</code>, <code>player_axial</code>, etc.)</p>
</td>
</tr>
<tr>
<td class="name"><a href="#gun.velocities"><var>velocities</var></a></td>
<td class="doc"><p>velocities in the format of <a href="../module/gun.html#gun.offsets">offsets</a>, but only containing angular (<code>gun_axial</code> and <code>player_axial</code>) offsets</p>
</td>
</tr>
</table>
</div>
<dl class="fields">
<dt id="gun.properties">
<span class="icon"></span><var>gun.properties</var>
<a class="permalink" href="#gun.properties" title="Permalink to this definition"></a>
</dt>
<dd>
<p><a href="../module/gun.html#lvl1_fields.properties">properties</a> which define the vast majority of gun attributes and may change accross instances</p>
</dd>
<dt id="gun.consts">
<span class="icon"></span><var>gun.consts</var>
<a class="permalink" href="#gun.consts" title="Permalink to this definition"></a>
</dt>
<dd>
<p><a href="../module/gun.html#lvl1_fields.consts">constants</a> which define gun attributes and should not be changed in an instance of the gun</p>
</dd>
<dt id="gun.offsets">
<span class="icon"></span><var>gun.offsets</var>
<a class="permalink" href="#gun.offsets" title="Permalink to this definition"></a>
</dt>
<dd>
<p>runtime storage of <a href="../module/gun.html#lvl1_fields.offsets">offsets</a> generated by recoil sway wag or any other element.</p>
</dd>
<dt id="gun.name">
<span class="icon"></span><var>gun.name</var>
<a class="permalink" href="#gun.name" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>string</code> the name of the gun. Set to __template for guns which have no instances and serve as a template. It is safe to set name to the same as <a href="../module/gun.html#gun.itemstring">gun.itemstring</a></p>
</dd>
<dt id="gun.itemstring">
<span class="icon"></span><var>gun.itemstring</var>
<a class="permalink" href="#gun.itemstring" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>string</code> the itemstring of the gun- i.e. <code>&quot;guns4d_pack_1:m4&quot;</code>. Set to <code>&quot;&quot;</code> for <code>__template</code> guns.</p>
</dd>
<dt id="gun.itemstack">
<span class="icon"></span><var>gun.itemstack</var>
<a class="permalink" href="#gun.itemstack" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>ItemStack</code> the gun itemstack. Remember to player:set_wielded_item(self.itemstack) when making meta or itemstack changes.</p>
</dd>
<dt id="gun.player">
<span class="icon"></span><var>gun.player</var>
<a class="permalink" href="#gun.player" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>ObjRef</code> the operator of the weapon. This may at some point be deprecated when I start to implement AI/mob usage</p>
</dd>
<dt id="gun.meta">
<span class="icon"></span><var>gun.meta</var>
<a class="permalink" href="#gun.meta" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>MetaDataRef</code> itemstack meta</p>
</dd>
<dt id="gun.id">
<span class="icon"></span><var>gun.id</var>
<a class="permalink" href="#gun.id" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>string</code> the ID of the gun used for tracking of it's inventory</p>
</dd>
<dt id="gun.gun_entity">
<span class="icon"></span><var>gun.gun_entity</var>
<a class="permalink" href="#gun.gun_entity" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>ObjRef</code> the gun entity</p>
</dd>
<dt id="gun._registered">
<span class="icon"></span><var>gun._registered</var>
<a class="permalink" href="#gun._registered" title="Permalink to this definition"></a>
</dt>
<dd>
<p>list of registered guns, <strong>DO NOT MODIFY</strong> I really need a metatable for this class...</p>
</dd>
<dt id="gun.bolt_charged">
<span class="icon"></span><var>gun.bolt_charged</var>
<a class="permalink" href="#gun.bolt_charged" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>bool</code> is the bolt charged</p>
</dd>
<dt id="gun.particle_spawners">
<span class="icon"></span><var>gun.particle_spawners</var>
<a class="permalink" href="#gun.particle_spawners" title="Permalink to this definition"></a>
</dt>
<dd>
<p><a href="../module/misc_helpers.html#table"><code>table</code></a> list of particle spawner handles (generated by firing)</p>
</dd>
<dt id="gun.current_firemode">
<span class="icon"></span><var>gun.current_firemode</var>
<a class="permalink" href="#gun.current_firemode" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>int</code> the active index of the firemode from <a href="../module/gun.html#lvl1_fields.properties.firemodes">firemodes</a></p>
</dd>
<dt id="gun.walking_tick">
<span class="icon"></span><var>gun.walking_tick</var>
<a class="permalink" href="#gun.walking_tick" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>float</code> walking time used to generate the figure 8 for wag</p>
</dd>
<dt id="gun.time_since_last_fire">
<span class="icon"></span><var>gun.time_since_last_fire</var>
<a class="permalink" href="#gun.time_since_last_fire" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>float</code></p>
</dd>
<dt id="gun.time_since_creation">
<span class="icon"></span><var>gun.time_since_creation</var>
<a class="permalink" href="#gun.time_since_creation" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>float</code></p>
</dd>
<dt id="gun.rechamber_time">
<span class="icon"></span><var>gun.rechamber_time</var>
<a class="permalink" href="#gun.rechamber_time" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>float</code> time left for the chamber to cycle (for firerates)</p>
</dd>
<dt id="gun.burst_queue">
<span class="icon"></span><var>gun.burst_queue</var>
<a class="permalink" href="#gun.burst_queue" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>int</code> number of rounds left that need to be fired after a burst fire</p>
</dd>
<dt id="gun.muzzle_flash">
<span class="icon"></span><var>gun.muzzle_flash</var>
<a class="permalink" href="#gun.muzzle_flash" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>function</code></p>
</dd>
<dt id="gun.gun_translation">
<span class="icon"></span><var>gun.gun_translation</var>
<a class="permalink" href="#gun.gun_translation" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>vec3</code> translation of the gun relative to the &quot;gun&quot; bone or the player axial rotation.</p>
</dd>
<dt id="gun.property_modifiers">
<span class="icon"></span><var>gun.property_modifiers</var>
<a class="permalink" href="#gun.property_modifiers" title="Permalink to this definition"></a>
</dt>
<dd>
<p><a href="../module/misc_helpers.html#table"><code>table</code></a> indexed list of functions which are called when the gun's properties need to be built. This is used for things like attachments, etc.</p>
</dd>
<dt id="gun.attached_objects">
<span class="icon"></span><var>gun.attached_objects</var>
<a class="permalink" href="#gun.attached_objects" title="Permalink to this definition"></a>
</dt>
<dd>
<p><a href="../module/misc_helpers.html#table"><code>table</code></a> a list of ObjRefs that are attached to the gun as a result of attached_objects</p>
</dd>
<dt id="gun.subclass_instances">
<span class="icon"></span><var>gun.subclass_instances</var>
<a class="permalink" href="#gun.subclass_instances" title="Permalink to this definition"></a>
</dt>
<dd>
<p><a href="../module/misc_helpers.html#table"><code>table</code></a> list of subclass instances (i.e. Sprite_scope)</p>
</dd>
<dt id="gun.animation_rotation">
<span class="icon"></span><var>gun.animation_rotation</var>
<a class="permalink" href="#gun.animation_rotation" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>vector</code> containing the rotation offset from the current frame, this will be factored into the gun's direction if {@consts.ANIMATIONS_OFFSET_AIM}=true</p>
</dd>
<dt id="gun.animation_translation">
<span class="icon"></span><var>gun.animation_translation</var>
<a class="permalink" href="#gun.animation_translation" title="Permalink to this definition"></a>
</dt>
<dd>
<p><code>vector</code> containing the translational/positional offset from the current frame</p>
</dd>
<dt id="gun.total_offsets">
<span class="icon"></span><var>gun.total_offsets</var>
<a class="permalink" href="#gun.total_offsets" title="Permalink to this definition"></a>
</dt>
<dd>
<p>all offsets from <a href="../module/gun.html#gun.offsets">gun.offset</a> of a type added together gun in the same format as a <a href="../module/gun.html#gun.offsets">an offset</a> (that is, five vectors, <code>gun_axial</code>, <code>player_axial</code>, etc.). Note that if
offsets are changed after update, this will not be updated automatically until the next update. update_rotations() must be called to do so.</p>
</dd>
<dt id="gun.velocities">
<span class="icon"></span><var>gun.velocities</var>
<a class="permalink" href="#gun.velocities" title="Permalink to this definition"></a>
</dt>
<dd>
<p>velocities in the format of <a href="../module/gun.html#gun.offsets">offsets</a>, but only containing angular (<code>gun_axial</code> and <code>player_axial</code>) offsets.</p>
</dd>
</dl>
</div>
</div>
<div class="section">
@ -105,57 +480,57 @@
<table class="fields compact">
<tr>
<td class="name"><var id="lvl1_fields.properties.hip">hip</var><a class="permalink" href="#lvl1_fields.properties.hip" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/Gun.html#gun.properties.hip">hipfire properties</a></p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/gun.html#gun.properties.hip">hipfire properties</a></p>
</td>
</tr>
<tr>
<td class="name"><var id="lvl1_fields.properties.ads">ads</var><a class="permalink" href="#lvl1_fields.properties.ads" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/Gun.html#gun.properties.ads">aiming (&quot;aiming down sights&quot;) properties</a></p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/gun.html#gun.properties.ads">aiming (&quot;aiming down sights&quot;) properties</a></p>
</td>
</tr>
<tr>
<td class="name"><var id="lvl1_fields.properties.firemodes">firemodes</var><a class="permalink" href="#lvl1_fields.properties.firemodes" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/Gun.html#gun.properties.firemodes">list of firemodes</a></p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/gun.html#gun.properties.firemodes">list of firemodes</a></p>
</td>
</tr>
<tr>
<td class="name"><var id="lvl1_fields.properties.recoil">recoil</var><a class="permalink" href="#lvl1_fields.properties.recoil" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/Gun.html#gun.properties.recoil">defines the guns recoil</a></p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/gun.html#gun.properties.recoil">defines the guns recoil</a></p>
</td>
</tr>
<tr>
<td class="name"><var id="lvl1_fields.properties.sway">sway</var><a class="permalink" href="#lvl1_fields.properties.sway" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/Gun.html#gun.properties.sway">defines the guns idle sway</a></p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/gun.html#gun.properties.sway">defines the guns idle sway</a></p>
</td>
</tr>
<tr>
<td class="name"><var id="lvl1_fields.properties.wag">wag</var><a class="permalink" href="#lvl1_fields.properties.wag" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/Gun.html#gun.properties.wag">defines the movement of the gun while walking</a></p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/gun.html#gun.properties.wag">defines the movement of the gun while walking</a></p>
</td>
</tr>
<tr>
<td class="name"><var id="lvl1_fields.properties.charging">charging</var><a class="permalink" href="#lvl1_fields.properties.charging" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/Gun.html#gun.properties.charging">defines how rounds are chambered into the gun</a></p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/gun.html#gun.properties.charging">defines how rounds are chambered into the gun</a></p>
</td>
</tr>
<tr>
<td class="name"><var id="lvl1_fields.properties.ammo">ammo</var><a class="permalink" href="#lvl1_fields.properties.ammo" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/Gun.html#gun.properties.ammo">defines what ammo the gun uses</a></p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/gun.html#gun.properties.ammo">defines what ammo the gun uses</a></p>
</td>
</tr>
<tr>
<td class="name"><var id="lvl1_fields.properties.visuals">visuals</var><a class="permalink" href="#lvl1_fields.properties.visuals" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/Gun.html#gun.properties.visuals">defines visual attributes of the gun</a></p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/gun.html#gun.properties.visuals">defines visual attributes of the gun</a></p>
</td>
</tr>
<tr>
<td class="name"><var id="lvl1_fields.properties.sounds">sounds</var><a class="permalink" href="#lvl1_fields.properties.sounds" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/Gun.html#gun.properties.sounds">defines sounds to be used by functions of the gun</a></p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/gun.html#gun.properties.sounds">defines sounds to be used by functions of the gun</a></p>
</td>
</tr>
<tr>
<td class="name"><var id="lvl1_fields.properties.inventory">inventory</var><a class="permalink" href="#lvl1_fields.properties.inventory" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/Gun.html#gun.properties.inventory">inventory related attributes</a></p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> <a href="../module/gun.html#gun.properties.inventory">inventory related attributes</a></p>
</td>
</tr>
<tr>
@ -226,7 +601,7 @@
<a class="permalink" href="#gun.properties.inventory" title="Permalink to this definition"></a>
</h2>
<div class="inner">
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<div class="synopsis">
<table class="fields compact">
@ -252,7 +627,7 @@
</tr>
<tr>
<td class="name"><var id="gun.properties.inventory.inventory_image">inventory_image</var><a class="permalink" href="#gun.properties.inventory.inventory_image" title="Permalink to this definition"></a></td>
<td class="doc"><p><code>string</code> inventory image for when the gun is loaded. This is added automatically during construction.</p>
<td class="doc"><p><code>string</code> inventory image for when the gun is loaded. This is added automatically during construction as the item's wield image.</p>
</td>
</tr>
</table>
@ -265,7 +640,7 @@
<a class="permalink" href="#gun.properties.subclsses" title="Permalink to this definition"></a>
</h2>
<div class="inner">
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<div class="synopsis">
<table class="fields compact">
@ -276,7 +651,7 @@
</tr>
<tr>
<td class="name"><var id="gun.properties.subclsses.part_handler">part_handler</var><a class="permalink" href="#gun.properties.subclsses.part_handler" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/Gun.html#gun.properties.subclsses.part_handler"><code>part_handler</code></a> Part_handler class to use. Default is <code>Guns4d.part_handler</code></p>
<td class="doc"><p><a href="../module/gun.html#gun.properties.subclsses.part_handler"><code>part_handler</code></a> Part_handler class to use. Default is <code>Guns4d.part_handler</code></p>
</td>
</tr>
<tr>
@ -299,7 +674,7 @@
<a class="permalink" href="#gun.properties.ads" title="Permalink to this definition"></a>
</h2>
<div class="inner">
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<div class="synopsis">
<table class="fields compact">
@ -328,7 +703,7 @@
<a class="permalink" href="#gun.properties.hip" title="Permalink to this definition"></a>
</h2>
<div class="inner">
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<div class="synopsis">
<table class="fields compact">
@ -363,7 +738,7 @@
</h2>
<div class="inner">
<p>list containing the firemodes of the gun. Default only contains &quot;single&quot;. Strings allowed by default:
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<div class="synopsis">
<table class="fields compact">
@ -387,7 +762,7 @@
</h2>
<div class="inner">
<p><strong>IMPORTANT</strong>: expects fields to be tables containing a &quot;gun_axial&quot; and &quot;player_axial&quot; field.
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<h5>Example</h5>
<pre><code class="language-lua">property = {
gun_axial = type
@ -415,7 +790,7 @@ this means that increasing it decreases the time it takes for the angular veloci
</tr>
<tr>
<td class="name"><var id="gun.properties.recoil.target_correction_max_rate">target_correction_max_rate</var><a class="permalink" href="#gun.properties.recoil.target_correction_max_rate" title="Permalink to this definition"></a></td>
<td class="doc"><p><code>float</code> The maximum rate per second of recoil offset as determined with <a href="../module/Gun.html#gun.properties.recoil.target_correction_factor">gun.properties.recoil.target_correction_factor</a></p>
<td class="doc"><p><code>float</code> The maximum rate per second of recoil offset as determined with <a href="../module/gun.html#gun.properties.recoil.target_correction_factor">gun.properties.recoil.target_correction_factor</a></p>
</td>
</tr>
<tr>
@ -448,8 +823,8 @@ this means that increasing it decreases the time it takes for the angular veloci
<a class="permalink" href="#gun.properties.sway" title="Permalink to this definition"></a>
</h2>
<div class="inner">
<p><strong>IMPORTANT</strong>: expects fields to be tables containing a &quot;gun_axial&quot; and &quot;player_axial&quot; field. In the same format as <a href="../module/Gun.html#gun.properties.recoil">gun.properties.recoil</a>
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<p><strong>IMPORTANT</strong>: expects fields to be tables containing a &quot;gun_axial&quot; and &quot;player_axial&quot; field. In the same format as <a href="../module/gun.html#gun.properties.recoil">gun.properties.recoil</a>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<div class="synopsis">
<table class="fields compact">
@ -483,7 +858,7 @@ this means that increasing it decreases the time it takes for the angular veloci
<a class="permalink" href="#gun.properties.wag" title="Permalink to this definition"></a>
</h2>
<div class="inner">
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<div class="synopsis">
<table class="fields compact">
@ -499,7 +874,7 @@ this means that increasing it decreases the time it takes for the angular veloci
</tr>
<tr>
<td class="name"><var id="gun.properties.wag.offset">offset</var><a class="permalink" href="#gun.properties.wag.offset" title="Permalink to this definition"></a></td>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> containing angular deviation while walking in the same format as <a href="../module/Gun.html#gun.properties.recoil">an offset vector</a>. Acts as a multiplier on the figure-8 generated while walking.</p>
<td class="doc"><p><a href="../module/misc_helpers.html#table"><code>table</code></a> containing angular deviation while walking in the same format as <a href="../module/gun.html#gun.properties.recoil">an offset vector</a>. Acts as a multiplier on the figure-8 generated while walking.</p>
</td>
</tr>
</table>
@ -512,7 +887,7 @@ this means that increasing it decreases the time it takes for the angular veloci
<a class="permalink" href="#gun.properties.charging" title="Permalink to this definition"></a>
</h2>
<div class="inner">
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<div class="synopsis">
<table class="fields compact">
@ -533,12 +908,12 @@ this means that increasing it decreases the time it takes for the angular veloci
</tr>
<tr>
<td class="name"><var id="gun.properties.charging.draw_animation">draw_animation</var><a class="permalink" href="#gun.properties.charging.draw_animation" title="Permalink to this definition"></a></td>
<td class="doc"><p><code>string</code> name of the animation to play from <a href="../module/Gun.html#gun.properties.visuals.animations">visuals.animations</a>. Default &quot;draw&quot;</p>
<td class="doc"><p><code>string</code> name of the animation to play from <a href="../module/gun.html#gun.properties.visuals.animations">visuals.animations</a>. Default &quot;draw&quot;</p>
</td>
</tr>
<tr>
<td class="name"><var id="gun.properties.charging.draw_sound">draw_sound</var><a class="permalink" href="#gun.properties.charging.draw_sound" title="Permalink to this definition"></a></td>
<td class="doc"><p><code>string</code> name of the sound to play from <a href="../module/Gun.html#gun.properties.sounds">sounds</a>. Default &quot;draw&quot;</p>
<td class="doc"><p><code>string</code> name of the sound to play from <a href="../module/gun.html#gun.properties.sounds">sounds</a>. Default &quot;draw&quot;</p>
</td>
</tr>
</table>
@ -551,7 +926,7 @@ this means that increasing it decreases the time it takes for the angular veloci
<a class="permalink" href="#gun.properties.ammo" title="Permalink to this definition"></a>
</h2>
<div class="inner">
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<div class="synopsis">
<table class="fields compact">
@ -585,7 +960,7 @@ this means that increasing it decreases the time it takes for the angular veloci
<a class="permalink" href="#gun.properties.visuals" title="Permalink to this definition"></a>
</h2>
<div class="inner">
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<div class="synopsis">
<table class="fields compact">
@ -637,7 +1012,7 @@ should be in the format <code>{x=integer,y=integer}</code></p>
}
</code></pre>
<p>There are other animations which are variable which are not listed here, these are usually defined by properties such as:
reload, <a href="../module/Gun.html#gun.properties.charging.draw_animation">draw_animation</a></p>
reload, <a href="../module/gun.html#gun.properties.charging.draw_animation">draw_animation</a></p>
</td>
</tr>
</table>
@ -650,8 +1025,8 @@ reload, <a href="../module/Gun.html#gun.properties.charging.draw_animation">draw
<a class="permalink" href="#gun.properties.sounds" title="Permalink to this definition"></a>
</h2>
<div class="inner">
<p>other fields are defined by other properties such as <a href="../module/Gun.html#gun.properties.charging.draw_sound">properties.charging.draw_sound</a> and <a href="../module/Gun.html#lvl1_fields.properties.reload">properties.reload</a>
<div class="see">See also <a href="../module/Gun.html#lvl1_fields.properties">properties</a></div>
<p>other fields are defined by other properties such as <a href="../module/gun.html#gun.properties.charging.draw_sound">properties.charging.draw_sound</a> and <a href="../module/gun.html#lvl1_fields.properties.reload">properties.reload</a>
<div class="see">See also <a href="../module/gun.html#lvl1_fields.properties">properties</a></div>
<div class="see">See also <a href="../module/play_sound.html#guns4d_soundspec">soundspec</a></div>
<div class="synopsis">

View File

@ -45,7 +45,7 @@
<div class="classes">
<div class="heading">Classes</div>
<ul>
<li><a href="../class/gun.html">Gun.gun</a></li>
<li><a href="../class/gun.html">Gun</a></li>
<li><a href="../class/player_model_handler.html">Player_model_handler.player_model_handler</a></li>
</ul>
</div>

View File

@ -41,7 +41,7 @@
<div class="classes">
<div class="heading">Classes</div>
<ul>
<li><a href="../class/gun.html">Gun.gun</a></li>
<li><a href="../class/gun.html">Gun</a></li>
<li><a href="../class/player_model_handler.html">Player_model_handler.player_model_handler</a></li>
</ul>
</div>

View File

@ -32,7 +32,7 @@
<div class="classes">
<div class="heading">Classes</div>
<ul>
<li><a href="class/gun.html">Gun.gun</a></li>
<li><a href="class/gun.html">Gun</a></li>
<li><a href="class/player_model_handler.html">Player_model_handler.player_model_handler</a></li>
</ul>
</div>