Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magic rework #476

Merged
merged 98 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
59849c8
Starting commit
EgorDinamit Sep 22, 2023
3641ae6
Adjustments
EgorDinamit Sep 23, 2023
412e22d
Globals generated
EgorDinamit Sep 23, 2023
74c56af
Chance to have higher mana/spell points for job spawns
EgorDinamit Sep 23, 2023
10bf576
Dispell projectile, more tweaks to spell book
EgorDinamit Sep 23, 2023
50dc029
Tweak & Fixes
EgorDinamit Sep 24, 2023
c8981de
Aimed healing
EgorDinamit Sep 24, 2023
eaf3cc2
Fix
EgorDinamit Sep 24, 2023
e020be4
Category for dispells
EgorDinamit Sep 24, 2023
8dce1a1
Fixes
EgorDinamit Sep 24, 2023
5bc1bc1
Trance duration fix
EgorDinamit Sep 24, 2023
e4f6bf8
Health analyze improvement
EgorDinamit Sep 30, 2023
bc8d7cc
Fix veil of shadows
EgorDinamit Sep 30, 2023
91861de
Silly spells
EgorDinamit Oct 8, 2023
a3b554b
Some tweaks and fixes
EgorDinamit Oct 8, 2023
9beeeaf
Aimed swap + some tweaks
EgorDinamit Oct 10, 2023
0117b11
Tweaks + Sounds
EgorDinamit Oct 11, 2023
d02c9e1
Magic orbs + Moving mana to mind
EgorDinamit Oct 12, 2023
fe4f68d
Tweaks & Fixes
EgorDinamit Oct 12, 2023
88ffe00
Water slash, more tweaks
EgorDinamit Oct 13, 2023
2f4ff0b
Water slash fixes/tweaks
EgorDinamit Oct 13, 2023
745687b
Fix aimed "charge refunding"
EgorDinamit Oct 13, 2023
ffb0d2f
Fixes
EgorDinamit Oct 13, 2023
8f10cd5
Fixes...
EgorDinamit Oct 13, 2023
54e1326
And fixes.....
EgorDinamit Oct 13, 2023
b2868f1
Another one
EgorDinamit Oct 13, 2023
97c6405
Fix... Please...
EgorDinamit Oct 13, 2023
f48cfa8
Spellbook upgrades
EgorDinamit Oct 13, 2023
409c4b9
Fix spellbook
EgorDinamit Oct 13, 2023
25798de
Water slash stuff
EgorDinamit Oct 13, 2023
bc89cf9
Tweaks & Fixes
EgorDinamit Oct 13, 2023
db5211e
Fixes & Tweaks, again
EgorDinamit Oct 13, 2023
9146dc2
Water slash checks in range instead of view
EgorDinamit Oct 13, 2023
0df18c6
Flamethrower spell, more tweaks, remove "tower" subtypes
EgorDinamit Oct 14, 2023
5e75e66
Tweaks!
EgorDinamit Oct 14, 2023
64f3890
Wizard den away site update
EgorDinamit Oct 28, 2023
0894f50
Fix
EgorDinamit Oct 28, 2023
e846290
Remove map files that aren't added yet.
EgorDinamit Oct 28, 2023
014c3f7
Oopsie
EgorDinamit Oct 28, 2023
918a97a
Fixes
EgorDinamit Oct 29, 2023
6e978d1
Fixes naming of planetoid away sites
EgorDinamit Oct 29, 2023
457df68
Some updates
EgorDinamit Oct 29, 2023
f4c65b7
Some tweaks
EgorDinamit Nov 24, 2023
60d9979
You can now write spells into the spellbook
EgorDinamit Dec 16, 2023
d65a297
End of everything :)
EgorDinamit Dec 16, 2023
0ed92d9
Fix
EgorDinamit Dec 16, 2023
18305e8
Assorted fixes
EgorDinamit Dec 16, 2023
ed5a877
a
EgorDinamit Dec 16, 2023
e838bcc
Fix
EgorDinamit Dec 16, 2023
71dd2e1
Onrush spell
EgorDinamit Jan 16, 2024
4e9c708
Multitude of updates
EgorDinamit Jan 16, 2024
6b88d94
Tweaks & Fixes
EgorDinamit Jan 16, 2024
aaf8179
Gives corpse explosion an appropriate cooldown
EgorDinamit Jan 16, 2024
bf61719
Decoy effect fix
EgorDinamit Jan 16, 2024
fd35059
Linter fix
EgorDinamit Jan 17, 2024
75b405b
Tweaks + Aimed blink
EgorDinamit Jan 17, 2024
00f35ed
More tweaks!
EgorDinamit Jan 17, 2024
f236bb0
Fix/buff dispell effect on mobs
EgorDinamit Jan 17, 2024
16dbc2a
Updates
EgorDinamit Jan 17, 2024
2045083
Balance & tweaks
EgorDinamit Jan 17, 2024
dcaf5e3
Fix runtime
EgorDinamit Jan 17, 2024
abfac18
Should fix onrush
EgorDinamit Jan 17, 2024
b563047
oopsie
EgorDinamit Jan 17, 2024
5674435
fix
EgorDinamit Jan 18, 2024
8a91b32
Healing spells tweaks & buffs
EgorDinamit Jan 18, 2024
7f67a6d
Tweaks & Fixes
EgorDinamit Jan 18, 2024
cc50551
Revive, not rejuvenate
EgorDinamit Jan 18, 2024
4b89d16
Fix random spellbooks
EgorDinamit Jan 18, 2024
a773f1c
Missing parent call
EgorDinamit Jan 18, 2024
f54825d
More epic updates!
EgorDinamit Jan 19, 2024
2e0670b
Mana burn icon
EgorDinamit Jan 19, 2024
91f5767
Spell steal!
EgorDinamit Jan 19, 2024
4616455
Fixes
EgorDinamit Jan 19, 2024
4b81dd3
More fixes
EgorDinamit Jan 19, 2024
d21428a
Batch of fixes
EgorDinamit Jan 19, 2024
0a7fca9
Nerfs polymorph
EgorDinamit Jan 19, 2024
1a36b07
Some more tweaks
EgorDinamit Jan 19, 2024
275bfda
Consume magic sounds
EgorDinamit Jan 19, 2024
adae376
Minor fixes
EgorDinamit Jan 19, 2024
a551cd7
Dispell projectile tweaks
EgorDinamit Jan 19, 2024
07c8a4b
Minor balance
EgorDinamit Jan 19, 2024
49f1591
More fixes
EgorDinamit Jan 19, 2024
9a28108
Stuncuff spell nerf
EgorDinamit Jan 19, 2024
aac46ce
Rebalance of healing spells, fix end of everything
EgorDinamit Jan 19, 2024
0a3b30f
Counter crystal spell
EgorDinamit Jan 20, 2024
1b8879b
Some tweaks & fixes
EgorDinamit Jan 20, 2024
01f738c
Mend structures spell & Code tweaks
EgorDinamit Jan 20, 2024
098669f
Adds turfs to mend structures
EgorDinamit Jan 20, 2024
a4f133f
Variety of tweaks & fixes
EgorDinamit Jan 20, 2024
97ede18
Rework spell upgrade code
EgorDinamit Jan 20, 2024
c89dd1c
Tiny fix + Show max amount of upgrades in the spell book
EgorDinamit Jan 20, 2024
6ceedce
Fixes
EgorDinamit Jan 20, 2024
f534e84
Makes certain spells invisible from normal books
EgorDinamit Jan 20, 2024
0efd55c
Numerous bug fixes, adds restore limbs spell
EgorDinamit Jan 20, 2024
9d3b1ee
Mana Drain, a lot of improvements
EgorDinamit Jan 22, 2024
cdfaf67
Updates CSS styles
EgorDinamit Jan 25, 2024
9f7f9ba
Random blink nerfs
EgorDinamit Jan 25, 2024
f3d3b57
Tweaks warning span color
EgorDinamit Jan 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 32 additions & 15 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include "code\__defines\lighting.dm"
#include "code\__defines\lists.dm"
#include "code\__defines\machinery.dm"
#include "code\__defines\magic.dm"
#include "code\__defines\mapping.dm"
#include "code\__defines\materials.dm"
#include "code\__defines\math_physics.dm"
Expand Down Expand Up @@ -908,6 +909,7 @@
#include "code\game\objects\effects\gibs.dm"
#include "code\game\objects\effects\item_pickup_ghost.dm"
#include "code\game\objects\effects\landmarks.dm"
#include "code\game\objects\effects\magic_orb.dm"
#include "code\game\objects\effects\manifest.dm"
#include "code\game\objects\effects\mines.dm"
#include "code\game\objects\effects\misc.dm"
Expand Down Expand Up @@ -1204,7 +1206,7 @@
#include "code\game\objects\structures\bedsheet_bin.dm"
#include "code\game\objects\structures\catwalk.dm"
#include "code\game\objects\structures\charge_pylon.dm"
#include "code\game\objects\structures\coathanger.dm"
#include "code\game\objects\structures\coatrack.dm"
#include "code\game\objects\structures\curtains.dm"
#include "code\game\objects\structures\displaycase.dm"
#include "code\game\objects\structures\dogbed.dm"
Expand Down Expand Up @@ -2043,6 +2045,8 @@
#include "code\modules\locks\key.dm"
#include "code\modules\locks\lock.dm"
#include "code\modules\locks\lock_construct.dm"
#include "code\modules\mana\mana.dm"
#include "code\modules\mana\mind.dm"
#include "code\modules\maps\dmm_suite.dm"
#include "code\modules\maps\helper_landmarks.dm"
#include "code\modules\maps\map_template.dm"
Expand Down Expand Up @@ -2754,6 +2758,7 @@
#include "code\modules\paperwork\pen\chameleon_pen.dm"
#include "code\modules\paperwork\pen\crayon.dm"
#include "code\modules\paperwork\pen\fancy.dm"
#include "code\modules\paperwork\pen\magic_quill.dm"
#include "code\modules\paperwork\pen\multi_pen.dm"
#include "code\modules\paperwork\pen\pen.dm"
#include "code\modules\paperwork\pen\reagent_pen.dm"
Expand Down Expand Up @@ -3133,6 +3138,7 @@
#include "code\modules\species\station\skrell.dm"
#include "code\modules\species\station\unathi.dm"
#include "code\modules\species\station\unathi_subspecies.dm"
#include "code\modules\spellbook\_spellbook.dm"
#include "code\modules\spells\_spell.dm"
#include "code\modules\spells\_spell_procs.dm"
#include "code\modules\spells\artifacts.dm"
Expand All @@ -3141,17 +3147,31 @@
#include "code\modules\spells\no_clothes.dm"
#include "code\modules\spells\racial_wizard.dm"
#include "code\modules\spells\spell_projectile.dm"
#include "code\modules\spells\spellbook.dm"
#include "code\modules\spells\aimed\_aimed.dm"
#include "code\modules\spells\aimed\blink.dm"
#include "code\modules\spells\aimed\corpse_explosion.dm"
#include "code\modules\spells\aimed\counter_crystal.dm"
#include "code\modules\spells\aimed\dispell.dm"
#include "code\modules\spells\aimed\fireball.dm"
#include "code\modules\spells\aimed\flamethrower.dm"
#include "code\modules\spells\aimed\healing.dm"
#include "code\modules\spells\aimed\mana_burn.dm"
#include "code\modules\spells\aimed\mana_drain.dm"
#include "code\modules\spells\aimed\onrush.dm"
#include "code\modules\spells\aimed\passage.dm"
#include "code\modules\spells\aimed\restore_limbs.dm"
#include "code\modules\spells\aimed\spark_bolt.dm"
#include "code\modules\spells\aimed\spell_steal.dm"
#include "code\modules\spells\aimed\swap.dm"
#include "code\modules\spells\aimed\water_slash.dm"
#include "code\modules\spells\aoe_turf\aoe_turf.dm"
#include "code\modules\spells\aoe_turf\blink.dm"
#include "code\modules\spells\aoe_turf\charge.dm"
#include "code\modules\spells\aoe_turf\disable_tech.dm"
#include "code\modules\spells\aoe_turf\drain_blood.dm"
#include "code\modules\spells\aoe_turf\exchange_wounds.dm"
#include "code\modules\spells\aoe_turf\fire_ring.dm"
#include "code\modules\spells\aoe_turf\knock.dm"
#include "code\modules\spells\aoe_turf\random_blink.dm"
#include "code\modules\spells\aoe_turf\smoke.dm"
#include "code\modules\spells\aoe_turf\summons.dm"
#include "code\modules\spells\aoe_turf\conjure\conjure.dm"
Expand All @@ -3167,6 +3187,7 @@
#include "code\modules\spells\general\area_teleport.dm"
#include "code\modules\spells\general\contract_spells.dm"
#include "code\modules\spells\general\create_air.dm"
#include "code\modules\spells\general\end_of_everything.dm"
#include "code\modules\spells\general\invisibility.dm"
#include "code\modules\spells\general\mark_recall.dm"
#include "code\modules\spells\general\portal_teleport.dm"
Expand All @@ -3175,33 +3196,29 @@
#include "code\modules\spells\general\tear_veil.dm"
#include "code\modules\spells\general\toggle_armor.dm"
#include "code\modules\spells\general\veil_of_shadows.dm"
#include "code\modules\spells\hand\_hand.dm"
#include "code\modules\spells\hand\_hand_item.dm"
#include "code\modules\spells\hand\analyze_health.dm"
#include "code\modules\spells\hand\blood_shards.dm"
#include "code\modules\spells\hand\burning_grip.dm"
#include "code\modules\spells\hand\consume_magic.dm"
#include "code\modules\spells\hand\entangle.dm"
#include "code\modules\spells\hand\hand.dm"
#include "code\modules\spells\hand\hand_item.dm"
#include "code\modules\spells\hand\mend_structures.dm"
#include "code\modules\spells\hand\slippery_surface.dm"
#include "code\modules\spells\hand\sunwrath.dm"
#include "code\modules\spells\spellbook\battlemage.dm"
#include "code\modules\spells\spellbook\cleric.dm"
#include "code\modules\spells\spellbook\druid.dm"
#include "code\modules\spells\spellbook\spatial.dm"
#include "code\modules\spells\spellbook\standard.dm"
#include "code\modules\spells\spellbook\student.dm"
#include "code\modules\spells\targeted\_targeted.dm"
#include "code\modules\spells\targeted\analyze.dm"
#include "code\modules\spells\targeted\blood_boil.dm"
#include "code\modules\spells\targeted\cleric_spells.dm"
#include "code\modules\spells\targeted\ethereal_jaunt.dm"
#include "code\modules\spells\targeted\exhude_pleasantness.dm"
#include "code\modules\spells\targeted\genetic.dm"
#include "code\modules\spells\targeted\glimpse_of_eternity.dm"
#include "code\modules\spells\targeted\harvest.dm"
#include "code\modules\spells\targeted\healing.dm"
#include "code\modules\spells\targeted\pestilence.dm"
#include "code\modules\spells\targeted\shapeshift.dm"
#include "code\modules\spells\targeted\shatter_mind.dm"
#include "code\modules\spells\targeted\shift.dm"
#include "code\modules\spells\targeted\subjugate.dm"
#include "code\modules\spells\targeted\swap.dm"
#include "code\modules\spells\targeted\torment.dm"
#include "code\modules\spells\targeted\equip\_equip.dm"
#include "code\modules\spells\targeted\equip\burning_touch.dm"
Expand All @@ -3214,7 +3231,6 @@
#include "code\modules\spells\targeted\projectile\dumbfire.dm"
#include "code\modules\spells\targeted\projectile\magic_missile.dm"
#include "code\modules\spells\targeted\projectile\projectile.dm"
#include "code\modules\spells\targeted\projectile\stuncuff.dm"
#include "code\modules\sprite_accessories\_accessory.dm"
#include "code\modules\sprite_accessories\_accessory_facial.dm"
#include "code\modules\sprite_accessories\_accessory_hair.dm"
Expand Down Expand Up @@ -3425,6 +3441,7 @@
#include "maps\antag_spawn\ninja\ninja.dm"
#include "maps\antag_spawn\wizard\wizard.dm"
#include "maps\away\away_sites.dm"
#include "maps\away\wizard_den\wizard_den.dm"
#include "maps\away_sites_testing\away_sites_testing_define.dm"
#include "maps\example\example_define.dm"
#include "maps\random_rooms\_random_room.dm"
Expand Down
3 changes: 3 additions & 0 deletions code/__defines/colors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,6 @@
// Colors for input/hotkey panel.
#define COLOR_INPUT_DISABLED "#f0f0f0"
#define COLOR_INPUT_ENABLED "#d3b5b5"

