Files
f00535983e [MDB IGNORE] [IDB IGNORE] atom damage (#5235)
## About The Pull Request

adds generic system for atom health / integrity / damage

everything that isn't flagged with not-bludgeonable can, well, now be
bludgeoned.

## Why It's Good For The Game

more interactive game world through the means of making people able to
break Everything.

## Changelog

🆑
add: atom damage - (almost) everything is now breakable.
refactor: new /atom level materials system
refactor: a lot of the combat system / click code
refactor: melee attack styles
/🆑

---------

Co-authored-by: silicons <no@you.cat>
2023-11-11 17:33:57 -07:00

22 lines
663 B
Plaintext

/datum/instrument_key
var/key //1 to 127
var/sample //file
var/frequency //frequency generated
var/deviation //deviation up/down towards pivot from sample (??)
/datum/instrument_key/New(sample = src.sample, key = src.key, deviation = src.deviation, frequency = src.frequency)
src.sample = sample
src.key = key
src.deviation = deviation
src.frequency = frequency
if(!frequency && deviation)
calculate()
/datum/instrument_key/proc/calculate()
if(!deviation)
CRASH("Invalid calculate call: No deviation or sample in instrument_key")
#define KEY_TWELTH (1/12)
frequency = 2 ** (KEY_TWELTH * deviation)
BLOCK_BYOND_BUG_2072419
#undef KEY_TWELTH