mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-22 02:17:05 +01:00
## 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>
22 lines
663 B
Plaintext
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
|