// Misc
#define COLOR_MANA "#47f0ff"
15 changes: 15 additions & 0 deletions code/__defines/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
#define COMSIG_GLOB_MOB_CREATED "!mob_created"
/// Mob died somewhere : (mob/living, gibbed)
#define COMSIG_GLOB_MOB_DEATH "!mob_death"
/// A magic orb was picked up by a mob: (orb, mob/living)
#define COMSIG_GLOB_ORB_PICKUP "!orb_picked"
/// When spell is cast; (user, spell, targets)
#define COMSIG_GLOB_SPELL_CAST "!spell_cast"
/// When hand type spell cast_hand is called; (user, spell, target)
#define COMSIG_GLOB_SPELL_CAST_HAND "!spell_cast_hand"

//////////////////////////////////////////////////////////////////

Expand All @@ -32,6 +38,15 @@
// /atom signals

// /atom/movable signals
/// When an atom's Dispell() proc is called; Passes dispell strength as argument.
#define COMSIG_ATOM_MOVABLE_DISPELL "atom_dispell"
// Return value of a signal handler if dispell should be blocked
#define COMPONENT_DISPELL_BLOCKED (1 << 0)

/// When spell is cast; (user, spell, targets)
#define COMSIG_SPELL_CAST "spell_cast"
/// When hand type spell cast_hand is called; (user, spell, target)
#define COMSIG_SPELL_CAST_HAND "spell_cast_hand"

