diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm index dd97e33fda0..6b4e1cc9830 100644 --- a/code/__DEFINES/traits/declarations.dm +++ b/code/__DEFINES/traits/declarations.dm @@ -55,6 +55,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_FAKEDEATH "fakedeath" //Makes the owner appear as dead to most forms of medical examination #define TRAIT_XENO_HOST "xeno_host" //Tracks whether we're gonna be a baby alien's mummy. #define TRAIT_LEGION_TUMOUR "legion_tumour" //used in huds for special icon +#define TRAIT_NO_SPELLS "no_spells" // Used to prevent movement spells from being used as a brain /// Are we immune to shocks? #define TRAIT_SHOCKIMMUNE "shock_immunity" /// Are we immune to specifically tesla / SM shocks? @@ -177,7 +178,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// This trait makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted. #define TRAIT_NODROP "nodrop" - ///Movement type traits for movables. See elements/movetype_handler.dm #define TRAIT_MOVE_GROUND "move_ground" #define TRAIT_MOVE_FLYING "move_flying" diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index 722993ef185..54ad01b0fe2 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -109,6 +109,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_NO_SLIP_SLIDE" = TRAIT_NO_SLIP_SLIDE, "TRAIT_NO_SLIP_WATER" = TRAIT_NO_SLIP_WATER, "TRAIT_NO_SPECIES_EXAMINE" = TRAIT_NO_SPECIES_EXAMINE, + "TRAIT_NO_SPELLS" = TRAIT_NO_SPELLS, "TRAIT_NO_TRANSFORM" = TRAIT_NO_TRANSFORM, "TRAIT_OBESITY" = TRAIT_OBESITY, "TRAIT_OPEN_MIND" = TRAIT_OPEN_MIND, diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 96ba79c316e..0a525769ad5 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -593,6 +593,9 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) to_chat(user, span_warning("You shouldn't have this spell! Something's wrong.")) return FALSE + if(HAS_TRAIT(user, TRAIT_NO_SPELLS)) + return FALSE + if(!centcom_cancast) //Certain spells are not allowed on the centcom zlevel var/turf/user_turf = get_turf(user) if(user_turf && is_admin_level(user_turf.z)) diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm index 7a4d403aa4d..868ec6b857a 100644 --- a/code/datums/spells/wizard.dm +++ b/code/datums/spells/wizard.dm @@ -382,7 +382,6 @@ action.button_icon_state = "fireball[active]" action.UpdateButtonIcon() - /obj/effect/proc_holder/spell/fireball/cast(list/targets, mob/living/user = usr) var/target = targets[1] //There is only ever one target for fireball var/turf/T = user.loc diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 95668af8f1d..7bf60ec50dc 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -88,6 +88,7 @@ brainmob.set_stat(CONSCIOUS) brainmob.set_invis_see(initial(brainmob.see_invisible)) held_brain = brain + ADD_TRAIT(brainmob, TRAIT_NO_SPELLS, UNIQUE_TRAIT_SOURCE(src)) // Dont use spells, little brain. alien = istype(brain, /obj/item/organ/internal/brain/xeno) update_appearance(UPDATE_ICON_STATE|UPDATE_NAME) if(radio_action) @@ -188,6 +189,7 @@ GLOB.alive_mob_list -= brainmob//Get outta here held_brain.brainmob = brainmob//Set the brain to use the brainmob held_brain.brainmob.cancel_camera() + REMOVE_TRAIT(brainmob, TRAIT_NO_SPELLS, UNIQUE_TRAIT_SOURCE(src)) brainmob = null//Set mmi brainmob var to null held_brain.forceMove(dropspot) held_brain = null