Apply suggestions from code review

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
warior4356
2021-07-15 18:44:23 -07:00
committed by GitHub
parent 15b32b7283
commit ba8052af3f
2 changed files with 5 additions and 3 deletions

View File

@@ -121,7 +121,8 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
var/critfailchance = 0
var/centcom_cancast = TRUE //Whether or not the spell should be allowed on the admin zlevel
var/holy_area_cancast = TRUE //Whether or not the spell functions in a holy place
/// Whether or not the spell functions in a holy place
var/holy_area_cancast = TRUE
var/datum/action/spell_action/action = null
var/action_icon = 'icons/mob/actions/actions.dmi'
@@ -563,7 +564,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
return 0
if(!holy_area_cancast && user.holy_check())
return 0
return FALSE
if(charge_check)
switch(charge_type)

View File

@@ -1461,7 +1461,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return
GLOBAL_LIST_INIT(holy_areas, typecacheof(list(
/area/chapel)))
/area/chapel
)))
/mob/proc/holy_check()
if(!is_type_in_typecache(loc.loc, GLOB.holy_areas))