// /area signals

Expand Down
40 changes: 0 additions & 40 deletions code/__defines/gamemode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,46 +60,6 @@
#define DEFAULT_TELECRYSTAL_AMOUNT 130
#define IMPLANT_TELECRYSTAL_AMOUNT(x) (round(x * 0.49)) // If this cost is ever greater than half of DEFAULT_TELECRYSTAL_AMOUNT then it is possible to buy more TC than you spend

/////////////////
////WIZARD //////
/////////////////

/* WIZARD SPELL FLAGS */
#define GHOSTCAST 0x1 //can a ghost cast it?
#define NEEDSCLOTHES 0x2 //does it need the wizard garb to cast? Nonwizard spells should not have this
#define NEEDSHUMAN 0x4 //does it require the caster to be human?
#define Z2NOCAST 0x8 //if this is added, the spell can't be cast at centcomm
#define NO_SOMATIC 0x10 //spell will go off if the person is incapacitated or stunned
#define IGNOREPREV 0x20 //if set, each new target does not overlap with the previous one
//The following flags only affect different types of spell, and therefore overlap
//Targeted spells
#define INCLUDEUSER 0x40 //does the spell include the caster in its target selection?
#define SELECTABLE 0x80 //can you select each target for the spell?
#define NOFACTION 0x1000 //Don't do the same as our faction
#define NONONFACTION 0x2000 //Don't do people other than our faction
//AOE spells
#define IGNOREDENSE 0x40 //are dense turfs ignored in selection?
#define IGNORESPACE 0x80 //are space turfs ignored in selection?
//End split flags
#define CONSTRUCT_CHECK 0x100 //used by construct spells - checks for nullrods
#define NO_BUTTON 0x200 //spell won't show up in the HUD with this

