diff --git a/classes/Gun.lua b/classes/Gun.lua index 3e78ac9..566ca5b 100644 --- a/classes/Gun.lua +++ b/classes/Gun.lua @@ -25,11 +25,13 @@ 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 +-- @display gun +-- @compact -- @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. --- @compact + + local gun_default = { --- `string` 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 @{gun.itemstring} name = "__guns4d:default__", diff --git a/docs/class/Gun.html b/docs/class/Gun.html index 5b2f366..b57bfdf 100644 --- a/docs/class/Gun.html +++ b/docs/class/Gun.html @@ -69,7 +69,7 @@
Classes
diff --git a/docs/class/player_model_handler.html b/docs/class/player_model_handler.html index e00ae3b..b3ec12b 100644 --- a/docs/class/player_model_handler.html +++ b/docs/class/player_model_handler.html @@ -41,7 +41,7 @@
Classes
diff --git a/docs/index.html b/docs/index.html index c005e4d..cce4631 100644 --- a/docs/index.html +++ b/docs/index.html @@ -32,7 +32,7 @@
Classes
diff --git a/docs/index.js b/docs/index.js index 56a34ea..9ccb3f9 100644 --- a/docs/index.js +++ b/docs/index.js @@ -1,5 +1,5 @@ var docs = [ -{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/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."}, diff --git a/docs/manual/changelog.html b/docs/manual/changelog.html index fcbd0d0..c4331e0 100644 --- a/docs/manual/changelog.html +++ b/docs/manual/changelog.html @@ -38,7 +38,7 @@
Classes
diff --git a/docs/module/Bullet_hole.html b/docs/module/Bullet_hole.html index 8ef74ec..5a4f543 100644 --- a/docs/module/Bullet_hole.html +++ b/docs/module/Bullet_hole.html @@ -39,7 +39,7 @@
Classes
diff --git a/docs/module/Control_handler.html b/docs/module/Control_handler.html index 23a46ea..dd80e0d 100644 --- a/docs/module/Control_handler.html +++ b/docs/module/Control_handler.html @@ -39,7 +39,7 @@
Classes
diff --git a/docs/module/Gun-methods.html b/docs/module/Gun-methods.html index b0fcde0..5c78fbe 100644 --- a/docs/module/Gun-methods.html +++ b/docs/module/Gun-methods.html @@ -39,7 +39,7 @@
Classes
diff --git a/docs/module/misc_helpers.html b/docs/module/misc_helpers.html index 9b144b9..b8cc67a 100644 --- a/docs/module/misc_helpers.html +++ b/docs/module/misc_helpers.html @@ -45,7 +45,7 @@
Classes
diff --git a/docs/module/play_sound.html b/docs/module/play_sound.html index 8c1ae0f..d958825 100644 --- a/docs/module/play_sound.html +++ b/docs/module/play_sound.html @@ -41,7 +41,7 @@
Classes
diff --git a/docs/search.html b/docs/search.html index dad9d09..67b9de1 100644 --- a/docs/search.html +++ b/docs/search.html @@ -32,7 +32,7 @@
Classes