Files
Paradise/obj/projectile.html

17 lines
21 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/obj/projectile - Space Station 13</title></head><body><header><a href="index.html">Space Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a><a href="obj/projectile.html#var">Var Details</a> - <a href="obj/projectile.html#proc">Proc Details</a></header><main><h1>projectile <aside>/<a href="obj.html">obj</a>/<a href="obj/projectile.html">projectile</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L6"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 6"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="obj/projectile.html#var/always_hit_living_nondense">always_hit_living_nondense</a></th><td>Does this projectile hit living non dense mobs?</td></tr><tr><th><a href="obj/projectile.html#var/always_nonmob_ricochet">always_nonmob_ricochet</a></th><td>Do we always bounce off non mobs?</td></tr><tr><th><a href="obj/projectile.html#var/antimagic_charge_cost">antimagic_charge_cost</a></th><td>determines the drain cost on the antimagic item</td></tr><tr><th><a href="obj/projectile.html#var/antimagic_flags">antimagic_flags</a></th><td>determines what type of antimagic can block the spell projectile</td></tr><tr><th><a href="obj/projectile.html#var/armor_penetration_flat">armor_penetration_flat</a></th><td>Flat armor reduction, occurs after percentage armor penetration.</td></tr><tr><th><a href="obj/projectile.html#var/armor_penetration_percentage">armor_penetration_percentage</a></th><td>Percentage armor reduction, happens before flat armor reduction.</td></tr><tr><th><a href="obj/projectile.html#var/chain">chain</a></th><td>For when you want your projectile to have a chain coming out of the gun</td></tr><tr><th><a href="obj/projectile.html#var/force_no_hit_message_or_sound">force_no_hit_message_or_sound</a></th><td>Is this projectile forced to not make hit messages or sound to avoid spam?</td></tr><tr><th><a href="obj/projectile.html#var/forcedodge">forcedodge</a></th><td>Number of times an object can pass through an object. -1 is infinite</td></tr><tr><th><a href="obj/projectile.html#var/has_been_fired">has_been_fired</a></th><td>Has the projectile been fired?</td></tr><tr><th><a href="obj/projectile.html#var/hitsound">hitsound</a></th><td>Hit sound to play when we hit something</td></tr><tr><th><a href="obj/projectile.html#var/immolate">immolate</a></th><td>Does the projectile increase fire stacks / immolate mobs on hit? Applies fire stacks equal to the number on hit.</td></tr><tr><th><a href="obj/projectile.html#var/last_angle_set_hitscan_store">last_angle_set_hitscan_store</a></th><td>Last turf an angle was changed in for hitscan projectiles.</td></tr><tr><th><a href="obj/projectile.html#var/last_projectile_move">last_projectile_move</a></th><td>Last world.time the projectile proper moved</td></tr><tr><th><a href="obj/projectile.html#var/min_ricochets">min_ricochets</a></th><td>how many times we have to ricochet min (unless we hit an atom we can ricochet off)</td></tr><tr><th><a href="obj/projectile.html#var/reflectability">reflectability</a></th><td>Determines the reflectability level of a projectile, either REFLECTABILITY_NEVER, REFLECTABILITY_PHYSICAL, REFLECTABILITY_ENERGY in order of ease to reflect.</td></tr><tr><th><a href="obj/projectile.html#var/ricochet_auto_aim_angle">ricochet_auto_aim_angle</a></th><td>On ricochet, if ricochet_auto_aim_range is nonzero, we'll consider any mobs within this range of the normal angle of incidence to home in on, higher = more auto aim</td></tr><tr><th><a href="obj/projectile.html#var/ricochet_auto_aim_range">ricochet_auto_aim_range</a></th><td>On ricochet, if nonzero, we consider all mobs within this range of our projectile at the time of ricochet to home in on like Revolver Ocelot, as governed by ricochet_auto_aim_angle</td></tr><tr><th><a href="obj/projectile.html#var/ricochet_chance">ricochet_chance</a></th><td>0-100 (or more, I guess), the base chance of ricocheting, before being modified by the atom we shoot and our chance decay</td></tr><tr><th><a href="obj/projectile.html#var/ricochet_decay_chance">ricochet_decay_chance</a></th><td>0-1 (or more, I guess) multiplier, the ricochet_chance is modified by multiplying this after each ricochet</td></tr><tr><th><a href="obj/projectile.html#var/ricochet_decay_damage">ricochet_decay_damage</a></th><td>0-1 (or more, I guess) multiplier, the projectile's damage is modified by multiplying this after each ricochet</td></tr><tr><th><a href="obj/projectile.html#var/ricochet_incidence_leeway">ricochet_incidence_leeway</a></th><td>the angle of impact must be within this many degrees of the struck surface, set to 0 to allow any angle</td></tr><tr><th><a href="obj/projectile.html#var/ricochet_shoots_firer">ricochet_shoots_firer</a></th><td>Can our ricochet autoaim hit our firer?</td></tr><tr><th><a href="obj/projectile.html#var/ricochets">ricochets</a></th><td>how many times we've ricochet'd so far (instance variable, not a stat)</td></tr><tr><th><a href="obj/projectile.html#var/ricochets_max">ricochets_max</a></th><td>how many times we can ricochet max</td></tr><tr><th><a href="obj/projectile.html#var/shield_buster">shield_buster</a></th><td>Does this projectile do extra damage to / break shields?</td></tr><tr><th><a href="obj/projectile.html#var/time_offset">time_offset</a></th><td>Left over ticks in movement calculation</td></tr><tr><th><a href="obj/projectile.html#var/trajectory">trajectory</a></th><td>The projectile's trajectory</td></tr><tr><th><a href="obj/projectile.html#var/trajectory_ignore_forcemove">trajectory_ignore_forcemove</a></th><td>Instructs forceMove to NOT reset our trajectory to the new location!</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="obj/projectile.html#proc/is_hostile_projectile">is_hostile_projectile</a></th><td>Is this projectile considered &quot;hostile&quot;?</td></tr><tr><th><a href="obj/projectile.html#proc/on_atom_entered">on_atom_entered</a></th><td>A mob moving on a tile with a projectile is hit by it.</td></tr><tr><th><a href="obj/projectile.html#proc/preparePixelProjectile">preparePixelProjectile</a></th><td>Aims the projectile at a target.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/always_hit_living_nondense"><aside class="declaration">var </aside>always_hit_living_nondense <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L97"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 97"></a></h3><p>Does this projectile hit living non dense mobs?</p><h3 id="var/always_nonmob_ricochet"><aside class="declaration">var </aside>always_nonmob_ricochet <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L146"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 146"></a></h3><p>Do we always bounce off non mobs?</p><h3 id="var/antimagic_charge_cost"><aside class="declaration">var </aside>antimagic_charge_cost <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L151"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 151"></a></h3><p>determines the drain cost on the antimagic item</p><h3 id="var/antimagic_flags"><aside class="declaration">var </aside>antimagic_flags <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L149"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 149"></a></h3><p>determines what type of antimagic can block the spell projectile</p><h3 id="var/armor_penetration_flat"><aside class="declaration">var </aside>armor_penetration_flat <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L18"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 18"></a></h3><p>Flat armor reduction, occurs after percentage armor penetration.</p><h3 id="var/armor_penetration_percentage"><aside class="declaration">var </aside>armor_penetration_percentage <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L20"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 20"></a></h3><p>Percentage armor reduction, happens before flat armor reduction.</p><h3 id="var/chain"><aside class="declaration">var </aside>chain <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L78"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 78"></a></h3><p>For when you want your projectile to have a chain coming out of the gun</p><h3 id="var/force_no_hit_message_or_sound"><aside class="declaration">var </aside>force_no_hit_message_or_sound <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L100"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 100"></a></h3><p>Is this projectile forced to not make hit messages or sound to avoid spam?</p><h3 id="var/forcedodge"><aside class="declaration">var </aside>forcedodge <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L69"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 69"></a></h3><p>Number of times an object can pass through an object. -1 is infinite</p><h3 id="var/has_been_fired"><aside class="declaration">var </aside>has_been_fired <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L94"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 94"></a></h3><p>Has the projectile been fired?</p><h3 id="var/hitsound"><aside class="declaration">var </aside>hitsound <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L22"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 22"></a></h3><p>Hit sound to play when we hit something</p><h3 id="var/immolate"><aside class="declaration">var </aside>immolate <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L71"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 71"></a></h3><p>Does the projectile increase fire stacks / immolate mobs on hit? Applies fire stacks equal to the number on hit.</p><h3 id="var/last_angle_set_hitscan_store"><aside class="declaration">var </aside>last_angle_set_hitscan_store <aside> /<a href="turf.html">turf</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L106"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 106"></a></h3><p>Last turf an angle was changed in for hitscan projectiles.</p><h3 id="var/last_projectile_move"><aside class="declaration">var </aside>last_projectile_move <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L81"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 81"></a></h3><p>Last world.time the projectile proper moved</p><h3 id="var/min_ricochets"><aside class="declaration">var </aside>min_ricochets <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L130"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 130"></a></h3><p>how many times we have to ricochet min (unless we hit an atom we can ricochet off)</p><h3 id="var/reflectability"><aside class="declaration">var </aside>reflectability <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L54"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 54"></a></h3><p>Determines the reflectability level of a projectile, either REFLECTABILITY_NEVER, REFLECTABILITY_PHYSICAL, REFLECTABILITY_ENERGY in order of ease to reflect.</p><h3 id="var/ricochet_auto_aim_angle"><aside class="declaration">var </aside>ricochet_auto_aim_angle <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L140"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 140"></a></h3><p>On ricochet, if ricochet_auto_aim_range is nonzero, we'll consider any mobs within this range of the normal angle of incidence to home in on, higher = more auto aim</p><h3 id="var/ricochet_auto_aim_range"><aside class="declaration">var </aside>ricochet_auto_aim_range <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L138"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 138"></a></h3><p>On ricochet, if nonzero, we consider all mobs within this range of our projectile at the time of ricochet to home in on like Revolver Ocelot, as governed by ricochet_auto_aim_angle</p><h3 id="var/ricochet_chance"><aside class="declaration">var </aside>ricochet_chance <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L132"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 132"></a></h3><p>0-100 (or more, I guess), the base chance of ricocheting, before being modified by the atom we shoot and our chance decay</p><h3 id="var/ricochet_decay_chance"><aside class="declaration">var </aside>ricochet_decay_chance <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L134"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 134"></a></h3><p>0-1 (or more, I guess) multiplier, the ricochet_chance is modified by multiplying this after each ricochet</p><h3 id="var/ricochet_decay_damage"><aside class="declaration">var </aside>ricochet_decay_damage <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L136"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 136"></a></h3><p>0-1 (or more, I guess) multiplier, the projectile's damage is modified by multiplying this after each ricochet</p><h3 id="var/ricochet_incidence_leeway"><aside class="declaration">var </aside>ricochet_incidence_leeway <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L142"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 142"></a></h3><p>the angle of impact must be within this many degrees of the struck surface, set to 0 to allow any angle</p><h3 id="var/ricochet_shoots_firer"><aside class="declaration">var </aside>ricochet_shoots_firer <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L144"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 144"></a></h3><p>Can our ricochet autoaim hit our firer?</p><h3 id="var/ricochets"><aside class="declaration">var </aside>ricochets <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L126"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 126"></a></h3><p>how many times we've ricochet'd so far (instance variable, not a stat)</p><h3 id="var/ricochets_max"><aside class="declaration">var </aside>ricochets_max <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L128"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 128"></a></h3><p>how many times we can ricochet max</p><h3 id="var/shield_buster"><aside class="declaration">var </aside>shield_buster <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L90"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 90"></a></h3><p>Does this projectile do extra damage to / break shields?</p><h3 id="var/time_offset"><aside class="declaration">var </aside>time_offset <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L83"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 83"></a></h3><p>Left over ticks in movement calculation</p><h3 id="var/trajectory"><aside class="declaration">var </aside>trajectory <aside> /<a href="datum.html">datum</a>/<a href="datum/point_precise.html">point_precise</a>/<a href="datum/point_precise/vector.html">vector</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L85"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 85"></a></h3><p>The projectile's trajectory</p><h3 id="var/trajectory_ignore_forcemove"><aside class="declaration">var </aside>trajectory_ignore_forcemove <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L87"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 87"></a></h3><p>Instructs forceMove to NOT reset our trajectory to the new location!</p><h2 id="proc">Proc Details</h2><h3 id="proc/is_hostile_projectile"><aside class="declaration">proc </aside>is_hostile_projectile<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L639"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 639"></a></aside></h3><p>Is this projectile considered &quot;hostile&quot;?</p>
<p>By default all projectiles which deal damage or impart crowd control effects (including stamina) are hostile</p>
<p>This is NOT used for pacifist checks, that's handled by <a href="obj/item/ammo_casing.html#var/harmful" title="/obj/item/ammo_casing">/obj/item/ammo_casing/var/harmful</a>
This is used in places such as AI responses to determine if they're being threatened or not (among other places)</p><h3 id="proc/on_atom_entered"><aside class="declaration">proc </aside>on_atom_entered<aside>(/<a href="datum.html">datum</a>/source, /<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/entered) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/projectile_base.dm#L469"><img src="git.png" width="16" height="16" title="code/modules/projectiles/projectile_base.dm 469"></a></aside></h3><p>A mob moving on a tile with a projectile is hit by it.</p><h3 id="proc/preparePixelProjectile"><aside class="declaration">proc </aside>preparePixelProjectile<aside>(/<a href="atom.html">atom</a>/target, /<a href="atom.html">atom</a>/source, /list/modifiers, deviation) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/projectiles/firing.dm#L97"><img src="git.png" width="16" height="16" title="code/modules/projectiles/firing.dm 97"></a></aside></h3><p>Aims the projectile at a target.</p>
<p>Must be passed at least one of a target or a list of click parameters.
If only passed the click modifiers the source atom must be a mob with a client.</p>
<p>Arguments:</p>
<ul>
<li><a href="atom.html" title="/atom">target</a>: (Optional) The thing that the projectile will be aimed at.</li>
<li><a href="atom.html" title="/atom">source</a>: The initial location of the projectile or the thing firing it.</li>
<li><a href="https://www.byond.com/docs/ref/#/list" title="/list">modifiers</a>: (Optional) A list of click parameters to apply to this operation.</li>
<li>deviation: (Optional) How the trajectory should deviate from the target in degrees.
<ul>
<li>//Spread is FORCED!</li>
</ul>
</li>
</ul></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/8a8a00a2a9bec485351e5f219982b7315d3504fa">8a8a00a</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html>