//invocation
#define INVOKE_SHOUT "shout"
#define INVOKE_WHISPER "whisper"
#define INVOKE_EMOTE "emote"
#define INVOKE_NONE "none"

//upgrading
#define UPGRADE_SPEED "speed"
#define UPGRADE_POWER "power"
#define UPGRADE_TOTAL "total"

//casting costs
#define SPELL_RECHARGE "recharge"
#define SPELL_CHARGES "charges"
#define SPELL_HOLDVAR "holdervar"

//Voting-related
#define VOTE_PROCESS_ABORT 1
#define VOTE_PROCESS_COMPLETE 2
Expand Down
50 changes: 50 additions & 0 deletions code/__defines/magic.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Defines for dispell strengths
#define DISPELL_WEAK 1
#define DISPELL_MEDIUM 2
#define DISPELL_STRONG 3
#define DISPELL_UNSTOPPABLE 4

// All possible spell categories. Please follow them.
#define SPELL_CATEGORY_FIRE "Fire"
#define SPELL_CATEGORY_EXPLOSIVE "Explosive"
#define SPELL_CATEGORY_HEALING "Healing"
#define SPELL_CATEGORY_MOBILITY "Mobility"
#define SPELL_CATEGORY_PASSIVE "Passive"
#define SPELL_CATEGORY_ANTIMAGIC "Anti-magic"
#define SPELL_CATEGORY_FORBIDDEN "Forbidden arts"

