Goonstation 13 - Modules - TypesVar Details

projectile

This file is not good Fucked up var names lie ahead Caution, traveler

General cleanup todo: Go through undocumented math and document it Remove bad vars, fill in gaps then created Deduplicate info between this and proj_data

Vars

angleAngle of this shot. For reference @see setup()
armor_ignoredDoes this projectile pierce armor?
called_targetTarget for called shots behavior - by default does not affect projectile behaviour
called_target_turfTurf of the called_target during projectile initialization
collide_with_other_projectilesBelow stuff but also this is dumb and only used for frost bats and I don't even know why it's used there. TODO remove
crossingNo clue. Assoc list seems like? Also accessed as a non-assoc list sometimes. fuck. TODO
curr_tNo clue. Related to curr_t. TODO
dataArbitrary projectile data. Currently only used to hold an object that a projectile is seeking for a singular type. TODO remove
facing_dirDefault dir, set to in do_step()
forensic_IDForensic ID of the gun, etc that shot this projectile, used for forensics on implanted projectiles
goes_through_mobsWhether this projectile can freely pass through mobs
goes_through_wallsWhether this projectile can freely pass through dense turfs
has_diedFor disabling collision when a projectile has died but hasn't been disposed yet, e.g. under on_end effects
hitlistList of atoms collided with this tick
implantedWhat kind of implant this projectile leaves in impacted mobs
incidenceReflection normal on the current tile (NORTH if projectile came from the north, etc.) TODO can maybe be replaced with a single dir check when relevant? not 100% sure why we need to track this always. Might be crucial, dunno
initial_powerTODO this var also feels dumb. convert to initial() prolly (on data not on this)
is_processingYeah this sucks. TODO remove. I don't care bring the bug back so we can actually fix it
max_rangeMaximum range this projectile can travel before impacting a (non-dense) turf
mob_shooterMob-typed copy of shooter var to save time on casts later
orig_turfOriginal turf this projectiles was fired from
pierces_leftNumber of impassable atoms this projectile can pierce. Decremented on pierce. Can probably be axed in favor of the component. TODO remove
powerOne of the two below vars needs to be renamed or removed. Fucking confusing I don't know why this var is here it just stores the result of a proc called on the proj data. TODO revisit
proj_dataProjectile data; almost all specific projectile information and functionality lives here
reflectcountNumber of times this projectile has been reflected off of things. Used to cap reflections
shooterThe mob/thing that fired this projectile
special_dataBullshit var for storing special data for niche cases. Sucks, is probably necessary nonetheless
targetsList of all targets this projectile can go after; useful for homing projectiles and the like
ticks_until_can_hit_mobTracks the number of steps before a piercing projectile is allowed to hit a mob after hitting another one. Scarcely used. TODO remove?
travelledNumber of tiles this projectile has travelled
was_pointblankWhether this projectile was shot point-blank style (clicking an adjacent mob). Adjusts the log entry accordingly
was_setupTODO axe this after testing. Used very infrequently, looks redundant
wxWhat the fuck is this comment your shit jesus christ ????? TODO
xoTODO dunno what these are. guessing 'original x' and 'original y' but all the code involving them is mathy and i don't have the patience rn Fill in if u know ty

Var Details

angle

Angle of this shot. For reference @see setup()

armor_ignored

Does this projectile pierce armor?

called_target

Target for called shots behavior - by default does not affect projectile behaviour

called_target_turf

Turf of the called_target during projectile initialization

collide_with_other_projectiles

Below stuff but also this is dumb and only used for frost bats and I don't even know why it's used there. TODO remove

crossing

No clue. Assoc list seems like? Also accessed as a non-assoc list sometimes. fuck. TODO

curr_t

No clue. Related to curr_t. TODO

data

Arbitrary projectile data. Currently only used to hold an object that a projectile is seeking for a singular type. TODO remove

facing_dir

Default dir, set to in do_step()

forensic_ID

Forensic ID of the gun, etc that shot this projectile, used for forensics on implanted projectiles

goes_through_mobs

Whether this projectile can freely pass through mobs

goes_through_walls

Whether this projectile can freely pass through dense turfs

has_died

For disabling collision when a projectile has died but hasn't been disposed yet, e.g. under on_end effects

hitlist

List of atoms collided with this tick

implanted

What kind of implant this projectile leaves in impacted mobs

incidence

Reflection normal on the current tile (NORTH if projectile came from the north, etc.) TODO can maybe be replaced with a single dir check when relevant? not 100% sure why we need to track this always. Might be crucial, dunno

initial_power

TODO this var also feels dumb. convert to initial() prolly (on data not on this)

is_processing

Yeah this sucks. TODO remove. I don't care bring the bug back so we can actually fix it

max_range

Maximum range this projectile can travel before impacting a (non-dense) turf

mob_shooter

Mob-typed copy of shooter var to save time on casts later

orig_turf

Original turf this projectiles was fired from

pierces_left

Number of impassable atoms this projectile can pierce. Decremented on pierce. Can probably be axed in favor of the component. TODO remove

power

One of the two below vars needs to be renamed or removed. Fucking confusing I don't know why this var is here it just stores the result of a proc called on the proj data. TODO revisit

proj_data

Projectile data; almost all specific projectile information and functionality lives here

reflectcount

Number of times this projectile has been reflected off of things. Used to cap reflections

shooter

The mob/thing that fired this projectile

special_data

Bullshit var for storing special data for niche cases. Sucks, is probably necessary nonetheless

targets

List of all targets this projectile can go after; useful for homing projectiles and the like

ticks_until_can_hit_mob

Tracks the number of steps before a piercing projectile is allowed to hit a mob after hitting another one. Scarcely used. TODO remove?

travelled

Number of tiles this projectile has travelled

was_pointblank

Whether this projectile was shot point-blank style (clicking an adjacent mob). Adjusts the log entry accordingly

was_setup

TODO axe this after testing. Used very infrequently, looks redundant

wx

What the fuck is this comment your shit jesus christ ????? TODO

xo

TODO dunno what these are. guessing 'original x' and 'original y' but all the code involving them is mathy and i don't have the patience rn Fill in if u know ty