Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorDinamit committed Jan 20, 2024
1 parent e0a976c commit 3026ef0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions code/modules/spellbook/_spellbook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ GLOBAL_LIST_EMPTY(spells_by_categories)
dat += "<A href='byond://?src=\ref[src];purchase=[S]'>Purchase ([initial(S.spell_cost)] points)</a><br>"
else if(OS.level_max[UPGRADE_TOTAL] > 0)
var/up_count = 0
for(var/up_type in spell_levels)
up_count += spell_levels[up_type]
dat += "Maximum amount of upgrades: [up_count]/[OS.level_max[UPGRADE_TOTAL]]"
for(var/up_type in OS.spell_levels)
up_count += OS.spell_levels[up_type]
dat += "Maximum amount of upgrades: [up_count]/[OS.level_max[UPGRADE_TOTAL]].<br>"
for(var/upgrade_type in OS.spell_levels)
if(OS.level_max[upgrade_type] <= 0)
continue
Expand Down
3 changes: 1 addition & 2 deletions code/modules/spells/_spell.dm
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,7 @@
if(!user.mind)
return FALSE
var/mob/living/L = user
L.mind.mana.UseMana(L, amount, FALSE)
return TRUE
return L.mind.mana.UseMana(L, amount, FALSE)

/datum/spell/proc/invocation(mob/user = usr, var/list/targets) //spelling the spell out and setting it on recharge/reducing charges amount

Expand Down
2 changes: 0 additions & 2 deletions code/modules/spells/hand/_hand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@
/datum/spell/hand/proc/cast_hand(atom/a, mob/user) //same for casting.
if(!TakeMana(user, mana_cost_per_cast))
return FALSE
SEND_SIGNAL(user, COMSIG_SPELL_CAST_HAND, src, a)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_SPELL_CAST_HAND, user, src, a)
return TRUE

/datum/spell/hand/charges
Expand Down
2 changes: 2 additions & 0 deletions code/modules/spells/hand/_hand_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Basically: I can use it to target things where I click. I can then pass these ta
user.visible_message("\The [user][hand_spell.show_message]")
if(hand_spell.cast_hand(A,user))
next_spell_time = world.time + hand_spell.spell_delay
SEND_SIGNAL(user, COMSIG_SPELL_CAST_HAND, hand_spell, A)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_SPELL_CAST_HAND, user, hand_spell, A)
if(hand_spell.move_delay)
user.ExtraMoveCooldown(hand_spell.move_delay)
if(hand_spell.click_delay)
Expand Down

0 comments on commit 3026ef0

Please sign in to comment.