// Spell flags
#define GHOSTCAST 0x1 //can a ghost cast it?
#define NEEDSCLOTHES 0x2 //does it need the wizard garb to cast? Nonwizard spells should not have this
#define NEEDSHUMAN 0x4 //does it require the caster to be human?
#define Z2NOCAST 0x8 //if this is added, the spell can't be cast at centcomm
#define NO_SOMATIC 0x10 //spell will go off if the person is incapacitated or stunned
#define IGNOREPREV 0x20 //if set, each new target does not overlap with the previous one
//The following flags only affect different types of spell, and therefore overlap
//Targeted spells
#define INCLUDEUSER 0x40 //does the spell include the caster in its target selection?
#define SELECTABLE 0x80 //can you select each target for the spell?
#define NOFACTION 0x1000 //Don't do the same as our faction
#define NONONFACTION 0x2000 //Don't do people other than our faction
//AOE spells
#define IGNOREDENSE 0x40 //are dense turfs ignored in selection?
#define IGNORESPACE 0x80 //are space turfs ignored in selection?
//End split flags
#define CONSTRUCT_CHECK 0x100 //used by construct spells - checks for nullrods
#define NO_BUTTON 0x200 //spell won't show up in the HUD with this

// Invocation
#define INVOKE_SHOUT "shout"
#define INVOKE_WHISPER "whisper"
#define INVOKE_EMOTE "emote"
#define INVOKE_NONE "none"

// Upgrading
#define UPGRADE_SPEED "speed"
#define UPGRADE_POWER "power"
#define UPGRADE_TOTAL "total"

// Casting costs
#define SPELL_RECHARGE "recharge"
#define SPELL_CHARGES "charges"
#define SPELL_HOLDVAR "holdervar"
11 changes: 11 additions & 0 deletions code/_global_vars/lists/misc.dm
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
GLOBAL_LIST_EMPTY(trusted_players) //CKeys of trusted players.

// A global list of all available spell categories
GLOBAL_LIST_INIT(spell_categories, list(
SPELL_CATEGORY_FIRE,
SPELL_CATEGORY_EXPLOSIVE,
SPELL_CATEGORY_HEALING,
SPELL_CATEGORY_MOBILITY,
SPELL_CATEGORY_PASSIVE,
SPELL_CATEGORY_ANTIMAGIC,
SPELL_CATEGORY_FORBIDDEN,
))
10 changes: 0 additions & 10 deletions code/_helpers/global_access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,6 @@
return global.appearance_manager;
if("area_repository")
return global.area_repository;
if("artefact_feedback")
return global.artefact_feedback;
if("ascii_esc")
return global.ascii_esc;
if("ascii_green")
Expand Down Expand Up @@ -759,8 +757,6 @@
return global.spacevines_spawned;
if("sparring_attack_cache")
return global.sparring_attack_cache;
if("spells")
return global.spells;
if("splatter_cache")
return global.splatter_cache;
if("sqladdress")
Expand Down Expand Up @@ -1190,8 +1186,6 @@
global.appearance_manager=newval;
if("area_repository")
global.area_repository=newval;
if("artefact_feedback")
global.artefact_feedback=newval;
if("ascii_esc")
global.ascii_esc=newval;
if("ascii_green")
Expand Down Expand Up @@ -1652,8 +1646,6 @@
global.spacevines_spawned=newval;
if("sparring_attack_cache")
global.sparring_attack_cache=newval;
if("spells")
global.spells=newval;
if("splatter_cache")
global.splatter_cache=newval;
if("sqladdress")
Expand Down Expand Up @@ -1934,7 +1926,6 @@
"antag_add_finished",
"appearance_manager",
"area_repository",
"artefact_feedback",
"ascii_esc",
"ascii_green",
"ascii_red",
Expand Down Expand Up @@ -2165,7 +2156,6 @@
"sounds_cache",
"spacevines_spawned",
"sparring_attack_cache",
"spells",
"splatter_cache",
"sqladdress",
"sqldb",
Expand Down
2 changes: 2 additions & 0 deletions code/_helpers/maths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
/// Value or the nearest multiple of divisor in either direction
#define Roundm(value, divisor) round((value), (divisor))

#define ATAN2(x, y) ( !(x) && !(y) ? 0 : (y) >= 0 ? arccos((x) / sqrt((x)*(x) + (y)*(y))) : -arccos((x) / sqrt((x)*(x) + (y)*(y))) )

// min is inclusive, max is exclusive
/proc/Wrap(val, min, max)
var/d = max - min
Expand Down
Loading
Loading